AXE091 Dev Board - TX/RX - possible by AXE027 USB cable?

kcarring

New Member
Though I have managed to download many basic files onto my 18M2, with the code editor, and the AXE027 cable... and then execute those ...

I have never managed to communicate back to the PC, and thus have had no success with any of the tutorials that connect the PICAXE to VB code.

Can this be done with the AXE027 cable?

I see there is a 9 way D serial socket (I do not have a cable though) and beside it 4 pin connects: NTXD/NRXD and TTXD/TRXD. Do I need to connect C.3 Serial Out (beside 18M2) to NTXD, and C.4 Serial In to NRXD, and then run a serial cable to the PC? I do not understand the manual which states:

RS232
Two methods of RS232 communication are provided.
The inverted (N) method uses a 10k/22k style circuit to the 3.5mm jack socket. This
allows the normal PICAXE download cable to be used for serial communication via
the input/output pins.
The true (T) method uses a MAX202 circuit connected to the 9 way D serial socket.
This requires a 9 way serial cable e.g. part CAB010.
Commands - serout, serin, hserout, hserin

I have not been able to succeed at any comm tutorials at all, it's like it won't talk, but I am just assuming my connected download cable is ready to go....
Am i missing some other way of connecting this, to have a Visual Basic Program gather and send data to the 18M2?

Thanks for any help!!!
I'm trying!!
Sorry, I'm very newb.
 
Last edited by a moderator:

nick12ab

Senior Member
You can communicate with the computer using the AXE027 and commands such as serin C.4 or serrxd to receive stuff from the computer and serout C.3 or sertxd to send stuff to the computer.

For serin and serout commands, use a Nxxxx baud rate when using the AXE027.

The speed of serrxd and sertxd is controlled directly by the speed of the PICAXE (which can be set with the setfreq command) and is N4800 at 4MHz, N9600 at 8MHz, N19200 at 16MHz and N38400 at 32MHz.
 

hippy

Ex-Staff (retired)
Do I need to connect C.3 Serial Out (beside 18M2) to NTXD, and C.4 Serial In to NRXD, and then run a serial cable to the PC?
First things first; are you wanting to communicate with the PC using SERTXD/SERRXD commands or with SEROUT/SERIN commands ?

If SERRTXD/SERRXD you don't need to do anything, just use those commands, keep the AXE027 plugged into the download socket as normal.

If using SEROUT/SERIN, connect the pins each use to NTXD/NRXD then plug the AXE027 into the jack next to the 9-way D once the program is downloaded.
 

kcarring

New Member
First things first; are you wanting to communicate with the PC using SERTXD/SERRXD commands or with SEROUT/SERIN commands ?

If SERRTXD/SERRXD you don't need to do anything, just use those commands, keep the AXE027 plugged into the download socket as normal.

If using SEROUT/SERIN, connect the pins each use to NTXD/NRXD then plug the AXE027 into the jack next to the 9-way D once the program is downloaded.

Thanks Hippy, I think that is the issue, right there...
I was using SEROUT/SERIN, and had ran a jumper from C.3 to NTXD, and from C.4 to NRXD, but my cable (3.5mm stereo) was still plugged into jack nearest the 18M2, itself.

So I will try that!
:)
 

hippy

Ex-Staff (retired)
I was using SEROUT/SERIN, and had ran a jumper from C.3 to NTXD, and from C.4 to NRXD, but my cable (3.5mm stereo) was still plugged into jack nearest the 18M2, itself.
That should have worked; C.3 is Serial Out so goes to the download socket you were plugged into. This works for me -

Code:
#Picaxe 18M2
#Terminal 4800
Do
  SerOut C.3, N4800, ( "I'm using SEROUT C.3", CR, LF )
  Pause 1000
Loop
As should this -

Code:
#Picaxe 18M2
#Terminal 4800
Do
  SerTxd ( "I'm using SERTXD", CR, LF )
  Pause 1000
Loop
If you take a wire from C.3 ( leg 2 of 18M2 ) to NTXD, move the AXE027 to the jack near the 9-way you should see the same on your Terminal window.
 

kcarring

New Member
That should have worked; C.3 is Serial Out so goes to the download socket you were plugged into. This works for me -

