MCP3208 ADC Problem
I seem to be having a problem with the MCP3208 giving me a consistent reading. I'm using the MCP3208_fast.spin object to read it.
I'm using the gyro-accel unit from gadget gangster: http://gadgetgangster.com/find-a-project/56.html?projectnum=213
Hopefully the images are good.
It seems very sensitive when I touch the pcb in some place, giving weird numbers.
On the screen shot, GY is giving the correct 1559 and any time I tilt one way or the other, it reads accordingly. The others are not responding to any tilt and are reading all the same numbers.
I read the MCP3208 pdf file, but I'm not hooking this up right or something.
I also uploaded my code, so if anybody can see something amiss there.
Everything is running on 3.3 volt.
On the ADC, I have:
pin 16 and 15 = +3.3 volt
pin 14 and 9 =ground
pin 13 = pin 6 on propeller
pin 12 and 11 =pin 5 on propeller
pin 10 =pin 4 on propeller
I have a 1uf cap on Vdd and ground.
The outputs from the IMU are going directly into the channels of the ADC.
If I'm missing something in my description let me know.
Thanks,
Tony
PS- I have to work during the day, so I can't respond immediately.
I'm using the gyro-accel unit from gadget gangster: http://gadgetgangster.com/find-a-project/56.html?projectnum=213
Hopefully the images are good.
It seems very sensitive when I touch the pcb in some place, giving weird numbers.
On the screen shot, GY is giving the correct 1559 and any time I tilt one way or the other, it reads accordingly. The others are not responding to any tilt and are reading all the same numbers.
I read the MCP3208 pdf file, but I'm not hooking this up right or something.
I also uploaded my code, so if anybody can see something amiss there.
Everything is running on 3.3 volt.
On the ADC, I have:
pin 16 and 15 = +3.3 volt
pin 14 and 9 =ground
pin 13 = pin 6 on propeller
pin 12 and 11 =pin 5 on propeller
pin 10 =pin 4 on propeller
I have a 1uf cap on Vdd and ground.
The outputs from the IMU are going directly into the channels of the ADC.
If I'm missing something in my description let me know.
Thanks,
Tony
PS- I have to work during the day, so I can't respond immediately.
Comments
Have you read the appnote AN688?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
This probably isn't your problem, but just in case:- the MCP3208 doesn't run as fast at 3v, as it does at 5v (50 kHz max at 3v). If you're overclocking the Prop is might pay to check the freq
What is app688? Is that in the MCP3208 Doc. I'll run a separate analog and digital ground.
Tubular, I'll add a 106 tantalum in parallel and change it to five volts and see what happens.
Thanks guys!
ww1.microchip.com/downloads/en/AppNotes/00688b.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Well, since I have your attention, I do have a question. What is the Reference Voltage pin used for? That has really been bugging me.
For example if you're reading a voltage from 0-3.3V then you would ti it to 3.3V. But if your reading 0-5V, then tie it to 5V. If you don't have this connected to anything, then it's floating would would explain your problem with an unstable reading.
If you want to raed voltages higher than 5V, then use a voltage divider to scale down your input and set your reference to 5V. For example if you want to read a 0-10V reading, then putting the input voltage through a voltage devider to cut your highest voltage of 10V down to 5V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jim Fouch
FOUCH SOFTWARE