Go Down

Topic: Attiny85 timer control (Read 156 times) previous topic - next topic

Frapeno

Hi i would like for helps, as i am not expert on arduino, i am just starting.
I want to create a Timer control with 2 mode, like a Timer/Delay, see description below, how doest it need to perform:

Timer / Delay:
a) one "Pin 0"  for "Signal IN" to be High level
b) one "Pin 1" for "Relay control", to be "ON/Off" after 30/60 second
c) one "Pin 2" for "LED" , counter flash + indicate Signal In is present.
d) one "Pin 3" for "Switch" - "Timer / Delay" selection
e) one "Pin 4" for "Switch" - "30s / 60s" selection, and flash Led.

Functioning way:

Timer Mode:
1st) If switched in "Timer mode", High level
2nd) If has "Signal 5v" into pin, then ....
3rd) Will power On the "Relay", then starts to count by flashing the "Led" 30s or 60, depending of the Switch 30/60s position.
4th) After reach the timer 30/60s, then will "Turn OFF" and keep off till reset the device or take Signal out and back.

Delay Mode:
1st) If switched in "Delay mode", Low level
2nd) If has "Signal 5v" into pin, then ....
3rd) WAIT, Will 1st starts to count by flashing the "Led" 30s or 60, depending the Switch 30/60s position.
4th) After reach the time 30/60s, then will "Turn ON" and keep on till reset the device or cut signal.

Remarks:
# The fucntioning will just start when has "Signal IN" on device.
# If cutted the signal, the device will be in "Stand by" condition, "relay off".
# Led, has 2 action, (one to flash during the counting seconds 30/60). Another is that after end the count, will keep flashing every 3 second, just to inform has "Signal in" present.

DrAzzy

Sounds like textbook use case for blinkwithoutdelay techniques
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up