RFC for review of code/hardware best practice for low voltage disconnect circuit.

Thread Starter

Underpants

Joined Feb 5, 2017
2
Hey friends, Working on a low voltage disconnect.

pseudo-code; If a low voltage is reached for 10 seconds, turn of. If a high voltage has been reached for 10 seconds, turn on.

The project is functional and works as expected. I am just looking for people smarter than me to make constructive criticisms and suggestions for improvement in code and hardware.

I am an just a hobbyist and this is my first time using Fritzing; so the transistor pictured is not correct (I don't think) - It's an NPN. I used "FET N" type in Fritzing because it has a 3 hole layout in the PCB view. (This is something I will have a proper PCB printed for)

The Arduino is a Adafruit Trinket Pro.


Anyway... On to the goods.

* Prototype in breadboard: http://i.imgur.com/0AP5aMW.jpg
* Fritzing breadbord: http://i.imgur.com/xG3ONE3.jpg
* Code: http://paste.openstack.org/show/597760/


If anything is unclear in my description please ask for clarification and I will update this post.

Looking forward to your comments.
 
Top