nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 7:27 am

boyoh wrote:I must admit I don't have a car , I can't drive, I'm looking at this problem in a logic way
It is night time, you are are on a long 300mile journey, 150 miles into your journey, your
Battery monitoring system indicates a battery low problem, What do you do.
You can't turn your light off ,it is night time. So your home made monitoring system
Is telling you something, you can't do anything about, If you stop your car, you will
Compound the problem , It won't restart, So take the jump leads out . And have
A spare battery, If you are bothered about the weight, leave the snow shovel and the
Bag of gravel out , Now the battery looks very cheap.
So you might not know how a car battery and a car charging system works, but if your battery starts getting weak during a trip, there is only one explanation: Your alternator is dead, the battery is not being charged anymore. This will make the battery charge light come on in the car, notifying you that your trip is now limited and you will sure as nothing strand.
This is a very rare occurrence and I have owned 3 car and run them for the last 25 years and it has only ever once happened to me, alternators are very reliable and simple devices.
Now should such a thing happen, the raspberry pi device would do absolutely nothing. More specific, if you read all the posts in the thread, which everybody should before posting, you would know that my intention was to turn the monitoring device off during driving.
Now when you drive without an alternator, all the power from the car, ignition and lights and everything is pulled from the battery. You could easily switch off the car and restart it, as long as the battery still has charge, but the battery and electrical system was never designed for this situation and so your battery will run down really fast and then everything will stop.
Having an extra battery will do nothing much, except give you maybe another 100 miles, but then the car will again stop and even a jump start will not get you going anymore, you have to replace the alternator or get towed.
But again, alternators usually don't break, in the time I had one alternator break, I had about 15 batteries replaced, as mentioned in the this thread posts, deep discharging them will damage them beyond repair, which my raspberry pi device is designed to prevent from happening.
Batteries usually never fail while driving, but while the car is sitting around, NOT being driven.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 8:31 am

boyoh wrote:Problem solved , Keep a well charged spare battery in your boot.
Iff you suspect a low battery change it.

This is the obvious answer. Rather than cut the main power keep a reserve. That way all electrics keep working, gut you always have enough power to start the car.

Here's an example.

Another option is a bank of super capacitors that hold enough charge to start the car. Search YouTube for examples.

But your second point is the big one. a well maintained vehicle with healthy charging circuit and battery is what you need.

If some system on the car draws lots of current when the engine is off then fit a warning or relay so that it is disconnected when the engine is off. Most cars have a warning sound if the lights are left on.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 8:42 am

nigratruo wrote:Batteries usually never fail while driving, but while the car is sitting around, NOT being driven.
What do you have connected to your battery that discharges it? disconnect THAT when the engine is off

Something you seem to have overlooked is that adding a Pi-controlled heavy relay is itself a point of failure that could leave you stranded. If your Pi dies, or the SD card becomes corrupted or your 5V regulator blows or you have a bug in your code or your relay fails then your car dies, and don't expect AAA to fix that.

If your battery discharges with the car just sitting it probably has a fault. It should last months.
If you leave your car for months at a time put a solar charger in it to trickle charge the battery.

If you want to monitor batteries it makes sense to use a device that consumes negligible power itself. That is not a Pi. Use a microcontroller with a deep micro-power suspend mode. Most microcontroller chips such as PIC or Atmel (used on Aduino) or small ARM devices can do this, but watch out for voltage regulators or other peripheral circuitry that might waste energy.

nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 10:49 am

PiGraham wrote:
nigratruo wrote:Batteries usually never fail while driving, but while the car is sitting around, NOT being driven.
What do you have connected to your battery that discharges it? disconnect THAT when the engine is off

Something you seem to have overlooked is that adding a Pi-controlled heavy relay is itself a point of failure that could leave you stranded. If your Pi dies, or the SD card becomes corrupted or your 5V regulator blows or you have a bug in your code or your relay fails then your car dies, and don't expect AAA to fix that.

If your battery discharges with the car just sitting it probably has a fault. It should last months.
If you leave your car for months at a time put a solar charger in it to trickle charge the battery.

