Making the Picaxe WiFi

djmikeys

New Member
Hi,
I am looking to send data to a Picaxe chip wirelessly, is it possible to do this without using a laptop as the size is an issue? There will of course be a power supply for the device. The Picaxe will simply be out putting a pwmout value.
I found these results when I searched the forum but I am not too sure if they are relevant.....
Any thoughts?
 

steliosm

Senior Member
You could do that using cheap 433MHz radio Rx/Tx modules. Do a search on the forum and you will find plenty of information on this subject.
 

djmikeys

New Member
Thanks for your replies but I am ideally looking to input data from a wireless internet network rather than have a set transmitter and receiver..............
 

moxhamj

New Member
Directly or indirectly?

Indirectly - that is easy. Use a PC to hook into the wireless network, grab some data off a common directory/disk drive/internet location, and send it out of the PC serial port.

Directly - that is very complex. You need the complexities of a wireless network card like the one that is in your PC. And then you need to talk to it with lots of data lines. Eg from a PC mother board. And you want to program it with a keyboard, and see what you are doing with a monitor, and you'll need TCP stack with lots of ram, and hang on, that is the same as having a PC...

But there might be another way. You can hook into a wireless network with a wireless router, and you can hook into a router with Simplelan.

This is not a trivial problem. Maybe there is another way. What are you trying to do?
 

djmikeys

New Member
Thanks Dr Acula,

I have data being logged onto a laptop which is connected to the network, the data is being dumped into a folder on the network. What I would like to do is access this folder and retreive the dat. The data would just be a single number from 0 - 26 updating as frequently as possible.
 

slimplynth

Senior Member
Hello mshooter

What kind of data are you collecting? I downloaded SelmaDAQ to get sensor data into a spreadsheet using SERTXD..

http://www.selmaware.com/selmadaq

Ideally i'd like it displayed on a webpage

This is the code for a reciever on the 18X

Code:
main:

serin 1,N1200,("UUUUU"),w1

sertxd(w1)

goto main
and the code for the transmitter (analouge input)

Code:
main:

readadc 1,w0
pause 300
serout 0,N1200,("UUUUU",w0)

goto main
 
Last edited:

hippy

Technical Support
Staff member
It will take some PC programming but there are plenty of ways to get data across a network ( wired or Wi-Fi ) from one PC application to another, MailSlots, DDE, UDP, TCP, Telnet.
 

moxhamj

New Member
Can you just explain the problem again pls?

You have some data on a folder on a laptop. Do you want this data to go to another folder on another machine (anywhere in the world), or do you want to output this data to a picaxe?

If the latter, can the picaxe be connected to that laptop, or is the picaxe in another physical location?

I have a few ideas on how to do this.
 

djmikeys

New Member
Hi Dr. Acula,

The Picaxe is in a totally different location, but accessing the same network. I would like a portable device than can access this 'data' folder stored on the network and use this constantly updated data as the input for the Picaxe
 

jmumby

Senior Member
Hmmm me thinks the connection to the network is'nt the problem here. How are you going to get the data from the folder into the picaxe once it is on the network? You will need to either send the data via telnet\winsock port or grab the data via a webpage or some such.
 

slimplynth

Senior Member
Thanks Dr Acula,

I have data being logged onto a laptop which is connected to the network, the data is being dumped into a folder on the network. What I would like to do is access this folder and retreive the dat. The data would just be a single number from 0 - 26 updating as frequently as possible.
Dump the Laptop and transmit sensor data using a picaxe and one of the previously suggested methods?

I have to know now though...as curiosity always gets the better of me...What is the data? a number 0-26.. is it tank/temperature data?
or something more sinister... like "26", the number of hamsters needed to make one good quality furr hat :D
 

ciseco

Senior Member
Hiya,

This might just be the trick with a wireless bridge like you'd use on a playstation. How good's you Linux skills?

http://www.scribd.com/doc/4622090/Cheap-Logger-Elektor-Electronics-March-2006

Alternativly I use a 800Mhz VAIA PC running windows 2003 server (consumes about 11 watts) and then connect to the sensor with serial or Xbee. Simply save a log file to a share on the remote PC.

There's lots of ways to do it, depends on how much you want to spend

Miles
_____________________________________
http://www.ciseco.co.uk
________
Mercedes-Benz OC500LE picture
 
Last edited:

hippy

Technical Support
Staff member
The Picaxe is in a totally different location, but accessing the same network. I would like a portable device than can access this 'data' folder stored on the network and use this constantly updated data as the input for the Picaxe
So the PICAXE is effectively reading a file on a PC somewhere which is on a network.

There seems to be four solutions -

1) Have the PICAXE+Bridge capable of accessing a shared file over the network. That would suggest the bridge would need to be PC-like supporting file sharing (SMB/Samba), running a client service which can read the file and pass the data direct to a PICAXE.

2) Have the file holding PC deliver the data in a form which the PICAXE+Bridge can easily access over the network. That would suggest the PC running a web server allowing a Bridge to simply download a web page and extract the data or to run an FTP server on the PC and an FTP client on the bridge to obtain the data. Again the bridge would probably have to be PC-like.

3) Use a simple Bridge which can be controlled by data 'pushed' from the PC. Most bridges support control using HTTP PUT, UDP or similar control. Th PC holding the data or some other on the network would need to run a server to push this data out.

4) Bypass Wi-Fi and use the PC holding the data or some other on the network to run a server which pushes the data out directly to the PICAXE using some other wireless mechanism.
 

moxhamj

New Member
How far away is that picaxe? 1 metre, 10 metres, 1km?

