View unanswered posts | View active topics It is currently Mon Oct 23, 2017 9:57 pm



Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Always ON Power Design! 
Author Message
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14828
Location: Home sweet home!
This is a new thread purely on the subject of dual power with always on cpu power, ecu sense pin from key feed wire, and key feed wire to some accessories.

I don't think the ECU should control the power to the other PCB devices, the key should do that. The ECU should just control whether it is asleep or awake based on an interrupt from a trigger input from the key supply. You could potentially use that knowledge to keep, say, a fuel pump, or cooling fan, or electric water pump on after shutdown until things cool off, or for fixed delays. The main point, though, is to let it shut itself down such that information about time of shutdown, the last run time, the shutdown conditions can be remembered, and hot start better catered for by way of inference from previous conditions.

Now, as for how to divide it up you have three things :

  • Constant battery power to supply the CPU and what else?
  • Key switched battery power to tell the CPU that it should wake up, and power what else?
  • One input pin on the CPU to receive the key switched signal.

And the following things are true :

  • It doesn't matter much how much power is used when the key is on, but it does matter very much how much is used when the key is off, it should be absolutely minimal.
  • The vref signal should match the analogue sensor supply, but should also match the CPU supply pretty closely.
  • It doesn't matter much, if at all, if the analogue sensor supply and vref come off different regulators, it will be close enough by definition anyway
  • Anything else?

The question, as was being discussed in Marcos' thread, is how to achieve the seperation between the two supplies at 5v levels and ~12v levels, etc. Can Marcos and/or Jared and/or anyone else summarise anything that I've missed that was talked about previously in the other thread, please.

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Sat Oct 09, 2010 10:55 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jun 24, 2008 5:31 pm
Posts: 468
Just to get it written down:
It should be noted that both 5v regulators should be powered from the clean 12v constant battery power. Driving them from the noisy switched 12v (which supplies the power actuators, like injectors, ign,pumps,etc) can mess up with any 5v circuit. If this can reset a cpu in other EMS, then it can make external logic gates, sensors, and filters to behave incorrectly in our system.

That's why I proposed a switch circuit, so the switched 12v enables the second 5v regulator.

Quote:
Key switched battery power to tell the CPU that it should wake up, and power what else?

The second 5v reg?
Quote:
One input pin on the CPU to receive the key switched signal.

Can the cpu wake up from sleep with the ADC? It senses 12v (constant or switched?), so the information is there. Probably it can't, but I wanted to bring that up.

Another note:
The threshold voltage to decide if it is switched on/off should be low, otherwise it could have the same effect as an unwanted cpu reset. I think that our ~12v can go under 5v, so a 0.8v-1.4v threshold should be fine (the same threshold of the CPU logic zero).

Quote:
It doesn't matter much how much power is used when the key is on, but it does matter very much how much is used when the key is off, it should be absolutely minimal.

Lets put a number on it. I vote for <1mA at 25°C:-) (page 1252 of the cpu datasheet shows the current consumption in different conditions)

_________________
Marcos


Sat Oct 09, 2010 12:54 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14828
Location: Home sweet home!
nitrousnrg wrote:
Just to get it written down:
It should be noted that both 5v regulators should be powered from the clean 12v constant battery power. Driving them from the noisy switched 12v (which supplies the power actuators, like injectors, ign,pumps,etc) can mess up with any 5v circuit.

Just to be clear, there is no reason why the second 12v supply can't be clean and switched. it could come straight from the battery through a relay, and the relay could be controlled from the key to supply the device.

As for dirty, it probably doesn't supply anything, it's a return path for spike catching diodes, a pull up for extrernal 12v inputs, maybe a few lower power high side drivers, etc.

Quote:
That's why I proposed a switch circuit, so the switched 12v enables the second 5v regulator.

Sure, but the key switched power should control such a setup, not the cpu.

Quote:
Quote:
Key switched battery power to tell the CPU that it should wake up, and power what else?

The second 5v reg?

I didn't want to assume that we had more than one reg, even though it was my suggestion, maybe there is a better way?

Quote:
Quote:
One input pin on the CPU to receive the key switched signal.

Can the cpu wake up from sleep with the ADC? It senses 12v (constant or switched?), so the information is there. Probably it can't, but I wanted to bring that up.

Quite possibly!!! Awesome point, and definitely to be looked into. I'd be very happy to save another pin that way, perfecto, amigo!

Quote:
Another note:
The threshold voltage to decide if it is switched on/off should be low, otherwise it could have the same effect as an unwanted cpu reset. I think that our ~12v can go under 5v, so a 0.8v-1.4v threshold should be fine (the same threshold of the CPU logic zero).

Absolutely agreed! It might depend upon the internal design of the ADC unit, though, if that's possible. And if it does, we can tailor the voltage by adjusting the scaling resistors.

Quote:
Lets put a number on it. I vote for <1mA at 25°C:-) (page 1252 of the cpu datasheet shows the current consumption in different conditions)

I'm not qualified to comment. Maybe we could look at how much OEM devices draw to get a guideline?

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Sat Oct 09, 2010 1:21 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14828
Location: Home sweet home!
Just for reference from ages ago, a prelim external power wiring diagram I drew up :

