ATTiny Output Directly Driving Regulator Enable Pin

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Switching regulator modules typically have an enable input with a high resistance internal pullup to Vin.

 

Vin is much higher than the Attiny Vcc--in my case, up to 25 volts while my ATTiny84 is on a 3.3V linreg.

 

The electrical spec for VIH is VCC+.5 max.  However, there is probably an input protect diode that will clamp the input voltage when such high value pullup resistors are used.  Current would be something like 25 uA maximum.

 

We used to worry about CMOS latchup, if inputs were higher voltage than VCC.  But, I suspect that enable inputs on DC/DC modules are routinely driven from 3.3V processors without issue.

 

Is this ok, or should I add a few parts to prevent current from flowing into an I/O when it is high?  (schottky diode clamp to vcc, or a transistor stage).

 

Thanks

 

 

This topic has a solution.
Last Edited: Sat. Oct 27, 2018 - 10:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

davethomaspilot wrote:
Switching regulator modules typically have an enable input with a high resistance internal pullup to Vin.

Go on - Which part are you considering ? because I would have thought typically not for a step down converter.

 

For the Diodes Incorporated AP5100 that I am using here is the enable pin desc. (Vin can be up to 24V)

 

EN 4

On/Off Control Input. Do not leave this pin floating. To turn the device ON, pull EN above 1.2V and to turn it off pull below 0.4V.

If enable/disable is not used, connect a 100kΩ resistor between EN to VIN

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Virtually any regulator that doesn't require an external pullup on the enable/!shutdown input.  For example:

 

https://www.pololu.com/product/2...

 

 

They have an internal pullup to Vin so you don't need an external component (or connection to the ENA/!Shutdown) if you aren't using that input.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah - That's a module; not an IC. Reading farther on that webpage ....

 

The regulator is enabled by default: a 270 kΩ pull-up resistor on the board connects the EN pin to reverse-protected VIN.

 

Therefore if that resistor is a nuisance then remove it.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, my question indicated it's a module.

 

I'd already sent a email to Pololu support asking if the resistor was external to the control chip, and if so, which one (so I could remove it).

 

But, this doesn't answer my question--is this necessary?  If so, it would be simpler to just add another component to my pcb.

 

Not that its relevant to my question, but there ARE requlator chips with internal pullups to Vin on ENA so you don't have to connect them externally.   I must, I'll provide some references.  

 

But that's not an answer to the original question.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not a good idea to connect +9V, +12V (or whatever your high supply is) though 270K to a micro pin even if it's in O/P high state. A definite no-no for mass production but for messing about on the workbench you'll probably get away with it.

 

A circuit something like this should be OK. (~PWR_EN connects to your micro output)

 

 

{ Edited to include Module internals }

 

Last Edited: Sun. Oct 21, 2018 - 08:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, that will work.  

 

Simpler is a 1K pulldown to ground.  1/270 * 25 volts is definitely a good down level for the ENA. 

 

 "A definite no-no for mass production"

 

Can you elaborate?  This is my question, not how to add components to avoid sourcing the 20-25 ua into the AVR I/O.   Again, I suspect many designs exist that drive an enable input like this with no issue.

 

Thanks for the reply.

 

 

  

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 "A definite no-no for mass production"

Short answer:  Its out of spec for the chip.

(Vin exceeds Vcc + 0.5 or whatever the limit is on the specific micro)

 

Longer answer:  You might well find that the chip is inadvertently partially powered, and not via the normal power on reset circuitry and internal Vcc bus.

The chip might well act flaky, and might not power up correctly until the power is removed from the pin, and the Vcc and AVcc pins are taken to ground, and then powered up properly.

 

JC

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:
For the Diodes Incorporated AP5100 that I am using here is the enable pin desc. (Vin can be up to 24V)

It's too bad that part cannot take higher voltages.  I was going to use that in a design that runs on 24 nominal, but can see voltages at 28 - 30.  Pity.  I like the simplicity.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The voltage on the pin might not exceed VCC+.5.  It depends on how much current the protect diodes sink at +.5 Vbe.   25 ua isn't much.  Too bad a maximum input current isn't specified instead of a voltage

 

The input protection circuitry is likely designed to handle this much current easily.  At least the ones we used on chips I've designed were.  But, lacking any details on what's on the chip, I agree that the positive current should not be allowed to flow into an input.

 

I have a footprint on the pcb for a pulldown.  It adds a negligible amount of power when the DC/DC is enabled.

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The "Regulator Enable" pin is ofen compatible with logic.

