Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 6th November 2009, 11:36 AM   #1
Default connecting 24v transducer to PIC

found a transducer for measuring air pressure in an air tank (air cannon project) on ebay.
one problem the transducer requires 15-24 volts and outputs 0 to 10 volts.

this is a DSY-150 transducer

http://www.proportionair.com/index.p...&product_id=20
what would be best way to connect to 18F452
thinking voltage divider ??
still need a 15-24 volt supply. planning on solar cells?
any ideas. Am sure it can be done but how?? and still maintain a sense of accuracy.
perhaps just measure the resistance of without connecting to voltage supply??
MrDEB is offline  
Old 6th November 2009, 02:44 PM   #2
Default

Use a 24V supply with a 5V regulator for the uC.

Well, there are several ways to interface the transducer to the uC.

The voltage divider is an idea.

Or, you can use a OPAMP/COMPARATOR, to output high/low level when the transducer senses a certain pressure.
Hayato is offline  
Old 6th November 2009, 03:06 PM   #3
Default I want to display the actual pressure

using an LCD 16x2 or a 20x4 display
air pressure for the various targets will need adjustment for distance so a digital readout is essential. sure a tire gauge would work but not real accurate.
not sure how these transducers work but get the idea that it may just output a resistance? but the data sheet says it requires 15ma min at 15-24v
I may call manfacture to get some info.
or just may resort to a voltage divider.
MrDEB is offline  
Old 6th November 2009, 04:03 PM   #4
Default

Use the Voltage Divider.
Hayato is offline  
Old 6th November 2009, 04:08 PM   #5
Default

Buffer the VD with an opamp for even better results. Use single supply rail to rail.
Russ Hensel is offline  
Old 6th November 2009, 04:42 PM   #6
Default

Why buffering the VD if the AN input from PIC is high impedance?
Hayato is offline  
Old 6th November 2009, 06:25 PM   #7
Default boy do I feel dumb

started computing for voltage divider where the voltage is 24 volts and need a min of 15ma.
looked at specs a second time - output is 0-10 volts so all I need is 5 volt output.duh= 2-300 ohm resistors in series will get me just under 17ma.
now wattage??
if I win auction, plan on using 1% resistors. maybe lowering the lower resistor for little less than 5v, like 4.5, just to be safe.
perhaps a zener diode to protect PIC?
but that might affect my voltage reference of 0-10v output from transducer??
MrDEB is offline  
Old 6th November 2009, 06:39 PM   #8
Default not sure about using the zener?

will it mess up the voltage output thus screwing up the pressure readings?
if so, suggestions?
Attached Thumbnails
connecting 24v transducer to PIC-voltage-divider.png  
MrDEB is offline  
Old 6th November 2009, 07:00 PM   #9
Default

I think you are confusing some things up:

1 - Your transducer needs 24V @ 15mA to work. (Your psu needs to stand a current of, at least, 15 mA at 24V).

