Author Options:

Circuitry help needed - microcontroller in binary clock Answered

Ok, so I am currently working on a project which involves some circuitry and programming. I am planning to make a simple binary watch. Now with my current plan I am planning on making 2-3 circuit boards depending on what I can get. The first circuit board will connect the leds for the time read. It will be a standard four column hour and minute binary clock readout. The second board will contain an ATtiny85 microcontroller, a 74HC595 8-bit shift register, two push buttons, two 10k ohm resistors, and four 220 ohm resistor. The third board will be glued to the bottom of the second board for the battery holder and some extra space to add wire tracing. Now I plan to design and etch my own pcb boards and solder them together. Though for the second and third board being glued together would add a bit of thickness so I am wondering if I can buy a dual sided pre-sensitized circuit board to etch?

Thes plans are based off the work of another user on here, link to his clock below: https://www.instructables.com/id/Simple-Binary-Cl...

Credit to him for this great and simple system. With my very limited knowledge and understanding of circuitry and programming, this is one of the most straightforward clocks I have found. This is general format I will try to follow, though I do wish to make some modifications to the circuit or program based on what is possible with the circuit setup. First I am concerned about the power consumption of the system and how I can reduce the supplied power to make it run on a watch battery and run for about a year if possible or longer. Second I know that adding a crystal oscillator can improve the accuracy of the clock by synchronizing the internal clock on a set frequency. So with that, how would I add a 16 Mhz crystal oscillator to the circuit? The program that is given in the project runs based on the internal 16 Mhz internal clock of the ATtiny85. Third question is what system works best to program the ATtiny85? I have a Raspberry Pi 3B+ and I also have Syper IDE and I am fairly good at programming with python. So could I program the ATtiny85 with my Raspberry pi and use python? Or would I have to use a different board and language to program the micocontroller?



6 weeks ago

Where to connect the 16MHz-crystal: See your separate thread asking about that.
Increased accurancy with external clock. See your separate thread asking about that.
How to programm the Attiny85: See your separate thread asking about that.
Splitting the PCBs: See your separate thread asking about that.

The link to the instructable doesnt work... I think its the same as in the other rthreads: https://www.instructables.com/id/Simple-Binary-Cl...
The problem with your "watch-battery" & "1 year+" runtime... It just does not add up...
I think with watch-battery you refer to something like a Renata 321, 394, 395, ... They hold around 14.5mAh (Renata 321) to 55mAh (Renata 395). Lets go with the 105% optimistic value and go with 55mAh energy-budget.
The 1.5V will need to be boosted to be usable for a micriprocessor and for LEds. Lets be impossibly optimistiy and go with 100% efficiency.
Lets assume 2V needed for both CPU and LED. The CPU will not run with
tis, the LEDs might. But lets roll with this overly optimistiv voltage.
Lets assume, the Battery is a miracle and has the full 1.5V till the very end.
The CPU will need a bit of power... Lets assume an average of 0.0mA which is impossible, but lets roll with it.
A LED takes at least 1mA (Very dimm) to up to 20mA (Quite bright). Also here: Lets be optimistic and go for 1mA.
The clock will always display a few LEDs at a time. Lets be super otimistic and go with 4 LEDs on all the time.

Now lets see how far we can go with this physics-breaking efficient setup we defined:
1.5V * 55mAh = 82.5mWh energy in the battery
82.5mWh / ( 4 LEDs * 1 mA ) = 82.5mWh / 4mA = 20h 37min 30sec
Thats it. Even with multiple miracles and physics breaking items and utterly impossible optimistic assumptions, you get below 1 day of runtime from a watch-battery for the LEDs alone.