Microcontroller/Programming help needed! simple DIY project

Thread Starter

Tman179

Joined Dec 10, 2019
1
Howdy, so I am currently working on a small project to build a binary clock style watch. I am pretty new to circuitry and building small circuits. I do know some python and have been toying around with my raspberry pi 3B+.

Here is the link to the project I plan to replicate and modify for my project:

https://www.instructables.com/id/Simple-Binary-Clock-Using-Attiny85/

I plan to build these circuits in roughly a 40x40mm area. Now with the circuit presented, I plan to break it up into two or possibly three boards. The first board will contain the array of LED chips all wired together as shown, and the connections brought to a side of the board. The second board will be directly beneath the first in the watch housing, it will contain the ATtiny, shift register, buttons, and resistors. It will connect to the LED board via some vertical wires that will go though the LED board and solder to the corresponding connections. Now on the bottom of the second board I plan to have a third board glued to its back, which will contain the battery holder and connections to directly connect the battery to the leads that require power. This was the second and third boards are back to back with some connections passing through the boards to connect power.

So here are my questions:
- I want to add a 16.000Mhz crystal oscillator to increase the accuracy of the internal clock in the ATtiny, so where would I add it if I can in this circuit?(I want to use 16.000 Mhz because it will line up with the internal clock of the ATtiny and the program)
- Is there such thing as a dual sided pre-sensitized pcb board I could buy to etch my circuits on? It would make the circuit designs much easier.
- Would my Raspberry Pi and Spyder IDE program work to program the ATtiny85?
- Finally, how could I reduce the power supplied by the battery to allow the circuit to run on minimal power and last for a year or longer? (If possible)

Thanks to anyone who can answer any of these questions, I would greatly appreciate it!
 

jpanhalt

Joined Jan 18, 2008
11,087
Welcome to AAC.

So here are my questions:
- I want to add a 16.000Mhz crystal oscillator to increase the accuracy of the internal clock in the ATtiny, so where would I add it if I can in this circuit?(I want to use 16.000 Mhz because it will line up with the internal clock of the ATtiny and the program)
Why have 2 oscillators? You can use 16 MHz for timing quite well. If you get a crystal, that can be used for the MCU too. You might consider something like a 4.194304 MHz (2^22) crystal. Easy to divide down to 1 second. Here's a selection: https://www.mouser.com/datasheet/2/96/008-0309-0-786275.pdf

- Is there such thing as a dual sided pre-sensitized pcb board I could buy to etch my circuits on? It would make the circuit designs much easier.
Definitely yes. That was all I used when I made my own PCB's. That manufacturer is out of business but there are others.

- Would my Raspberry Pi and Spyder IDE program work to program the ATtiny85?
- Finally, how could I reduce the power supplied by the battery to allow the circuit to run on minimal power and last for a year or longer? (If possible)

Thanks to anyone who can answer any of these questions, I would greatly appreciate it!
Don't know. I don't use either device.
 

AlbertHall

Joined Jun 4, 2014
12,338
This button could also turn off whatever computer you use as well if you use one of the RTC (real time clock) chips or a module using such a chip, which will maintain the time using very little current.
e.g. DS1307
 

MrChips

Joined Oct 2, 2009
30,621
Adding a 16.000MHz crystal does not necessarily increase the accuracy of a clock.
Accuracy, resolution, and stability are not the same thing.
If you want accuracy such as keeping proper time day after day, use the 60Hz line frequency coming out of the wall outlet.
 

Alec_t

Joined Sep 17, 2013
14,263
Since the MCU duties don't justify a high clock speed, why not use a standard 32768Hz crystal, which is made for watch and clock movements? Current draw would be much lower than when using 16MHz.
According to its datasheet, the ATtiny85 idle current would be typically ~100uA when the clock frequency is <1MHz, whereas it would be ~1.2mA @ 8MHz so presumably even higher @ 16MHz.
 
Top