google3004ea18f5b68ccc.html

Make a powerful battery saver, cut-out switch with the ATtiny 85

Now on Instructables

http://www.instructables.com/id/Battery-protector-cut-out-switch-with-ATtiny85-for/
  
Introducing the “Masterduino”
 
Smart Microcontroller Battery Protector
 
Protects your 12V car battery from current-draining devices, automatically cuts power supply when the battery voltage is below the programmed setting.
Maximum Voltage 35V
Maximum working current 20A.
 A LED will blink just before power cuts out to indicate battery status.
If the battery reaches pre-set level, power is automatically restored.
 
FEATURES
Prevents battery discharge Protects your battery against excessive discharge when using accessories connected to it. Lights drain the battery and destroy your battery. Most fridges turn off automatically to protect the fridge motor but not your battery.
Designed to turn off accessories before they discharge the battery to  low. Once turned off they remain inoperable until the battery reaches your set voltage above 12.8 volts again.
 
In the software you can change the voltage settings and are able to fine tune your battery protection based on load and demand. This device will protect your expensive batteries from damage due to over discharging them.
 
·       Programmed to switch of at 12 volt.
·       Blinks a warning LED before switching off. Indicating the power is low.
·       Completely switches off any drain ( except for the Tiny)
 
Other features of this ingenious MK1 board are that it has a small ATtiny 85 chip microcontroller. But the outcome is very powerful due to the mosfets that switch your power on and off.
There are two things that can be switched on and off or have a PWM output. Pulse Width Modulation. Or dimming, flickering lights on and off.
 
 
This board can protect your battery, but as it has more spare inputs it can also be used like any Arduino. Many different projects can be made with this board.
 
There are two extra inputs A3 and A2 that can be used to attach sensors for other projects to build.
 
·       Gardening, Watering, overflow sensing, moisture sensing, sprinklers
·       Water pumps, hydroponic timers, water level, overflow
·       Lighting, flickering lights, dimming, PIR sensing
·       Panning x and y axes
·       DC motor, stepper motor, servo motor
·       Timers ( a switching spark will turn the device briefly on before it settles)
·       Solar
 
A few of those will be covered in my next instructables.
 
 
The two NTD5867N Mosfet’s  are small in size but very powerful  and can handle 60 volts and 20A. Just see them as a relay that switches power.
The resistors near the Mosfet are to make sure they completely turn off.
Motors can also be attached to those. (use a diode)
 
Be aware that this Mosfet switches negative (ground) and not the plus rail.
 
For more info on N Drive and the Mosfet:
 http://www.freetronics.com.au/pages/ndrive-quickstart-guide#.VlbRmNIrJhE
 
In those instructions a diode is used for the motor.
With a diode the motor runs only in one direction.
If you need to reverse the motor use a motor shield and a 100nF capacitor instead.
 
The DC-DC converter on the board handles only up to 35 Volts for a short time and 28 volt for longer periods. Any higher voltage must go around the circuit and not to be connected thru the circuit.
 
Specifications
 
Model: Battery Protector Cut Out MK1
Output Power 20A
Input voltage: 6 to 28V
Reverse polarity protected
Auto reset short circuit fuse to protect the ATtiny 85 chip
Screw terminals
Size 7.5cm x 4cm
 
Parts on the Battery Protector Cut-Out MK1 board
Or should I call it MASTERDUINO as many other things can be made with this board.
4 terminal blocks
8 pin socket
1 ATtiny 85 chip pre programmed ( cutting the power at 12.2 volt)
1 dc to dc converter to power the Tiny
1 resettable fuse 250mAH
2 NTD5867N Mosfet’s (Element 14)
1 Diode N4004 (reverse polarity protection)
2   1K resistors
3   10K resistors
1   18K resistor
 
 voltage divider resistors for 12 volt system 1x18K to battery and  1x10K to ground
 
More information on voltage dividers to calculate a different voltage .
 
I use for a 12 volt Battery the highest voltage when it is charging so that the outcome going in to the input A1 of the Tiny is 5 volts. The maximum the Tiny input can handle is 5.5 to 6 volts.
If you follow this link you do not need to be a mathematician and just work with the calculator provided.
https://learn.sparkfun.com/tutorials/voltage-dividers
Car Batteries
If used in a dual battery system protecting the load battery the settings can be lowered to 11.89 volts.
If you discharge a lead acid battery lower than 11.89 volts you damage it.
 
A car battery is fully charged at 12.66 volt, charges at around 13.9 to 14.7 volts.
 
The battery monitor can be used on the main starter battery and can be programmed to cut out the power at 12.2 or 12.3 volts to have enough cranking power to start the car. ( This may change without notice)
 
*below data if you change to a 12 Volt Battery
*AGM 12Volt battery in a Car dual system
*Healthy resting voltage  12.8V-13V
*Absorption Voltage 14.7V
*Float Voltage  13.8
*Deat flat  11.89
12.66v . . . . . . . . . . 100%
12.45v . . . . . . . . . . 75%
12.24v . . . . . . . . . . 50%
12.06v . . . . . . . . . . 25%
11.89v . . . . . . . . . . 0%
Lipo Battery
Each cell has 3.7 volts, charged at 4.2 volts and discharged at 3.2 volts.
If you discharge the battery lower than that it can explode, start a fire or get permanently damaged.
 
Please note that Lipo batteries should not be left unattended when charging.
Those can set of a fire from overcharging, excessive heat and cannot be put out with water. I was informed that they keep burning under water as they produce their own oxygen.
 
However this instructable is to encourage you to build your own battery monitor and not scare you. But those warnings must be mentioned.
 
I would suggest using it outside on a solar system or in your car.
Car batteries let of toxic explosive fumes. Those are not charged inside a house or car.
A dual battery is a second battery usually used in four wheels drives.
 
If  a battery  does not fit inside the engine room as in my Toyota Prado you have to get a sealed battery inside the car. And usually a Deep cycle battery. Those are different from starter batteries and can handle lots of charging and discharging better. Most popular are AGM (Absorbed Glass Mat) batteries.
 
Cables
When using higher power to a car fridge thicker wire must be used.
My Engel Fridge draws 5 Amp. Depending on the cable length the size can be calculated here.
http://www.solar-wind.co.uk/cable-sizing-DC-cables.html
I just did a quick search to find you a calculator.
As a sample at 12 volts dc with a 5 Amp fridge and a cable length of 1 meter you will need a 2.5mm cable. Any less and the cable gets hot or burns. Too think and you lose power.
Or 12 volt, 5 Amps, 4 meter= 10mm wire
 
A suggestion is to use the battery monitor with a suitable 12Volt relay that handles the high current.
Kit Assembly Guide
If you make your own buy a circuit board of me or a kit.
Solder the input terminal
Solder the diode
Solder the fuse
Solder the DC-Dc converter
Solder the 8 pin socket
THEN APPLY POWER TO THE CIRCUIT AND ADJUST THE OUTPUT TO 5 VOLTS
Then solder the Mosfet’s and the 2x  1 K resistors  and the 2x   10K resisitors
There are different hole sizes provided at the output to directly connect  2 different outputs
The A2 and A3 input terminal are optional
Now we have R1 and R2 left over. Those two are voltage dividers and must be calculated for the Voltage you are putting in to the circuit.
Samples
Input voltage 5Volt R1 and R2 0 =5V
Input voltage 9 volt R1=8K and R2 =10K  volt out 5v
Input voltage 12 volt R1=15K and R2 = 10K  out 4.8v
Input voltage 14 volt R1=18K and R2 = 10K  out 5v
Input voltage 24 volt R1=27K and R2 = 7.5K  out 5.22 v
 
Installation Guide
Connect a suitable red cable from the battery to the device (fridge) and the Battery protector.
Connect a Black cable to the cut out switch.
Connect a black cable from the cut out to the device.
 
Thank you Massimo Banzi
Human nature is to make money or prevent a loss. Open source is different.
Helping others comes first.
THANK YOU Massimo Banzi :  https://www.arduino.cc/en/Profiles/MassimoBanzi
 You inspired me to take up my old electronics hobby, created and share my ideas free of charge to the world.
I knew there was a purpose for me in life.
 
 
 
 
 
 
 
 
Robert was born in Australia, but his mother went back to Germany when he was 7 years old.
 
We never had lights inside the dunny till I was 12.
When we finally moved to the big city of KIEL (North Germany) there was light inside the dunny, but I had to walk through the cold hallway that had an automated night light. And you guessed it. I could get there with the lights on but always had to find my way back in the dark.
So my interest in electrics and electronics started in an early age to change those problems. As a child my urge to change this was so great that I wound copper wire scraps around matches and glued them into match boxes. It looked cool, but only at the age of 20 my Aunty encouraged my ambition and bought me a 100 in one Dick Smith kit to learn electronics.
Recently I  became aware that some 400 million people have zero access to electricity in India alone since the grid does not reach their areas. Even Australia’s Power grid map does not look any better in the outback.
So I am spending my time and thousands of dollars to help the world with green technology because it is so much fun.
I learn from Electronic Clubs I find on  Meetup, and learn YouTube videos.
I love  to make small things. My interest for micro controllers and the smaller brother the ATtiny are my favourites.
As a fulltime profession I paint and repair houses (handyman).
I guess my true job description is. HELPING OTHER PEOPLE.
 
  

About Robert

Button

Where to buy?

Send me an email to arduinomastercomau@gmail.com
purchase price for the board $ 10
 
for the complete kit $ 20
 
free postage within Australia
$8 International