So look in the datasheet of your regulator how your specific regulator behaves here.

Or use a regulator that behaves better in this regard.

 

A Fet or bipolar transistor as mentioned in #6 can act as an easy translator if needed.

If your enable pins requires weird levels (Happens sometimes wit Audio Power Amplifier chips) you could think of adding an optocoupler for this.

 

Just yesterday I had a look at the datasheet of the PT4115

https://duckduckgo.com/html?q=pt4115+pdf

 

This is a Led driver with a dimming input.

Power supply upto 30V, and it can handle "up to" 1.2A on the output.

So this readily qualifies as a (specialized) Step-Down current regulaor.

The Dimming input is logic compatible ( input from -300mV to +6V).

It is one of the Ali / Ebay / China specials. You can buy 100 of these for EUR 3

That's 3ct a piece just like the uC meantioned recently :)

https://www.aliexpress.com/wholesale?SearchText=pt4115

 

On the west side of this globe you can hardly buy it:

https://octopart.com/search?q=pt4115

https://www.findchips.com/search/pt4115a

 

If you look closer at the DIM input, you see it has dual function.

Between 300mV and 2V5 it dims linearly,

But it can also be controlled by the PWM output of any logic chip such as a uC.

The moral of this story is that you have to study the datasheets of the chips you are using while designing stuff.

 

 

I think that Chinese stuff is so cheap over there because they realise they have redistribute their stuff around the globe.

If they do not facilitate this re-distribution the globe wil tilt untill China is more "Down Under" than Australia.

That would be a big mess. you have to re-calibrate all your clocks and the oceans might drain.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, there are many choices for buck regulator (or other step down) regulators.  Some don't have a pullup on the enable/!shutdown input so an exteranl pullup to a lower voltage can be used.

 

Of course you have to look at the datasheet while using any component.  That's what lead to the question.

 

Yes, it's easy to add a few components to interface with a pull-up to a high voltage.  The easiest is to simple use a pull-down to ground (which is on the first pass of the pcb).

 

My question was specific to the risk of directly driving a high resistance pull-up to something like 25 volts.  The resulting voltage may or may not exceed the specification, depending on the forward IV characteristic of the protection diode. 

 

The current will flow to the chips VCC, but in my application, that won't cause VCC to rise.

 

The only way to answer the question requires knowing the devices used for the input protection on the regulator chip in question.  I was hoping someone familiar with the ATTiny device level design in the input protection circuitry might answer the question.  For now, I'll just populate the resistor to ground--problem solved.

 

 

 

 

 

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sometimes weird things happen between what my eyes see and my brain interprets.

Sorry for that.

 

ATTiny84, Chapter 10 Page 54 has a picture of the I/O pin protection diodes (All pins except Reset).

 

There is an old Application Note for a zero cross detector using only a resistor from mains voltage, which relies on the ESD protection diodes to clamp the input voltage.

Some of the AVR datasheets give some specification that the ESD diodes. I think those say the diodes are able to conduct 2mA continuously 

 

Most people would play it safe, and add a skottky diode to clamp at Vcc+200mV or so, which is within official Spec.

If you are really curious, then take your tiny and do some measurements. Start injecting current till it fails.

 

Edit:

http://ww1.microchip.com/downloads/en/AppNotes/Atmel-2508-Zero-Cross-Detector_ApplicationNote_AVR182.pdf

 

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Tue. Oct 23, 2018 - 05:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Paulvhd!  That's the info I was looking for.

 

The zero crossing application referenced in the app note will source far more current than the pullup on the regulator module I'm using.  

 

I will measure the input voltage without the pull-down.  I'm thinking it will be less than VCC+.5, given the ap note says the diode will clamp to vcc+.5 a 1 Mohm resistor to 1000 volt input.  The 270K resistor will result in less than 100 ua in my application.

 

(Of course, a simple pull-down will prevent any current flowing into the input)

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

davethomaspilot wrote:

 However, there is probably an input protect diode that will clamp the input voltage when such high value pullup resistors are used.  Current would be something like 25 uA maximum.

That will likely be OK, but the other detail to worry about, is during reset, the AVR you think has control of the regulator, will enable it.

If you want the regulator to be off during reset, you need more parts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR you think has control of the regulator, will enable it. ,

 

yup, but not a problem in this application. 

 

Thanks

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

davethomaspilot wrote:
Current would be something like 25 uA maximum.
I guess that would be a fairly safe continuous current level for almost any digital logic (that has internal ESD diodes), even for weird circumstances such as an  un- powered target.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Sat. Oct 27, 2018 - 06:34 PM