Cinderella Clock Project – Part 2 – The Electronics

With the clock face constructed, I turned my attention to seeing what I could do to get it moving.

I knew it was going to have to be wirelessly-controlled because there was no way we would be able to run a control cable from a hanging beam to the side of the stage without complications.

So I put a few ideas together. I knew that an Arduino-like controller would be simple to put together. I’d played around with building a Bareduino ( https://www.virtuabotix.com/product/bareduino-bare-minimum-16-mhz-arduino-kit/ ) and found it fun and, more importantly, inexpensive. I ended up buying the components in bulk on eBay. Now I’m hooked on getting electronics from China for a couple of dollars.

The number of add-ons that are available for the Arduino market is impressive. I knew that it was possible to get wireless transceivers so I bought some nRF24L01+ transceivers from Amazon (http://www.amazon.com/gp/product/B00E594ZX0). These have good Arduino library support. There are a couple of libraries on GitHub and I found that the maniacbug version worked for me (http://maniacbug.github.io/RF24/). Also, I found his blog entry “Getting Started with nRF24L01+” really useful, particularly the pin connections from the ATmega328PU to the transceiver itself. The blog is at http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/.

I called my project a Nerduino due to the anticipated comments from my “friends”.

Initially, I breadboarded the circuits to show that I could send and receive

The wrinkle in building the circuit is that the transceiver is *powered* using 3.3v but the ATmega32PU is 5v-powered. This meant that I needed to build a voltage regulator to drop a 5v input down to 3.3v just to power it. That adds a few more components.

A LM317T is useful for building the regulator because it is adjustable based on the resistors that are used in the circuit. More information can be found at http://www.reuk.co.uk/Using-The-LM317T-To-Regulate-Voltage.htm but the schematic required to build a 5.5v to 3.3v regulator is:

IMG_3565

At the time I built the circuit, I didn’t have a 240 ohm resistor so I had to use a variable resistor instead but I managed to get the conversion to 3.3v

IMG_3568

 

 

I soldered together one Nerduino with the voltage regulator and tested again

After the successful test, I soldered another Nerduino and added a control panel

I added the servo output pins to one of the Nerduinos so that it became the receiver

 

The servo motor was running fast and unless I added gearing to the clock hands themselves, I needed to add a speed control to the control panel and slow the motor down from there.

The circuits needed to be able to run independently of a wall power socket so I wired up a USB cable to act as a power cable from a phone charger battery that I got from work.

Once the circuitry was working, I assembled it into the clock face with the help of a friend who was there to stop me from throwing the whole thing into the trash the moment we stumbled across minor issues.

I made sure that the clock could be operated from the sound desk at the back of the theatre (i’m standing next to the camera operator).

For those interested, the Arduino sketches for the transmitter and receiver are at:

http://projects.ravelox.com/files/ClockTransmitter.ino

http://projects.ravelox.com/files/ClockReceiver.ino

 

Cinderella Clock Project – Part 1- The Face

Let’s put a few things into perspective about my level of competence for things like this. I’m not presenting myself as an expert in this. I’m showing what I did. I’m not an electronics genius by any means. I have to look everything up so I couldn’t tell you the value of a resistor or put together a simple blinking circuit. I also don’t have a workshop bedecked with tools. I frustrate the heck out of my father because I don’t label all the boxes I put my screws in and I don’t have a place for all my flathead screwdrivers in ascending size. Yes, I’m that guy.

Electronics came to me at a late age. I had a kit when I was a kid and I would get onto my porch roof to put up the coat hanger antenna I made for my crystal radio. I do kind of know which end of a soldering iron to blow into but my technique leaves a lot to be desired.

I’m a member of the Mills High School Drama Guild which is run by parents of students who take part in the school Fall and Spring productions.  In particular, I help to build the sets. This year’s Spring production was Rodgers and Hammerstein’s version of Cinderella.

The Director had the following design in mind and, in particular, the all-important clock:

IMG_3445IMG_3446

 

At the time, there wasn’t much said about whether the clock should strike 12 but I looked at the design and thought “That’s seems easy”.

So, I started this project. I bought some corrugated plastic panels from Lowes to work out sizing. I tried two approaches: Making the clock face from a single panel ( approximately 3ft diameter ) and also quadrants from 4 panels making it a 5ft diameter face. Ultimately, the bigger size was better because the clock was going to be a way from the audience. I also cut some hands.

IMG_3531IMG_3532

 

I was originally intending for the exposed gears to mesh and to move when the hands moved. That was a stretch goal that was dropped early on because printing gears on paper and cutting around them into a strong enough material with enough precision to mesh them together so they move isn’t as easy as it sounds if you just have a craft knife. This is where a table-mounted scroll saw would have been useful. I did try with a Dremel but it’s not precise enough.

If you’ve never drawn a gear before, I strongly suggest http://www.inkscape.org. It’s a freeware vector graphics program and there are a lot of tutorials on how to use it. I found this http://www.wikihow.com/Draw-Gears-in-Inkscape and it came in really handy. I ended up drawing 2 styles of gear, printing it on regular paper and sticking the paper to the plastic to cut around. Once I cut one gear, I could use that as a template for another. Also, because the clock was going to be far away from the audience, the precision of the cutting wasn’t a high priority but I still tried my best to get them looking OK.

IMG_3601

 

I ordered some Roman numerals from a clock kit on Amazon (http://www.amazon.com/gp/product/B00LL1IEJ6/). They are self-adhesive but I should have used more glue because the 12 fell off just before opening night and broke into a few pieces.

I used spray paint for plastic to paint the pieces and we stuck the gears to the clock using double-sided tape.

IMG_3622

 

Some things that I would do better on the actual face:

Quadrants is a good idea when you’re carrying the pieces around but when you assemble them together, you MUST make sure that the seam is well supported and strengthened. The clock face had a tendency to fold on the seams and this made it difficult to stand up. We added some pieces of wood to the back.

This gave the clock some weight which was OK because it was hanging from a beam on set. It also gave us something to attach the circuitry, motor and battery to.

IMG_3645

IMG_3646

I hadn’t tested the servo motor properly to work out how to attach the hands. The hour hand was stuck at 12 so the servo only needed to move the minute hand. The minute hand had a tendency to slip on the axle even though it was secure on the screw, the screw would unwind itself it the hand got stuck. We resorted to gluing the screw into the servo motor coupling and also the hand to the screw.

The weight of the minute hand was unbalanced which meant the top of it would flop forward. I had reinforced the hand with wooden skewers to prevent it folding but there was still a noticeable lean. This didn’t matter so much for a couple of reasons. Firstly, because the audience was only looking at the clock from the front, they wouldn’t see the lean. Secondly, it meant that the minute hand had clearance to move and not catch any of the numerals or the hour hand.

Finally, the face design is more simple than the sketch. I didn’t have something to use to make fine circular lines that I could use to paint minute divisions. Painting circles at a large scale requires some finesse but I didn’t have any.

Design-wise, I was pretty pleased with it. I like the blue and gold together but I’m not sure the gold showed up when the stage lights were on it.