Showing posts with label MDF. Show all posts
Showing posts with label MDF. Show all posts

Friday, 18 April 2014

Pendulum Controlled Arduino Clock With Alarm




Introduction

Years ago when I was around 11 or 12 my grandfather gave me a clock box he made. My grandfather was a church carpenter so he made furniture and decorations for churches.
The box he gave me is made from teak wood as far as I remember, it has a nice domed front window for the clock face and plain glass for the lower pendulum part. My grand farther made the box in 1944 so 70+ years ago.
The clock box has moved around with me for years, but I never really got to use it for anything sensible. For some years I used it as a small alcohol cabinet (I'm not a big drinker), but for the most of the time it has been hidden away in the basement.
One day I watched a video from AndyDavisByTheSea creating an pendulum clock. Here is a link to the 1st video in the series.
The videos inspired me to start experimenting with my own pendulum. I didn't want to go pure mechanical as Andy, but wanted the pendulum to be the main time keeper and then use an Arduino board for the display. I also decided that I did not want to spend any money on the project. Everything had to be made from stuff I had lying around anyway.

Construction

The pendulum weight and the chime bell are both disks from an old hard drive. The pendulum rod is a ø6mm aluminium tube. The rocker is a piece of hard springy metal from a CD-drive.
At the end of the pendulum rod is a small strong magnet.

I was not really sure how to make the pendulum adjustable. As I only had one aluminium rod in house, and I did not want to go buy a new one, I had to be careful not to cut it too short while experimenting with the pendulum length. So after some drawing and experimenting I came up with a quite simple solution allowing me to make both coarse and fine adjustments.

Sketch of the pendulum length adjustment.

The first version of the pendulum adjustment. This construction allows me to do a coarse adjustment with the two pine wood mounts and do fine adjustment with the round top nut. 
The two aluminium angles are mounted on the wrong side of the disc on this photo. 
They are supposed to sit on the back of the disc so they don't block the disc.

Coils

I tried using different home wound coils, but soon realized that the power needed to drive the pendulum was so minute that the small coil from an old electrical toothbrush was enough. This coil also uses much less current than my home wound coils.

A couple of my initial coils. One with core and one without.


This is the coil from the electrical tooth brush I decided to work with.

The rocker mechanism

It has been quite a challenge to create a rocker that was stable, smooth and frictionless. My first attempts used a couple of small ball bearings. This worked quite good, but because the ball bearings are very sturdy in the axial direction, they also required the clock to be placed very accurately. (I live in an old Amsterdam flat, so neither walls nor floors are straight.) The construction was also to clumsy for my taste. So I decided to use a ‘knife’ construction for the pendulum.
This gives a very low friction, and it is quite insensitive to the placement of the clock itself as I could quite easily create an adjustable rocker assembly.
The rocker interrupts the light from an old light barrier, I think I got that from an old HP printer.

The spring loaded rocker assembly. The distance screws at the back are fixed, the two in the front can be adjusted to make sure the rocker is perfectly horizontal.

The height of the light barrier can be adjusted with a small screw. This adjustment determines when the coil ‘fires’. 

Close-up of the rocker and the adjustable light barrier. As can easily be seen here, everything is made from old scrap.

The placement of the coil is very critical to how the pendulum works. It is very important that the coil is directly in line with the pendulum movement. Else the pendulum will jitter. Also the offset of the coil is very important for the swing of the pendulum. And the distance from the pendulum tip (magnet) to the coil also influences the pendulum swing greatly.
On top of that comes the current through the coil and the length of the pulse. The coil is only supposed to give the pendulum a very small kick and the pulse cannot be so long that is attracts the coil after it has swung by the coil.

Here experimenting with the trigger time and pulse length using long exposure on the camera.

The strength and the length of the coil pulse is easily adjusted with the circuit, but the mechanical adjustment was quite a challenge. I needed to adjust in tree directions. For the X and Y position I came up with the design shown below.

The elongated holes allows me to adjust the coil position in the X and Y direction.

The X and Y position of the coil can be adjusted sliding the coil left, right, backwards and forwards. The height adjustment I still need to figure out.

Close-up of the chime mechanism. The “bell” is made from a disc from an old hard drive just like the pendulum. The disc has a nice crisp sound when hit with the little wooden hammer. The two rubber suspensions come from an old CD-drive.

The chime will sound X times every hour, two short at a quarter past and a quarter to the hole hour and three short chimes at half past the hour.

I don’t expect the clock to be highly accurate. Temperature and humidity will probably have quite an influence on the precision because I use ordinary MDF or pine wood for construction. But for home use I think it should be more than good enough. Anyway the pendulum will be driving an Arduino for the clock display, so I can always do some compensation there if needed.
Currently I just use a LCD display, but it is my intention to create a clock face with a ring of LEDs like the one I build back in the 80’s. Though in this version I want to be able to see through the centre of the display so the rocker mechanism will be visible.

My old LED clock I build in the 80’s. It is using all 40xx parts on a single sided circuit board, hence the large number of top wires. Time keeper is taken from the 50 Hz net frequency.

 
Just a peek inside while ticking away.


 
The chime sounds a little harsh here, mainly because I used a small metal screw in the hammer head, but also because of my old but trusty camera. In the current version I have removed the screw. That gives a softer sound. Also the chime sound is dimmed when the lid is closed.

Electronics

The electronics driving the pendulum is very simple, just one 4093 quad Schmitt trigger Nand gate. I have seen even more simple analogue circuits, but I decided to take the more digital route. 
Block diagram of the pendulum driver.


The small circuit reads the pulse from the light barrier, creates a short pulse using a mono stable flip-flop and a small driver transistor for the coil. At the bottom right is the chime driver.


Very simple circuit board for the pendulum driver. I’ll probably redesign this later when I start to implement the ring shaped clock display.


The second pulse from this circuit triggers one of the interrupt pins on the Arduino.
The Arduino program is in this first version very simple. It simply counts the second pulses, and converts them to minutes and hours. The result is displayed on a 4 x 20 character LCD display. 

Control application

To adjust and measure the accuracy of the pendulum clock, I have created a small control application that prints a graph over time, showing the time variations. I used my function generator to generate a 1 Hz pulse to calibrate the readout.
The application also enables me to get and set the time of the clock, set the alarm time plus a few test functions.

Screen shot of the control application for the pendulum clock. It graphs the time variations in micro seconds compared to a 1 Hz signal from my function generator. The red graph is the current pulse time. The blue is averaged over the last 5 minutes.

Update: 12-05-2014

Ring display and new control board

I have finally finished ring display, this is the first time I have used a large amount of SMD components, so I have spend quite some time on designing the circuit board. This is also the first time I work with through hole rivets. I did practice on a few 'failed' boards so I didn't mess up the final board and the result is actually quite good. The through hole rivets I used are ø0.6 * ø0.4, so it was quite fiddly, but using one of those dentist 'pokers', the handling of the small rivets went smoothly.
I managed to fit the whole display on two pieces of 100 * 160 mm double sided board by splitting the ring up in 4 equal pieces.

Each of the ring display parts are soldered together on both top and bottom side at the edge. This makes the display quite sturdy.


The assembled ring display. Next to it the dental 'poker' I used for handling the through hole rivets. Unfortunately you can't see the pointy end on this photo.
It' alive. Well the photo is a little blurry (no flash and no tripod)
 
Well it is Saturday morning - Nigella Lawson is cooking away in the background. 
So time for a quick look on the display powered up with some test code. The flickering comes from the camera.
Close up of the ø0,6 * ø0,4 through hole rivets.


Ring display mounted for the first testing. I wanted to be very careful when mounting the ring. It has to be spot on center and I did not want to drill any 'faulty' holes in the box my grand farther made more than 70 years ago.

New Control board

The new control board contains both the driver for the ring display and the pendulum control from the old board. This board is also double sided, but only contains through hole components. This is mainly because I already had all the components in house. On this circuit board I also used through hole rivets, but I used a little larger rivets, ø0.8 * ø0.6 to match the pin size of the IC sockets.
The new controller board. Upper part is the pendulum driver, the lower part is the display driver.






The updated circuit board. Upper circuit is unchanged from the first version. The lower circuit is the display driver using four 74HC595 Shift registers. 
I use 1k current limiting resistors. This gives more than adequate light both in daylight and at night. As an experiment, I have added a photo resistor (LDR) together with a 10k series resistor, and feed the divider voltage to one of the analogue inputs of the Arduino. With that I can adjust the intensity of the Leds. I probably build that on to a small shield as I'm not sure I want to create a new version of the driver board just for two components, one of which will have to be mounted off board anyway.

Here are a few new pictures of the latest development.
Arduino Shield for the Real Time Clock module, menu buttons (from an old HP Ink Jet printer) and connectors for the main board. The spun wire goes to an LDR so I can adjust the brightness levels for day and night.
The painted chime. The copper wire at the bottom limits the hammers bounce back swing.

Everything is mounted, more or less. The wiring is still a little bit of a mess though.
While testing I mounted my LCD display on the ring display as can be seen here. But I have decided to keep it, maybe replace it with a 2 row version. I do need a display when setting the clock and alarms and luckily it is out of view when the door is closed. As a unplanned extra the Led on the back of the LCD display casts a faint red light on the main board mounted on the backwall of the clock.


Tuesday, 28 September 2010

UV Light Box

Makes it much more fun to make printed circuit boards.

When I began working with electronics again after a long break, I quickly realized that I needed a UV light box to produce my circuit boards.

Breadboards and test prints are good for prototyping, but at a certain point is it necessary to have a more robust and portable version.

When I make printed circuit boards I use positive photo printing. The layout I print on transparencies on my ink-jet printer. To get good coverage I need to print layout twice on the same sheet.

Update:

The old ink jet printer gave up and have now been replaced with a new colour laser printer. I no longer need to do double printing to get a good result. That saves oceans of time, because the old ink jet transparency needed to dry totally between prints. That could easy take a couple of hours with the ink I used, even using a heating source to speed it all up a little.
The first test prints on the new printer have been quite successful. I was a little sceptic when I saw the first transparencies though - they looked quite weak, but to my surprise the result was surprisingly good. This circuit board only took a couple of hours to get to this stage. The circuit board obviously still needs the drilling.



The UV light box is made from 9mm MDF (Medium Density Fibreboard). The light source is a 8W UV-A lamp that I have taken out of an old handheld face browner I had lying around from my more vain days. After some experimenting I found the optimal exposure time to be about 25 minutes. So of course I needed a timer circuit.


The first version was a simple timer, with the familiar 555 as the main component. It worked OK and served its purpose. But I wanted to be able to get an indication of the time left, so I decided to build a new timer using CMOS technology. This time with the proven 4000 series.


The cover is locked with a small snap lock.
The UV light and reflective parabola.
The parabolic reflector is made ​​from ordinary kitchen aluminium foil glued to thin cardboard. The UV bulb is placed in the focal point of the reflector. A piece of perspex is used as the top. On the inside of the lid, I have placed some adhesive rubber foam to keep the PCB in good contact with the layout of the film.

The initial timer was build around the well known 555 timer.
Running.
There is drilled a small hole in the lid and a piece of clear plastic is inserted in the hole. That way I can see if the lamp is lit. I suspect that it will give up one day.

UV lamp was purchased somewhere in the mid 80s. Fortunately, I almost never used it, so with some luck should be able to use it for quite a few cycles before it burns out.

The wire can be curled up for easy storage.
The finished UV light box. Now with a digital timer build with the good old 40XX series CMOS.
The new timer from can be set from 1 to 99 minutes.

Saturday, 5 June 2010

Work Bench

Let the chaos be gone.

A place where I can keep my electronics and do my experimenting - and still have a tidy living space.

Ever since I was a young lad, around 12 years old or so, I wanted to own a bureau or chatol, as it is called where I come from. I think my fascination came from a bureau , I saw in an old antique shop, in the town I grew up in.
That, of course, was a proper bureau. It was made from beautiful dark wood. It had loads of drawers and doors and of course some secret doors and drawers too.

At that age I started working with electronics as a hobby. Being four brothers in the same house, meant that there were quite a bit of sharing spaces. So a bureau would be perfect for all my experimenting. I never got around to get one, but coming from quite a creative family, I decided finally to try to build my own simplified version. Now I only hope my old childhood dream finally comes to good use.

Well I haven't aimed to build a it like the one I saw in the shop. First of all, it would be way too big and way out of my comfort zone. The content of my toolbox is limited to a nail file and a pencil sharpener (more or less). So I have to, and want to, keep it simple. At least for this - my first piece of furniture.

It is just supposed to be a place where I can work with electronics and be able to literally close the lid when taking a break, without having to clean everything up.

Living in an Amsterdam flat, in the middle of the old city, space is very limited. So every corner has to be used to its optimal, without making it in to a total clutter of course.

As you can see on the images below, one drawer section can rotate outwards to give more leg space when sitting working. The total width of the chatol is 110cm. I obviously wanted plenty of drawers on both sides. The drawer section on the right side is 30cm wide and full depth, 40cm. This fits an A4 with room to spare. The swing drawer, as I have decided to call it, is 40cm wide and 30cm deep. This gives 50cm of leg space. That is enough while sitting, but when getting up you will bump into one of the drawer sections. So by swinging one drawer away while working, gives just that extra space needed. I could have made a drawer on wheels, but that would make the construction unstable.

Here under is a model I made from 4mm MDF. I wanted to check if my design was stable enough. The full scale version is made mainly from 18mm MDF.

This small model is actually amazingly strong. I’m not sure if this is a scientific correct approach. But I have trusted my instincts and started the build.


This is a scaled model to check the stability. It is made from 4mm MDF and cardboard. And a couple of tooth picks :-)


Well it's not too way off.


Only the kitchen could do with a kind hand.

http://www.microshan.nl/UserFiles/Image/WorkBench/Img_1148.jpg
Oh - what to do with the wall socket?


Yes it swings!


Just need to cut out the bottom plate.


First test run. I just couldn't help it.
By the way, look at that kitchen table. It's all shiny.



Oh the everlasting paper stacks. Soon I will get rid of them. Or at least stuff them in one of my new drawers.


Well, just another angle. But I haven’t got the faintest idea what colour to give it.