If you want to monitor batteries it makes sense to use a device that consumes negligible power itself. That is not a Pi. Use a microcontroller with a deep micro-power suspend mode. Most microcontroller chips such as PIC or Atmel (used on Aduino) or small ARM devices can do this, but watch out for voltage regulators or other peripheral circuitry that might waste energy.
Wow, why do you bother replying if you don't even read what was posted already in this thread???
You would realize THAT I ALREADY SAID SEVERAL TIMES that the battery can be reconnected without the pi. How would you use the pi for that if the power is off? It would need power too.
Cars dicharge batteries naturally (slowly), but again, I have said that already. Everybody that has a car and has let it sit for 4 weeks knows that.
AAA won't have a clue how a Pi works or anything complex like that, but why would I want to call AAA? I don't need to, THAT IS THE WHOLE POINT of this post, to use a pi for the solution.
And here we are in a Raspberry Pi forum and you are seriously recommending to use an Arduino? I can tell you this much: I will use a Pi, that is non negotiable. The Pi uses very little energy, again, check your facts, yours are obviously out of date and again, real the tread, this was asked already and answered by me, with a link.
I'm pretty frustrated how many posts here totally ignore the basic question and propose anything that has absolutely nothing to do with doing this with a raspberry pi, which this by the way, is a forum of.
Many can be summarized like this: Use another battery, do it by hand, don't drive a car, don't even try to do anything, it won't work, can't work, will be dangerous or whatever :-(

From now on, I won't bother even answering posts from people that have not read the messages in this thread. and what was discussed and explained so far. It is in the interest of everybody to not repeat things 10 times over and over.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 1:01 pm

nigratruo wrote:Cars dicharge batteries naturally (slowly), but again, I have said that already. Everybody that has a car and has let it sit for 4 weeks knows that.
Only if there's something wrong with your car or battery. It should last more than 4 weeks. Something is wrong with your car. Fix it.
nigratruo wrote:why would I want to call AAA? I don't need to, THAT IS THE WHOLE POINT of this post, to use a pi for the solution.
Adding a software controlled battery isolator is as likely to cause a problem as getting a flat battery. Fix the cause not the symptom, and don't add extra failure points if the objective is greater reliability.
nigratruo wrote:And here we are in a Raspberry Pi forum and you are seriously recommending to use an Arduino? I can tell you this much: I will use a Pi, that is non negotiable. The Pi uses very little energy, again, check your facts, yours are obviously out of date and again, real the tread, this was asked already and answered by me, with a link.
Nothing wring with my facts, thanks. A Pi uses hundreds of milliamps. A microcontroller uses a few microamps. Pi has no suspend mode.
nigratruo wrote:I'm pretty frustrated how many posts here totally ignore the basic question and propose anything that has absolutely nothing to do with doing this with a raspberry pi, which this by the way, is a forum of.
People are addressing the issue raised in the OP, not the dodgy idea of using a Pi to do something it's not best suited for.
nigratruo wrote:Many can be summarized like this: Use another battery, do it by hand, don't drive a car, don't even try to do anything, it won't work, can't work, will be dangerous or whatever :-(
If you can't take good advice don't ask for help. People are trying to help with the problem you said you had. Be nice.

nigratruo wrote:From now on, I won't bother even answering posts from people that have not read the messages in this thread. and what was discussed and explained so far. It is in the interest of everybody to not repeat things 10 times over and over.
If you headed the good advice, instead of complaining that it differs from your own idea there would be less repetition.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 2:34 pm

Of course if you know you will be leaving your car for a few weeks you can simply disconnect the battery. Use an isolator switch to make is easy, or just disconnect at the battery terminal.

https://www.amazon.co.uk/Car-Battery-Is ... B003DYQYXC

Rather than adding a load of one Pi that, in itself, would run a car battery flat in less than 4 weeks (You'd need some 120AH for the Pi alone), just turn off the power completely until you need it again.

boyoh
Posts: 1505
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Sep 09, 2016 3:05 pm

nigratruo wrote:
boyoh wrote:I must admit I don't have a car , I can't drive, I'm looking at this problem in a logic way
It is night time, you are are on a long 300mile journey, 150 miles into your journey, your
Battery monitoring system indicates a battery low problem, What do you do.
You can't turn your light off ,it is night time. So your home made monitoring system
Is telling you something, you can't do anything about, If you stop your car, you will
Compound the problem , It won't restart, So take the jump leads out . And have
A spare battery, If you are bothered about the weight, leave the snow shovel and the
Bag of gravel out , Now the battery looks very cheap.
So you might not know how a car battery and a car charging system works, but if your battery starts getting weak during a trip, there is only one explanation: Your alternator is dead, the battery is not being charged anymore. This will make the battery charge light come on in the car, notifying you that your trip is now limited and you will sure as nothing strand.
This is a very rare occurrence and I have owned 3 car and run them for the last 25 years and it has only ever once happened to me, alternators are very reliable and simple devices.
Now should such a thing happen, the raspberry pi device would do absolutely nothing. More specific, if you read all the posts in the thread, which everybody should before posting, you would know that my intention was to turn the monitoring device off during driving.
Now when you drive without an alternator, all the power from the car, ignition and lights and everything is pulled from the battery. You could easily switch off the car and restart it, as long as the battery still has charge, but the battery and electrical system was never designed for this situation and so your battery will run down really fast and then everything will stop.
Having an extra battery will do nothing much, except give you maybe another 100 miles, but then the car will again stop and even a jump start will not get you going anymore, you have to replace the alternator or get towed.
But again, alternators usually don't break, in the time I had one alternator break, I had about 15 batteries replaced, as mentioned in the this thread posts, deep discharging them will damage them beyond repair, which my raspberry pi device is designed to prevent from happening.
Batteries usually never fail while driving, but while the car is sitting around, NOT being driven.
Due to the fact, that you switch off the battery monitoring system while driving your car
You are bringing two equations in to your logic thinking

1. ( probability ) All parts are very reliable, and won't fail.

2. ( Diversity Factor ) That not all parts will be working at the same time.( Electrical )

If above is your logic thinking, why have you built a monitoring system

Why do you have AAA membership
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Wed Jun 21, 2017 10:31 pm

I currently don't have much time, but noticed from reports, that flat batteries still happen, even here in sunny California, where no cold will ever kill a battery. Even new cars seem to be build pretty dumb.
I will report back once I have my gadget built, to enlighten some of the people that commented here that a:) can't be done b:) shouldn't be done c:) will cause more problems that it solves.
I have no doubt that it will be very useful and be a success, EXACTLY because nobody else seems to be able to muster the optimism to try something like this.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Thu Jun 22, 2017 1:52 pm

nigratruo wrote:I currently don't have much time, but noticed from reports, that flat batteries still happen, even here in sunny California, where no cold will ever kill a battery. Even new cars seem to be build pretty dumb.
I will report back once I have my gadget built, to enlighten some of the people that commented here that a:) can't be done b:) shouldn't be done c:) will cause more problems that it solves.
I have no doubt that it will be very useful and be a success, EXACTLY because nobody else seems to be able to muster the optimism to try something like this.
Adding a power drain to shut off the battery is just a dumb idea.
Flat or faulty battery is one of the top 10 reasons for call-outs but the fix for that is simple - proper maintenance.
Don't fit power draining accessories (such as an always-on Raspberry Pi).

Of course a cut-off circuit can b done, but it doesn't fix the problem, which a fault in the electrical system of battery, or failure to charge the battery because the car is not used.
Get a solar charger, plug in to a mains charger, carry a portable jump starter. Even fitting a battery isolator switch for times you leave a car parked up for weeks is a better option than adding something that in itself will drain the battery in a few weeks at best.

If you insist on making something at least use a microcontroller with very low current sleep state. You can get to down to a few micro amps A Pi uses far too much power for this.

BTW make absolutely sure your door locks will work after a long time without power. Check that disconnection doesn't leave doors unlocked. Obviously alarm system will be off without power.

pcmanbob
Posts: 9878
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Thu Jun 22, 2017 2:54 pm

PiGraham wrote: BTW make absolutely sure your door locks will work after a long time without power. Check that disconnection doesn't leave doors unlocked. Obviously alarm system will be off without power.

I would be worried that if your doors are dead locked like my car and you disconnect battery how are you going to open the doors to reconnect ?

A common problem on modern cars that have dead locks battery goes flat cant get in car.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Thu Jun 22, 2017 3:49 pm

pcmanbob wrote:
PiGraham wrote: BTW make absolutely sure your door locks will work after a long time without power. Check that disconnection doesn't leave doors unlocked. Obviously alarm system will be off without power.

I would be worried that if your doors are dead locked like my car and you disconnect battery how are you going to open the doors to reconnect ?

A common problem on modern cars that have dead locks battery goes flat cant get in car.
Don't worry, you can out the AAA! :D

I think the OP intends to have some sort of manual switch to reconnect the half dead battery. The remote locking might work after that or it might not. If you have mechanical key locks you should be able to open the doors, but make sure those work! If you rarely use a key the locks can seize up.

nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 10:52 am

PiGraham wrote:
nigratruo wrote:I currently don't have much time, but noticed from reports, that flat batteries still happen, even here in sunny California, where no cold will ever kill a battery. Even new cars seem to be build pretty dumb.
I will report back once I have my gadget built, to enlighten some of the people that commented here that a:) can't be done b:) shouldn't be done c:) will cause more problems that it solves.
I have no doubt that it will be very useful and be a success, EXACTLY because nobody else seems to be able to muster the optimism to try something like this.
Adding a power drain to shut off the battery is just a dumb idea.
Flat or faulty battery is one of the top 10 reasons for call-outs but the fix for that is simple - proper maintenance.
Don't fit power draining accessories (such as an always-on Raspberry Pi).

Of course a cut-off circuit can b done, but it doesn't fix the problem, which a fault in the electrical system of battery, or failure to charge the battery because the car is not used.
Get a solar charger, plug in to a mains charger, carry a portable jump starter. Even fitting a battery isolator switch for times you leave a car parked up for weeks is a better option than adding something that in itself will drain the battery in a few weeks at best.

If you insist on making something at least use a microcontroller with very low current sleep state. You can get to down to a few micro amps A Pi uses far too much power for this.

BTW make absolutely sure your door locks will work after a long time without power. Check that disconnection doesn't leave doors unlocked. Obviously alarm system will be off without power.
Well, thanks for the insult, I would call it dumb to not read my posts, where I clearly 1. indicated that the battery could not get flat because it would be cut off, 2. that the zero uses VERY LITTLE current, by somebody that actually measured it with a meter (I have one too) I won't use a microcontroller, as that is more expensive than a zero and we are in a raspberry Pi Forum, otherwise I would post this somewhere else. I will also not use a solar charger, as that does not help, and if you forget your light at night, bang, your precious solar charger will be wasted money, the battery will be dead. My aim was: System that prevents run down of the battery, IN EVERY CASE, no matter what. Batteries do decharge naturally when connected to a chassis (again, repetition), I have a manual turn off, then it lasts for half a year or more without recharging. I have said all that before, and I think you just are stuck in a loop, don't really care what I want to do, but are more interested to stop my project.I won't repeat myself anymore, you guys have been extremely unhelpful, thanks a lot! All the stuff that does not work, pointing out problems that are clearly false and wil never occur is not a thing I need others for, I can do that myself.
When you ask somebody in a forum "help me repair this PC", it will be super helpful if you get 20 messages by people telling you it can't be done, you should not be doing it, it is dumb. I will try beating myself over the head and see it that feels better... Nah, feels the same, but does not help ;-)

And I don't have AAA, why would I? How did you get this idea? I think some people here have trouble understanding written text. The point is to build a device that does NEVER EVER cause a dead battery call to AAA anymore.

I have now a huge drive to realize that and then publish it here, and feel really smug that it works, complete with instructions how to get it done. I probably don't have to protect the idea for commercial use, as nobody will even care to implement it, at least not here *grin*

nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 10:59 am

pcmanbob wrote:
PiGraham wrote: BTW make absolutely sure your door locks will work after a long time without power. Check that disconnection doesn't leave doors unlocked. Obviously alarm system will be off without power.

I would be worried that if your doors are dead locked like my car and you disconnect battery how are you going to open the doors to reconnect ?

A common problem on modern cars that have dead locks battery goes flat cant get in car.
Oh really? Don't know about that one, all the cars I ever had have a physical key, the way the batteries run down constantly (even more on modern vehicles, as the power drain is massive with all the electronics that need to be on). So being locked out all the time when you forget the light or run down your battery is a really dumb thing that does not happen.
Think about it, who would design a moronic thing like this? Even the locksmith would be helpess, you can get the hood open, you can't charge the battery, you can't open the door.
*Tow car*, *throw down abyss*, *buy new car*.

For people that don't have cars and/or no experience with them, you seem to know a lot about them, oddly enough ;-)

nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 11:02 am

PiGraham wrote:
pcmanbob wrote:
PiGraham wrote: BTW make absolutely sure your door locks will work after a long time without power. Check that disconnection doesn't leave doors unlocked. Obviously alarm system will be off without power.

I would be worried that if your doors are dead locked like my car and you disconnect battery how are you going to open the doors to reconnect ?

A common problem on modern cars that have dead locks battery goes flat cant get in car.
Don't worry, you can out the AAA! :D