Code:
#Picaxe 18M2
#Terminal 4800
Do
  SerOut C.3, N4800, ( "I'm using SEROUT C.3", CR, LF )
  Pause 1000
Loop
As should this -

Code:
#Picaxe 18M2
#Terminal 4800
Do
  SerTxd ( "I'm using SERTXD", CR, LF )
  Pause 1000
Loop
If you take a wire from C.3 ( leg 2 of 18M2 ) to NTXD, move the AXE027 to the jack near the 9-way you should see the same on your Terminal window.


Thanks Hippy :)

Both of your examples work, having the AXE027, plugged into the AXE091, in either location, at the 18M2 jack, or the mini jack nearest the RS232.
So I guess the problem is in getting my setup to work with the code as shown.


I was trying to get through this tutorial here:
http://www.instructables.com/id/Control-real-world-devices-with-your-PC/step5/Download-the-picaxe-program/

This was the original code he gave:
Code:
main:serin 3,N2400,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 
readadc 1,b1' read the pot then send this back 
serout 0,N2400,("Data", b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13) 
select case b0' read data bit b0 
case <140' if <140 then set servo to one position 
servo 2,120 
pause 1000' pause a second 
else 
servo 2,160 
pause 1000 
endselect 
low 2' turn off the servo as serin does this anyway 
goto main
And I changed it to:


Code:
symbol LED = B.6

main:

serin C.4,N4800,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 
readadc C.1,b1' read the pot then send this back 
serout C.3,N4800,("Data", b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13) 
select case b0' read data bit b0 
case <140' if <140 then flash slow
high LED
pause 150
low LED 
pause 1000' pause a second 
else 
high LED
pause 35
low LED
pause 1000 
endselect 
low LED
goto main

Then I connected Pin18 to the wiper on the pot, Pin 12 to a 320 ohm resistor -> anode of LED -> cathode to 0V.

In VB, he gave:

Code:
Imports System.IO
Imports Strings = Microsoft.VisualBasic ' so can use things like left( and right( for strings
Public Class Form1
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer) ' for sleep statements
Dim WithEvents serialPort As New IO.Ports.SerialPort ' serial port declare
Dim PicaxeRegisters(0 To 13) As Byte ' registers b0 to b13
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Timer1.Enabled = True ' put this in code as defaults to false when created
Timer1.Interval = 5000 ' 5 seconds
PictureBox1.BackColor = Color.Red ' set to position 'red'
Array.Clear(PicaxeRegisters, 0, 13) ' probably not needed as array declared blank
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
' timer ticks every 5 seconds
Call SerialTxRx() ' talk to picaxe
End Sub
Sub SerialTxRx()
Dim LabelString As String ' string to display byte values
Dim DataPacket(0 To 17) As Byte ' entire data packet "Data"+14 bytes
Dim i As Integer ' i is always useful for loops etc
Label1.Text = "" ' clear the text on the screen
For i = 0 To 3
DataPacket(i) = Asc(Mid("Data", i + 1, 1)) ' add the word "Data" to the packet
Next
For i = 0 To 13
DataPacket(i + 4) = PicaxeRegisters(i) ' add all the bytes to the packet
Next
If serialPort.IsOpen Then
serialPort.Close() ' just in case already opened
End If
Try
With serialPort
.PortName = "COM1" ' Most new computers default to com1 but any pre 1999 computer with a serial mouse will probably default to com2
.BaudRate = 2400 ' 2400 is the maxiumum speed for small picaxes
.Parity = IO.Ports.Parity.None ' no parity
.DataBits = 8 ' 8 bits
.StopBits = IO.Ports.StopBits.One ' one stop bit
.ReadTimeout = 1000 ' milliseconds so times out in 1 second if no response
.Open() ' open the serial port
.DiscardInBuffer() ' clear the input buffer
.Write(DataPacket, 0, 18) ' send the datapacket array
Call Sleep(300) ' 100 milliseconds minimum to wait for data to come back and more if data stream is longer
.Read(DataPacket, 0, 18) ' read back in the data packet array
.Close() ' close the serial port
End With
For i = 4 To 17
LabelString = LabelString + " " + Str(DataPacket(i)) ' turn into a text string
Next
Label1.Text = LabelString ' put the text string on the screen
Catch ex As Exception
'MsgBox(ex.ToString)' uncomment this if want to see the actual error message
Label1.Text = "Timeout" ' will display this if picaxe not connected etc
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.BackColor = Color.Red ' change the box to red
PicaxeRegisters(0) = 120 ' an arbitrary value for the servo
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PictureBox1.BackColor = Color.Green ' box to green
PicaxeRegisters(0) = 160 ' arbitrary value for the servo
End Sub
End Class
I changed these (hopefully obvious) lines to:

