ZipLight

by rmo in Circuits > LEDs

673 Views, 5 Favorites, 0 Comments

ZipLight

Group 16.jpg

My project is called ZipLight, a sound-sensitive smart desk lamp. When the surrounding noise exceeds a set threshold, the lamp automatically turns off, humorously signaling, “You don’t deserve to study.” It’s designed for libraries or quiet study spaces, reminding people to keep noise levels down.

I’m now using the Arduino Uno as the main controller, which connects to a sound sensor, a transistor, and an LED strip. The Arduino Uno provides standard 5V power and a familiar pin layout, making wiring straightforward. The PAUTIX COB LED strip provides soft, energy-efficient lighting, while the sound sensor detects noise levels. The transistor acts as a switch to control the lamp’s brightness based on the noise threshold.

The lamp is powered via USB, making it simple and practical. With its clean design and functional features, ZipLight is both a fun and effective companion for focused studying!

Supplies

1111.jpg
IMG_1540.jpg
IMG_1555.jpg
IMG_1556.JPG

Electronics:

  1. Arduino Uno (microcontroller board)
  2. PAUTIX COB LED Strip Light (5V, USB-powered, cut to desired length)
  3. GY-MAX4466 Electret Microphone Amplifier (sound sensor module with adjustable gain)
  4. NPN Transistor (DGS configuration, e.g., 2N2222 or similar)
  5. 1kΩ Resistor (for the base of the transistor)
  6. Jumper Wires (for connections)

Power and Connections:

  1. USB Cable (to power the Arduino Uno from your computer)
  2. Breadboard (for prototyping connections)

Tools:

  1. Wire Cutters and Strippers
  2. Soldering Iron (if needed for secure connections)

Materials for Assembly:

  1. Lamp Structure: 3D-printed
  2. Adhesive or Screws (to secure components inside the lamp structure)

Miscellaneous:

  1. Heat Shrink Tubing or Electrical Tape (for insulating connections)
  2. USB Power Source

3D Modeling the Lamp

截屏2024-12-10 下午10.26.57.png
lamp4.330.png

In this step, we will design the lamp in three separate parts: the lampshade, the stand, and the stand connector. Each part is modeled independently to ensure modularity and ease of assembly. Here's how:

  1. Lampshade:
  2. Design a dome or cone-shaped structure to house the LED strip light.
  3. Add cutouts or grooves for the light to shine through or to fit ventilation if necessary.
  4. Ensure there’s a mechanism (like screw threads or clips) for attaching the lampshade to the stand connector.
  5. Stand:
  6. Create a sturdy vertical pole or support to hold the lampshade at an appropriate height.
  7. Design the base to provide stability. This could be a flat circular or rectangular shape.
  8. Add channels or hooks for cable management if desired.
  9. Stand Connector:
  10. Model a connector piece to join the stand and lampshade securely.
  11. Include slots or screw holes for fixing the lampshade and stand together.
  12. Ensure it allows for easy disassembly if required.

Once the models are complete, export the files in STL format for 3D printing. Ensure the dimensions align properly so the parts fit together seamlessly during assembly.

Wiring the Circuit

截屏2024-12-10 下午10.39.24.png
IMG_1555.jpg
  1. Prepare the Components:
  2. Arduino Uno, GY-MAX4466 sound sensor, LED strip, NPN transistor, 1K resistor, wires.
  3. Connect the LED Strip:
  4. Negative wire → Transistor collector (C).
  5. Positive wire → Arduino Uno 5V pin.
  6. Set Up the Transistor:
  7. Transistor base (B) → Arduino pin 9 via 1K resistor.
  8. Transistor emitter (E) → Arduino GND.
  9. Wire the Sound Sensor:
  10. VCC → Arduino 5V pin.
  11. GND → Arduino GND.
  12. OUT → Arduino A0 pin.
  13. Power the Arduino:
  14. Connect the Uno to a computer using a USB cable.

Ready for programming and testing!

Coding

// Define pins

#define SOUND_SENSOR_PIN 2 // The sound sensor digital output is connected to digital pin 2

#define LED_STRIP_PIN 9 // The LED strip positive terminal is connected to digital pin 9


void setup() {

Serial.begin(9600); // Initialize serial communication

pinMode(SOUND_SENSOR_PIN, INPUT); // Set the sound sensor as an input

pinMode(LED_STRIP_PIN, OUTPUT); // Set the LED strip control pin as an output

digitalWrite(LED_STRIP_PIN, HIGH); // Ensure the LED strip is off by default

}


void loop() {

// Check the sound sensor for high or low signals

int soundDetected = digitalRead(SOUND_SENSOR_PIN);


// If sound is detected (high signal)

if (soundDetected == HIGH) {

Serial.println("Sound detected! LED strip blinking...");

// Blink the LED strip for 2 seconds

for (int i = 0; i < 10; i++) { // Blink 10 times, 200ms per blink

digitalWrite(LED_STRIP_PIN, LOW); // Turn on the LED strip

delay(100); // Wait for 100ms

digitalWrite(LED_STRIP_PIN, HIGH); // Turn off the LED strip

delay(100); // Wait for 100ms

}

} else {

1111.jpg
IMG_1444 2.JPG
IMG_1447 2.jpg

Prepare the Parts for Painting


Ensure all parts (lamp shade, stand, and connection part) are clean and free from dust

lightly sand the surfaces to create a smoother texture for painting.

Spray Paint the Parts


Choose a spray paint that is suitable for the material you're using (e.g., plastic or metal).

Apply light coats of paint, allowing each coat to dry before applying the next one.

Let the painted parts fully dry before handling them further.

Assemble the Lamp Components


Once the paint has dried, begin assembling the parts:

Attach the lamp shade to the stand using the connector part.

Secure all parts firmly using screws or glue, depending on the design.

Check for Stability


Make sure all parts are securely attached and that the lamp is stable. Adjust or tighten as needed.

Final Touches


Once assembled, check the overall appearance and make any final adjustments. You can add additional details or decorations if desired.