RGB / RFID Lamp

by pchretien in Circuits > Arduino

29394 Views, 328 Favorites, 0 Comments

RGB / RFID Lamp

all_colors800.jpg
Making the Scary Monkey Project project with my son has been a lot of fun so I decided to make another project for the kids. I built an interactive RGB lamp. The lamp has no switch and no dimmer, it’s entirely controlled with radio frequency identification (RFID) tags. The RFID reader is hidden in the lamp body and the RFID tags are embedded in colored wooden disks.

You can change the color of the lamp by placing a colored disc into the circular recess in front of the lamp body. When no disc is placed in the receptacle, the lamp changes color randomly. Place the white disc to produce a white light and the black disk to turn off the lamp. You can also turn the lamp into a stroboscope or produce other special effects by combining different sequences of colors.

The body of the lamp and the RFID disks are made out of scrap wood I had in my shop. The shade is made from a transparent drawing tube and tracing paper.

The Material

There are many different ways this project can be built. The following list only includes the essentials electronic components required for the project.

  • RGB LEDs strip
  • 3 N-Channel Mosfet transistors
  • RFID reader and tags.
  • One 3mm or 5mm LED
  • Arduino micro-controller
  • Piezo speaker (optional)

The Circuit

rgbrfid3_bb.jpg
20130915_121741.jpg
20130915_121809.jpg
20131028_100051.jpg
20131026_103147.jpg
20131026_103200.jpg
20131026_103229.jpg
20131105_205147.jpg
The circuit for this project has many uses:
  • Drive the three color channels (RGB) of the LED strip
  • Read data sent by the RFID reader
  • Drive the "ready" LED
  • Send tones to the piezo speaker if any
Since all this is controlled by an Arduino micro-controller, building the circuit as an Arduino shield would make it more compact and reusable. The arduino shield PCB design will be explained in the next section.

The RGB channels are driven by the Arduino pulse with modulation (PWM) output pins 3, 5 and 6. The three Arduino logic pins are connected to the gate of three N-Channel Mosfet transistors. You can control the intensity of each channel by writing values from 0 to 255 on any of these pins.

The RFID reader communicates with the Arduino micro-controller through a serial connection. I wanted to be able to re-program the lamp without having to disconnect the RFID reader so I decided to use the SoftwareSerial library. This library allows you to use the IO pin of your choice for serial communication, freeing the pins 0 & 1 for communication with the computer. I used pins 8 and 9 of the micro-controller to communicate with the RFID reader.

The power is provided by a 12v 600mA wall transformer. The 12v pin of the transformer is connected to the power wire of the LED strip and to the Vin pin of the Arduino.

I added a small LED to indicate when the RFID reader is ready to read a new tag. This LED is connected on pin 7 of the Arduino micro-controller. Finally, an optional piezo speaker can be attached to pin #10 of the Arduino bord to integrate sounds in the project. The "ready" LED and the piezo are optionals.

Custom Arduino Shield

20131027_145445.jpg
20131027_154002.jpg
20131027_145000.jpg
20131027_155852.jpg
20131027_160419.jpg
20131027_163501.jpg
20131027_185840.jpg
20131027_192649.jpg
This project was a perfect fit for a custom Arduino shield. I designed the shield using Fritzing, an open source application that allows you to build your circuit and PCB at the same time. The circuit has been designed as a single side PCB shield. You can find the Fritzing project on my Github repo at: https://github.com/pchretien/rgbrfid

Woodworking

20131027_140859.jpg
rgbrfid1.png
20131020_131559.jpg
20131020_132626.jpg
20131020_132756.jpg
20131020_132904.jpg
20131020_133343.jpg
20131020_133652.jpg
20131020_133845.jpg
20131020_134854.jpg
20131020_134209.jpg
20131020_134902.jpg
20131020_135300.jpg
20131020_140458.jpg
20131020_141051.jpg
20131021_184405.jpg
20131021_184505.jpg
52a901ea9d29c9a5540000d9.jpg
20131022_180516.jpg
20131022_185752.jpg
20131023_110103.jpg
20131024_212034.jpg
20131026_143844.jpg
20131027_115757.jpg
20131027_115815.jpg
I love woodworking and I love electronics so mixing both into a single project was pure fun. I used Stketchup to do draw the lamp and test the design. The plans are available on my Github account at https://github.com/pchretien/rgbrfid.

To build the body of the lamp I cut two pieces of 1/4" plywood and four pieces of 3/4" pine. To cut the shape of the lamp I printed a 1:1 template of the lamp using a TOP / Wire-frame view in Sketchup and glued it on top of the boards. To make sure the boards stayed aligned during cutting, I put some carpet tape between all pieces. (this trick from the best woodworking show on Youtube http://www.woodworkingformeremortals.com).

Once the shape of the lamp is cut, remove the two plywood boards and trace a line 3/4" inside the outline of the lamp. Again, using the band-saw, cut the inside of the lamp. It's now time to sand all the pieces and apply several coats of spay paint.

The six wooden disks are cut from a piece of 1/4" plywood. Each disk is made gluing two 1/4" disks together. Do not forget to place the RFID tags between the two pieces of plywood. I used a 1 1/2" Fostner bit to make a shallow recess to fit the RFID tags. Sand and paint the disks with the colors of your choice.

Finally, I used a PVC pipe to hold the LED strip. I painted it white, cut a hole on top of the lamp and placed the pipe into the hole with epoxy glue.

Assembly Instructions

20131028_185616.jpg
20131105_205247.jpg
20131105_205753.jpg
20131028_100115.jpg
20131028_100103.jpg
20131105_205201.jpg
20131105_205610.jpg
I assembled the lamp with my son... Here is an overview of the process ... I may have forgot some steps ... I write these by memory.

  1. Wrap the LED strip around the PVC pipe and mark where it should be glued to cover the whole length of the pipe
  2. Glue the LED strip onto the pipe and pass the wires through a hole at the bottom of the pipeAttach the RFID reader under the disk holder with small wood screws
  3. Attach the Arduino to the bottom of the lamp
  4. Glue the small LED in the center of the disk receptacle through a small hole
  5. Strip the transformer connector, pass it through a hole on the back of the lamp and make a knot
  6. Connect all the wires and connectors to the Arduino shield
  7. Screw the bottom of the lamp and install the rubber pads
  8. Et voilà!

Done!

20131105_210049.jpg
20131105_210117.jpg
20131105_210135.jpg
20131105_210157.jpg
20131105_210020.jpg
20131105_210239.jpg
Your lamp is ready! The kids love this lamp! They asked for new "hidden" features. When presented with a specific sequence of colors, the lamp enter into special modes changing colors and playing music.

This project was first published on my blog (http://www.basbrun.com). The whole project is open ... You can have all the code and schematics on my Github account at https://github.com/pchretien/rgbrfid.

Feel free to fork, copying is not a crime!