Code:
.PortName = "COM3" ' This is what is shown as being the port I am always connected to when downloading
.BaudRate = 4800 ' I thought this should match my PICAXE freq./baudrate

I make sure the 18M2 is programmed first. Exit out of code editor completely, then I execute the VB file, by hitting play in VB8, I get my buttons, colored box, and text line, but all it does is flash:
Timeout

So then I enabled "view error dialog" and tried switching to COM1. Slightly different error (more indicative of an actual port problem...), but both flash "timeout".
When I read the error message, it is timing out on line 42:

.Read(DataPacket, 0, 18) ' read back in the data packet array

So I guess it is talking? I've just got my adc not configured?

Hmmm
 
Last edited:

kcarring

New Member
*NOTE

I'm beginning to think I should just get away from this Visual Basic and into Liberty basic or something a bit more "explored and explained" after having seen a few pages online.

Essentially I am wanting to do some simple PC based automation of valves, SSR's etc. And have those mini-apps operate off of real world times, calendars.
 

Goeytex

Senior Member
Liberty Basic
RobotBasic ( Free & very good for automation)
JustBasic ( Free Version of Liberty Basic)
ThinBasic (Free)
 

hippy

Ex-Staff (retired)
serin C.4,N4800,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13

That's likely causing some problems, not in it being wrong but how it's used.

Pin C.4 is Serial In on the 18M2, so while it could receive data, any data seen will cause the chip to reset and expect a download. You need to add a DISCONNECT command at the start of the program / before the first SERIN C.4 is executed.

Additionally, if you connect the NRXD of the bottom jack to C.4, leg 3, that creates a potential divider with the actual download interface already in place which may possibly cause some issues.
 

kcarring

New Member
serin C.4,N4800,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13

That's likely causing some problems, not in it being wrong but how it's used.

Pin C.4 is Serial In on the 18M2, so while it could receive data, any data seen will cause the chip to reset and expect a download. You need to add a DISCONNECT command at the start of the program / before the first SERIN C.4 is executed.

Additionally, if you connect the NRXD of the bottom jack to C.4, leg 3, that creates a potential divider with the actual download interface already in place which may possibly cause some issues.

Thanks hippy!

I really appreciate all your help. When you are new to this stuff, and you do what I did, go purchase the AXE091... it's almost "too much" - in the sense that, had I of just got an 08M, learned how to connect it, power it, all just on a breadboard, I think I would have got a better foundation. There are far more links online to people doing stuff "raw", then using "AXE091's" ... So in the last two days, I'm back tracking... spending more time on the basics... I've put the whole concept of using any 3rd part language aside, for a moment... and I just have it reporting back to the terminal, for example a variable voltage divider using a potentiometer, calculated from that, the actual potential at that point... reporting back to terminal that result ...

I will look up the DISCONNECT command.

Eventually I hope to have the AXE be a software driven Irrigation valve control "brain".
I would also like to make a voltage datalogger.

Haven't seen any projects out there, for either, which kind of surprises me... as there are plenty of applications, however; many seem "toyish".

Cheers
 

eclectic

Moderator
Eventually I hope to have the AXE be a software driven Irrigation valve control "brain".
I would also like to make a voltage datalogger.

Haven't seen any projects out there, for either, which kind of surprises me... as there are plenty of applications, however; many seem "toyish".

Cheers
http://www.picaxeforum.co.uk/showthread.php?14968-20x2-Retic-5station-led-display&highlight=retic

http://www.picaxeforum.co.uk/showthread.php?18194-Picaxe-controlled-garden-water-sprinkler&highlight=retic


then search using
irrigation
hydroponic

And voltage logger? Must be dozens lurking about the Forum.

e
 

hippy

