Wireless PICAXE downloads?

kd5crs

Senior Member
Curiosity stikes again.

Would it be possible to wirelessly clone a picaxe? The Sparkfun transmitter/receivers I use (the $4 ones) say they transmit and receive exactly what they see. So, say I hook up a 14m to a computer as normal with a AXE027 cable. Then I also put the transmitter module on the serial in pin, and a receiver module on the serial out pin.

For the remote picaxe, I have a transmitter on the serial out pin, and a receiver on the serial in pin (before a 22k/10k resistor pair, as per the instructions).

Assume both are powered properly, etc.

Would both picaxes program at the same time?

Brian
 

Andrew Cowan

Senior Member
I have found that the $4 ones receive a lot of noise as well - the PICAXE would struggle with this, and not program properly. If something like an xbee ut faster data rates) was used, maybe this idea could work. xBees have a built in modem which does encoding/decoding etc.

A
 

moxhamj

New Member
When they say they transmit exactly what they see, unfortunately that isn't true. This topic has been considered by many people over a long time, and the short answer is that there is no solution at the present time.

To replicate a wire, a wireless link needs to transmit a low as a low, and a high as a high. Wireless modules do that if the signal is changing rapidly, but if there is a long low or a long high, the output is instead white noise. The problem peculiar to picaxe is that there is a 'break' signal to reset things which has a long period of low (or high depending on the polarity).

Further, you need a bidirectional link so that means two different RF frequencies. And you also can't introduce time delays.

So - can it be done? Yes, I believe it can and I think that the technique that would work would be to use digital signal processing using sine wave lookup tables and to create a modem in software. It is a simplified version of FFT and relies on one frequency for low, one for high, and noise being interpreted as high rather than as noise. Further, you need to be looking for sine waves and the phase is important and you need to sample the wave at least 10x the carrier frequency and do a simplified correlation coefficient between the sine wave and the received waveform. If this sounds complex, it is and it isn't. Software of this sort does exist on the Propeller chip (search for Bell Modem) and it was quite possible to do it on DSP chips from the early 1990s. A hardware multiply helps a lot! (though a multiply using log/antilog tables could also work).

Maybe maybe it might be possible on the new generation of picaxes.

And perhaps xbee can too, but I've yet to find a radio device that really does replicate the waveforms.

There might also be solutions using old-school modem chips, and/or hardware implementations of the pattern matching algorithm.
 
Last edited:

westaust55

Moderator
Would it be possible to wirelessly clone a picaxe?
If you are thinking of extracting the program from an existing PICAXE and copying it to another PICAXE or PIC chip then the answer is NO. There is not way to extract the firmware OR the existing BASIC program from within a PICAXE chip.


Would both picaxes program at the same time?
I doubt that you will be successful in programming multiple PICAXE simultaneously over the wireless link.

As well as data being sent to the PICAXE chips, the Programming Editor is also receiving some signals back from the PICAXE chips via the SEROUT pin (as used for SERTXD commands).

How would the P.E. work with the slight time delays and multiple return signals from have several PICAXE chips being programmed together? NOT I think.
 
Last edited:

kd5crs

Senior Member
All righty then, so not a very practical idea. I'll just have to find some other way to update the program of my 14Ms in situ.

Or I could just get the program perfect the first time... nah, what are the odds? :)

Thanks for the insights.
 

moxhamj

New Member
Updating in situ?

There are quite a number of options. You can put the chip in a socket, then pull it out and put it in another board to reprogram. I used to use that method and it works fine.

Or, you can build every board with a dowload socket. It is just one socket and two resistors so a small extra cost. The only problem there is that you have to bring your board to the PC or your PC to the board. Bringing the board to the PC might be tricky if the circuit is hardwired somewhere but plugs and sockets of various types can be useful. This doesn't work so well if you want to test your new program in-situ with real world inputs/outputs. So the other option is to bring the PC to the board, eg a laptop especially the small notebook PCs.

And who knows, maybe we might crack the problem of true wireless bidirectional asynchronous no-time-delay RS232.
 

boriz

Senior Member
“Would it be possible to wirelessly clone a picaxe?”

Of course.

The question is really “How much will it cost to wirelessly clone a picaxe?”

And the answer is …

How much are you prepared to spend?
 

boriz

Senior Member
“I'll just have to find some other way to update the program of my 14Ms in situ”

You could try this:

1-Connect three wires to the 14M Picaxe: Pins 2, 14, and 13.

2-Connect these three wires to your PC serial port through any three wire cable.

