Sunday, November 1, 2026

November 1st Clock Project ; Neopixels- Ed Moriarty- from Whats App



Project Members: Kassia and Stanley

Clock Project Materials

  1. 20ft Neon Rope Light (https://a.co/d/07Wv8LGq) x2

  2. Hicarer Quartz Clock Mechanism (https://a.co/d/0ayWk703) x2

  3. 14 INCH Circle Wood Panel (https://a.co/d/02dNcepE) x2

  4. 14 in Diameter 1/8" Acrylic Circle Sheet (https://a.co/d/0g4jJQRN) x2

  5. ESP32 Devkit C Development Boards (https://www.amazon.com/dp/B089F6LRBS?plpRedirect=mhFallback&ref=clp_hp_h_pc) x2

    1. 16.4 FT 300LED Strip (https://www.amazon.com/dp/B088FJF9XD?niid=nl_cl_lst_a_1_1&ref_=nl_cl_lst_a_1_1&nrid=F34K766AX534CASHDN1X&th=1) x2

  6. 5V batteries (still not too sure on what power source we want for the clocks [wall plug, power bank, lithium battery, etc.)

    Response by  Jonathan:

    Quartz clock mechanisms are powered by their own battery, typically an AA

    ESP32's can be powered by 5-9V on Vin, 5V on the 5V pin, or 3.3V on the 3.3V pin. Since Neopixels are happiest at 5V, I would recommend powering the whole system with 5V, using a USB cable or a 5V power adaptor. Since Neopixels can draw a lot of power, I would recommend a 5V 3A DC adaptor

NeoPixels powered by 5v ideally need a 5V data signal. If using a 3.3V microcontroller you must use a logic level shifter such as a 74AHCT125 or 74HCT245. See the “Logic Level Shifting” page for more details. If you are powering your NeoPixels with 3.7v directly from a LiPoly cell, a 3.3v data signal is OK.

 

       Listed Neon rope uses a 24V 24W power supply

Ed's MIT LED Project

  • We were hoping there was a previous compiled list of materials to make the project again. We talked with Ed a bit about this, but we were thinking to make the project more portable (and therefore smaller) to carry around and gift to schools, but I don't think we settled on that idea just yet.

Clock Questions:

  1. How do I program an ESP32 Board using Arduino in order to program LED lights to turn a certain color?

  2. How do we connect the LED light to the ESP32 Board to manually change color?

  3. Could we send a message along with a change in color from one clock to another?

  4. How can I permit communication both ways?

  5. How can we creatively design a clock design with numbers and utilize the circular acrylic sheets effectively in the overall appearance of the clock?

Ed's MIT LED Project Questions:

  1. How can we concise the model such that it can be portable or hand held?

  2. How can we use the model we have now to improve on the functionality of the LED Diodes and sensors (i.e. the communication between diode and sensors is really rough, likely due to the outline of the acrylic?)

  3. How could we personalize the model to each school as a gift? Detachable part of the model?

Jonathan's Project Questions:
  1. Why use an ESP32? Are you controlling this remotely?
  2. 2. What is the neon rope for?  the one listed uses its own 24V controller, and cannot be connected to a microcontroller.
------------------------------------------------

For the standard AILBTON 20FT Neon Rope Light, the short answer is no, it cannot be controlled directly using Adafruit NeoPixel / FastLED addressable software.

However, it can be controlled by a microcontroller using standard analog PWM drive circuitry.

Why It Doesn't Work with NeoPixel Software

  1. Analog RGB vs. Digital Addressable (NeoPixel/WS2811):

    • This specific AILBTON neon light uses the Lotus Lantern app ecosystem with simple DC 24V RGB drive.

    • It is an analog 4-wire LED strip (+24V, R, G, B) rather than a digital addressable strip. The entire 20-foot rope changes to one color at a time across the whole length; individual LEDs do not have integrated driver ICs (such as WS2811, WS2812B, or SK6812) to decode digital data pulses.

    • The Adafruit NeoPixel library sends high-speed single-wire NRZ timing signals (DATA_IN). Because this strip lacks digital decoder ICs, it cannot read or respond to a NeoPixel data line.

  2. Operating Voltage:

    • This strip operates at 24V DC. Direct logic outputs from a 3.3V or 5V microcontroller will not drive it.

How to Control It with a Microcontroller

While you cannot address individual segments or run NeoPixel chases, you can fully control the overall color, brightness, and fading transitions using a microcontroller (such as an ESP32 or Arduino) via PWM (Pulse Width Modulation):

Plaintext
Microcontroller (3.3V / 5V)
   PWM Pin R ----[ Gate ]--> Logic-Level N-Ch MOSFET ---> Strip R- (Ground switch)
   PWM Pin G ----[ Gate ]--> Logic-Level N-Ch MOSFET ---> Strip G- (Ground switch)
   PWM Pin B ----[ Gate ]--> Logic-Level N-Ch MOSFET ---> Strip B- (Ground switch)
   GND ---------- Common Ground with 24V Supply

24V 2A–3A Power Supply:
   +24V -------------------------------------------------> Strip +24V (Common Anode)
   GND  -------------------------------------------------> MOSFET Sources & MCU GND
  • Hardware Needed:

    • 3× Logic-level N-channel MOSFETs (e.g., IRLZ44N, AO3400) or a dedicated low-side MOSFET module/shield.

    • Common-ground reference between the MCU and the 24V supply.

  • Firmware:

    • Standard analogWrite() (on Arduino) or ledcWrite() (on ESP32) to generate PWM on the red, green, and blue gates.

------------------------------------------------

WS2811 Smart Addressable Individually Pixel Strip Light DC 12V 24V LED Neon Flexible Bar Club Multi-color LED Strips Lighting-- 

1. The "Individually Addressable" Quirk (12V / 24V Pixel Grouping)

In standard 5V strips (like WS2812B), each physical LED package contains its own IC and acts as one individual pixel. In higher voltage strips:

  • 12V WS2811: Typically controls 3 LEDs in series per 1 WS2811 IC. One "pixel" in code illuminates a 3-LED segment together.

  • 24V WS2811: Typically controls 6 LEDs in series per IC.

  • Software impact: If you have a strip with 300 physical LEDs run at 12V with 3 LEDs per IC, your code should define 100 pixels, not 300.

2. Microcontroller Wiring Architecture

To wire a 12V/24V WS2811 strip:

  1. Common Ground (GND): Connect the - / GND terminal of the external 12V/24V DC power supply to the strip's GND and to the microcontroller's GND pin. Without a shared ground reference, the data signal cannot be decoded.

  2. Data Line Protection: Connect your chosen GPIO pin to the strip’s DIN (Data In) wire through an inline 330 Ω – 470 Ω resistor close to the strip.

  3. Power Filtering: Place a 1000 µF capacitor (rated for at least 25V for a 12V setup, or 35V–50V for a 24V setup) across the + and - terminals where power enters the strip to smooth inrush spikes.

  4. Logic Level (3.3V vs 5V):

    • An Arduino Uno / Mega (5V logic) can drive the WS2811 DIN line directly.

If using a 3.3V microcontroller (ESP32, RP2040, etc.), WS2811 chips typically expect $V_{IH} \ge 0.7 \times V_{DD}$. Because internal IC regulation on 12V/24V strips commonly runs at 5V logic internally, 3.3V GPIO signals can occasionally produce flickering on long wire runs. If erratic flashing occurs, route the GPIO through a fast 3.3V-to-5V level shifter (e.g., 74AHCT125 or 74HCT245).
-----------------

Simple Code Example:

#include <Adafruit_NeoPixel.h>

#define LED_PIN 6 // Your GPIO data pin
#define NUM_PIXELS 100 // Number of ICs / pixel groups (NOT individual LED diodes)

// WS2811 strips typically use NEO_GRB or NEO_BRG at 800 KHz (NEO_KHZ800)
Adafruit_NeoPixel strip(NUM_PIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
strip.setBrightness(150); // Set brightness (0 to 255)
}

void loop() {
// Turn first pixel group red
strip.setPixelColor(0, strip.Color(255, 0, 0));
strip.show();
delay(500);
}

-----------------------------------------

Tuesday, October 27, 2026

October 27th- Class Canceled; Items for Next Week

Questions for Students:

  1. What project are you planning to work on?  Laser Harp? Optical Music Box?


  2. Who is working on the project? Students are encouraged to work in groups

  3. Download the Arduino IDE ( Integrated Development Environment) and install it on their own computers.  Watch the intro video at https://youtu.be/zfp0IJoXcFg

  1.  Bring laptops to next week’s class.


    For next week:

Review Project Plans and needed parts, such as:
    • Laser Diodes
    • IR Sensors
    • Microcontroller
    • MIDI Board
    • Speakers
    • Power Supply
    • Paper transport for Music Box
    • Laser Harp Frame
Lab activities: 

-----------------------------------------------------------------------------------

AI-generated Course Overview & Prerequisites

  • Target Audience: Freshmen
  • Duration: 4 sessions (approximately 90–120 minutes each).
  • Core Concepts: Voltage dividers, analog sensing, sound generation (tone() vs. MIDI), conditional logic, and physical alignment.
  • Hardware Kit (Per Team of 2):
    • 1 × Arduino Uno (or Nano) + USB cable
    • 1 × Half-size or full-size breadboard
    • 4–6 × 5V 650nm Red Laser Diode modules (Class 2 / Class 3R, 5mW maximum)
    • 4–6 × Light Dependent Resistors (LDRs / Photoresistors) or LDR modules
  • LDR2.jpeg
    • 4-6 IR line sensors
  • Principle-of-working-of-IR-sensor.jpg
    • 4–6 × 10kΩ Resistors (for voltage dividers)
    • 1 × Passive or active piezo buzzer (or 3.5mm audio jack for external speaker)
    • Jumper wires & cardboard/foam-board/laser-cut wooden frame

Session-by-Session Instructional Sequence

1.Optical Sensing & Safety Fundamentals: 


  • Prerequisite safety check: Class 2/3R eye safety rules must be briefed first.

  • Objective: Understand how an LDR detects light intensity changes and wire a stable voltage divider circuit.
  • Safety Briefing: Never look directly into the laser beam or point it at reflective surfaces; ensure all laser modules are powered off until mounted.
  • Hands-on Task:
    1. Build a voltage divider with a single LDR and a 10kΩ resistor connected to pin A0.
    2. Upload a simple analogRead() sketch and observe ambient light values via the Arduino Serial Plotter.
    3. Aim a handheld laser pointer at the LDR to determine the "hit" threshold vs. "blocked" threshold.

2.Sound Generation & Single-String Prototype:

  • Objective: Translate an interrupted light beam into a distinct musical note.
  • Hands-on Task:
    1. Wire a piezo buzzer to digital pin 8.
    2. Introduce Arduino's built-in tone(pin, frequency) function.
    3. Write a threshold conditional statement:

      Arduino Code sample:

      if (analogRead(A0) < threshold) {
        tone(8, 262); // Middle C
      } else {
        noTone(8);
      } 
Test interrupting the beam with a finger to verify immediate response latency and calibrate ambient light sensitivity.

3.Scaling to Multiple Strings & Code Architecture:
  • Objective: Scale the circuit from 1 to 4–6 strings without writing repetitive code.
  • Hands-on Task:
    1. Duplicate the LDR + 10kΩ voltage divider across pins A0 through A4.
    2. Refactor code using arrays for pins and musical frequencies:
      const int sensorPins[] = {A0, A1, A2, A3};
      const int notes[] = {262, 294, 330, 349}; // C4, D4, E4, F4
Implement an automatic calibration routine inside setup() that reads ambient levels for 2 seconds to calculate dynamic trip thresholds.

4.Chassis Integration & Final Performance:
  • Objective: Mount components to an enclosure, align optical paths, and polish interaction.
  • Hands-on Task:
    1. Assemble a cardboard, wood, or 3D-printed C-frame.
    2. Mount laser diodes on the top arm and LDRs inside recessed channels (baffles or heat-shrink tubing) on the bottom arm to shield them from ambient room lighting.
    3. Align laser dots to photoresistors and test multi-beam chord or melodic playback.
    4. Extension Option: Swap the piezo buzzer for a MIDI-over-USB library to trigger digital instruments inside software like GarageBand or Ableton Live.

      Common Pitfalls & Troubleshooting Checklist
  • Ambient Light Interference: Overhead fluorescent or LED lighting can trigger false positives. Wrap heat-shrink tubing or black paper collars around each LDR to create a narrow field of view.
  • Beam Misalignment: Fixed frames flex. Ensure the laser mounts have slight mechanical tolerance or set-screws for manual beam adjustment.
  • Monophonic Limits of tone(): Arduino's standard tone() function can only generate one frequency at a time. Remind students that simultaneous multi-beam playing requires MIDI output to an external synthesizer or a multi-channel audio shield.

 






Nov 3rd Class- Experimenting with Neopixels; MIDI Prototyping

Above: Kerem makes calculations...  The planned projects seemed to have coalesced into two projects: Project 1(Stanley-Kexin-Rohan) is a clo...