You could go PC <=> picaxe <=> wireless link <=> picaxe.

That is easy up to about 500 metres. How far do you need to go?
 

ceke

New Member
Picaxe + SimpleLAN + Wireless bridge

I've used the SimpleLAN with a Linksys wireless (WET11) to get a picaxe on a LAN. I think it is the easiest, and maybe least expensive way to make a picaxe LAN capable. You can get the WET11 for less than US$20 on eBay sometimes, or the newer models.
 

atharvai

Senior Member
What about PICAXE NET server? give u quite a lot of network facilities. Also it might be easier to program. tbh I haven't used the PICAXE NET server.
 

djmikeys

New Member
I have decided to simplify my circuit and just use the XBee wifi modules. I have one module connected to the serial to usb base module ans the other to the Picaxe 18X chip. I am using puTTy to try and send info to the chip. I have connected the pic to the XBee using the circuit given here:

http://www.kronosrobotics.com/Projects/MaxStreamInterface3.pdf

when I press keys in the puTTy application the XBee connected to the Pic LED lights up indicationg that it is recieving data. I am trying to view the data by debugging the Pic. Here is myu code I am using:

main:

serin 0, T2400, b0
debug b0

goto main

I have set the speed on puTTy to 2400 and it is set up for the correct com port. When I run this code the debugger just says 'waiting'.

Any ideas?
 

atharvai

Senior Member
i'm not sure how to do it in Putty. I've never used it.
But it should by default be N2400. the onlything i can tell u then is change ur code to N2400. and make necessary adjustments.

i believe debug outputs on serout pin so try connecting ur pc or laptop to the pic directly and see if u r getting anything. then try the Xbee connection.
 

djmikeys

New Member
I've already tried changing it to N2400 but it does the same thing: the debugger says 'waiting...'

I already have the pic connected to my pc to get the debug....
 

atharvai

Senior Member
oh in that case i can imagine you have the PIC programmer debug and Putty running at the same time? they might be listening to different com ports.
why not use the PICAXE programmer's own terminal? that way you see both the serial input and output.
of if u want to continue using putty, instead of debug use sertxd command. that way you will see in putty what ur output is (the b0 value).
 

atharvai

Senior Member
sorry edit for post #24.
when i say N2400 i meant it should be inverted (N) and you should be able to select bits per second(2400), data bits(8), parity bits(none), stop bit(1).

if u can, please upload a screen shot of your putty configuration screen...

thanks

EDIT: I've just downloaded Putty and i believe it is inverted (N) so just make sure ur com port is correct now. Flow control not sure yet but in Hyperterminal (which i use on XP) its set to Hardware which is RTS/CTS... so thats another thing to try... but try them one at a time so u know which setting it is that is causing the communication failure.
 
Last edited:

atharvai

Senior Member
did you try closing the picaxe programmer and running just Putty? because the PICAXE programmer might not be listening to Com8
 

djmikeys

New Member
Im not sure I understand, do I not need the picaxe debugger running so I can see the data being sent from the puTTY via the XBee? The Picaxe is connected to comm7 and the XBee to comm8 so surely this wont make a difference?
 

atharvai

Senior Member
ah ok. my fault then, sorry.

hmm i'm not sure then. the only thing then i can suggest is to actually use sertxd instead of debug and see what comes out.

what format does the Xbee send the data to PICAXE? is it inverted or true?
 
Last edited:

djmikeys

New Member
Im not sure, is this not determined by the putty rather than the XBee? Will it be on the XBee data sheet somewhere?
 

ciseco

Senior Member
Hi,

From your picture as I'm not too familair with putty these days, been a few years. From memory I don't think you want flow control on though, thats a start.

Have you got a windows machine, I might be more help with hyperterm. Not sitting at a pc with interface at the moment, but can be tommorow afternoon.

XBee's default to 9600bps unless you've changed it with the PICAXE programmer, you can also use maxstreams xctu (probably windows only though). The picaxe and physically connected Xbee need to be the same speed (stick to 2400 to avoid timing issues) the PC side can be anything upto 115K the Xbees communicate at 250k between themselves.

I always use true not inverted in my picaxe code.

What exactly have you built? two of these krono boards? or do you have some sort of FTDI USB board which would make life easier, if both are the same board, then DTR/CTS arent even wired, which will prove a pain as xctu cant perform all functions without it. Same problem on the AXE210, actually now come to think of it theres probably a good reason they put it through a MAX232, what you have should be fine for the PICAXE side but perhaps not the PC end.

I should be able to help once I properly understand where you have got to :)

Miles
________
Ford Falcon Cobra picture
 
Last edited:

djmikeys

New Member
Finally got it fixed. All I needed to do is make the baudrate 9600, so to do this with the 18x I need to speed up the chips frequency. This is done by entering 'setfreq m8' into the code as doing it in the setup seems to confuse things somewhere.

Cheers for everyones help,

Mike
 

ciseco

Senior Member
Cool,

Upping the PICAXE to 8Mhz is one way, you can also slow the XBee down (just a few of AT commands), as mentioned the two XBee's dont have to run at the same speed. The 18X also supports HSERIN and HSEROUT so you can go faster than 9600 if you need to.

Miles
________
herbalaire vaporizer
 
Last edited:

MBrej

Member
The 18X also supports HSERIN and HSEROUT so you can go faster than 9600 if you need to.
The 28X1/40X1 supports hardware serial (HSERIN/HSEROUT), not the 18X, although it can be clocked to 8MHz and support serin/serout at 9600 ;)

Matt
 
Top