Ex-Staff (retired)
So in the last two days, I'm back tracking... spending more time on the basics... I've put the whole concept of using any 3rd part language aside, for a moment... and I just have it reporting back to the terminal, for example a variable voltage divider using a potentiometer, calculated from that, the actual potential at that point... reporting back to terminal that result ...
That's often the best and recommended course. It's easy to jump in the deep end, rush too far ahead, and hit problems, then not know why or where, and it often is a combination of mistakes or misunderstandings.

Get a good sound foundation and then build on that. If it works on the terminal it should then work on a separate serial link to the terminal, and when it works on that, it should work with an external program. Being able to say 'it worked with that but not with this' is invaluable in pinpointing what could be wrong.
 

kcarring

New Member
If it works on the terminal it should then work on a separate serial link to the terminal, and when it works on that, it should work with an external program. Being able to say 'it worked with that but not with this' is invaluable in pinpointing what could be wrong.
Thanks Guys!

@hippy - my thoughts exactly. I was reading through the specs of the 20X2, and prior to getting involved with this stuff, every circuit I ever built was analogue. I always thought "analogue is always less power consumption", but... i was reading, and I see the 20X2 can operate @ 31kHZ/3V. That's gotta be LOW idle draw... what, in the uW's????

I love, for whatever reasons, to think about "outside the box" stuff.

I do commercial / residential irrigation, for work. One of the real shortcomings of Irrigation systems is that when the power goes out, a 9V (or 3.0V) kicks in to "save your programming" - sometimes in the newer models this is lithium ion cells, or even supercaps. Great. Problem is, none of them actually "water", in other words, you miss a watering cycle, guaranteed. There is no "power available" for the solenoids - just memory retention. So that is not ideal, by any means. Also, none of them are smart enough to say, know that the battery is low and DO something about it, i.e. recharge it. Only the supercap models. So in 95% of the models, if the battery goes dead, and property owner Bill is on vacation, the power goes out, memory is not retained, everything goes to default values, typically meaning that he is now watering for about 10 min. per station, possibly on days that are deemed "illegal" days (for his address) based on city bylaws. One guy I was hired by, came home to a dead battery and a $200 fine posted on his door.

Of the few systems I have seen that are truly computerized, i.e. hooked up to a PC, none are even close to affordable, let alone simple to own or operated. In fact, the only ones I have seen are owned and operated by very tech-savvy guys. Even those systems are not safeguarded for power failure.

While all of this seems overkill... it's not actually. Consider the owner of property, say a Mall. He lives in a city 400 miles away. His irrigation system fails, and in one week he loses $35,000 worth of plants. That being the cost of the plants, ripping them out + hiring someone to put new ones in. It ain't cheap.

Perhaps I will eventually come up with a system that runs on the PICAXE netserver and is UPS/battery based, web monitering. I see real application for this. All the technology is there... the solenoids themselves typically draw perhaps 300-350 mA/24VAC on startup, and idle at about 180mA/24VAC. Typically, you might have 6 or 7 zones, operating for 30 minutes each run, on 3 days per week. I do not see this as something that could not be sustained by batteries. A single Trojan 1275 deep cycle should do the trick, and for the off-gridder, could be solar charged, too.
 

SAborn

Senior Member
I also worked with irrigation systems over many years, there is systems that will do as you request and not over costly, but will agree most are basic rubbish, and any system needing a backup battery to be fitted to retain the program i simply would not use nowdays.

A watering system with a picaxe and a RTC is about as easy as it gets, and if the program set values are stored in eeprom a power outage wont effect the program operation.

There is complete solar systems and i installed my first one of those over 20 years ago, they use a different solenoid, as the coil has a magnet on it and a single pulse is sent to the coil to open the valve, and a single pulse of reverse polarity is sent to close the valve, this allows for very little battery power needed to control the system.

Many of the larger vineyards here use a wireless system with smallish solar panels and pulse controlled solenoids, the main control unit sends a wireless command to the slave to open the correct valve, then the slave sends a message back to the master controller, if no message received then a fault is indicated.

Again rather easy to do with a picaxe, RTC, and a few Dorji tranceivers.
 

kcarring

New Member
I also worked with irrigation systems over many years, there is systems that will do as you request and not over costly, but will agree most are basic rubbish, and any system needing a backup battery to be fitted to retain the program i simply would not use nowdays.