I think the OP intends to have some sort of manual switch to reconnect the half dead battery. The remote locking might work after that or it might not. If you have mechanical key locks you should be able to open the doors, but make sure those work! If you rarely use a key the locks can seize up.
Yes, he exactly intends that, a starting of the car is always possible, since the cut off happens before the battery is so dead that it won't start the car anymore, that threshold can be established by experimentation, the decharge and charge curve, as well as the voltage and the drop when ignition is on can show how low the battery is.
You can call this a fail save: Now matter what the car does, when the engine is off and the battery does not get charged, it is only allowed to go below a certain level, at this point the Pi will physically cut of the battery and terminate itself also (or I could use an extra Li-ION battery for the pie, that lasts a few more hours, till it then shuts down too). When I come back and I notice the battery "dead", I open the hood, push down the reconnect button (or turn a crank to reconnect it, whatever it would be) and then star the car and then the battery can charge again.
I have an old car that only uses normal keys, so I don't have that problem.

BMS Doug
Posts: 3823
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 12:35 pm

nigratruo wrote: 1. indicated that the battery could not get flat because it would be cut off,
2. that the zero uses VERY LITTLE current, by somebody that actually measured it with a meter (I have one too)
The zero is still a full linux PC running an operating system and associated overheads, You can possibly reduce the overheads by programming in bare metal (No OS) but that is complicated and the Pi still isn't the ideal device for your application.
nigratruo wrote:3. I won't use a microcontroller, as that is more expensive than a zero
Incorrect, you can buy an arduino clone for less than the price of a zero.
nigratruo wrote:4. we are in a raspberry Pi Forum, otherwise I would post this somewhere else.
It is the spirit of the raspberry pi forum that we will suggest the correct solution, not insist that a Pi is the answer to everything even when it is clearly unsuited to the application.

nigratruo wrote:5. I will also not use a solar charger, as that does not help, and if you forget your light at night, bang, your precious solar charger will be wasted money, the battery will be dead.

I have now a huge drive to realize that and then publish it here, and feel really smug that it works, complete with instructions how to get it done. I probably don't have to protect the idea for commercial use, as nobody will even care to implement it, at least not here *grin*
Everyone who has been telling you that the Pi isn't the right tool for this job has been doing so with the best of intentions,
Good luck with your project and let us know how it goes.
Doug.
Building Management Systems Engineer.

pcmanbob
Posts: 9878
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 12:42 pm

nigratruo wrote:
So being locked out all the time when you forget the light or run down your battery is a really dumb thing that does not happen.
It does happen probably more often than you would think, car forums often have questions about it asking how to get in car.
nigratruo wrote: Think about it, who would design a moronic thing like this? Even the locksmith would be helpess, you can get the hood open, you can't charge the battery, you can't open the door.
*Tow car*, *throw down abyss*, *buy new car*.
company's like the RAC & AA in this country know how to get round the problem. normally involves connecting second battery to starter motor + terminal and body of car which allows car to be opened using normal remote so battery can be changed.
used this exact method myself to get in to a friends car who suffered this exact problem.
nigratruo wrote: For people that don't have cars and/or no experience with them, you seem to know a lot about them, oddly enough ;-)
I do understand the electrical systems on cars probability better than the average motorist because I have been an electrical engineer all my working life.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 1:26 pm

nigratruo wrote:
PiGraham wrote:
nigratruo wrote: 2. that the zero uses VERY LITTLE current, by somebody that actually measured it with a meter (I have one too) I won't use a microcontroller, as that is more expensive than a zero
Various report indicate a PiZero draws 80 to 100mA in it's lowest power state. That is some 20,000 times the current consumption of an ATTiny microcontroller in sleep.
This is basically how H2OhNo! works. Power everything off, go to sleep, wakeup, do something useful (check for water), go back to sleep. By disabling the ADC during sleep, we can get the sleep current consumption down to 5uA! That’s 0.005mA, or 2000 times lower than our original rate.

https://learn.sparkfun.com/tutorials/h2 ... wer-attiny
ATTiny boards can be found for <£4, so cheaper than a PiZero.

You might think 100mA is nothing, but a 50AH 12V battery can provide about 600WH of energy and draining that at 0.5W continuously will flatten it in 50 days. Your solution will cause the very problem you seek to prevent. Your Pi solution will have to cut the power after just a couple of weeks to prevent the Pi discharging the battery.

