Maker Pro
Maker Pro

Microcontroller pin high when Vcc low.

eem2am

Aug 3, 2009
429
Joined
Aug 3, 2009
Messages
429
Hello,

We implemented a SAM3N00B microcontroller, and one of its pins switchs on an NPN which turns a battery charger current source OFF.

Unfortunately, when the microcontroller has just 1V on its Vcc pin, it turns this BJT ON and this unfortunately turns OFF the charger current source.
-this behaviour is not wanted.
-when the microcontroller's Vcc voltage is below the start up voltage of the microcontroller we do not want the micro to turn ON the NPN.

Anyway, its happening, so we need some component or circuit which is like a switch, and this switch must only apply volts to the Vcc of the microcontroller when the voltage is 3V. -then the micro won't be able to switch the NPN ON when the micro's Vcc is just 1V, because the micro will never have just 1V on it.

Does such a component exist? (it would probably be composed of an internal reference and a high side FET which turns ON when the rail voltage gets to 3V.

The SAM3N00B is not supposed to start up until its Vcc is 1.62V, so when the Vcc is just 1V, it must be some strange behaviour thats being exhibited....it couldnt be anything to do with the code, because the micro is programmed to start up and keep the NPN switched OFF at first

I thought a microcontroller's pins were "high impedance" until the full Vcc voltage was present on the Vcc pin?

SAM3N00B datasheet
http://www.atmel.com/Images/doc11011.pdf

Anyway, do you know of the above described "switch" component? (i could make one from a FET, a reference and a comparator, but really need a small integrated solution.)
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
I have no idea how precise or specific your needs are or the overall design but a quick and dirty, pull that output pin down with an external resistor, you can vary the resistor to vary what is needed to flip it high... Or put a diode or two on the output pin so that your low voltage leak won't pass...

As I said those are quick and dirty hacks, if this is something that requires or needs more professionalism or accuracy this is not the answer...
 

eem2am

Aug 3, 2009
429
Joined
Aug 3, 2009
Messages
429
Thanks, but i need something, that will only apply vcc to the micro when its got to 3V....its a flat battery voltage thats creeping up because its being slow charged by a current source, and it must be allowed to creep up to 3V before the micro gets any voltage on its vcc......at the moment the micro is turning off the current source too early
 

eem2am

Aug 3, 2009
429
Joined
Aug 3, 2009
Messages
429
It emerges that the problem is the pullup resistors , which are enabled even when the micro is at sub start-up voltage.

The answer, as you say, will be to put a resistor between B and E. But to assess its value, i need to find the garanteed start up voltage of the microcontroller.

What is the minimum vcc voltage at which all Atmel SAM3N00B microcontroller parts from any production batch can be gauranteed to start up?

Page 696 of the datasheet appears to say that the SAM3N00B may start up at any voltage between 1.62V and 3.6V..-but is it garanteed to start up at 1.62V?

SAM3N00B microcontroller datasheet
http://www.atmel.com/Images/doc11011.pdf
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Do you have a reset controller (with voltage supervision) in your circuit? You can use this to hold the base of the BJT low while the µC is in reset.
 

eem2am

Aug 3, 2009
429
Joined
Aug 3, 2009
Messages
429
Thanks, but wouldnt you prefer the simple solution of the BE resistor?..or was i wrong about the pullups...?...is there something else too that puts a voltage out on the pin when vcc = 1V?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I would think the series diode would be the best solution. I would aso try a voltage detector that pulls the reset line low until the input voltage reaches a guaranted working level.

Does this same thing happen with the reset line pulled low?
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
You should be aware of the fact that the lowest guaranteed voltage the core will start on is 1.95V. <1.62 V is the highest voltage the core will not start on.

You should also think about the use of the battery. No battery likes to be totally discharged, many will not survive it at all. Normally the battery should be disconnected when the voltage level is too low. This disconnect logic should also include a form of hysteresis, and not reconnect the load until the voltage is restored to an acceptable level. If you do this, the problem with the pullup should also disappear.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
It's not normal to switch the MCU's power supply voltage the way you suggest in your original post. Often, MCU input pins are driven from voltage sources, and disconnecting VCC from the MCU could possibly cause damage to its inputs. Also, current feeding into input pins can be passed onto the MCU's VCC through the diode protection circuits on the pins, so the MCU could power up (weakly) anyway.

The MCU has built-in power-on reset, so I assume it holds itself in reset until it has enough voltage to operate. Is that the 1.62V threshold you mentioned in your first post?

Sure, you can use a pulldown resistor. Make sure it's low enough to pull the voltage to safely under 0.6V at the maximum specified weak pullup current over the full operating temperature range. (The weak pullup current is probably not a well-controlled parameter.) It will waste some current, of course.

You could make that pin active low and drive a PNP from it, with its emitter connected to VCC. The collector would drive the base of the existing NPN. Or you might be able to change the charge controller circuit to avoid adding extra components.

Can you post a schematic of what you have so far? Mainly I'm interested in what drives the MCU's reset input, and how the I/O pin controls the charger.

Are there any I/O pins on the MCU that don't have weak pullups?
 
Top