CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

a/d inputs

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
guest
Guest







a/d inputs
PostPosted: Wed Aug 31, 2005 4:39 am     Reply with quote

Hello,
I have a requirement to input 2 0-5VDC signals from a heavy vehicle. I have used the A/D on PIC18's before with no problem. My concern here is the signals are originating in an electrically dangerous (for microntrollers)
environment. Its a bulldozer. Any tips or tricks for isolating/buffering these signals?

Thanks
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Aug 31, 2005 6:26 am     Reply with quote

You could use a voltage follower implemented with an opamp capable of rail-to-rail operation on its inputs.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Wed Aug 31, 2005 7:36 am     Reply with quote

Look at the "PICDEM MC" at Microchip.com

They use the LOC111, which is a linear optocoupler. You can thus preserve galvanic isolation.

Another method we use is to feed the analog voltage to a voltage-to-frequency converter such as the LM331, and send the square wave over an optoisolator, such as the H11L1. You can now either directly read this frequency with the CCP, or you can send this frequency thru another LM331, which now acts as a frequency-to-voltage converter, and feed that directly to the PIC's ADC input.
sseidman



Joined: 14 Mar 2005
Posts: 159

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 7:44 am     Reply with quote

MikeValencia wrote:
Look at the "PICDEM MC" at Microchip.com

They use the LOC111, which is a linear optocoupler. You can thus preserve galvanic isolation.

Another method we use is to feed the analog voltage to a voltage-to-frequency converter such as the LM331, and send the square wave over an optoisolator, such as the H11L1. You can now either directly read this frequency with the CCP, or you can send this frequency thru another LM331, which now acts as a frequency-to-voltage converter, and feed that directly to the PIC's ADC input.


Even when using a linear optoisolator, you need to continue isolation by maintaining power isolation. Keep all the pic circuitry isolated by using an isolating DC/DC converter. Not all DC converters are isolating, so be careful when you buy.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 7:51 am     Reply with quote

Do you need galvanic isolation, or would just some robust clamping and EMI filters do the job? Is the power and other I/O for the PIC coming from the bulldozer too? I don't see what you are galvanically isolating between.
_________________
The search for better is endless. Instead simply find very good and get the job done.
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 10:35 am     Reply with quote

I have a device working in a vehicle, and it has been working perfectly for about a year now. I was in the same boat - had to measure multiple 0-5V analog inputs.

The first thing is the power supply. I assume that you're drawing power directly from the vehicle's 12 or 24V (since this is a bulldozer) supply. You'll need a reverse polarity protection diode across your supply input just in case someone decides to reverse the leads. Of couse, it goes without saying that you need a fuse too.

I also place a TVS (transient voltage suppressor) across the input too. The supply itself is simply a 5V linear regulator. Just be careful to get one that can tolerate 30V+ input, as there are no guarantees about the actual voltage of the vehicle. [What always spurs me on is the memory of getting a "boost" from a tow truck many years ago. He boosted me at 24V (this was a 12V car) for extra starting "oomph."]

The analog input lines first encounter an ESD suppressor. From there, the signal goes into a rail/rail input and output op-amp, configured as a voltage follower. The ones I use are the TI TLV237x (x=1,2,4). Great op-amps, and quite inexpensive too.

The reason for the op-amps is for a "sacrifice" if that makes any sense. It's much cheaper to replace an op-amp, should something bad happen, than a pic. Particularly if the pic is 44+ pins, and surface mount.

If you're interested, let me know and I'll dig out the actual part #'s for the TVS and the ESD suppressors.
Guest








PostPosted: Wed Aug 31, 2005 11:11 am     Reply with quote

thanks new guy,
I would love those patr#'s if you get the chance.

Thanks
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Aug 31, 2005 11:23 am     Reply with quote

newguy wrote:
What always spurs me on is the memory of getting a "boost" from a tow truck many years ago. He boosted me at 24V (this was a 12V car) for extra starting "oomph."

