BasicMicro - Forums

www.basicmicro.com
It is currently Tue Feb 07, 2012 3:06 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: protection of atom analog pins up to 5V: electrical circuit
PostPosted: Thu Apr 22, 2010 2:29 am 
Offline
Citizen

Joined: Mon Jun 23, 2008 8:39 am
Posts: 18
Dear All,
I've developed a board with an Atom 28 (Pro version), using 4 analogue channels, but one of these channels is broken because I've erroneously applied +12V, instead of +5V to obtain 1023 of ADC value. Now I want to protect the microcontroller with an electronic circuit, but I don't know which kind of circuit or mosfet it's needed to limit the voltage to 5V. Can you help me?

Kind regards
Deny Antonino


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Thu Apr 22, 2010 6:24 am 
Offline
Citizen

Joined: Wed Feb 10, 2010 1:09 pm
Posts: 16
denyan wrote:
Dear All,
I've developed a board with an Atom 28 (Pro version), using 4 analogue channels, but one of these channels is broken because I've erroneously applied +12V, instead of +5V to obtain 1023 of ADC value. Now I want to protect the microcontroller with an electronic circuit, but I don't know which kind of circuit or mosfet it's needed to limit the voltage to 5V. Can you help me?

Kind regards
Deny Antonino


Hello sir, Currently i have a 12v battery powering the basic atom 40m through a "voltage regulator" that regulates the input voltage at 5v. Have you thought about using one of these?


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Thu Apr 22, 2010 11:37 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Brock, he's talking about applying an input to a single ADC pin, not power to the chip. If he put +12V on the chip, we would likely be discussing how to get a replacement while airing out the room to get rid of the "magic smoke".

Denyan, it is common practice to put a resistor, typically 100 Ohms to 1K Ohm, in the circuit between the ADC pin and the input voltage you are measuring, making it quick-and-dirty insurance. The PIC in the Atom/Nano has limiting diodes to TRY to maintain the input levels so the input circuit gets some protection. But, once they start conducting they are practically a short, and will eventually fail if nothing is done to limit the current through them, which is where the "limiting" resistor mentioned comes in.
N'est ce pas?
There are other, more exotic fixes, but the resistor works for most situations and is quick and cheap.
kenjj

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Thu Apr 22, 2010 12:09 pm 
Offline
Citizen

Joined: Wed Feb 10, 2010 1:09 pm
Posts: 16
doh! Just when I decide to attempt to answer a question instead of posting questions I get it wrong. Guess I'll leave it up to the pros next time ;)


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Thu Apr 22, 2010 5:59 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Yeah, well, my first helpful advice here sorta backfired. Someone asked how to make his servo motor turn the other way and I told hime to reverse the wires. Then someone who ACTUALLY knew what he was doing "yelled", "BELAY THAT! You can get your servo to go the other way by feeding it pulses around 1 ms every 20ms."
Yep. I was Mr Green that day. :mrgreen:
Re-la-ax. As long as you can afford to buy the guy/gal a new one, make any suggestion you're comfortable with! ;)
Later.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Fri Apr 23, 2010 6:52 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 788
Location: Temecula, CA
The current limiting resistor will work some what but I don't think it would protect from a 12v input on an I/O. Another option is a clipping diode. You can get 5v clipping diodes. The diode will fry but not the pin(usually).

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Sat Apr 24, 2010 4:57 am 
Offline
Citizen

Joined: Mon Jun 23, 2008 8:39 am
Posts: 18
Thank you for your support!
A question for Acidtech: what is a clipping diode?


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Sat Apr 24, 2010 12:22 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 788
Location: Temecula, CA
IIRC without looking it up a clipping diode is a zenor with a reverse break down voltage at the voltage level you are after. Eg a 5V zenor diode will clip any higher voltage coming in to 5v.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Sun Apr 25, 2010 4:06 am 
Offline
Citizen

Joined: Mon Jun 23, 2008 8:39 am
Posts: 18
Ah, ok!! a zener diode!!!! It's alright!!


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Mon Apr 26, 2010 7:53 am 
Offline
Citizen

Joined: Mon Jun 23, 2008 8:39 am
Posts: 18
Dear Kenjj, if I put a resistor (1Kohm) in series to the circuit, between the ADC pin and the analog voltage I want to measure, I see a voltage drop across the resistor, so that in the ADC pin I see a different value of voltage, not the output voltage of the sensor.


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Mon Apr 26, 2010 9:26 am 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 502
Why not simply use a two resistors as a voltage dividor...

For example on the Lynmotion Bot Board 2 they setup two of these to allow you to measure the current Servo and Logic battery voltages: http://www.lynxmotion.com/images/data/bb2sch.pdf

They use a 30KResitor then the tap to the IO pin, then a 10K to ground. So what you are measuring on the IO pins is 1/4 of the battery voltage. So for example a 12V battery would only measure 3v at the pin.

Kurt


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Mon Apr 26, 2010 11:12 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Denyan, how big a voltage drop do you get with the 1K ? Try a 100 Ohm inline resistor and tell us if that's OK.
Later.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Tue Apr 27, 2010 8:45 am 
Offline
Citizen

Joined: Mon Jun 23, 2008 8:39 am
Posts: 18
Dear Kenjj, if I have a potenziometric (10k) voltage signal, for example from 0 volts to 5 Volts, the external resistor of 100ohm in series with the potenziometer causes a different value of voltage into the ADC pin. Is it so?


Top
 Profile  
 
 Post subject: Re: protection of atom analog pins up to 5V: electrical circ
PostPosted: Tue Apr 27, 2010 11:11 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
This is what I mean. Did you wire it this way?
Attachment:
Inline Resistor.JPG
Inline Resistor.JPG [ 13.27 KiB | Viewed 594 times ]

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO