Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

AVR inputs

AVR inputs

2009-07-29 by Brian

I made a module for a car to monitor inputs. Since inputs can only be VCC +/-0.5V for a high signal, how do you keep the inputs from getting to the micro before VCC is applied? It keeps blowing my inputs so they dont work.

One thing I thought about is using a mosfet switch controlled by an output of the micro to allow the signal only once it is started up.

Brian

Re: AVR inputs

2009-07-29 by Brian

Tim,

I have also done this, My friend is hooking it up in his car and I havent had a chance to see what exactly what he is doing so I am only going on what he says he is doing. I really need to get out to his house to make measurments and see what he is doing.

Brian 

--- In AVR-Chat@yahoogroups.com, "Tim Gilbert" <tim@...> wrote:
Show quoted textHide quoted text
>
> Brian,
> I'm guess you've got another problem; just applying 5 volts to an input without VCC applied shouldn't blow things up.  For example, I've connected a STK500 for programming a processor but didn't have power applied; no damage.
> 
> What are these inputs?
> 
> Regards,
> 
> 
> Tim Gilbert
> JEM Innovation Inc.
> 303-926-9053 (office)
> 303-437-4342 (cell)
> 720-890-8582 (fax)
> www.jeminnovation.com
> www.pdksolutions.com
>

Re: AVR inputs

2009-07-29 by Brian

Never thought about that one. Man do I have a lot to learn. Thanks.

Brian

--- In AVR-Chat@yahoogroups.com, Jim Wagner <wagnerj@...> wrote:
Show quoted textHide quoted text
>
> One way is to add a series resistor to each input (say 4.7K to 10K),  
> then add a diode (preferably Schottkey,j but silicon junction will  
> work) from each input to the processor Vcc, cathode to Vcc. That will  
> limit each input at the micro to the current Vcc )(plus one diode drop).
> 
> Jim Wagner
> Oregon Research Electronics
> On Jul 28, 2009, at 7:40 PM, Brian wrote:

Re: [AVR-Chat] AVR inputs

2009-07-29 by Jim Wagner

One way is to add a series resistor to each input (say 4.7K to 10K),  
then add a diode (preferably Schottkey,j but silicon junction will  
work) from each input to the processor Vcc, cathode to Vcc. That will  
limit each input at the micro to the current Vcc )(plus one diode drop).

Jim Wagner
Oregon Research Electronics
On Jul 28, 2009, at 7:40 PM, Brian wrote:

> I made a module for a car to monitor inputs. Since inputs can only  
> be VCC +/-0.5V for a high signal, how do you keep the inputs from  
> getting to the micro before VCC is applied? It keeps blowing my  
> inputs so they dont work.
>
> One thing I thought about is using a mosfet switch controlled by an  
> output of the micro to allow the signal only once it is started up.
>
> Brian
>
>
> 



[Non-text portions of this message have been removed]

Re: [AVR-Chat] AVR inputs

2009-07-29 by Tim Gilbert

Brian,
I'm guess you've got another problem; just applying 5 volts to an input without VCC applied shouldn't blow things up.  For example, I've connected a STK500 for programming a processor but didn't have power applied; no damage.

What are these inputs?

Regards,


Tim Gilbert
JEM Innovation Inc.
303-926-9053 (office)
303-437-4342 (cell)
720-890-8582 (fax)
www.jeminnovation.com
www.pdksolutions.com
Show quoted textHide quoted text
  ----- Original Message ----- 
  From: Brian 
  To: AVR-Chat@yahoogroups.com 
  Sent: Tuesday, July 28, 2009 8:40 PM
  Subject: [AVR-Chat] AVR inputs


    I made a module for a car to monitor inputs. Since inputs can only be VCC +/-0.5V for a high signal, how do you keep the inputs from getting to the micro before VCC is applied? It keeps blowing my inputs so they dont work.

  One thing I thought about is using a mosfet switch controlled by an output of the micro to allow the signal only once it is started up.

  Brian



  