Take a look also at the chapter on automotive applications, in the datasheet of the LT1625 http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1042,C1032,C1092,P1674,D3498, page 16. It talks mainly about the power supply issues, but it still might be useful for you, because it lists the hazards you electronics might be exposed to.
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 11:47 am     Reply with quote

Anonymous wrote:
thanks new guy,
I would love those patr#'s if you get the chance.


Here you go:

The TVS's I use are the Littelfuse SMBJ series. They come in unidirectional and bidirectional models. The one I used on the automotive app was SMBJ20ACCCT-ND (from digikey). Rated for 20V, 600W, something like $.50 CDN each. Pretty cheap. Note that the bidirectional versions work perfect for the flyback diode on a relay's coil.

There are a couple of ESD suppressor arrays that I tend to use, both work well, only one is a lot cheapter than the other.

The expensive one is the Littelfuse SP721AB. 6 input, $2.65 CDN. Digikey's part # is F2165-ND. This is the one I used for the automotive app, as it is rated for a bit higher power dissipation than the next one.

The cheap one is the On Semiconductor MMQA6V2T1. 4 input, less than $.50 CDN each. Digikey's part # is MMQA6V2T1OSCT-ND. Works well too, but I wouldn't trust it in a "robust" environment like a vehicle due to its low power rating - 24W. I use this one for protecting button/switch input lines to the pic.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 12:32 pm     Reply with quote

I don't believe that a TVS placed between input power and ground
is a good idea for voltage spike protection in an automotive-type
environment.

I used a 33v-36v, 500w TVS device (similar to p/n SA30A from Vishay).
http://www.vishay.com/docs/88378/sa.pdf

This is was in a light aircraft with I believe, a 12v system, though it
might have been 24v. Anyway, the mechanical voltage regulator/
alternator system put out a large over-voltage for several seconds.
This caused the TVS device to burn up. It became a permanent short.
Then the main fuse in the device blew. (3AG type, 1 Amp, fast blow)

A bulldozer's electrical system might well have the same problem.
So I would recommend caution. Make sure that the protection
device you use can withstand all potential failure modes of the electrical
system. This should probably all be tested in the lab, ahead of time.
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 12:54 pm     Reply with quote

PCM,

Thanks for info! What would you recommend instead of the TVS then?
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Wed Aug 31, 2005 1:10 pm     Reply with quote

PCM programmer: Could you have done a switching regulator, then a TVS, then a DC/DC ?
-Regulator will clean out the surge
-TVS cleans up esd/lightning/power poll short
-DC/DC provide the isolation.

ps I use semtech TVS's and C&D NTE0505M

sseidman: is the NTE0505M doing galvonic isolation as I thought?
I don't see the word "galvonic" in the spec!!! ?
http://www.cd4power.com/data/power/ncl/ndc_nte_5.pdf
sseidman



Joined: 14 Mar 2005
Posts: 159

View user's profile Send private message

PostPosted: Wed Aug 31, 2005 3:57 pm     Reply with quote

treitmey wrote:


sseidman: is the NTE0505M doing galvonic isolation as I thought?
I don't see the word "galvonic" in the spec!!! ?
http://www.cd4power.com/data/power/ncl/ndc_nte_5.pdf


Yes, good to 1kVDC. The key for digikey is specifying "isolated" in the search

I've used that very converter. When Newark stocks 2,000 of them at $8, its got to be a star.

Try "galvanic", but I don't know if that's going to be a good search term for DC/DC converters.

When designing with one of these guys, keep the output side of the converter powering the PIC circuitry and the side of any optoisolator closer to the pic (i.e., the input side for an input to the pic, and the output side for the output of the pic), and leave the input side powering any noisy equipment. You can tie the ground of the input side of the converter to the ground of any signal on the nonisolated side of the device.

When you're done building a prototype, use a meter to make sure your grounds are still separated!! It's real easy to tie both grounds together accidentally if the circuit gets a little complex.

Scott
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group