Fun Electronics Today

banner copy.jpg

HOME   SWoff.png

Projects   SWon.png

About   SWoff.png

Contact   SWoff.png

funelectronicstoday/ projects/ jar clock/

 

†† Jar clock

 

Jar clock.jpg

†† You remember those mineral oil immersed desktop computers some people were building? Yah, those fish tanks, you might say. I thought ďwhat about an immersed microcontroller instead of a CPUĒ! And so I came up with this idea of building an LED clock inside of a jar.

youtube.png

†† Hardware details

†† The circuit is designed on two parallel PCBs, connected between them with some wire leads like illustrated in the layout drawing below:

†† Jar clock schematic picture.png

†† I didnít wanted to struggle very much with a RTC and since I had a previous MCU project that was generating a 1s pulse, I thought I use that as a master circuit for my clock. I could have used the tmr modules of the same MCU, but then I realized I had to use another external CLC chip just to increase the number of pins because I wanted to build the binary LED display for the seconds. Since I found that these China MCUs are cheaper than many other 74ís, I decided that I was going to use this configuration of two microcontrollers. So I came up with this twisted-head schematic eventually. The master circuit also controls the seconds display and after it finishes displaying all the LEDs and measuring exactly one second, it outputs a single pulse from the pin D7 of the PortB. This pulse is the increment signal for the slave chip and the chip knows exactly what to do with it.

†† Software details

†† The code on the master MCU is really minimalist and with some small exceptions regarding the order of the instructions and without the conversion procedures, it could be described like this:

Master MCU flowchart.png

†† The slave MCU then picks up the square wave from the master and increments the rest of the clock... and without trying to be too boring, I will place a simplified flowchart of that too:

Slave MCU flowchart.png

 

†† The Master MCU code is only 113 words and the Slave MCu code is 263 so the entire code is 376 x 14 bits.

 

Code size.png

Some building instructions

 

†† I figured I could use uncolored mineral oil or red colored (these are the most common available on the market). I choose red with red LEDs because I found a cheap mixing mineral oil used for 2 strokes engines and I was content with this solution.

†† I managed to drill a hole in the jar using a glass drill bit, but I have to admit I also managed to break my first jar at a first attempt. So, Iím advising you to use thick gloves and goggles if you want to try it. I sealed the hole using glue gun first, but it started leaking after a while so I took it off and replaced the whole sealing with transparent silicone which seemed to have a better adhesion to glass.

†† Inside the jar I also placed a 6V sealed lead accumulator of 1.3Ah so this provides functionality for almost 12 hours in case the power goes down.

battery.png

†† The custom letter LEDs are manually build also. I placed two overlapped pieces of transparent laser printed foil over the LEDs and then I covered the entire LED in contractible tube as the image shows.

letter LEDs.png

 

†† The LEDs from the second are showing the word Jesus when they all light up at 31 seconds (or 0001 1111). I thought that, since the Christmas is coming, a religious message would be most appropriate. But you can choose whatever you like, if you want to re create this clock.

†† I think there is also room for improvement. For instance, Iím thinking of adding a constant temperature regulator to the oil (keeping the temperature higher than the room temperature, of course, but stabile). In this way, I could keep the masterís resonator at a constant temperature and obtain a very precise clock period (in theory).

Photo0480.jpg

 

†† I hope you have a good time building this project and if you do, write me back and send me pictures with your build

 

 

 

 

††† Files to download:

 

         Schematic Layout

         Master ASM Code

         Slave ASM code

         Extension button board

         Battery schematic

 

 

 

 

Fun Electronics Today ©Marius Taciuc 2016*  |   Public content  | Disclaimer Home                         Going up? ^

*This website and all the information contained in it is the intellectual property of Marius Taciuc. However, the information has a public

shared character and can be used, copied and replicated by everyone for personal use only.

Replicating these hardware parts or using their software for mass production is not permitted without the prior agreement of the designer.