If you used an appropriate device fo this it would last 2,000 times longer and the solution would not make the problem worse.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 1:32 pm

nigratruo wrote:I will also not use a solar charger, as that does not help, and if you forget your light at night, bang, your precious solar charger will be wasted money, the battery will be dead. My aim was: System that prevents run down of the battery, IN EVERY CASE, no matter what.
A solar charge will put charge into the battery, so it certainly can help. It could provide some of the energy your power-hungry Pi will use. It will correct for battery self-discharge that can be an issue when a car is not run for weeks.

Making an automatic circuit to turn off the lights after a time, or when daylight is detected, is a good idea, as is a lights-on warning. Do one of those instead.
Last edited by PiGraham on Fri Jun 23, 2017 2:22 pm, edited 1 time in total.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Fri Jun 23, 2017 2:01 pm

nigratruo wrote:
PiGraham wrote:I won't repeat myself anymore, you guys have been extremely unhelpful, thanks a lot! All the stuff that does not work, pointing out problems that are clearly false and wil never occur is not a thing I need others for, I can do that myself.
Be honest, you didn't post here for helpful advice, did you? You mind was made up before you ever wrote the opening post and you are rudely ignoring lots of sound advice and getting shirty about it. We have tried to help you get to a good solution. Often the best solution is something you didn't think of in the first place.

The best thing you can do for an old car that has an issue with flat batteries is to get a new battery that charges efficiently, has full capacity and holds charge for a long time.

nigratruo
Posts: 27
Joined: Tue Sep 24, 2013 2:20 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Sat Jun 24, 2017 12:32 am

BMS Doug wrote:
nigratruo wrote: 1. indicated that the battery could not get flat because it would be cut off,
2. that the zero uses VERY LITTLE current, by somebody that actually measured it with a meter (I have one too)
The zero is still a full linux PC running an operating system and associated overheads, You can possibly reduce the overheads by programming in bare metal (No OS) but that is complicated and the Pi still isn't the ideal device for your application.
nigratruo wrote:3. I won't use a microcontroller, as that is more expensive than a zero
Incorrect, you can buy an arduino clone for less than the price of a zero.
nigratruo wrote:4. we are in a raspberry Pi Forum, otherwise I would post this somewhere else.
It is the spirit of the raspberry pi forum that we will suggest the correct solution, not insist that a Pi is the answer to everything even when it is clearly unsuited to the application.

nigratruo wrote:5. I will also not use a solar charger, as that does not help, and if you forget your light at night, bang, your precious solar charger will be wasted money, the battery will be dead.

I have now a huge drive to realize that and then publish it here, and feel really smug that it works, complete with instructions how to get it done. I probably don't have to protect the idea for commercial use, as nobody will even care to implement it, at least not here *grin*
Everyone who has been telling you that the Pi isn't the right tool for this job has been doing so with the best of intentions,
Good luck with your project and let us know how it goes.
Well, I beg to differ, but there I got something nice to prove, I'm a very experienced IT person and am especially knowlegable with Linux and this can be easily done, it is the PERFECT tool for it, especially because it has a full OS, the Arduino would be a lot of work, since it is so limited. The only advantage is that the Arduino uses less power and is probably 2 dollars cheaper than a Zero (did not know that you can get Arduinos so cheap, I thought they cost at least 8 dollars or so). Not having a OS framework and having to do everything in C is very work intensive. Python works for me MUCH MUCH better, I get much faster results with it and code is much easier to maintain.