[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: AVR inputs

2009-07-29 by Jim Hatley

You might consider an opto isolator to be sure nothing bad gets to the processor. Inexpensive and easy to apply.

Jim
Show quoted textHide quoted text
  ----- Original Message ----- 
  From: Brian 
  To: AVR-Chat@yahoogroups.com 
  Sent: Tuesday, July 28, 2009 8:01 PM
  Subject: [AVR-Chat] Re: AVR inputs


    Never thought about that one. Man do I have a lot to learn. Thanks.

  Brian

  --- In AVR-Chat@yahoogroups.com, Jim Wagner <wagnerj@...> wrote:
  >
  > One way is to add a series resistor to each input (say 4.7K to 10K), 
  > then add a diode (preferably Schottkey,j but silicon junction will 
  > work) from each input to the processor Vcc, cathode to Vcc. That will 
  > limit each input at the micro to the current Vcc )(plus one diode drop).
  > 
  > Jim Wagner
  > Oregon Research Electronics
  > On Jul 28, 2009, at 7:40 PM, Brian wrote:



  

[Non-text portions of this message have been removed]

Re: [AVR-Chat] AVR inputs

2009-07-29 by David Kelly

On Jul 28, 2009, at 9:51 PM, Jim Wagner wrote:

> One way is to add a series resistor to each input (say 4.7K to 10K),
> then add a diode (preferably Schottkey,j but silicon junction will
> work) from each input to the processor Vcc, cathode to Vcc. That will
> limit each input at the micro to the current Vcc )(plus one diode  
> drop).


There is an Atmel apnote describing how one might monitor AC zero  
crossings which states there is already a protection diode on all  
inputs which is good for up to 1 mA. The apnote used a large value  
1000V rated resistor in series to connect direct to 120V AC. And then  
goes on to say something to the effect, "Use at own risk."

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Re: AVR inputs

2009-07-29 by s.holder123@btinternet.com

Put a pull up resistor between Vcc and the microcontroller input pin, then a diode (1n4001)Anode between the junction of the resistor and the microcontroller pin and the cathhode to the Car input (Perhaps a cap between junction of pull up resistor and microcontroller pin as well. This isolates the microntroller from excessive input values and limits and current via the pull up resistor, the cap provides a simple low pass filter. As long as the input doesn't exceed the reverse breakdown voltage all will be well. Auto electrics tend to have lots of nasty stuff "hanging" on the signal and power lines so you need to isolate the microcontroller inputs form this. The opto-isolater idea might be required but i think this might doe the trick.

Regards

--- In AVR
-Chat@yahoogroups.com, David Kelly <dkelly@...> wrote:
Show quoted textHide quoted text
>
> 
> On Jul 28, 2009, at 9:51 PM, Jim Wagner wrote:
> 
> > One way is to add a series resistor to each input (say 4.7K to 10K),
> > then add a diode (preferably Schottkey,j but silicon junction will
> > work) from each input to the processor Vcc, cathode to Vcc. That will
> > limit each input at the micro to the current Vcc )(plus one diode  
> > drop).
> 
> 
> There is an Atmel apnote describing how one might monitor AC zero  
> crossings which states there is already a protection diode on all  
> inputs which is good for up to 1 mA. The apnote used a large value  
> 1000V rated resistor in series to connect direct to 120V AC. And then  
> goes on to say something to the effect, "Use at own risk."
> 
> --
> David Kelly N4HHE, dkelly@...
> ========================================================================
> Whom computers would destroy, they must first drive mad.
>

Re: AVR inputs

2009-07-29 by richardlfry@btinternet.com