3-Use the free editor/programmer to burn the program into the 14M.

Does that help?
 

Haku

Senior Member
And who knows, maybe we might crack the problem of true wireless bidirectional asynchronous no-time-delay RS232.
What about infra-red?

Failing IR, I think I have a solution to wirelessly programming a Picaxe - wireless USB: http://www.everythingusb.com/cables-unlimited-wireless-usb-adapter-kit-15823.html
Combine that with the Picaxe USB to serial lead and I'd almost bet money (or a couple of 08M's) on the setup working.

Amazon has it for $30, and some guy uses such a setup for his digital SLR - http://hackaday.com/2009/05/21/wireless-portable-usb-tether/
 

ciseco

Senior Member
I've considered IR too but never developed it, in my mind it's worth a try, a couple of optos isnt going to break the bank if they end up in the bin. Making it work over more than a few feet I doubt will be possible without major tinker time. There was from memory a guy doing battery monitoring called Robotnik or something talking to other AXE's through opto's. I seem to think there ws very few componants, look him up.

There is always program one from another, ok has some serious flaws, depends how much you want to do it.

You need another uM, probably not a picaxe as you'll need to store the entire program so it can do the programming in one blip. I bet someone out there could figure something out.

The other way is for the actual bootloader the PICAXE uses to be modified to support such a process. This is much more feasible. You'll need to plead with rev ed on that :)

The wireless USB thing would be a little expensive to put one in every picaxe project, if you try one let us know how it went, I'd have one if only to stop me tripping over the ruddy cable :)

Just my $0.02

Miles
 
Last edited by a moderator:

hippy

Ex-Staff (retired)
Someone ( apologies for forgetting who, and where on the forum ) did get the Programming Editor downloading with IR working over short ranges, but wireless has complications which make it much harder.

I wouldn't hold out much hope for the bootloader being modified to make such a thing possible, but that's not an official answer, just can't see it happening myself. There's likely too much work involved and effort in testing for probably too little reward to make it worthwhile.

Programming multiple PICAXE in parallel might be possible but would be hit and miss with no guarantees as you'd be throwing data blindly at all but one and never knowing if it was receiving it or not. It's almost certainly going to go wrong or not work at some point even if you get lucky once, and then just confusing as you don't know which have correct programs and which do not. I doubt anyone would recommend that other than as a way of idling away a rainy day for amusement value.

There's no ability for a PICAXE to clone another, except in the case of an X2 which could potentially clone one Slot program in external I2C Eeprom to a Slot in I2C Eeprom on another. I don't know if anyone has tried that though.
 

kd5crs

Senior Member
It seems like a few of you guys were unclear on the idea, but that's ok. It's just an idle thought.

Out of curiosity, why would a short distance matter to infrared? More chance of reflections screwing things up?

Brian
 

BeanieBots

Moderator
Short distance because the data needs to be duplex and with IR there is a high possibility of cross-talk adding to all the other components of possible data corruption.
 

manie

Senior Member
I am starting to like the X2's features more and more.... Hippy's idea of multiple "jumps" from Axe to memory to Axe seems workable albeit in a round-about way. Would like to look into that one day along with GSM sms units.... then you can program an Axe globally ??
 

ciseco

Senior Member
Just seen a possible solutiuon

pg 30 of the manual has a command I've never seen before, booti2c

so I take from that, transfer your code whilst the x2 is running wirelessly into the eeprom, verify and reboot. Plop!

At least I hope it works that way :)

Miles
 
Last edited by a moderator:

hippy

Ex-Staff (retired)
Yes, one can either run the external code in-situ in external I2C Eeprom (RUN) or load it into PICAXE on-chip memory then run from there (BOOTI2C).

To transfer from one PICAXE to another, the sender has to have the program to send in external I2C Eeprom and the receiver has to place what it receives in external I2C Eeprom. Once received the choice of how that transferred program is used ( RUN or BOOTI2C ) is up to the user.

A danger with any remote update is that, once the newly transferred program is executing, if it doesn't correctly implement the download protocol itself ( or was corrupted during transfer to the I2C Eeprom or to on-chip memory, such as power fail during transfer ) the remote PICAXE can become locked-out to subsequent downloads. This may require manual access to the remote system to get it working again. In the worse case you will need to download to that from the Programming Editor.
 

ciseco

Senior Member
Sorry was 4 mins to midnight, on my way to bed, just stumbled into the command looking for something else and thought it was worth mentioning.

Miles
 
Last edited by a moderator:
Top