OCCRA
Go to Post Please no reboots. I'm so sick of reboots. Hollywood has ruined them for me. I don't even reboot my computer anymore. - Michael Hill [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-06-2017, 08:40 PM
Tom Line's Avatar
Tom Line Tom Line is offline
Danger: Raptor Crossing
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,824
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
PNP versus NPN part 2.

I happen to have some 12V PNP prox sensors laying around. Out of curiosity, I hooked them up to the Analog input. I know the input isn't rated to 12V on the Roborio - but I knew it was short protected to battery voltage so I shouldn't damage it. I was happy to see the sensor reading up to the Analog limit, and it didn't seem to trip or reset the rail when I made unmade the switch, but the voltage did vary from zero to max when made and unmade so I knew it was functioning correctly.

So I figured - why not? I hooked the 12V up to the DIO rail as well and it functioned just fine.

So - since we know the Roborio is short protected against 12V, while it's not recommended to run it that way, will this cause any other unforeseen issues that I'm not seeing now on my bench?

Last edited by Tom Line : 12-06-2017 at 08:50 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-06-2017, 09:43 PM
marshall's Avatar
marshall marshall is online now
Discerning and exacting individual
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 2,072
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: PNP versus NPN part 2.

I donít have a good answer but good on you for trying this.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #3   Spotlight this post!  
Unread 12-06-2017, 09:51 PM
mman1506 mman1506 is offline
Hater of Tiny Molex Connectors
AKA: Marcus Quintilian
FRC #0865 (Wrap7)
Team Role: Alumni
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Toronto
Posts: 1,054
mman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond reputemman1506 has a reputation beyond repute
Re: PNP versus NPN part 2.

Maybe there's a current limiting resistor somewhere getting toasty?
__________________
2014-2015: FRC 865 Warp7 Team Captain
2017: Free Agent Mentor
Reply With Quote
  #4   Spotlight this post!  
Unread 12-06-2017, 10:38 PM
Tom Line's Avatar
Tom Line Tom Line is offline
Danger: Raptor Crossing
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,824
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: PNP versus NPN part 2.

Shouldn't be a current limiter problem - I verified the output current of the switch is so small that even at 12V the total wattage is well inside what the Rio docs say it can handle.

It's been a good night - I got the pixy working over I2C in LabView as well.

Now I just need to go back to this stupid Lidar sensor. Sharp IR in a couple days.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-07-2017, 01:21 AM
philso philso is offline
Mentor
FRC #2882 (Nuts n Boltz)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 1,236
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: PNP versus NPN part 2.

What is the range of supply voltage that your sensor can work with? Can it work with a 5 V supply? Is it a digital output type? If you must run the sensor from a 12 V supply, use a resistor divider on the output to limit the voltage applied to the RoboRio to something between 3 V to 4 V. A 10 kOhm connected between the sensor output and the RoboRio input and a 4.7 kOhm connected between the RoboRio input and the 0 V pin should do the job.

The usable input range of the Analog Inputs is 0 V to 5 V so running your sensor gives no useful information after the output voltage goes over 5 V.

The RoboRio specs do not seem to show what the protection level is for the Digital Inputs.

In general, it is bad practice to apply signals beyond the nominal input range (0 V to 5 V). Your sensor output impedance may be high enough to let you get away with it.

The +-16 Overvoltage Protection spec means that NI installed devices that clamp at about +-16 V. Such specs are to show what the device will survive without permanent damage. The device is not meant to work at that operating point.

The spec does not show any Maximum Input Current spec which may mean there is no input current limiting resistor. If your source has a low enough impedance, you can drive sufficient current through the clamping devices and blow them off the board. Your actual input circuitry will blow about a micro-second after.

There are no clamping devices indicated on the Digital Input/Output pins and it is highly unlikely there are any because those pins can be used as outputs. The Digital I/O also has a nominal range of 0 V to 5 V. It is probably the clamping devices built into the I/O chip that is doing the clamping of your 12 V signal. They will be much smaller than any external clamping device and will blow at much lower currents.
Reply With Quote
  #6   Spotlight this post!  
Unread 12-07-2017, 02:05 AM
Tom Line's Avatar
Tom Line Tom Line is offline
Danger: Raptor Crossing
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,824
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: PNP versus NPN part 2.

The input is 10-30V - it's a fairly standard SICK IR prox. The voltage divider is the easiest way, but I was curious as to how apply the 12V to the rails would affect them. We've accidentally applied 12V to the rails before *glares at team members*.
Reply With Quote
  #7   Spotlight this post!  
Unread 12-07-2017, 02:13 AM
Jaci's Avatar
Jaci Jaci is offline
http://imjac.in/ta/name
AKA: Jaci R Brunning
FRC #5333 (Can't C#) #5663 (Ground Control) | (OpenRIO, FRC West Aus)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 452
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: PNP versus NPN part 2.

I see you've discovered that 'rated for' doesn't exactly mean 'absolute maximum'.

The Analog inputs make use of a controlled buffer within its MUX (driver, 1:1 amp, whatever you want to call it), which then go to an ADC. You'll find that, like most buffers, it doesn't really care about input voltages, but since it is 1:1, it will 'follow' that voltage when activated. Since the VCC going to that chip is likely 5V on the RIO, it will cap at 5V. The voltage buffer doesn't really mind if you give it 12V, although it will be pretty useless since you can only read 0-5V.

Digital channels on the RoboRIO are tristate compatible, which means they have a similar controlled buffer on the output, whose output loops back to the input. This allows a pin to act as both an input and output. NI doesn't specify whether they use a voltage buffer on the input, but it is very common place to do so (whether inside the FPGA or otherwise).

Either way, putting 12V into a 5V sensor line isn't the best of ideas, but it certainly won't fry anything, at least in this context.


EDIT: You can find most of this info in the RoboRIO User Manual / Specifications (here and here).
__________________
Jacinta R

Curtin FRC (5333+5663) : Senior Mentor
OpenRIO : Owner

Website | Github
jaci.brunning@gmail.com
Reply With Quote
  #8   Spotlight this post!  
Unread 12-07-2017, 06:13 AM
electroken's Avatar
electroken electroken is offline
Electron Tamer
AKA: Ken Pontbriant
FRC #0230 (Gaelhawks)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Shelton, CT
Posts: 216
electroken is a jewel in the roughelectroken is a jewel in the roughelectroken is a jewel in the roughelectroken is a jewel in the rough
Re: PNP versus NPN part 2.

Be cautious with this. My comments may not be universally true but are based on a few decades of designing industrial controls every day.

The positive overvoltage protection on most of the analog inputs I've seen or designed includes a diode from the input to the positive power supply rail of the microcontroller, FPGA, whatever. This diode keeps the microcontroller pin from seeing voltages beyond one diode drop above the rail voltage. A possible undesirable side effect of this is injecting current into the power supply downstream from the voltage regulator. Normally this is no big deal.

HOWEVER, if you do it with a bunch of inputs you can inject enough current to bring the power supply out of regulation, possibly fatally damaging your expensive gray box.

Experimentation is fun until the magic smoke gets loose.
Reply With Quote
  #9   Spotlight this post!  
Unread 12-07-2017, 08:52 AM
philso philso is offline
Mentor
FRC #2882 (Nuts n Boltz)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 1,236
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: PNP versus NPN part 2.

Quote:
Originally Posted by Jaci View Post
I see you've discovered that 'rated for' doesn't exactly mean 'absolute maximum'.

The Analog inputs make use of a controlled buffer within its MUX (driver, 1:1 amp, whatever you want to call it), which then go to an ADC. You'll find that, like most buffers, it doesn't really care about input voltages, but since it is 1:1, it will 'follow' that voltage when activated. Since the VCC going to that chip is likely 5V on the RIO, it will cap at 5V. The voltage buffer doesn't really mind if you give it 12V, although it will be pretty useless since you can only read 0-5V.

Digital channels on the RoboRIO are tristate compatible, which means they have a similar controlled buffer on the output, whose output loops back to the input. This allows a pin to act as both an input and output. NI doesn't specify whether they use a voltage buffer on the input, but it is very common place to do so (whether inside the FPGA or otherwise).

Either way, putting 12V into a 5V sensor line isn't the best of ideas, but it certainly won't fry anything, at least in this context.


EDIT: You can find most of this info in the RoboRIO User Manual / Specifications (here and here).
What in this context will allow 12 V to be applied to the Analog Inputs of the RoboRio? Do you have access to detailed internal schematics of the RoboRio that show what specific chips are used?

Most (over 99%) of the chips on the market are not designed to tolerate having voltages higher than the supply voltage applied to their pins and are easily damaged by such treatment. The voltage range between the maximum nominal input voltage (usually the nominal supply voltage, 5 V here) and the absolute maximum input voltage is not a range that is meant to be used. First of all, proper operation is not guaranteed. With some device designs, pulling the input pins can cause large internal currents to flow, leading to a condition called "latchup" where the device stops working. Proper operation only resumes after all voltages are removed.
Reply With Quote
  #10   Spotlight this post!  
Unread 12-07-2017, 09:02 AM
philso philso is offline
Mentor
FRC #2882 (Nuts n Boltz)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 1,236
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: PNP versus NPN part 2.

Quote:
Originally Posted by electroken View Post
Be cautious with this. My comments may not be universally true but are based on a few decades of designing industrial controls every day.

The positive overvoltage protection on most of the analog inputs I've seen or designed includes a diode from the input to the positive power supply rail of the microcontroller, FPGA, whatever. This diode keeps the microcontroller pin from seeing voltages beyond one diode drop above the rail voltage. A possible undesirable side effect of this is injecting current into the power supply downstream from the voltage regulator. Normally this is no big deal.

HOWEVER, if you do it with a bunch of inputs you can inject enough current to bring the power supply out of regulation, possibly fatally damaging your expensive gray box.

Experimentation is fun until the magic smoke gets loose.
The internal protection diodes you are writing about have a pretty low current capacity, usually in the order of milliamps. As described in my first post in this thread, once this current capacity is exceeded, the diode will most likely blow open, leaving the internal circuitry un-protected. The internal circuitry then blows microseconds later.

My comments come from over 30 years of experience designing the circuitry that goes into industrial controls, such as the RoboRio, as well as the circuitry to protect them from harsh conditions such as over-voltage conditions. Working at a chip manufacturer also gives me an insiders view of what goes in such devices.
Reply With Quote
  #11   Spotlight this post!  
Unread 12-07-2017, 09:03 AM
Jaci's Avatar
Jaci Jaci is offline
http://imjac.in/ta/name
AKA: Jaci R Brunning
FRC #5333 (Can't C#) #5663 (Ground Control) | (OpenRIO, FRC West Aus)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 452
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: PNP versus NPN part 2.

Quote:
Originally Posted by philso View Post
What in this context will allow 12 V to be applied to the Analog Inputs of the RoboRio? Do you have access to detailed internal schematics of the RoboRio that show what specific chips are used?

Most (over 99%) of the chips on the market are not designed to tolerate having voltages higher than the supply voltage applied to their pins and are easily damaged by such treatment. The voltage range between the maximum nominal input voltage (usually the nominal supply voltage, 5 V here) and the absolute maximum input voltage is not a range that is meant to be used. First of all, proper operation is not guaranteed. With some device designs, pulling the input pins can cause large internal currents to flow, leading to a condition called "latchup" where the device stops working. Proper operation only resumes after all voltages are removed.
Voltage buffers usually do have a fairly high tolerance for overvoltage (rather, they aren't as touchy as other chips), since their input impedance is extremely high, and due to the nature of their application, especially in amplifier configurations.

If you open up a RoboRIO, you'll find a chip containing a quad op amp nearby the Analog In pins. The traces that connect it are not visible, but it's a pretty good indication given its locality and 4 op amp channels (= 4 analog ins). The chip is a LM2902k, and according to the datasheet, it has a maximum differential input voltage of +/- 32V (supply voltage ranges from 3V to 30V, 32V absolute max).
__________________
Jacinta R

Curtin FRC (5333+5663) : Senior Mentor
OpenRIO : Owner

Website | Github
jaci.brunning@gmail.com
Reply With Quote
  #12   Spotlight this post!  
Unread 12-07-2017, 09:28 AM
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 2,235
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: PNP versus NPN part 2.

Keep in mind the RoboRio is not your typical industrial device. It has been hardened to take abuse of novices. My notes are on another computer so I am speaking from memory. Take this with a grain of salt. (Also I am not replacing you rio is you blow the IO) The IO on Rio was tested with 12 volts. (Actually the overload protection is +- 16V) My understanding is 12 volts will not hurt it. The Digital logic input is actually based on 3.3 volts. Yes I know the supply rail is 5V. (set by Jumper) That is why many 12 volt sensors work erratically with the Rio. Their output will not pull low enough for the Rio's input to read zero. The analog input is a work around because you can pick your threshold voltage. Of course the OP is using a PNP sensor which will not work on the DI without some other circuitry to invert the signal.
__________________
If you don't know what you should hook up then you should read a data sheet
Reply With Quote
  #13   Spotlight this post!  
Unread 12-07-2017, 10:57 AM
electroken's Avatar
electroken electroken is offline
Electron Tamer
AKA: Ken Pontbriant
FRC #0230 (Gaelhawks)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Shelton, CT
Posts: 216
electroken is a jewel in the roughelectroken is a jewel in the roughelectroken is a jewel in the roughelectroken is a jewel in the rough
Re: PNP versus NPN part 2.

Quote:
Originally Posted by philso View Post
The internal protection diodes you are writing about have a pretty low current capacity, usually in the order of milliamps. As described in my first post in this thread, once this current capacity is exceeded, the diode will most likely blow open, leaving the internal circuitry un-protected. The internal circuitry then blows microseconds later.

My comments come from over 30 years of experience designing the circuitry that goes into industrial controls, such as the RoboRio, as well as the circuitry to protect them from harsh conditions such as over-voltage conditions. Working at a chip manufacturer also gives me an insiders view of what goes in such devices.
The diodes I'm referring to are added external to the protected device and can tolerate a couple hundred milliamps.

Believe me, I'm in no way suggesting that connecting 12V to a roboRIO analog input is a good idea.
Reply With Quote
  #14   Spotlight this post!  
Unread 12-07-2017, 11:41 AM
philso philso is offline
Mentor
FRC #2882 (Nuts n Boltz)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 1,236
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: PNP versus NPN part 2.

Quote:
Originally Posted by Jaci View Post
Voltage buffers usually do have a fairly high tolerance for overvoltage (rather, they aren't as touchy as other chips), since their input impedance is extremely high, and due to the nature of their application, especially in amplifier configurations.

If you open up a RoboRIO, you'll find a chip containing a quad op amp nearby the Analog In pins. The traces that connect it are not visible, but it's a pretty good indication given its locality and 4 op amp channels (= 4 analog ins). The chip is a LM2902k, and according to the datasheet, it has a maximum differential input voltage of +/- 32V (supply voltage ranges from 3V to 30V, 32V absolute max).
The tolerance of 32 V being applied to the inputs is only valid when the supply is also 32 V. When connected to a single +5 V supply, the maximum input voltage is +5 V.

Having spoken directly with chip designers and applications engineers at many different chip manufacturers, they are all in agreement that the general rule is to never exceed the voltage on the power supply pins. Some manufacturers do a better job of making this point clear on their datasheets than others. I have also seen coworkers prove that the chips will blow up if the input pins are taken beyond the power supply range.


TI recommend the Input Common Mode Voltage, VCM be Vcc - 2 V as a maximum (Vcc = positive supply) in Table 6.3

ST recommends VCM be < Vcc - 2 V or Vcc - 1.5 V, depending on temperature, in Table 2

On Semi recommends VCM be < Vcc - 1.7 V in Note 5 at the bottom of page 3

There are a few devices available that do allow the inputs to be at voltages above or below the supply pins but this ability is very prominent in the part description. The LM2902 makes no such claims.

Last edited by philso : 12-07-2017 at 01:53 PM. Reason: add info from chip manufacturers
Reply With Quote
  #15   Spotlight this post!  
Unread 12-07-2017, 11:51 AM
GeeTwo's Avatar
GeeTwo GeeTwo is online now
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 4,901
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: PNP versus NPN part 2.

I would put some combination of resistors and zener diodes to bring that high level down to 5V or less. The last thing you want to do is get your students in the habit of designing for what they can get away with rather than design/rated specs, especially as this doesn't give up any competitive advantage (and may confer some).
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:44 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi