Another readadc on 08m2 question

PersonX99

New Member
I am using on 08m2 (bear with me as I am new to this) with a simple voltage divider circuit. One side is a 25K pot and the other side is a fixed 10K resistor. In between the two I have connected C.2.

My code is as follows:

main:
readadc C.2,b0
sertxd("Variable b0 = ",#b0,13,10)
pause 200
goto main

When I run this program with the terminal window up, I see the value of 117-119. I adjust the pot and the output remains the same. I check the voltage (+ at input c.2, - at ground) and the voltage varies with the pot adjustment between ~.6 and 3.6V (numbers may be slightly skewed). The 08m2 is powered with 3AA battery pack. The voltage divider circuit is powered from a separate 5V source, but I got the same results from using the Vcc from the 08M2.

All of the other pins on the 08m2 are floating. Will this affect the results?
Which source should I use for the voltage divider circuit (08m2 or seperate source)? Can I use either?

I have done a couple of simple circuits with the 08M2 using simple high,low and PWM commands to light up some leds on the outputs. All of these seemed to work as expected so I believe to 08M2 to be working correctly.

Any thoughts, comments and/or suggestions?

Thanks for any info,
Dave
 

Technical

Technical Support
Staff member
Welcome to the forum.
Sounds like a simple wiring error somewhere, your code is correct and the floating inputs make no difference.
You have got both 0V lines connected between the two supplies?
 

Goeytex

Senior Member
Some things to check.

1. Check your ground from the battery pack to Picaxe Leg 8.
2. Take all voltage measurements using Picaxe Leg 8 as the ground reference.
3. If using a separate supply make sure the grounds are tied together
4. ALWAYS put a 100nf bypass/decoupling capacitor across the +V and 0V Picaxe Pins
5. Try a different Picaxe Pin.
 

mrburnette

Senior Member
I am using on 08m2 (bear with me as I am new to this) with a simple voltage divider circuit. One side is a 25K pot and the other side is a fixed 10K resistor. In between the two I have connected C.2.
Wire the Pot as a Rheostat (2-wire device) ... tie the wiper to the end connecting to the AD of the PICAXE.

If you reverse the 10K resistor (one end to +5V) and put the rheostat (variable resistor) with one end to GND, then you would effectively have something like:
Test-Results-On-AD
where the rheostat would be mimicking the thermistor.


- Ray
 
Top