A watering system with a picaxe and a RTC is about as easy as it gets, and if the program set values are stored in eeprom a power outage wont effect the program operation.

There is complete solar systems and i installed my first one of those over 20 years ago, they use a different solenoid, as the coil has a magnet on it and a single pulse is sent to the coil to open the valve, and a single pulse of reverse polarity is sent to close the valve, this allows for very little battery power needed to control the system.

Many of the larger vineyards here use a wireless system with smallish solar panels and pulse controlled solenoids, the main control unit sends a wireless command to the slave to open the correct valve, then the slave sends a message back to the master controller, if no message received then a fault is indicated.

Again rather easy to do with a picaxe, RTC, and a few Dorji tranceivers.
Very interesting. It makes sense, in a way, to locate the power, where it's needed... instead of running expensive copper wire through the ground, everywhere... i like it. Especially for a huge installation... And in the winter, here, when there is very little sun/solar - who cares, the irrigation isnt in use.
 

SAborn

Senior Member
One commercial wireless irrigation slave i looked at not long back was close to $1000.00, that did not include the solar panel and sla battery, just the wireless slave, my thoughts were i could build it with a 08m2 and a Dorji transceiver for far less than $50.00, and the master would cost about the same.

In vineyards the ground is often tilled so wires become problems unless buried rather deep, then you have long runs of cables with high losses, so wireless is the best option, it also allows for a semi intelligent system with data being sent both ways (master>slave>master) and with the use of simple pressure sensors to indicate plumbing faults like a broken pipe, blocked sprinkler heads, etc.
 

kcarring

New Member
One commercial wireless irrigation slave i looked at not long back was close to $1000.00,
Yes that is pretty spendy. I get pretty close to installing a 2 or 3 zone small system for $1000 - nevermind just the timer :)
once i figure out how to work this PICAXE a bit more on some basic stuff, maybe we both can work on that. Could be a cool
thing to build and open-source
 

hippy

Ex-Staff (retired)
One guy I was hired by, came home to a dead battery and a $200 fine posted on his door.
Ouch! That certainly puts the annoyance of having 'recorded the wrong channel' into perspective.

The PICAXE with a DS1307 should be ideal for something better than 'by rote, on the hour, every hour' style watering and it seems there's enough 'insurance' in that to make it cost effective without sky-high pricing and still profitable.

