Introduction: Wireless Powered Multi Color LED Lamp

About: I like to learn, like to make, like to share.

Led lamps are cool especially when you made yourself one. I designed a 3D printed multicolor LED lamp using Neopixel LED ring with ultra bright white LED. The lamp is completely waterproof and has an integrated wireless charger. So no hassle with charging cord. It has a tilt sensor and automatically goes off when you put upside down. In last few steps, I will share you how I made this nice lamp. Before starting to make yourself one watch the demo video what I made and how it works.

Step 1: Shopping List

1. Arduino Pro Mini (1 pc): The main controller unit for the lamp. You can use another version but I used it for the smaller form factor. Buy one:

2. Neopixel Ring (16 or 24 bit 1pc): Buy one:

3. Ultra white LED Panel: This is required to produce white light.

4. 5V Boost converter module: The output voltage of a Li-ion battery is 3.7V. For driving the circuit (Arduino & Neopixel ring) 5V supply is required. So to convert 3.7 V to 5 V a 5V boost converter is required.

5. Li-ion charger module ( For charging a Li-ion battery safely a charging module is required.

6. Li-ion Battery 500mAh

7. Coil for wireless charging: Two coils are required for wireless charging and I made the coils from 24AWG enameled copper wire.

8. 4 MOSFET (IRF540N): For a wireless charger, you need to provide AC voltage to the transmitter coil for producing alternating voltage. To produce an alternating voltage from a DC supply a switching circuit is needed. MOSFETs are used for a high power fast switching circuit.

9. Half-bridge MOSFET Driver (IR2104): Microcontroller pin cannot drive a MOSFETs directly. So a MOSFET driver is required to drive a MOSFET. IR2104 is a half bridge driver which can drive 2 MOSFET and 2 IC is required to make an H-bridge inverter circuit.

10. 555 Timer IC: Used for generating PWM signal for driving the MOSFET.

11. IR Sensor (LTH1550-01): Two IR sensors were used as touch buttons to control the color and brightness of the lamp.

12. BJT (2N2222): Two BJT were used to drive ultra bright led panel separately because bright white LEDs take enough current and Arduino pin cannot provide such current directly.

13. Hex Inverter (4069)

14. Resistor (100R, 15K X 2, 100K, 270 X 2, 1K X 2) & Capacitor (1uF X 4, 203pf X 2)


1. Soldering Iron

2. Glu Gun

3. Wire cutter

4. LCR Meter

5. Multimeter

6. Oscilloscope (optional)

7. 3D Printer

Step 2: 3D Printing

I print five separate parts of the lamp. Middle part should be print with natural PLA. Other parts can be any color according to your choice. Natural PLA is semi-transparent and good for lighting as light effect and LED diffusion passes easily through the transparent part. The thickness of the middle part and the bottom side ot the base part is 1.5mm thick. Other parts are 2mm thick. I printed all the parts using my Anet A8 3D printer. All the designed files are attached to the step in .stl format. I designed all the parts in web platform.

Step 3: Making the Circuit

I soldered two IR obstacle sensors in a small PCB board according to the diagram attached. These two sensors will work as touch button and works with the touch from the outside of the lamp surface. I added 8 ultra bright LED (.5W each) for pure white light and connected with two sections (4 in each) driven by two transistors. Two sections can be turned on and off separately and by this way, brightness can be controlled. The color of the Neopixel ring can be controlled by another touch button.

Step 4: Placing the LEDs on the Base

I placed all the white led panels to the middle orange ring with hot glue. I tried to keep equal distance among each led panel. Then I attached the Neopixel ring in right place. The image attached can explain the position more than I can.

Step 5: Connecting With Arduino

Neopixel ring has four pins (DIN, DOUT, 5V, GND). Last to pin connections are obvious and need not explain. The DOUT pin is for connection another Neopixel with it so we will leave it unconnected. The DIN pin is the data input pin for the ring and we will connect it to the Arduino pin #6. Pin 6 is the default pin of the Neopixel used in Neopixel library. After connecting the Neopixel ring connect the sensor circuit to Arduino. Two pins of the sensor circuit should connect with Arduino A0 and A1. I used analogRead() function of Arduino to read the sensor and set a threshold to the program to adjust the sensitivity of the switch. Two transistors should be connected to Arduino digital pin #7 and pin #8 for controlling the white LEDs.

After completing the connection upload the following sketch to Arduino pro mini and test it. If it works perfectly get ready for next step.


#define COLOR_PIN   A0
#define WHITE_PIN   A1    // Digital IO pin connected to the button.  This will be
                          // driven with a pull-up resistor so the switch should
                          // pull the pin to ground momentarily.  On a high -> low
                          // transition the button press logic will execute.

#define PIXEL_PIN    6    // Digital IO pin connected to the NeoPixels.

#define PIXEL_COUNT 16

// Parameter 1 = number of pixels in strip,  neopixel stick has 8
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_RGB     Pixels are wired for RGB bitstream
//   NEO_GRB     Pixels are wired for GRB bitstream, correct for neopixel stick
//   NEO_KHZ400  400 KHz bitstream (e.g. FLORA pixels)
//   NEO_KHZ800  800 KHz bitstream (e.g. High Density LED strip), correct for neopixel stick
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800);