--- In AVR-Chat@yahoogroups.com, "s.holder123@..." <s.holder123@...> wrote:
>
> Put a pull up resistor between Vcc and the microcontroller input pin, then a diode (1n4001)Anode between the junction of the resistor and the microcontroller pin and the cathhode to the Car input (Perhaps a cap between junction of pull up resistor and microcontroller pin as well. This isolates the microntroller from excessive input values and limits and current via the pull up resistor, the cap provides a simple low pass filter. As long as the input doesn't exceed the reverse breakdown voltage all will be well. Auto electrics tend to have lots of nasty stuff "hanging" on the signal and power lines so you need to isolate the microcontroller inputs form this. The opto-isolater idea might be required but i think this might doe the trick.
> 
> Regards
> 
> --- In AVR
> -Chat@yahoogroups.com, David Kelly <dkelly@> wrote:
> >
> > 
> > On Jul 28, 2009, at 9:51 PM, Jim Wagner wrote:
> > 
> > > One way is to add a series resistor to each input (say 4.7K to 10K),
> > > then add a diode (preferably Schottkey,j but silicon junction will
> > > work) from each input to the processor Vcc, cathode to Vcc. That will
> > > limit each input at the micro to the current Vcc )(plus one diode  
> > > drop).
> > 
> > 
> > There is an Atmel apnote describing how one might monitor AC zero  
> > crossings which states there is already a protection diode on all  
> > inputs which is good for up to 1 mA. The apnote used a large value  
> > 1000V rated resistor in series to connect direct to 120V AC. And then  
> > goes on to say something to the effect, "Use at own risk."
> > 
> > --
> > David Kelly N4HHE, dkelly@
> > ========================================================================
> > Whom computers would destroy, they must first drive mad.
> >
>

Hi,

I've used an AT90CAN128 to monitor car signals in the past.
I expect you've already thought of it, but a lot of signals on a car are +12V.  Infact the altenator output can be up to 14.8V.  I've just used a 10K / 22K potential divider (plus some filter capacitors) to divide the signal by approx 3 before it gets to the A/D inputs.
This obviously makes the 10bit resolution approx 3 times worse, but most signals on a car aren't that critical.
Another though on the subject is that if you are planning to measure signals like air flow or throttle posistion, these signals are generally on the 5V sensor bus (maybe that's your 5v signal as you have mentioned) but they are also generally very low impedance - less than 10K.  So often, just a potential divider will affect the signal so much that the engine ECU reports problems.  Generally just a general purpose buffer circuit works for this, and also gives you a bit more protection so you don't blow up the expensive processor - just the 30p LM321!!
Rich

Re: [AVR-Chat] AVR inputs

2009-07-29 by Adeilton Oliveira

First, you can forget the diode if you choose the resistors for the 
voltage divider to deal with the minimum and maximum values that the 
digital inputs recognize as logic 1 (VCC).
Second, choose the resistor values high enough (hundreds of K) so that 
you have negligible current through the clamping diode even if you have 
more than 5V in the digital input pin (it will not damage your input). 
In addition, if you use high value resistors you will avoid the battery 
to run down when in Off mode.
That's all you need for automotive applications.

Adeilton Oliveira
GMB


Jim Wagner wrote:
Show quoted textHide quoted text
>  
>
> One way is to add a series resistor to each input (say 4.7K to 10K),
> then add a diode (preferably Schottkey,j but silicon junction will
> work) from each input to the processor Vcc, cathode to Vcc. That will
> limit each input at the micro to the current Vcc )(plus one diode drop).
>
> Jim Wagner
> Oregon Research Electronics
> On Jul 28, 2009, at 7:40 PM, Brian wrote:
>
> > I made a module for a car to monitor inputs. Since inputs can only
> > be VCC +/-0.5V for a high signal, how do you keep the inputs from
> > getting to the micro before VCC is applied? It keeps blowing my
> > inputs so they dont work.
> >
> > One thing I thought about is using a mosfet switch controlled by an
> > output of the micro to allow the signal only once it is started up.
> >
> > Brian
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>

Re: [AVR-Chat] Re: AVR inputs

2009-07-30 by Tim Gilbert

Don't forget about "load dump"!  I believe that the automotive spec for electronics requires a 50 volt surge; aviation (DO-160E) requires the circuit to handle a 60 volt surge.

