Using PICAXE as input to a PC

dr_robert

New Member
Hello there,

I would like to use a picaxe to drive a simple input to a program running on a PC. I think that I understand the requirements/limitations but I have a couple of specific questions that I haven't been able to find answers to in the manual or in forum posts.

I cannot interface from my picaxe circuit to a Windows PC over USB, it needs to be serial but can I use an AXE027 cable?
Is it possible to use an AXE027 cable to provide power to the picaxe circuit?
I'm going to need to learn a new language to write the program that will receive the input from the picaxe circuit - any recommendations? C++? I'm learning Python for my Raspberry Pi would that be appropriate?

Thanks in advance,

Rob
 

alband

Senior Member
Hi you'll definitely get more and better answers than this but it always nice to get a quick response..

You can use an AXE027 cable, but it can't provide power to the PICAXE. The AXE027 cable is itself a USB to serial converter of sorts, but at the serial end it only has connections for two data lines and ground (It's sometimes possible to harvest power from data lines but I don't know if it would work and would certainly be very difficult and probably more trouble than it's worth). By far, it's easiest to use 3 AAs for a PICAXE circuit if it's possible.

As for what program, I once set up some serial communication between a PICAXE and PC using VB (visual basic), and found it fairly easy to use. However it was a very rough solution and there will be others with more experience on the matter who can give recommendations.

It might be useful though to know what this thing is going to do? This could affect what program it is best to use and could help answer how to power the PICAXE circuit if you don't want to use batteries.

Good luck,

David.
 

TheChief

Senior Member
Forget the programming cable and pc and just go directly to the uart on the Pi from the PICAXE.
As your learning Python it would be a good way to practice. You could always just write a shell script to listen in and process the uart data
 

dr_robert

New Member
Thanks for responses so far...it is nice to get a quick reponse so "cheers".

The requirement is simply to send a message eg "Button activated" to an application running on a windows PC. The activation control could be any of a range of ADC inputs > 100 send message < 100 don't send message. I could get this running easily enough using the debug or terminal in the picaxe programmer - I guess i just want a standalone terminal interface that would read the serial message...the next step after that would be to get the app to do something with it but one step at a time!

Using the Pi would be great (and I'm looking forward to the interfacing options that brings), but for now it does need to be a picaxe to PC integration. I'm not wedded to any specific programming language, so if VB is most appropriate that would be fine.

Rob
 

lbenson

Senior Member
A usb-to-serial dongle is shown in this link: http://www.picaxeforum.co.uk/showthread.php?20365-Picaxe-to-internet-via-TP-Link-WR703N-router-with-openWrt&highlight=tp-link

The dongle could be used on a PC, but could also be used on your Raspberry Pi if you didn't want to fiddle with the on-board serial (the use of which is somewhat complicated because it is, as I recall, the serial console, which will have a massive stream of output upon boot-up).

If you should be interested in the WR703N itself, it's available on ebay for $21.09US here: http://www.ebay.com/itm/TP-LINK-TL-WR703N-150M-WiFi-802-11b-g-n-Wireless-3G-AP-Router-for-iPhone-4S-iPad-/121003978372?pt=COMP_EN_Routers&hash=item1c2c662e84
 

nekomatic

Member
You can get USB to serial cables (wire ends or pin header) or 'breakout boards' that use the FTDI chipset and include a 5 V and/or 3.3 V line supplied from USB. You can use the utility from FTDI to program the converter chip to invert the polarity of the RX and TX lines so you can connect them direct to the PICAXE serial in and out, and you can then power and program the PICAXE using the cable/board. I've done this with the Sparkfun one available from here among other suppliers.
 
Top