Building_A_Robot_Fish
New Member
Hi,
I'm a total beginner at this electrickery and robotics stuff so please be gentle.
I'm attempting to construct a tilt sensor using an Analog Devices ADXL202 accelerometer and a PIC. I'm utilising the analogue outputs from the XL as I've insufficient timer/counter pins on the PIC.
I've attached a circuit diag for reference.
On the PIC side I've coded up the A/D conversion and have a bank of 10 LEDs to show the 10-bit binary value of the conversion.
The math & doco says that on straight and level the voltage drop between the X axis npn emmiter and the A/D pin should be 2.5v (approx). This should equate to a value from the conversion of around 500.
My problem is this.... When the circuit is up and running and I measure the voltage between the emitter and ground it reads circa 2.5v and the LEDs show roughly the right value and are very stable. However, when I remove the meter the value the LEDs show changes and starts moving about all over the place. If I ground my meter and then touch the emmitter the values reads good and the LEDs show the value they should.
Remembering I know very little about this subject, any ideas what's wrong with my circuit? How is the meter alterring the behaviour of the circuit? I'm guessing at this stage that it's my circuit rather than my code as I'm a coder by trade.
Any help appreciated, thanks.
I'm a total beginner at this electrickery and robotics stuff so please be gentle.
I'm attempting to construct a tilt sensor using an Analog Devices ADXL202 accelerometer and a PIC. I'm utilising the analogue outputs from the XL as I've insufficient timer/counter pins on the PIC.
I've attached a circuit diag for reference.
On the PIC side I've coded up the A/D conversion and have a bank of 10 LEDs to show the 10-bit binary value of the conversion.
The math & doco says that on straight and level the voltage drop between the X axis npn emmiter and the A/D pin should be 2.5v (approx). This should equate to a value from the conversion of around 500.
My problem is this.... When the circuit is up and running and I measure the voltage between the emitter and ground it reads circa 2.5v and the LEDs show roughly the right value and are very stable. However, when I remove the meter the value the LEDs show changes and starts moving about all over the place. If I ground my meter and then touch the emmitter the values reads good and the LEDs show the value they should.
Remembering I know very little about this subject, any ideas what's wrong with my circuit? How is the meter alterring the behaviour of the circuit? I'm guessing at this stage that it's my circuit rather than my code as I'm a coder by trade.
Any help appreciated, thanks.