Annoy your co-workers : lead them into begging you to turn off your special PC clock !
This little rig infact interfaces via USB to your PC clock and generates hours and half hours dings on a real bronze bell. Great stuff to bring into your office and surprise then amuse then annoy your helpless friends.
From these pages I already showed something similar where a serial port was used instead of USB. Today most PCs lack of a serial port and with this design USB serves also as power source.
Arduino is at its core and interfaces to the PC clock with a simple Processing sketch, its natural counterpart by design.
Step 1: Please, a Video !
Here it is.
For some reasons I couldn't merge it here directly.
The audio is awful because of the camera's poor microphone. It should give a good idea though.
Step 2: Forewords
I decided to go with Arduino for a few things:
1: it is made in Italy.
2: in case of troubles tha community is there: for sure someone else has had my same
3: anyone with little or no software and hardware background can have a project running.
4: gives instant gratification : upon receiving the kit anyone can have a blinking LED driven
by a RISC processor, not bad.
5: the credits.
6: in case of serious problems I can blame someone else.
7: it is made in Italy.
Done with with the Ad, after years of working around the problem of not having a real Arduino board and wiring fake-ups, I finally bought one.
This contest is a great way of putting my 35 euros at work.
The picture shows Arduino along with a same sized breadboard to host the veeery simple hardware needed to complete the project.
Step 3: Parts Needed
-Arduino (mine is a "Duemilanove" with an ATMega 328 chip. Any other Arduino should do.
-Some 100mils breadboard to host the bronze bell "shield", as hardware to go on Arduino is called.
-One small 5V relay. This shall be hacked into an electric bell clapper.
-One low power NPN transistor. I used a 2SC1815 scrapped from a VCR.
-One 1000 Ohm resistor. Scrapped from same VCR.
-One small silicon diode (1N4148 is the most likely to be scrapped from anywhere)
-Strip of 100mils spaced Berg connector
-Small/medium/large/very large bronze bell. Depends on the relay (clapper) size and on how much annoying you want this rig to be. The clapper should be easily removable, better if its end inside the bell is threaded.
-A suitably long screw to fit the thread inside the bell
-Some thin steel wire for the clapper
-Cyanoacrylate or equivalent fast drying, strong glue
-Small nut and bolt to complete the clapper
-Tools : pliers, small cutters, solder
-Black/coloured paper and paper glue if you want to add a little finesse.
-You'll also need a PC running Arduino developers kit, available for free at http://arduino.cc and Processing developers kit available for free at http://processing.org
In the picture the electronic components. The orange relay is not the one I finally used.
Step 4: Add Some Finess ?
This step is optional and can be skipped.
Placing some coloured paper on the components side of the perfboard add a PCB look. Also, the paper can be computer printed with some labels and logos.
Just cut a piece of paper, glue it with paper glue, let it dry and cut the excess paper. That's it.
You'll may have to pic-prick the paper (components side to solder side) where the components will be placed.
Step 5: The Bell
The bell can be placed as in the picture : the long screw keeps it in place right next to the relay.
Step 6: Completing the Circuit
The circuit is very simple : one single transistor is driven by one of Arduino's output. The transistor in turn drives the relay whose moving anchor is modified into a larger clapper to hit the bell.
The pin strips help keep the board steady on your Arduino. I used a few more than actually necessary.
Arduino is interfaced to the PC through a serial port emulated by a USB interface, that is, a regular USB cable connecting Arduino's board and the PC is actually seen by both parties as a serial link.
Processing runs on the PC and reads PC's time of day every second. At the hour and half hour it sends a string of "#" characters through the USB/serial port, the number of "#" characters being the number of strikes of the bell.
Arduino is connected on the other end of the serial port and receives the string of "#" characters : it simply has to count them and drive one of its digital output once per strike.
Now come the hardare part do be soldered: the output of Arduino drives a transistor which in turn drives the relay whose moving anchor is modified into a clapper. Simple as it sounds.
The circuit is herebelow:
The NPN transistor has three pins, they shouldn't be swapped: different transistors have different pinouts.
The 1000 Ohm resistor limits the current into the Base of the transistor, the diode at the relay's coil is necessary to preserve the transistor from inverse large voltage spikes generated by the relay when it opens. The diode has a polarity, look for the black ring at its cathode.
Only three connections are needed with Arduino.
In case a large realay is used, a medium power transistor would be needed and an external supply for the circuit below would be needed. In this case connect to Arduino only GND and "To Arduino digital pin 8". BW, on every respectable Arduino board, the pin name are clearly labeled at the conectors, you can't be wrong.
Step 7: The Clapper
This is the final picture of the modified relay: first remove the cover from the realy with a pair a small cutters. Be careful not to damage the bobbin core. Depending on the internal physical implementation of the relay, tha moving anchor may move horizontally or vertically: the best thing is to try it with a battery. It also helps testing the relay coil for damage.
The relay pictured is not the one I finally used because I ended up gluing the anchor to the coil...
The clapper is built from a small chunck of thin steel wire. On one end a hook holds a small screw, the other end is L-shaped to be glued on the relay's anchor.
Test the assembly again when the glue has dried - it should take a couple of minutes. Don't overdo with the glue !
Step 8: Install the Software
Download processing PC environment from processing.org following the instructions at the site. You may need to add also Java Runtime as specified in the installation notes : in case it should be straightforward.
Download Arduino developer's kit from arduino.cc and install it on the PC.
Your Arduino should come with bootloader already installed.
Connect the cable between Arduino and your PC: your Arduino willbe seen as a serial port. You'll need to set Arduino model and serial port to cennct to from the Tools menu.
If haven't done so already download Arduino and Processing sketches herebelow and save them to a directory.
Run Processing and load Prossing.pde : Processing will suggest to create a repository aptly named to save it in, just say OK.
Click the arrow on top left to run the program ("the sketch") and after a few seconds a clockface will show up on the screen showing PC's time of day.
Run Arduino dev kit and load Arduino.pde : Arduino will suggest the same as for Processing, again click OK.
Now, at the hours and half hours the bell should play. You may need to bend and twist the clappers steel wire to suit the distance and position relative to the bell. In case use a two pliers not to stress the joining point of the steel wire with the relay's anchor.