2 - Your transducer will output a 0 - 10V . (You don't need a minimum current to have this output. It will output 0 - 10 V, period. Of course, if you have a low resistance load, you gonna degrade the output level).

3 - 300 ohms is too low, you don't need that. Your uC's analog input is high impedance and will not overload the the voltage divider. Use resistors in 'k' range, like 4k7 .

4 - Protection is a good thing. But remember that zeners begin to conduct before the nominal voltage, so you are going to have a small degration.
Hayato is offline  
Old 6th November 2009, 09:25 PM   #10
Default spec sheet says=

min supply voltage = 15
min supply current = 35ma
min output voltage = 0
max output voltage = 10
the 300 ohm resistors are a voltage divider so output won't exceed 5vdc
I did boo boo as I thought (stupid me on the spec sheet) the output was 15ma but it is supply voltage min. of 15v
supply current is 35ma.
your suggesting going with say 3k resistors on the divider?
at what wattage? I was contemplating 1/2 watt. keep the heat to a min as the heat will change the divider resistance.
the zenier maybe go with a 5 v instead of a 4.6?
I still need to win the auction.
MrDEB is offline  
Old 7th November 2009, 07:00 AM   #11
Default

Use two 10k to 47k resistors in series.
colin55 is offline  
Old 7th November 2009, 10:11 AM   #12
Default

Quote:
Originally Posted by MrDEB View Post
min supply voltage = 15
min supply current = 35ma
min output voltage = 0
max output voltage = 10
the 300 ohm resistors are a voltage divider so output won't exceed 5vdc
I did boo boo as I thought (stupid me on the spec sheet) the output was 15ma but it is supply voltage min. of 15v
supply current is 35ma.
your suggesting going with say 3k resistors on the divider?
at what wattage? I was contemplating 1/2 watt. keep the heat to a min as the heat will change the divider resistance.
the zenier maybe go with a 5 v instead of a 4.6?
I still need to win the auction.
As Colin and I said, for the voltage divider use resistors in k range. Colin says any from 10k to 47k, I say that you can go from 4k7.

4k7, due the uC datasheet specs, that says "The maximum recommended impedance for analog sources is 2.5 kΩ." (page 184, 17.1)

As the source impedance is the 1/2 * voltage divider resistance, with 4k7 you are going to have 2.35 kΩ

Think about it:

If you use the voltage divider with 300 Ω resistors, you are going to drain about 17 mA from the transducer, which I believe that is too much ( near the limit). And the each resistor will dissipate 83 mW.

If you use 4k7 you are going to drain ~ 1.1 mA from the transducer (you won't overload it, so you are going to take much more accurate measurements), and each resistor will dissipate ~ 5.5 mW (1/180) W (so you can use 1/4W or 1/8W instead of 1/2W).

And you can find 0.5% tolerance resistors, if needed.

The zener you can use is 5.1V, but you must test the accuracy of your measurements.
Hayato is offline  
Old 7th November 2009, 11:26 AM   #13
Default this is where I get lost

the subject of impedence.
in the data sheet you say the impedence is 2.5k
what does one do with that figure.
will sim in LT Spice using two 4700 ohm resistors and a 5.1 zener.
Oh after looking over the spec sheet on the transducer, I see it has two adjustments so the output voltage can be adjusted for desired voltage.
just need to win the auction.
MrDEB is offline  
Old 7th November 2009, 11:42 AM   #14
Default

Quote:
Originally Posted by MrDEB View Post
the subject of impedence.
in the data sheet you say the impedence is 2.5k
what does one do with that figure.
will sim in LT Spice using two 4700 ohm resistors and a 5.1 zener.
Sounds a waste of time? - the PIC input has a minimum source impedance, NOT a resistance, I don't think LTSpice simulates the internal working of a PIC?. Basically it requires a certain amount of source (or sink) current to charge/discharge the capacitor in the internal sample and hold.

If the source impedance is too high, then it slows the rate at which the capacitor charges/discharges. This only really matters (within reason) if you're switching channels - and too high a source impedance will give the wrong reading on both, UNLESS you delay before reading (but after switching channels), to give it time to settle.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 7th November 2009, 12:30 PM   #15
Default here is a sim

with 2.5k load or impedance it drops the input voltage.
Nigel, are you suggesting not to worry about impedance.?
I get lost in this area anyway.
I inserted a 6.2 zener.
The transducer has an adjustment for the span of desired voltage output as well as low output level.
may just do the voltage divider then adjust transducer for actual pressure in tank.
Attached Thumbnails
connecting 24v transducer to PIC-voltage-divider.png  
MrDEB is offline  
Reply

Tags
24v, connecting, pic, transducer

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Connecting a PIC joellee Micro Controllers 6 27th August 2009 08:00 PM
Need help with connecting a CT to a PIC tyru Electronic Projects Design/Ideas/Reviews 16 15th May 2008 04:11 PM
Connecting a Buzzer to a PIC Gayan Soyza Micro Controllers 1 27th November 2006 06:58 AM
connecting DS1307 to pic amindzo Micro Controllers 0 14th August 2006 12:17 PM
Pic driving ultrasonic transducer mlt57sooner Micro Controllers 1 22nd April 2005 09:42 AM



All times are GMT. The time now is 08:44 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker