.....I can see your 470pf.... over there... yes there.....next to your Pickit2 he!he!![]()
.....I can see your 470pf.... over there... yes there.....next to your Pickit2 he!he!![]()
3d visualization of a test pcb attached...
As you notice I didn't care much about the placement of sensor caps.
Just wanted to see the size of the board and best placement of connectors
(pcb measured... 45mm X 30 mm)
PLEASE NOTE all connectors will be male (not as seen) except for the sensor that it will be soldered on board
The sensor will be layed above C3 C2 and C1 (low profile cap)
Last edited by bitmaniac; - 5th June 2009 at 11:47.
SUCCESS!
Scalerobotics your code worked ok.
I put together a 12f675 , two caps on MPX supply pins , one 100n on pic supply pin one resistor to PC serial RX port and guess....
I get 54-55m ALT here from our MPX4115 project on the desk.
I also turned on my other project with a gps module next to it and I get 54-58m ALT!
PERFECT right on the SPOT!!! I am very please with the result.
May be we must also include a calibration initial setup.
pic settings 4Mhz internal , Clk source Fosc/8 , Define ADC clock 2 (I will try 1 later) and ADC_SAMPLEUS 5.
The only thing left to verify is the accuracy in meters.
I am very happy now!
First try success? Nice!
Maybe you are already converting feet to meters in your code, but this seems to work for me. And I think it is better than a new metric lookup table, because there are more feet per increment, which should make it more accurate.
So it looks like you are making an altitude hold circuit. An altitude hold has been on my back burner for a few years now. Darrel's code has really made part of this easy, so it looks like I may be able to move this up a burner or two myself!Code:if metric = 1 then 'convert from feet to meters finalALT = finalalt * 2500 finalALT = div32 8203 endif
How smooth is your servo at 4 mhz and 8 mhz? I would think that 20 mhz would be a bit smoother for sensing pulse width, but have not tried the lower mhz.
http://www.scalerobotics.com
Altitude hold : oh! you gave me another idea!
For the moment it will be an ALT+TIMER motor cut-out for moto-gliders for F5J-GR . I am trying to make a circuit that will cut motor after 30sec or to an ALT of 200m what comes first!
about your question I think we will have problems with internal 4mhz. I am thinking of going to 12f683 (8 Mhz internal) and more code space , we are in the limit here with f675. Also may be asm is used to pass servo pulses through and/or maybe as final solution we will go to an external low profile crystal and two decopuling caps.
I will experiment and see....
(Now I get 51m here (project running!) the funny thing is that I have closed the door of my lab now , the weather got very hot here now . I think there will be no problem with the calibration because the only think I want to measure is ALT differece of 200m so 1st you have to power the device just 1minutes before flight. It will read the ground alt and if 200m reached motor will cut that's all.
Last edited by bitmaniac; - 5th June 2009 at 17:18.
Modified the code to handle 0 to 25,900 feet, and a 16 bit conversion lookup table. Now you can select your conversion oversampling rate for Darrel's code, and your result gets shifted to match the 16 bit lookup table for altitude conversion. Works for 10 to 16 bit oversampling rates. My favorite is the 15 bit for accuracy and speed, but it is selectable.
See http://sites.picbasic.net/component/...,91/pageid,81/ for more info.
http://www.scalerobotics.com
scalerobotics , you have done excellent work again my friend!.
But you made me wonder ... (as I have already design the pcb of my ALTMTR) MUST I include a Crystal (20Mhz) after all or I can leave/ and rely on internal 8Mhz oscillator (12f683) with any drawbakcs of it?
May be I need to redesign my mcb and loose button activation option.
Or may be I use led indication both as input and / or output this will make me think....)
Bookmarks