BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sun Jul 22, 2018 9:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: PRESSURE TRANSDUCER WITH NANO 28
PostPosted: Tue Jul 01, 2014 6:25 pm 
Offline
Citizen

Joined: Thu Feb 06, 2014 7:37 pm
Posts: 19
HELLO:well i am using a nano28, a/d input,i have a pressure transducer tied to that input.i have coded everything and the device is working...the problem is,my scale is not correct..i need a little help on the scaling..here it is...

10 bit ADC
5v ref.
transducer = 0.5(0psi) to 4.5(50psi) volt output (liner)
transducer = absolute (vacuum ref.,built in),i am at 14.5psi(ambient)
transducer = at my location = 1.624 volts,(ambient)
my scale will read 0psi(ambient) to 30 psi max

THANK YOU FOR ANY HELP ON THIS....


Top
 Profile  
 
 Post subject: Re: PRESSURE TRANSDUCER WITH NANO 28
PostPosted: Wed Jul 02, 2014 5:18 am 
Offline
Master

Joined: Wed Oct 19, 2011 2:28 am
Posts: 123
Hi,
I wrote this routine but it will give you a pressure from zero to 50 psi. I am using the range of 50. Try it and see if it give you the right pressure.
also why you do not used the ad16. It will give a more accurate reading.
Code:
'This routine will convert the transducer output voltage from zero to 50 psig
vcc_ref      fcon 5.0    'reference voltage
sig_low      fcon 0.5   'transducer zero
sig_high        fcon 4.5   'transducer max reaading
range      fcon 50.0    'transducer range
max_count    fcon 1024.0 'ad max counts
pressure            var  float   
inp_counts         var  word          
Input   P1

Main
 
adin P1 ,inp_counts
pressure = (tofloat(inp_counts)*vcc_ref)/max_count
pressure = 4.5
pressure = (pressure - 0.5)*(50.0/4.0)
serout s_out,i9600,["pressure = ", real pressure,13]
pause 2000

goto main

end 


Regards,
tauro0221


Top
 Profile  
 
 Post subject: Re: PRESSURE TRANSDUCER WITH NANO 28
PostPosted: Wed Jul 02, 2014 5:23 am 
Offline
Master

Joined: Wed Oct 19, 2011 2:28 am
Posts: 123
Hi,
Sorry but I forget to remarks the instruction pressure = 4.5. I was using it to test the equation. If you run the program it will give you a pressure of 50 psi.


Top
 Profile  
 
 Post subject: Re: PRESSURE TRANSDUCER WITH NANO 28
PostPosted: Fri Jul 04, 2014 11:43 pm 
Offline
Citizen

Joined: Thu Feb 06, 2014 7:37 pm
Posts: 19
HELLO: thank you very much for the reply...i know what i was doing wrong...i gave you the right info.,i had the wrong info... :? i told you absolute sensor with a built in vacuum ref."0" psi..and your example worked perfect,i was using sea level ref. "14.7" psi...also you used 0-50 psi scale,that is what it should be..i used 0-30 psi scale,don't know where i got that...well any way,you saved the day again my friend...THANKS AGAIN........


Top
 Profile  
 
 Post subject: Re: PRESSURE TRANSDUCER WITH NANO 28
PostPosted: Sat Jul 05, 2014 3:32 am 
Offline
Master

Joined: Wed Oct 19, 2011 2:28 am
Posts: 123
Hi,
Your welcome. I went in that way a lots of time. Just take a break analyzed the specifications and try it again.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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