Power control of the EMS system

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
Brian
QFP80 - Contributor
Posts: 42
Joined: Sat Jul 26, 2008 1:08 pm

Re: Power control of the EMS system

Post by Brian »

Brian wrote:One of the three 12V feeds, the one that gives battery voltage info to the cpu, does it need to ever be turned off?
As in, the 12V ref would supply an ADC port, plus the current through the divider network. If the divider network totalled 13K for example, then 1mA would flow through that, what would the ADC port draw while the uP is asleep? Just wondering if something can be simplified here, one less wire or one less relay maybe.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Power control of the EMS system

Post by Fred »

No, you are right, that could be left on without issue too I guess.

It would be easy to keep adding things that are always on though and deteriorating the battery stand by performance though.

The network is 39k + 10k = 49k so it's not worth worrying about at all.

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!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Power control of the EMS system

Post by jharvey »

About switching the 12V feed w/o relay. Here's a way to do high side switching with a enhanced mode PMOSFET.

Image

Enhanced mode for NC operation, and the resistor should ensure it defaults that way. Then PMOSFET should invert the polarity to create the transition to the active state when it's negative relative to source.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Power control of the EMS system

Post by Fred »

That's not quite right.

It should be switched 12v controlling it and constant 5v in and switched (by you) 5v out.

Also, if you do it this way, you are going to have way more error in your temperatures due to voltage difference between 5v ref and 5v sensor supply than what you would have got from self heating :-p

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!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Power control of the EMS system

Post by jharvey »

You can switch it before the 5V reg yes? Also a resistor divider off of 12V switched can be used to create a 5v (or what ever) ref is needed for the MOSFET.

By switching 12V vs 5V, if the MOSFET drops a volt or two, you still have a good 5V ref.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Power control of the EMS system

Post by Fred »

Sure, but you then need a full second regulator setup and probably the main benefit is lost.

:indiff:
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!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Power control of the EMS system

Post by Fred »

With regards my desire for caps before and after the regulators with a series resistor before to help filter even more, from a conversation between myself and baldur on msn :
(02:59:01) baldur: "Power supply board now with 4 regulators, 2 inductors and many capacitors"
(02:59:11) baldur: that's one thing that has always plagued the megasquirt power supply
(02:59:15) baldur: not enough capacitance
(02:59:23) baldur: both on the v2.2 board and 3.0
(02:59:52) baldur: I've found that it helps a lot to have a lot of capacitance
(03:00:14) baldur: and where current consumption allows, series resistance in front of the regulators
(03:00:31) baldur: increases the filtering effect of the capacitors a lot
He also corrected something else that I have not been thinking much about...

The large cap post the regulator is almost useless, leave an electro there, but maybe 220uF and double the one before the reg if anything. Reason being, the one after the reg is at 5v so for a start it stores less energy and secondly, as soon as it starts draining the voltage will fall below 5.0 and it becomes useless. So, reservoir caps must be pre the regulator. Decoupling caps afterwards ad before.

Cheers for knocking some sense into me baldur!

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!
User avatar
Delta
LQFP112 - Up with the play
Posts: 111
Joined: Fri Jul 25, 2008 8:04 pm
Location: Perth, WA, Australia

Re: Power control of the EMS system

Post by Delta »

Generally the largest caps are after a regulator not before - the reason being if current demand momentarily exceeds the regulators limit, there is somewhere to draw the current from. Also there aren't any reverse polarity problems after the reg so cheap polarised electros can be used. Thats the general thinking anyway.

I tend to massively over cap things like this (don't ask why its probably just me) ie put 1000uF before and after. In the case of the regulator - if you draw more current than the wire can supply and you have no input cap then the input voltage drops to the reg - at startup this could be a problem, any other time its not. However if you draw more current than the reg can supply and you have no cap then the voltage drops. Things to think about?
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Power control of the EMS system

Post by Fred »

Which side they go on depends on their purpose. The purpose for the outer ones is to buffer during cranking.Their function will be averaging the dips and peaks in voltage during that time.

In terms of after the regulator they need to be appropriate for the level of current drawn and the change in current drawn and rate in that change. IE, the regulator can react to a certain rate of current change without issue, and the cap only has to prevent voltage drop and ripple in the period not covered by the regulator. Realistically the regulators are pretty fast and don't allow much ripple with quite small caps, but I am also like you in that I prefer to overkill the caps significantly :-)

Having larger ones on the inside of the reg also means a slower switch off which probably doesn't matter, but could be negative.

I realised while writing this that we could actually calculate exactly what is required on both sides of the reg. Perhaps someone would like to do that?

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!
User avatar
Delta
LQFP112 - Up with the play
Posts: 111
Joined: Fri Jul 25, 2008 8:04 pm
Location: Perth, WA, Australia

Re: Power control of the EMS system

Post by Delta »

Actually we can't - not without knowing what the noise looks like both at the input and how much noise is generated by the digital switching on the output. I've run a few simulations and done some calcs, but what ever way you look at it, the caps are there only to filter noise really. Nothing is going to be big enough to hold voltage high while cranking. If you put bypass and supply caps at each digital chip then I'de say you only need about 10uF + bypass at the output. The input should be reasonably well filtered IF during normal running we are expecting voltage to drop below say 8-7V for more than 1ms on a periodic basis. I'de just put a 220uF minimum at the input? Thoughts?
Post Reply