Despite your initial hurdles, the abilities of the AXE091 more than most project boards and a little overwhelming, it is probably the best platform for developing such a system on, easy to connect PICAXE, DS1307, ( plus I2C EPROM if you want logging ) with the breadboard great for battery backup and power-loss circuits and ULN2xxx solenoid drivers ( and the LED's can work as 'solenoids' for testing ), the extra jack great for programming and debugging while outputting to another PC / laptop that can do any clever stuff. It's what I'd choose so definitely wasn't a mistake.
 

kcarring

New Member
Ouch! That certainly puts the annoyance of having 'recorded the wrong channel' into perspective.

The PICAXE with a DS1307 should be ideal for something better than 'by rote, on the hour, every hour' style watering and it seems there's enough 'insurance' in that to make it cost effective without sky-high pricing and still profitable.

Despite your initial hurdles, the abilities of the AXE091 more than most project boards and a little overwhelming, it is probably the best platform for developing such a system on, easy to connect PICAXE, DS1307, ( plus I2C EPROM if you want logging ) with the breadboard great for battery backup and power-loss circuits and ULN2xxx solenoid drivers ( and the LED's can work as 'solenoids' for testing ), the extra jack great for programming and debugging while outputting to another PC / laptop that can do any clever stuff. It's what I'd choose so definitely wasn't a mistake.
Ok :)

It's still hard to believe nobody has built and published a voltage data logger for battery discharge monitering LOL unreal. Maybe it's so simple, nobody bothered to post it... I mean, I've played with the ADC to voltage divider, does one only need to connect & share grounds (-), and have the positive of charging battery ---> center of voltage divider ---> one resistor in series to ADC, the other in series to ground?

http://www.thebackshed.com/Windmill/PicLog.asp

That's how it seems to be done, on this awesome project, above ^

Closest I have come, is backshed's awesome alternative energy system... (which is, of course, way, more)... once again it is rather complex, but, at least, he is just sending the ADC readings out, to software... I learned pretty quick why software is needed, last night... when playing with a voltage divider, having to manipulate equations extensively to handle the math, beyond goofy indeed (is this why the math co-processor was invented??!)- easier to just send out the ADC info out to BASIC, which can handle math!! So I'll play with "sections" of this backshed energy moniter, looks awesome!
 
Last edited:

SAborn

Senior Member
I also know the Piclog very well and have used it in the past, nowdays i have a updated design and better software (the piclog software can crash at times, but think Glenn has fixed that now)

Yes its only the 10k and 22k resistor voltage divider that is needed to read the battery voltage with the picaxe as shown in the piclog circuit.
Although i tend to use a 2K2 resistor to ground and a 22K to V+ for the divider.

It is dead easy to get the picaxe to send the data out to the PC and to use the piclog software to calibrate, display and log the battery voltage, you dont need to use all the other functions like amps, rpm, windspeed etc.

If you want a little help to get the picaxe talking to the PC piclog software i can help you there, do you need a code example to read the voltage on the ADC pin and send it to piclog.
Piclog is easy to calibrate too.
Im also on TBS forum too if you need to ask questions there, but all you need is also on this forum.
 

SAborn

Senior Member
Here is a code example of what you would need to use in the basic form to read the voltage and send it to piclog.

Code:
symbol amp 	=  w1
symbol volt 	= w2	
symbol rpm 	= w3									
symbol Wind 	= w4	


Main:

	readadc10 C.2, volt 	'read Volts input 2
	

	sertxd("[<V>" ,#volt, "</V> <I>", #Amp ,"</I> <R>" ,#RPM, "</R> <S>",#Wind, "</S>]",13,10)	


	goto main
you need to remember the com port can only be open in one program at any time, so if you use it to program the chip in PE then you will need to close PE or change the com port in PE, before you can open Piclog and select the com port that is used, also the baud rate in piclog will be 4800 and also needed to be selected.
Some of the piclog versions you might need to select the com port and save it, then close piclog and reopen it again before the com port will work.

In the code you may need to change the pin number to suit where the voltage divider is connected to.....this line.....

readadc10 C.2, volt

At present it is pin C.2, change that to suit your circuit.
 

kcarring

New Member
Voltage / Over Time

If you want a little help to get the picaxe talking to the PC piclog software i can help you there, do you need a code example to read the voltage on the ADC pin and send it to piclog.
Piclog is easy to calibrate too. Im also on TBS forum too if you need to ask questions there, but all you need is also on this forum.
Thanks for the generosity!

i think this little setup will get me started, if i weed out some of the nice, but not necessary functionality... initially I just want an absolute dead simple thing. A picaxe, a 12 volt lead acid battery, under load, and data exported comma delimited, with the time, and the voltage - thats it - as to make a graph in say Open Office Calc.

I don't even really need the time... just the number of minutes elapsed would be totally fine, in fact that is how i do things, manually, now... 0 min, 12.70V | 10 min, 12.43 V etc... etc...

I think I can take from this (hopefully) and contrive that...
http://profmason.com/?page_id=99
 

SAborn

Senior Member
Hey its up to you, but piclog will do all you need, as for the other functions like amps and rpm etc, just ignor them, it will even plot the graph for you in piclog, or you can access the log file and copy paste it into excel and plot the graph of what you want.

It is all very simple, i do remember years back when i first go a picaxe to talk with a PC and log exactly like you voltage, it was a big step forward, and it was piclog i used back then.

If you set up the voltage divider (2 resistors) to the picaxe input, and use the code i gave above for the picaxe, then piclog will record the voltage.
That just leaves downloading and installing piclog on your PC and adjusting the calibration value in piclog to display the correct voltage.

You do really need to record time if you want to plot a graph of the curve recorded, i think piclog will only allow 10 second recordings of an average over the 10 second period, but should you want a program for the PC that will record in 1 second intervals i can give you that, it still uses the exact code format that the picaxe sends to piclog, so no code changes required to swap PC programs.

Up to you, but if you setup the voltage divider to the picaxe (5 minutes work) then within less than 20 minutes you can be logging data to the PC, where you go from there is up to you.
 
Top