input to Axe 110 datalogger

Hello Group.
I am not too good at digital stuff, but I will try to explain my problem. I am inputing into axe110 datalogger on analogue input 1, a voltage of approximately 0.500 volts, which can increase by + or - 0.001volts each second. I have an axe 033 lcd module attached, but this is reading 38 !!!. I am using a picaxe wizard programme to record readings each second.
My question is, can I get my lcd module to display 0.500, 0.501 etc with an appropriate programme, or should I amplify my output before I feed it into my datalogger sensor input? Anyone any ideas?

David Miles.
 

Andrew Cowan

Senior Member
Readadc has 255 values - so with a supply of 5v, that is a resolution of 0.019v.

Readadc10 has 1024, so with a supply of 5v, that's a resolution of 0.0049v.

Therefore, you might find you can get away with using readadc10, although you'll have to give it a go. If that doesn't work, you'll probably need to use an op-amp.

Andrew
 

westaust55

Moderator
as Andrew indicates, READADC10 should provide adequate resolution albeit in the lower portion of the ADC input range. - (EDIT See below)

Note that Readadc10 will give a result from 0 to 1023 where the input at the same voltage as the PICAXE supply gives 1023.

Thus you need to perform some maths to rescale the value the match the input voltage.

Since you want 3 decimal places you will need to use a word variable (to hold a value greater than 255) then multiply the value(s) by 1000 to handle 3 decimal places since the PICAXE only works with positive integer values and finally use the BINTOASCII command to output each digit and insert the decimal point (".") at the correct position.

EDIT: actually even with the READADC10 your resolution is 0.0049 / 0.005 Volts as Andrew has mentioned.
So no without an op-amp for amplification, you are not going to register a difference of 0.001 volts as you seek - sorry was thinking of 2 decimal places to start with until I re-read your post.
 
Last edited:

Svejk

Senior Member
Are you trying to read a LM355 or MCP9700 or similar temperature sensor? Those give out 500 mV at 0ºC. Also what range of voltages are you looking to measure? 500 to 1000 mV?
 
Thank you Andrew and westaust55 for your help, you have told me what I need to know.

To answer Sveik's question, I am using a diode to measure temperature . The actual temperature is not important, I just need to be able to see very small changes over a narrow range.

David Miles.
 
Hello All.

As I did say that I wasn't too good at this digital stuff, I hope Andrew or Westaus55 can help me out here with my dc into my axe110 datalogger.
I tried:-
main:
readadc10 C.1,w1 ; read value into b1
gosub wrchr ‘ send character to LCD
pause 200 ; short delay
goto main ; loop back to start
But I got an error message.
Can you please tell me what I have done wrong, I would just like to display the current dc reading on my LCD screen. Thanks.

David Miles.
 
Axe110 Datalogger

Hi Hippy.
The error message was:-

gosub wrchr ‘ send character to LCD


Error: Label not defined - wrchr

I really don't know what to change to get it to display the current dc voltage on the lcd screen.

David Miles.
 

jtcurneal

Senior Member
As mentioned before, the error message means that you do not have wrchr correctly defined.

Readadc10 c.1, w1 puts a 10 bit value between 0 and 1023 into variables b3 and b2

To output a voltage to an LCD you will have to convert that ADC value into something that represents the voltage.
You then have to convert that value into ASCII characters and send the ASCII characters to the LCD.

With more information, we can give you more specific help.

Joel
 
Hi. jtcurneal.
Thanks for trying to help. I can try to give you any info you need, just ask, or if you know of a similar project, just point me in the that direction and I will try to extrapolate.
David Miles.
 
Hi All.

My problem is that I know very little about digital programming. When I have used the Axe110 Datalogger in the past, I have used the wizards and they have worked well. This time I want to reproduce a dc value of around 0.500 volts on my Axe033 lcd module.
This is what I tried.
main:
readadc10 C.1,w1 ; read value into b1
gosub wrchr ‘ send character to LCD
pause 200 ; short delay
goto main ; loop back to start

But I got this error message:-
gosub wrchr ‘ send character to LCD
Error: Label not defined – wrchr
It means nothing to me!!
I assumed it would be a three or four line programme using readadc.
Any help would be appreciated.
David Miles
 

jtcurneal

Senior Member
To get started, I would use readadc to a byte variable instead of readadc10 which uses a word variable.

The PicAxe chip compares the voltage that you are imputing to the VCC voltage (4.5 or 5 volts) and stores a value in the variable which is a percentage of the maximum. For a byte variable it will be from 0 to 255. 0.5 volts is 10% of 5 volts so I would expect a value of about 25 - 26.

for testing I would then output that value to the PE terminal, F8 on the computer keyboard.

main:
readadc C.1,b1 ; read value into b1
gosub wrchr ‘ send character to LCD
pause 200 ; short delay
goto main ; loop back to start

gosub:
sertxd(“The value of b1 is ”,#b1,13,10)
return


the 13 and the 10 in the sertxd command means a carriage return and a line feed so each reading is on a new line.

After you get that working, you can go to sending it to the LCD.

Joel
 
Hi Joel.
I tried your suggested code and received this:-

gosub:
^

Error: Syntax error in this line!
Does that mean anything to you.

David
 

jtcurneal

Senior Member
Sorry That line should have been wrchr: not gosub:

Getting to be the end of my workday and am not the most alert.

Joel
 

eclectic

Moderator
Hi Joel.
I tried your suggested code and received this:-

gosub:
^

Error: Syntax error in this line!
Does that mean anything to you.

David
It might be a good idea to step back and :

1.Post your scheamtic and a couple of Hi-Res photo's.

2. Describe what you have connected

3. Step though exactly what you wish to achieve.

e
 
I do think that I should step back and look!

Westaust55 had already told me that 0.005volt would be my best resolution without an amp on my input. I will now try to boost up my input voltage changes to at least 0.005volts, before I try anything else.

I don't really mind what the axe033 LCD screen says.I just want it to be as sensitive as the diode thermometer at the input.

Incase anyone is interested in a practically free diode temperatute sensor, this is the link to an article about it.http://www.rst-engr.com/rst/articles/KP90APR.pdf

David Miles
 

jtcurneal

Senior Member
The diode may be inexpensive as a temperature sensor, but when you add the cost of an opamp and the expense and time involved in setting up that method of measuring temperature, it would wind up cheaper and easier to use a DS18B20 IC for most applications. PicAxe chips can read a DS18B20 to a resolution of 0.0625 degrees C without any external opamp. They are very easy to use with Picaxe chips.

Joel
 

boriz

Senior Member

centrex

Senior Member
Do you have at the very start of the program

SYMBOL wrchr = w1

This should fix that particular error message
 
Top