Project Perspective
DIY Heng Balance Lamp is an innovative and creative magnetic balance lamp project. By focusing on the essential building blocks—the neodymium magnets and NeoPixel LEDs—you'll learn how to communicate using a specialized magnetic switch and a robust hardware setup.
Technical Implementation: Magnets and Color Loops
The project focuses on creating a high-performance and user-friendly balance lamp:
- Magnetic Control layer: Two Neodymium Magnets act as the lamp's physical switch; when they are brought close enough to each other, they trigger a magnetic reed switch or a small tactile button hidden in the structure.
- Lighting layer: Using WS2812B NeoPixel LEDs, the Arduino can individually address and control the color and brightness of each pixel along the lamp's curved frame.
- Micro-controller layer: The Arduino Uno Wifi Rev.2 manages the switch states and coordinates the high-speed LED animation sequences.
Hardware Infrastructure
- Arduino Uno Wifi Rev.2: The "brain" of the project, managing the magnetic switch input and coordinating the LED lighting tasks.
- WS2812B RGB LEDs: Providing a clear and playful visual feedback for the lamp's balance-based interaction.
- Neodymium Magnets: Providing a smooth and tactile way to manually turn the lamp on or off.
- 3D Printed Frame: A custom-designed frame that houses all of the electronics and magnets.
- 5V Phone Charger: Provides a stable power source for the Arduino and its LED strip.
- Jumper Wires: Connect all the components together.
Interaction Step-by-Step
The balance lamp's interaction is designed to be very user-friendly:
- Initialize Hardware: Correctly seat the NeoPixel strip and the magnetic assembly in your 3D-printed frame.
- Setup Animation: Upload the LED control code using the FastLED library in the Arduino IDE.
- Poll Switch: The Arduino constantly measurements the state of the magnetic switch and triggers the "on" animation when the two magnets are in balance.
- Visual Feedback Integration: Watch as the NeoPixels automatically light up one-by-one with a smooth, warm orange glow when the magnets meet.
Future Expansion
- OLED Status Dashboard Integration: Add a small OLED display to show the current lamp brightness and the number of times it has been "balanced."
- Cloud Interface Synchronization Registration: Add a WiFi module (ESP8266/ESP32) and link to a cloud dashboard to track the lamp's usage from your smartphone.
- Multi-LED Color Sync Support: Connect several lamps and use one magnet to control all their colors and brightness levels simultaneously over WiFi.
- Advanced Velocity Profile Dashboard: Design a custom Android or iOS app with a slider to control the lamp's color and pulse patterns precisely via Bluetooth.