bool colorOldState = HIGH;
bool whiteOldState = HIGH;
int showType = 0;
int showWhite = 0;
int state = 0;
void setup() {
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  strip.begin();; // Initialize all pixels to 'off'

void loop() {
  // Get current button state.
    colorWipe(strip.Color(127, 0, 0), 50);  // Red
    state = 1;
  if(state == 1){
    colorWipe(strip.Color(0, 0, 0), 50);
    state = 0;
  bool colorNewState = analogRead(COLOR_PIN)<450?LOW:HIGH;
  bool whiteNewState = analogRead(WHITE_PIN)<500?LOW:HIGH;
  // Check if state changed from high to low (button press).
  if (colorNewState == LOW && colorOldState == HIGH) {
    // Short delay to debounce button.
    // Check if button is still low after debounce.
    colorNewState = analogRead(COLOR_PIN)<500?LOW:HIGH;
    if (colorNewState == LOW) {
      if (showType > 10)

  if (whiteNewState == LOW && whiteOldState == HIGH) {
    // Short delay to debounce button.
    // Check if button is still low after debounce.
    whiteNewState = analogRead(WHITE_PIN)<500?LOW:HIGH;
    if (whiteNewState == LOW) {
      if (showWhite > 2)
  // Set the last button state to the old state.
  colorOldState = colorNewState;
  whiteOldState = whiteNewState;

void startShow(int i) {
    case 0: colorWipe(strip.Color(0, 0, 0), 50);    // Black/off
    case 1: colorWipe(strip.Color(255, 0, 0), 50);  // Red
    case 2: colorWipe(strip.Color(0, 255, 0), 50);  // Green
    case 3: colorWipe(strip.Color(0, 0, 255), 50);  // Blue
    case 4: colorWipe(strip.Color(255, 255, 0), 50);  // Yellow
    case 5: colorWipe(strip.Color(0, 255, 255), 50);  // Cyan
    case 6: colorWipe(strip.Color(255, 0, 255), 50);  // Megenta
    case 7: theaterChase(strip.Color(127, 127, 127), 50); // White
    case 8: rainbow(20);
    case 9: rainbowCycle(20);
    case 10: theaterChaseRainbow(50);

void startWhite(int i) {
    case 0: digitalWrite(7, LOW);
            digitalWrite(8, LOW);  
    case 1: digitalWrite(7, HIGH);
            digitalWrite(8, LOW);
    case 2: digitalWrite(7, HIGH);
            digitalWrite(8, HIGH);

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i

Step 6: Putting All Inside the Box

After completing the connection and uploading the program it is the right time to place all the LEDs and the circuits inside the lamp box. First, I placed the sensor circuit and then place the Neopixel ring with the middle orange part of the lamp inside the transparent part. I placed the boost converter inside the middle part, then I placed the transistor circuit. Then put the Li-ion charger circuit. Finally, I placed the Arduino pro mini board inside the box and attached all the components and wires in its place using hot glue. The following video can give you a clear view.

Step 7: Wireless Charging (Making the Coils)

WIRELESS power transfer (WPT) refers to a family of techniques for delivering power without wires or contacts. It was demonstrated firstly by MIT using inductive coupling the summer 2007. In 2008, Intel also achieved wireless power through inductive coupling.

I used inductive coupling method for Wireless charging of the lamp. In this project, oscillation circuit converts DC energy to AC energy(transmitter coil) to transmit magnetic field by passing frequency and then induce the receiver coil. The properties of Induction coupling are wave(magnetic field-wideband), range(very short~cm), efficiency(hight) and operation frequency(LF-band~several hundred kHz).Here I made a 5V charger for charging for a 3.7V Li-ion battery of the lamp in this method. The system bases on coupling magnetic field, then designed and constructed as two parts. There are transmitter part and receiver part. The transmitter coil (transmitter part) transmits coupling magnetic field to receiver coil (receiver part) by passing frequency at about 50KHz. The Ampere’s law, Biot-Savart law, and Faraday law are used to calculate the inductive coupling between the transmitter coil and the receiver coil. The calculation of this law shows how many power transfer in receiver part when how many distances between the transmitter coil and the receiver coil. The system is safe for users and neighboring electronic devices.

In this project, supply voltage 12 DC drives oscillator circuit as an h-bridge driver to operate transmitter coil. Then, the transmitter coil transmits coupling magnetic field by passing frequency at about 50KHz. In this state, there are AC voltage and the receiver coil receiver coupling magnetic field as AC voltage. A bridge rectifier with capacitor converts AC to DC voltage again to charge the battery of lamp.

The complete circuit diagram of the project can be divided into two different sections:

• Transmission section and

• Receiving section

Both sections require an inductive coil for producing magnatic flux.

Designing good coil is a very important thing. The efficiency of the charger depends on the coil. Coils determine the coupling factor and Q (quality) factor. Two coils should be identical for good coupling. The coupling between primary and secondary coils can be described by a coupling factor, k, a dimensionless number between 0 and 1. Coupling factor is equal to 1 if the secondary coil couples with all of the flux generated by the primary coil. The coupling between coils is highly sensitive to separation and alignment, however modeling the variation is not trivial, and mathematical derivations do not yield simple analytical expressions. A second important effect of a varying coupling factor is seen in the frequency response function of the coupled-tuned system.

For my project, I designed two coils using 14AWS enameled copper wire of 25 turns. The diameter of the coil is 60mm and I found the inductance 0.045mH. I used super glue to form the coil in a base.

Step 8: Making Transmitter Circuit

The circuit is designed based on Inductive coupling. Inductive coupling is based on magnetic field induction that delivers electrical energy between two coils. Inductive power transfer (IPT) happens when a primary coil of an energy transmitter generates a predominantly varying magnetic field across the secondary coil of the energy receiver within the field, generally less than a wavelength. The near-field magnetic power then induces voltage/current across the secondary coil of the energy receiver within the field. This voltage can be used for charging a wireless device or storage system. The operating frequency of inductive coupling is typically in the kilo Hertz range. The secondary coil should be tuned at the operating frequency to enhance charging efficiency. The quality factor is usually designed in small values (e.g., below 10), because the transferred power attenuates quickly for larger quality values. Due to lack of the compensation of high quality factors, the effective charging distance is generally within 20cm. Inductively coupled radio frequency identification (RFID) is an example that pushes the limit to extend the charging distance to tens of centimeters, at the cost of diminished efficiency (e.g., 1-2%) with received power in micro watt range. Despite the limited transmission range, the effective charging power can be very high (e.g., kilowatt level for electric vehicle re-charging). The advantages of magnetic inductive coupling include ease of implementation, convenient operation, high efficiency in close distance (typically less than a coil diameter) and ensured safety. Therefore, it is applicable and popular for mobile devices. Very recently, MIT scientists have announced the invention of a novel wireless charging technology, called MagMIMO, which can charge a wireless device from up to 30cm away. It is claimed that MagMIMO can detect and cast a cone of energy toward a phone, even when the phone is put inside the pocket.

In this project, the wireless charger works mainly on the principle of inductive coupling. With this inductive coupling idea, we are trying to transfer power wirelessly to charge low power devices, such as mobile phones, cameras, wireless mouse etc.
From the block diagram, it is clear that for the overall functioning of wireless charger circuit, it required a wireless power transmitter & a wireless power receiver sections. The transmitter coil in this wireless power transmitter section converts the DC power from an oscillator to a high frequency AC power signal. This high frequency alternating current, which is linked with the wireless power transmitting coil, would create an alternating magnetic field in the coil due to induction, to transmit energy. In the wireless power receiver section, the receiver coils receives that energy as an induced alternating voltage (due to induction) in its coil and a rectifier in the wireless power receiver section converts that AC voltage to a DC voltage. Finally this rectified DC voltage would be feed to the load through a voltage controller section. That is, the wireless power receiver section’s main function is to charge a low power battery through inductive coupling.

The Transmitter section of wireless charger circuit consists of a DC power source, oscillator and a transmitter coil. A constant DC voltage is provided by a DC power source, and this DC signal is the input to the oscillator circuit. This oscillator converts this DC voltage to a high frequency AC power, and is supplied to the transmitting coil. Due to this high frequency AC current, the transmitter coil energizes, and generates an alternating magnetic field in the coil.

DC power Source: It consists of a step down transformer that step downs the supply voltage to a desired level, and rectifier circuit to convert that AC voltage to DC signal. Another good option is a switch mode power supply. I used here a 12V SMPS.

Oscillator Circuit: The transmitter circuit consists of DC source, oscillator circuit, and a transmitter coil. oscillator circuit consists of four n channel MOSFETS IRF540 (4 pcs) , 4148 diodes (provide cross-coupled feedback), 1uF capacitors, 102pf capacitor (works as a resonating capacitors, connected in series with the coil), 555 timer (PWM generator) and a hex inverter 4069.. When the 12 DC power is given to the oscillator, current starts flowing through the coil and drain terminal of the transistor. Current flows through the coil in either direction and the frequency is controlled by the PWM signal from 555 timer IC. I set the PWM frequency at 50KHz (determined by using formula F=1/[2π√(LC)]).

Step 9: Making Receiver Circuit

The receiver section consists of receiver coil (identical to the transmitter coil), rectifier circuit (using ultra-fast diode) and a voltage regulator IC. The AC current flowing through the transmitter coil creates a magnetic field. When we place the receiver coil with in a specific distance from this transmitter coil, the magnetic field in the transmitter coil extends to this receiver coil, and it induces an AC voltage and generates a current flow in the receiver coil of the wireless charger. The rectifier circuit in the receiver section converts this AC voltage in to DC and the voltage regulator IC helps to provide a constant limited regulated output voltage to the load for charging the low power devices. Here we are using LM 7805 voltage regulator IC. It is used because the IC gives a regulated 5V as its output and it don’t allow more than 5V to the output. 5V output is required for the charging circuit of the Li-ion battery charger circuit. The regulator output is fed to the input of the charger circuit.

The receiver circuit is placed inside the lamp at the bottom part. Placing is shown in the images.

Step 10: Completed

I attached some photo of the lamp. When I placed the lamp on the transmitter coil of the wireless charger circuit it starts to charge. The red color of the LED lamp indicates that it is charging. The receiver circuit is attached with the orange part of the lamp. So, the orange side must be placed down when charging.

Homemade Gifts Contest 2017

Participated in the
Homemade Gifts Contest 2017

LED Contest 2017

Participated in the
LED Contest 2017

Wireless Contest

Participated in the
Wireless Contest