Regards,


Tim Gilbert
JEM Innovation Inc.
303-926-9053 (office)
303-437-4342 (cell)
720-890-8582 (fax)
www.jeminnovation.com
www.pdksolutions.com
Show quoted textHide quoted text
  ----- Original Message ----- 
  From: richardlfry@btinternet.com 
  To: AVR-Chat@yahoogroups.com 
  Sent: Wednesday, July 29, 2009 3:33 PM
  Subject: [AVR-Chat] Re: AVR inputs


    --- In AVR-Chat@yahoogroups.com, "s.holder123@..." <s.holder123@...> wrote:
  >
  > Put a pull up resistor between Vcc and the microcontroller input pin, then a diode (1n4001)Anode between the junction of the resistor and the microcontroller pin and the cathhode to the Car input (Perhaps a cap between junction of pull up resistor and microcontroller pin as well. This isolates the microntroller from excessive input values and limits and current via the pull up resistor, the cap provides a simple low pass filter. As long as the input doesn't exceed the reverse breakdown voltage all will be well. Auto electrics tend to have lots of nasty stuff "hanging" on the signal and power lines so you need to isolate the microcontroller inputs form this. The opto-isolater idea might be required but i think this might doe the trick.
  > 
  > Regards
  > 
  > --- In AVR
  > -Chat@yahoogroups.com, David Kelly <dkelly@> wrote:
  > >
  > > 
  > > On Jul 28, 2009, at 9:51 PM, Jim Wagner wrote:
  > > 
  > > > One way is to add a series resistor to each input (say 4.7K to 10K),
  > > > then add a diode (preferably Schottkey,j but silicon junction will
  > > > work) from each input to the processor Vcc, cathode to Vcc. That will
  > > > limit each input at the micro to the current Vcc )(plus one diode 
  > > > drop).
  > > 
  > > 
  > > There is an Atmel apnote describing how one might monitor AC zero 
  > > crossings which states there is already a protection diode on all 
  > > inputs which is good for up to 1 mA. The apnote used a large value 
  > > 1000V rated resistor in series to connect direct to 120V AC. And then 
  > > goes on to say something to the effect, "Use at own risk."
  > > 
  > > --
  > > David Kelly N4HHE, dkelly@
  > > ========================================================================
  > > Whom computers would destroy, they must first drive mad.
  > >
  >

  Hi,

  I've used an AT90CAN128 to monitor car signals in the past.
  I expect you've already thought of it, but a lot of signals on a car are +12V. Infact the altenator output can be up to 14.8V. I've just used a 10K / 22K potential divider (plus some filter capacitors) to divide the signal by approx 3 before it gets to the A/D inputs.
  This obviously makes the 10bit resolution approx 3 times worse, but most signals on a car aren't that critical.
  Another though on the subject is that if you are planning to measure signals like air flow or throttle posistion, these signals are generally on the 5V sensor bus (maybe that's your 5v signal as you have mentioned) but they are also generally very low impedance - less than 10K. So often, just a potential divider will affect the signal so much that the engine ECU reports problems. Generally just a general purpose buffer circuit works for this, and also gives you a bit more protection so you don't blow up the expensive processor - just the 30p LM321!!
  Rich



  

[Non-text portions of this message have been removed]

Re: [AVR-Chat] AVR inputs

2009-07-31 by Dave C

Brian,
What's the designed purpose of the circuit? Monitoring what for what purpose?

Thanks,
Dave

-=-=-=-
Show quoted textHide quoted text
>I made a module for a car to monitor inputs. Since inputs can only 
>be VCC +/-0.5V for a high signal, how do you keep the inputs from 
>getting to the micro before VCC is applied? It keeps blowing my 
>inputs so they dont work.
>
>One thing I thought about is using a mosfet switch controlled by an 
>output of the micro to allow the signal only once it is started up.
>
>Brian

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.