Lets start off by saying that I am a noob to micro controllers like Arduino. After looking through instructables for a while I saw the things that arduino could do. That is when I realized that I had to get one and learn the whole process of programming. So having said that I will now move onto my first instructable build.
UPDATE!! IF YOU HAVE UPGRADED TO ARDUINO 1.0 THE WAVE LIBRARY WILL NOT WORK!!! I AM CURRENTLY LOOKING FOR A FIX TO THIS. IN THE MEAN TIME PLEASE USE THE OLDER VERSION OF ARDUINO SOFTWARE OR IF YOU CAN HELP WITH THE FIX PLEASE POST!!
I decided to create a singing pumpkin display for Halloween. I got the idea from http://www.instructables.com/id/Singing-PumpkinsParallel-Port-Relay-Box/ I did’t have a parallel port but I had an arduino, sound shield and lots of patience. I used the song “This is Halloween” from Nightmare Before Christmas, wrote the code and built a relay board. I will go over how I did this later. Even though it took a lot of work the final result is well worth it! Video is posted in last step.
CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!! CAUTION!!
THIS PROJECT DEALS WITH HIGH VOLTAGE. IF YOU ARE NOT CAREFUL YOU COULD GET SERIOUSLY INJURED.
IF YOU ARE NOT COMFORTABLE WITH THAT PORTION OF THE PROJECT, PLEASE GET SOMEONE TO HELP.
Step: 1 Things you will need
Things you will need:
Arduino ( I used the uno with smd chip)
8 pumpkins with light socket and cord( the more styles the better )
flicker bulb set ( available at HD Christmas isle)
wire ( low voltage, electrical cord )
9 diodes- Vr/50v Io/1A T/R. Mfg P/N: 1N4001
9 10k OHM 5% 1/4W carbon film resistors
9 330 OHM 1/6W carbon film resistors
9 transistors- 600mA 75V NPN ON Semi Bipolar Small Signal Mfg P/N; P2N2222AG
9 leds 3v
Plastic box ( for relay board and outlets )
Small plastic box ( protection for arduino and sound shield )
9v wall wart (adapter)
For the relay board set up I needed 9 relays that control 110v. That ‘s 8 for the pumpkins and 1 for the flicker bulbs that will run In standby mode. The relays I used are 5v input and 110v 12a output. The relays are wired to be controlled by the arduino but they are powered by a wall wart ( transistors are perfect for using a low voltage to control a higher voltage ). The circuit is simple( as you will see in upcoming steps). The arduino sends a signal to the 10k resistor which is connected to the center pin of the transistor. This will use the transistor as a switch to connect the negative from the wall wart to the relay pin by switching the ground.
Step: 2 Relay board 1
For this step I laid out my relays so I could get an Idea of how I wanted it to be. The relay I used had the load pin in the middle and it did not fit into the preff board so some drilling was needed ( see pic ). Now it’s time to place relays and solder them. Once the relays are all soldered we can now move on to placing the other parts. I started with the diode. Even though relays have no polarity the diode will change that ( diodes let the juice flow one direction ) and that will keep the voltage from bouncing back where it shouldn’t be.
Step: 3 Relay board 2
At this point I added the transistor and first resistor (10k). Since the transistor switched a ground or negative I placed it so the output pin is connected to the diode negative or ground side. ( side without stripe ). The resistor is connected to the signal pin of the transistor this pin is used to control the internal switch.
In the next picture I added the second resistor (330k). This is used to limit or resist the voltage to the led. In the picture it looks like it connects to the transistor but it is not. The side of the resistor that is facing away from the transistor will be soldered together.
By now the solder connections are as follows. Solder relay to the board. solder diode so that each pin is soldered to the relay signal pins. Place transistor and solder one pin to the negative side of the diode and relay. Solder the 10k resistor to the middle pin of the transistor. Solder the 330ohm resistor so that both resistors are connected opposite of that transistor.
Step: 4 Relay board 3
In this step add the led. Leds have a flat edge on one side this is the negative( – ) or cathode. This will be soldered to the last pin of the transistor. The other pin of the led the anode will be soldered to the 330k resistor. You may notice in the second picture the layout is slightly different then the first and that is because things got a bit tight for soldering. However the circuit remains the same. (See pic).
The next pic show the jumper wires used to connect the positive( + ). This will feed power to all relays with a wall wart. The jumper wires are soldered to the stripe end of each diode. It’s now a good time to add the signal wires. The wall wart negative (-) ground connects to the ground buss bar and arduino ground.
Now to the bottom of the relay board for some major work ( see pic ). I know the solder isn’t pretty but, hey, it’s my first major solder project. Solder a buss bar to all load pins on the relays. Solder either a buss bar or jumper wires to all negative ( – ) connections. The negative connections need to connect to the ground on the arduino and to the negative on the wall wart. The only thing left to solder is the line wire from a male plug and the output load wires to each relay that will connect to your outlets.
For more detail: Singing Pumpkins/ Arduino using microcontroller
This free embedded project also found using:
- arduino singing pumpkins