http://i260.photobucket.com/albums/ii15 ... iring5.png

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Sat Oct 09, 2010 1:40 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jun 24, 2008 5:31 pm
Posts: 468
Quote:
Just to be clear, there is no reason why the second 12v supply can't be clean and switched. it could come straight from the battery through a relay, and the relay could be controlled from the key to supply the device.

Totally true, I wasn't being open minded enough.
Quote:
Quote:
That's why I proposed a switch circuit, so the switched 12v enables the second 5v regulator.
Sure, but the key switched power should control such a setup, not the cpu.

Okay, hardwired to the key, cpuless. I agree.
Quote:
I didn't want to assume that we had more than one reg, even though it was my suggestion, maybe there is a better way?

I don't think there is a better way. If you use one regulator, then you'll have to cut the power on the 5v side. I don't know any kind of electronic switch that could do that without a voltage drop (analog circuits are specially sensitive to this).
Quote:
Quote:
Can the cpu wake up from sleep with the ADC?

Quite possibly!!! Awesome point, and definitely to be looked into. I'd be very happy to save another pin that way, perfecto, amigo!

I should check the datasheet... I guess the cpu needs an interrupt to wakeup, lets hope the ADC module has some way to do this without delays .
Quote:
I'm not qualified to comment. Maybe we could look at how much OEM devices draw to get a guideline?

Good, short topic for another thread :-)

_________________
Marcos


Sat Oct 09, 2010 3:52 pm
Profile
1N4001 - Signed up
User avatar

Joined: Tue Jun 10, 2008 5:17 pm
Posts: 1607
nitrousnrg wrote:
I vote for <1mA at 25°C:-) (page 1252 of the cpu datasheet shows the current consumption in different conditions)

I say this sounds reasonable. I don't see specifying an off current as super critical at this point. It's handy to have an expectation to verify if we are unnecessarily wasting energy. I would say a 150Ah battery discharged over the course of a year would be a good minimum expectation. I believe that would correlate to a continuous current draw of about 17mA. At .017A * 8760 hrs/yr = 148.9 amps/year. Of course ignoring puchard (SP), temperature, ect.

If we find the current draw is over 17mA, it's to high and we should see if we can lower it, if it's under 17mA we may be able to push it down to 1mA if we try harder, but eh, it's also low enough.

I think we have touched about every thing else from the other threads, so not much new stuff for me to add. I think there may have been some conflicting comments, but I'll consider Fred's picture to be the designed power flow intent. I think it shows things being switched by the ECU where some comments may have noted they should be switched via key. Perhaps we should allow them switched by ECU, or if you don't like these extra parts in the middle, use the key if you like. I like ECU switch control because you can add inertia cut off and other such emergency cut offs. However, I can also see simplicity as valuable, especially on a first draft design.


Sun Oct 10, 2010 2:55 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14828
Location: Home sweet home!
What I intended to convey was that the stuff INSIDE the ECU should be controlled by key and not by CPU. In the diagram there are 8 relays, in two banks. The two banks are: 1) is key switched and controls various power feeds to the ECU and accessories such as wideband etc 2) is ECU switched and controls fuel pumps and power to coils and injectors. Somewhere on the forum is a list of what all the fuses and items are and are for, hence the letter/number labeling scheme. I'm not trying to say that various external accessories can't/shouldn't be controlled by CPU. As noted there are valid cases for external CPU controlled power, such as cooling fans, pumps, etc that you want to keep working after shut down.

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Sun Oct 10, 2010 3:29 am
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14828
Location: Home sweet home!
LM2940 (smd variants available) for main CPU power
LM2941 (smd variants available) for accessory and ADC power

Done.

http://www.national.com/mpf/LM/LM2940.html#Overview
http://www.national.com/mpf/LM/LM2941.html#Overview

Too easy.

For reference, power on signal goes from key input (which if relay switched and from battery could double for BRV feed) to a specific CPU pin (yet to be decided) and another specific CPU pin will then enable the second reg at its leisure.

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Wed Jul 13, 2011 5:03 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14828
Location: Home sweet home!
The above have about 10mA quiescent current, but doesn't specify the off quiescent current at all, which I would imagine is lower, but may not be.

http://www.national.com/mpf/LM/LM2937.html#Overview - 500mA max with 2mA quiescent current
http://www.national.com/mpf/LM/LM2931.html#Overview - 100mA max with 0.4mQ quiescent current

I'll probably end up using an LM2937 for CPU duties and an LM2941 for acc duties for a total quiescent of 12mA max.

Some units specify off current to be much lower again, I guess it doesn't matter much, though, it would take a very long time to drain even a small car battery at 20mA draw. EG typical car alarm LED on dash :-)

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Wed Jul 13, 2011 9:59 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jun 24, 2008 5:31 pm
Posts: 468
One little thing an experienced folk warn me about:

He had an always-on board, and used a variant of the 8051 MCU, for automotive stuff too (car alarms or something like that). This is what he stumpled into: when the mcu supply went under 4v or so, the mcu stopped, and IT DIDN'T START AGAIN when the voltage was restored, even with briefs undervoltage situations. So, he ended using a bit of circuitry to force a reset to the mcu while the voltage was under 8v.

I'd like to believe that our mcu has a brown out reset, voltage monitors inside, or other cool stuff like that to avoid these problems, but I think its worth mentioning it. Once in a while I see o get warned about weird behaviors in many different families of MCUs...

_________________
Marcos


Thu Jul 14, 2011 1:25 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.