View Full Version : Altitude sensor - PIC project
pjsmith
Jul 27, 2004, 05:19 PM
Does anyone know where I can get one of the motorola MPX pressure sensors, ms5534, or equivilent in the UK?
Thanks.
Bruce Abbott
Jul 28, 2004, 04:55 AM
Try Farnell (http://uk.farnell.com/jsp/endecaSearch/searchPage2.jsp?N=401&Ntk=gensearch_001&Ntt=MPX&Nty=1&specialorder=on)
MartinFVS
Jul 28, 2004, 05:08 AM
Try the SCC15AD2 available from Farnell.
Martin
pjsmith
Jul 28, 2004, 05:20 AM
Thanks for that. Sod's law the MPX4200A I would have choosen is out of stock :(
The SCC15AD only seems to have around 100mv at full output with a range of only 50mv or so which is a bit small for me to work with without extra bits. I'll be trying to measure this with a 10 bit a/d converter in the PIC. I'm also trying to keep this simple as I don't have much experience with this before.
pjsmith
Jul 28, 2004, 06:52 AM
I was searching in Google for a retailer of the MS5534, thought I'd got lucky for a moment at just $37
http://www.foodlocker.com/ms5534.html
:)
MartinFVS
Jul 28, 2004, 08:24 AM
The MPX4115 would be better because its more sensitive and its in stock! :)
mpx4115 (http://uk.farnell.com/jsp/endecaSearch/searchPage2.jsp?specialorder=on&Ntt=MPX4115&newSearch=true&Nto=MPX&Nty=1&showImages=true&N=0&Ntk=gensearch)
pjsmith
Jul 28, 2004, 09:02 AM
Thanks, just ordered...
ybanrab
Jul 28, 2004, 10:37 AM
Hi pjsmith,
please keep let us know how you get on with doing an altimiter. I spent a while looking into doing it a few years ago, but never had the time to try making anything.
Barny
pjsmith
Jul 28, 2004, 11:36 AM
Same here. Finally got round to learning how to program the PIC's last weekend after having the programmers etc for at least 6 months and not having had time to use them. Plan is to have video overlay, battery monitoring, gps data, altitude etc. I'll post details once done if I ever get it working!
Texy
Jul 28, 2004, 03:10 PM
Only just over £13 too.
How do they work, dare I ask?
The higher you go, the lower the pressure, the higher the voltage out?
I guess you'd need to calibrate it on the ground first or something.
Interesting......
Texy
pjsmith
Jul 28, 2004, 03:14 PM
Yes, something like that. You can monitor that voltage with a small processor and do various things with it. I plan to try to log it and use it to overlay on video.
Texy
Jul 28, 2004, 03:39 PM
'something like that' - LOL
Well I did a google search on MPX4115 and there's a few projects out there.
Looks like quite a bit of math required to have pressure voltage equate to feet,
but quite doable with any PIC with A/D. Best to use an op-amp to get the right
range/resolution for our needs. Driving an LCD module is simple enough, but I
guess some form of data logging would be what is required.
Texy
Ironsides
Jul 28, 2004, 04:29 PM
A lot of us on the Aerial Photography Forum are using an Altitude Recorder that records an entire flight profile and also records the altitude at which each individual digital photo is taken.
http://www.hexpertsystems.com/zlog/
David
Texy
Jul 28, 2004, 05:32 PM
A lot of us on the Aerial Photography Forum are using an Altitude Recorder that records an entire flight profile and also records the altitude at which each individual digital photo is taken.
http://www.hexpertsystems.com/zlog/
David
How much does it cost?
How much does it cost?
ZLog version 1 was $75. I'm working on version 2, which has some minor
improvements. I just built the prototype last night and it's looking good.
Price for version 2 is not set yet, but I'm targetting pretty close to what
ZLog Mod1 was.
MX
pjsmith
Jul 29, 2004, 02:30 AM
Hi,
This is partially what I'm doing, though I have video overlay, voltage monitoring etc as well. I already have the video overlay, voltage monitoring, and temprature working. I plan to add proper altitude via this pressure sensor (same as you are using by the look of it). All this data is overlayed on the video as well as logged. gps co-ordinates are to be overlayed if a gps is connected, along with an arrow that points 'home' (not done this yet, though I have the gps mouse working). This is so I can fly by the video and hopfully not get lost/run out of battery.
One other thing I'd love to add, though I'm not sure how to go about it is RSSI for the reciever. I guess it'd be different for other recievers, but it'd be nice to know you are not flying out of range as well. At the moment this is 4 breadboards, but I plan to make it nice and neat and get someone to make me a custom board.
BTW - I'm nowwhere near as tallented at this as you. This is my first attempt to build anything like this and it's a steep learning cure for me. I've got one of your MX switches. It's great :)
Hi,
This is partially what I'm doing, though I have video overlay, voltage monitoring etc as well. I already have the video overlay, voltage monitoring, and temprature working. I plan to add proper altitude via this pressure sensor (same as you are using by the look of it). All this data is overlayed on the video as well as logged. gps co-ordinates are to be overlayed if a gps is connected, along with an arrow that points 'home' (not done this yet, though I have the gps mouse working). This is so I can fly by the video and hopfully not get lost/run out of battery.
One other thing I'd love to add, though I'm not sure how to go about it is RSSI for the reciever. I guess it'd be different for other recievers, but it'd be nice to know you are not flying out of range as well. At the moment this is 4 breadboards, but I plan to make it nice and neat and get someone to make me a custom board.
BTW - I'm nowwhere near as tallented at this as you. This is my first attempt to build anything like this and it's a steep learning cure for me. I've got one of your MX switches. It's great :)
I have the advantage of programming embedded systems for my day job.
I guess I just don't get enough of it there. :)
What is RSSI? I'm not familiar with that.
MX
pjsmith
Jul 29, 2004, 02:51 AM
Recieved Signal Strength Indication. I guess you can probably pick it up from the reciever somewhere.
Acetronics
Aug 02, 2004, 04:48 AM
Hello,
Just cross the Channel ...
www.selectronic.fr ... and order !!!
Alain
Recieved Signal Strength Indication. I guess you can probably pick it up from the reciever somewhere.
They may be calculating that internally in the microprocessor. May not be
any signal to pick off.
MX
simingx
Aug 02, 2004, 11:58 PM
Check out Newark... they have just about the full range of MPX sensors.... or if you're willing to buy second hand, I can sell you one MPX4100A6U together with an entire Dietrich Meissner PCB+parts (which was working before, but isn't working now for some reason I have no time to troubleshoot).... PM if interested.
AndyKunz
Aug 06, 2004, 12:16 PM
RSSI is an output of the receiver chip. It's a pretty good indication of the distance in LOS applications like model airplanes.
It's not linear.
Andy
Texy
Dec 24, 2004, 03:45 AM
Well this thread went quiet - I wonder how pjsmith got on?
Anyway, I just ordered a couple of samples of MPX4115 from motorola.
Its just as easy as getting free samples of PIC's from microchip.
I ordered them late last night, and they are already with fed-ex on there way!
Texy
pjsmith
Dec 24, 2004, 03:54 AM
OK, thought I've just moved house, had a lot of work to do (I run a business) etc.
I've got the altitude part working fine. I've got a pic based board that outputs current altitude on a little lcd. It's reasonably good, but can definately be improved. I calibrated it using the pressure sensor on a little garmin gps. The results are now about the same. I'd say it's accurate to within approx 1M, which is fine for what I want.
I've not intergrated the video on the same board yet, but that's the next step. The plane already broadcasts the video, just need to do the overlay. Not really touched this project for a couple months I guess. Haven't even had time to go fly recently :(
Texy
Dec 24, 2004, 04:48 AM
Thanks for the quick reply.
Would you be willing to share circuits and pic code to start me off?
I,m not interested in the video overlay side of things.
Texy
pjsmith
Dec 24, 2004, 04:53 AM
I'd certainly share at least the methods for getting alt with you. I've no circuit diagrams at the moment as I've just built it as I went along. It's pretty simple really, though I find coding with no floating point a bit difficult. The code is PIC basic pro. This was my first attempt at PIC programming. Went through about £200 of programmers, software, etc until I found something I could use!
PM me your email and I'll see what I can put together. Give me at least a few days though. Most of the bits are still in boxes and I've a room to finish plastering and painting before we can eat xmas dinner!
Texy
Jan 05, 2005, 08:08 AM
Well I,ve done a lot of work on this over the last week or two. I,m using a 16F88 as, amongst other things, it has the ability to read its own program memory. I,m using a look-up table to convert from the ADC voltage to
the altitude in feet, and with 4k at hand, plus plenty of I/O pins, and the 10-bit ADC, this was a good fit. And I had a couple lying around (free samples from microchip, of course!).
Now that the MPX4115A's have arrived from Motorola, I don't seem to get it to work. Last night at home I read the voltage direct off the Vout signal, and it read 4.10volts. I must be around 200-300 feet above sea level here, but I don't really know. I think that reading is somewhat high - I should expect 4.03volts or so according to my calculations. Anyway I took my circuit upstairs, expecting a (slight change), but no - still 4.10v. Now my dvm is a cheap unit, so I thought I,d try using my company dvm at work. I live very close to work, which is up a hill from my house - I,d guess at about 100 - 150 feet higher. What reading did I get at work? 4.10volts.
OK so I,ve tried 2 different locations each with a different dvm. I,ll take my works dvm home tonight and see what it reads there.
I mean I should be able to hook up the MPX4115A up to 0 and +5volts, and read the Vout on the dvm with no other circuitry, right?
Otherwise I,m stuck. Anyone else have these problems? PJ?
Texy
tapio linkosalo
Jan 05, 2005, 08:26 AM
A lot of us on the Aerial Photography Forum are using an Altitude Recorder that records an entire flight profile and also records the altitude at which each individual digital photo is taken.
http://www.hexpertsystems.com/zlog/
What kind of data does it output through the serial port?
I'm using a Zcech "LoLo" logger as trimming aid with my free flight models, and to avoid carrying a PC to the flying field (model box, winder, stooge, that's quite enough) I wrote together with Petri Kuikka a Palm-based software to read and plot logger data. We even have a web-page (http://koti.welho.com/pkuikka/lolo).
pjsmith
Jan 05, 2005, 08:31 AM
Hi,
I think you need to be looking at somthing more sensitive than that. The voltage changes are very small. The 16F88's (which I'm using I think) resolution is not that good. What I did is to get a voltage reference + and - between the 2 expected voltages I expected to get at my minimum and maximum altitude giving a decent enough resolution, and then reset the PIC's - and + vref to that. Then you get the same amount of steps but over a much smaller voltage range therefore giving you better measurements. Get a bunch of measurements, average it out, and you have a reasonable result. Then the real fun of actually calculating the altitude from the voltage without using any floating point begins!
The hours I've 'wasted' (according to my girlfrield anyway) on this! :)
Texy
Jan 05, 2005, 10:51 AM
Hi PJ - thanks for the quick response, as always.
I realise that the voltage difference between a few feet is very marginal.
Based on my calculations (Vout = 5 (( P(kPa) x 0.009) - 0.095) and
X = -26216 x ln( P(kPa) / 101.304 ), I should see a difference of 4.05067928
- 4.03987856 = 0.0108 volts between 190ft and 253ft. Not a lot for a cheap
dvm to distiguish, I agree.
In my design I,ve used 2 op-amps to first add -3v, then multiply that by 4 to give
a range to the ADC of 1.16 and 4.33 volts for 0 to 5000 feet. I,ve also used the
Vdd and Vss references (0 & 5v) for the ADC in the PIC.
I didn't think of using the -vref and +vref to select the ADC ranges. If I used that
approach, I could also eliminate the need for the op-amps - good idea!
I,ll need to find some clever resistor values to get 3.29volts (for 5000ft) and
4.08volts (for 0ft) from the 5volt supply. I guess I could cheat and use pots!
Thanks for you help so far.
Do my calculations tie in with yours?
Texy
shaneyee
Jan 06, 2005, 07:56 PM
Sorry to butt in, I just found this thread.
I am interested to build a device that will transmit a tone to a me on the ground indicating relative changes in alititude to aid in detecting thermals. So if the plane climbs, the tone goes higher in pitch and lowers in pitch if the plane loses altitude.
Thanks
Texy
Jan 07, 2005, 05:35 AM
Good Luck!
Texy
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.