As I said, you should talk about facts, how much a Zero really uses, you are mistaken that it uses so much (I don't know where that false info comes from), but it is a very low powered device and when the CPU is not doing anything, it goes into microsleep mode (inbetween commands of the OS). In Linux you can customize it extremely well, you can deinstall every component that you don't need, and measuring how much power it uses then is very easy (USB power measurement dongle provides fact, not some theoretical specification fiction), see here, in case you want to also measure it:

https://www.amazon.com/DROK-Digital-Mul ... TF8&qid=14
For completeness here some facts, to show that the pi would not run down the battery needlessly:

For completeness here some facts, to show that the pi would not run down the battery needlessly:
98262037&sr=8-2&keywords=usb+power+measuring

I use the Pi because it allows me to finish projects much faster, in my view the Arduino is obsolete Technologiy (minimalism) and likely it will also get an OS soon, (the devices getting bigger) as you will need networking, logging, filesystem access, storage etc... everything that an OS provides, if this is all tacked on, you get one gigantic mess that does not scale, at that point you are much better using a Pi with a standard Linux OS like Raspian that is among the most solid and reliable OS on the planet (thanks to more mature (older less buggy) code.

But hey, everybody can use whatever they want. I think that some people get the kick out of trying to make it extra hard, to prove with little resources they can manage, in my eyes minimalism, that leads to much wasted time that is not necessary to finish a project.


https://www.jeffgeerling.com/blogs/jeff ... zero-power


For completeness here some facts, to show that the pi would not run down the battery needlessly:

The zero in idle uses 80 mA (0.4W), a typical Car battery has 960 watt hours (so either 960 hours with 1 watt, or one hour with 960 watt), so a Pi, would should be able to run quite a long time till it has totally discharged the battery, a light bulb will use more power.

--------
It is the spirit of the raspberry pi forum that we will suggest the correct solution, not insist that a Pi is the answer to everything even when it is clearly unsuited to the application.
---------
I do understand that you guys feel that it is only suited to certain purposes, like being educational for kids, because you built it for that. I have found it EXTREMELY useful for tons and tons of applications, so far I built a sous vide cooker, automatic wood pellet stove (temparature controlled, for heating a hot tub, via an immersion stove in the water: Wood pellets are dirt cheap here in the US.), a heart rate monitor (for day long monitoring), internet proxy, mediacenter (Kodi, Libreelec), surveilance system (with video cam), one project that I'm doing is access control via RFID and NFC door access control (via cryptokey), home automation system that beats insteon in function and price, etc. and it is suited surprisingly well. The combination of the hardware with an Linux OS that is the most flexible operating system worldwide is an extremely powerful combination for IoT and I will keep building more and more things still.

As batteries get more powerful (and they will, especially with electric cars pushing that need), power usage will become less and less important.

There would not be 1 Million sold RPIs, if uses were that limited. You might not support them, but they still are done. Especially the Zero is a game changer, there has never been a fully functional computer for 5 dollars and I predict a market of surely 50 Million of them, but of course production is so slow that it will take years for this, I know many people (including me) that would love to buy Zeros in a 10 pack for 50 dollars, because they are, as you say, a dime a dozen. But of course you can only buy them one at a time, which is kinda crazy: This would be like you can buy fancy pens that cost 6 dollar a piece in unlimited amounts, but when you want to get a dirt cheap biro, that costs 10 cents per piece, you can only buy one. So the most popular Raspberry Pi product is the one with the most limited production. I can imagine that the Zero is maybe overshadowing the RPI 3, because although that is powerful, many people opt to get something that is as power saving or even more than a single core RPI 1, because, in my case, they are already more than enough powerful for the job, a Pi for this project with the car battery would twiddle its thumbs 99.99999999999999999999% of all time and I might be able to deactivate so much in the OS because it is not needed (like the whole network stack) And a computer that costs 35 dollars is not a novelty anymore, there are tons and tons of them, RPI's own products and competitors, but the zero stands alone so far in its versatility and at the same time extremely low price. Imagine what people in the 2000 would have thought, to know that a 1 GHz PC that costs thousands back then, complete with powerful GPU and huge amount of RAM (back then), would be available for just 5 dollars? Crazy!

I think it might be that the foundation was surprised by the success and attention that the Zero is getting and the huge demand for it. The reason is clear: for 100 or 200 dollars, you will consider where you use ONE computer, for 35 dollars you might use 4 of them, but then it starts costing again, while the Zero, you could use 7 of them for the price of a normal Pi, making them so dirt cheap that they literally become discardable. If you blow one up because you wire something wrong, who cares?

So I will report back once I have solved the most difficult problem, that has nothing to do with the Pi: how to have a hardware shutoff, that is fail save (does not deploy by accident), but not so hard to operate (a screw that gets wound into a connector and makes contact? Or a very heavy duty relay that allows 200 amps of power flow through for starting the engine.
How do you reconnect it easily without a tool? I always see a spring that can get unlocked and then disconnects. Then when you get back and find the car powerless, you can push it down to engage (and lock it) again and reconnect the battery.
I'm even sure I could make this a very well selling product with the right marketing with the slogan "never have a dead battery again!"
and the guarantee says that it is physically not possible that the battery runs down with this system, no matter what does the decharging, UNLESS the battery is old and damaged and needs replacing, at which point of course no other system will work, not even a solar trickle charger.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Sat Jun 24, 2017 1:08 pm

nigratruo wrote: The zero in idle uses 80 mA (0.4W), a typical Car battery has 960 watt hours (so either 960 hours with 1 watt, or one hour with 960 watt), so a Pi, would should be able to run quite a long time till it has totally discharged the battery, a light bulb will use more power.
How long? Work it out! One of the issues you want to protect against is leaving a lightbulb on, and you propose to do that by adding the equivalent of a lightbulb to your car.

Using your numbers 100 days would consume 100% of the initial charge in the battery, but you don't want to use it all because you need enough charge to start the car. SO say 20% is acceptable loss to run the Pi. So your system will operate for 20 days. OK if you don't really need it but not so clever if you do.

PiGraham
Posts: 4088
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Sat Jun 24, 2017 1:14 pm

nigratruo wrote: So I will report back once I have solved the most difficult problem, that has nothing to do with the Pi: how to have a hardware shutoff, that is fail save (does not deploy by accident), but not so hard to operate (a screw that gets wound into a connector and makes contact? Or a very heavy duty relay that allows 200 amps of power flow through for starting the engine.
Alternatively, you don't need to disconnect the battery from the starter, the only bit that draws such high currents. You only need to isolate the low current accessories that can slowly drain the battery, such a lights, audio system, accessories connected to the lighter socket and so on. You can use standard automotive relays for that. The lights will be switched by relays already and you only need control the smaller coil current to force them off.

grahamed
Posts: 277
Joined: Mon Jan 30, 2012 7:01 pm

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Sat Jun 24, 2017 6:34 pm

Hi

So this topic is still running and generating more hot air than most.

Having read through it again I see there are any number of factual errors, false assumptions, etc which are then corrected, possibly ignored, forgotten about, resurrected, recycled as firelighters, whatever.

For my $2/100 -

the idea is interesting but car manufacturers are neither fools nor charlatans and would have probably done it if were such a good idea.

new lead-acid batteries are OK, old lead-acid batteries are not.

every vehicle I have seen for a while has had several wires leaving the battery area - the big fat one is the starter and can be safely ignored in this context, one or more of the little ones are the ones to be cut-off.

battery cut-offs are common in the leisure battery of motor-homes and not at all complicated

Mercedes-Benz recommend connecting a trickle-charger to prevent battery discharge when leaving the vehicle for more than 4 weeks though how this is managed at the airport is not clear. I have not seen this in other manfacturer's manuals.

an Arduino can be put to sleep for hours at a time to minimize current draw - if you must use a Pi use a timer (an Arduino?) to wake it up every few hours and program it to do its thing then shutdown again. Again the Pi lacks the ADC provided on the Arduino. Forget it - use an Arduino, or go mad and use an ESP8266 and micro-Python. Better yet, just don't do it.

User avatar
Imperf3kt
Posts: 3824
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Automatic Car Battery Cut off to prevent rundown andAAA

Mon Jun 26, 2017 1:30 am

Can I facepalm yet?
If you leave the lights on in a modern car built after the 1990s, it should beep at you until you turn them off or crank the engine.

If you're too silly to investigate why your car is beeping, then you deserve to get a flat battery.
55:55:44:44:4C
52:4C:52:42:41

Colttan
Posts: 1
Joined: Thu Jul 30, 2020 1:41 am

Re: Automatic Car Battery Cut off to prevent rundown andAAA call

Thu Jul 30, 2020 2:24 am

One could eliminate the risk of vehicle shutting down while driving, which would most likely be due to a loose connection or failing alternator (though even if the battery was disconnected while driving the alternator should keep the vehicle running in most cases), by running a trigger wire or relay from the ignition switch so that the battery wouldn't be disconnected when the key is in the run/on or start position. The idea would be a fail safe that disconnects the battery from the entire system (aside from the ignition switch which won't draw power unless it's turned from the off position) if the voltage or current were to fall below the minimum required to start the vehicle, also compensating for any discharge from the cut-off device, if it doesn't have it's own backup battery, as well as security systems, clock/radio settings, computer memory, and any other essential functions for a certain amount of time (which could be adjusted if desired). Once the key is cranked it would send the signal, or gate voltage, to the device and reconnect the battery. I don't see any safety risks to doing this, assuming that everything is wired and programmed correctly. If anyone knows a device like this that exists, please send a link lmao. Otherwise a kill switch or various relays may be the next best thing.

Return to “Automation, sensing and robotics”