Serial to USB adaptor?

dr_robert

New Member
Hi there,

I'd like to ouput from a PICAXE to my PC but it seems no new PC's are built with a serial port. Can I use a Serial to USB adaptor? If so, are there different versions and any that I should avoid?

Thanks

Rob
 

nick12ab

Senior Member
Welcome to the PICAXE Forum.

I'd like to ouput from a PICAXE to my PC but it seems no new PC's are built with a serial port. Can I use a Serial to USB adaptor? If so, are there different versions and any that I should avoid?
Yes you can. Any one will do, however if you also want to be able to program the PICAXE you must use one that supports break signalling.
 

dr_robert

New Member
Welcome to the PICAXE Forum.

Yes you can. Any one will do, however if you also want to be able to program the PICAXE you must use one that supports break signalling.
Thanks for the answer,

I'm happy to use the AXE27 to programme, I just want to get a better idea of some ranges of analogue sensors (LDR's etc) and to help de-bug some programmes and seeing the variables change real time will be helpful.

Cheers!

Rob
 

dr_robert

New Member
Rob, saborn is right, look up sertxd command in part 2 of the manual.

Paul
That's brilliant, I was looking at the Advanced Interfacing 2 section of part 3, but this will do the business and save me a tenner to boot!

Thanks all,

Rob
 

npomeroy

Member
Excuse my late entry to this thread...
I bought one of these http://www.jaycar.co.nz/productView.asp?ID=XC4834&keywords=usb+serial+adaptor&form=KEYWORD
and can't get the computer to communicate with the picaxe. I get a list of messages including reducing the power supply to the picaxe to 4.5 v. I have tried this and smoothing the supply with a capacitor but no go. I see above "you must use one that supports break signalling" but how do we tell if this is the case? I am happy to buy the dedicated USB cable - it is just that there will ba quite a wait for delivery and I was able to get an off-the-shelf adpator in a local shop.
 

eclectic

Moderator
Excuse my late entry to this thread...
I bought one of these http://www.jaycar.co.nz/productView.asp?ID=XC4834&keywords=usb+serial+adaptor&form=KEYWORD
and can't get the computer to communicate with the picaxe. I get a list of messages including reducing the power supply to the picaxe to 4.5 v. I have tried this and smoothing the supply with a capacitor but no go. I see above "you must use one that supports break signalling" but how do we tell if this is the case? I am happy to buy the dedicated USB cable - it is just that there will ba quite a wait for delivery and I was able to get an off-the-shelf adpator in a local shop.
What is local to you?
http://www.sicom.co.nz/?PageID=3617&function=viewprd&rnd=2348421&prd_id=172729&pmm_id=0

or
http://www.surplustronics.co.nz/shop/product-AXE027.html

or Global village
http://www.techsupplies.co.uk/epages/Store.sf/en_GB/?ObjectPath=/Shops/Store.TechSupplies/Products/AXE027
e
 

inglewoodpete

Senior Member
Excuse my late entry to this thread...
I bought one of these http://www.jaycar.co.nz/productView.asp?ID=XC4834&keywords=usb+serial+adaptor&form=KEYWORD
and can't get the computer to communicate with the picaxe.
I'm pretty sure that the USB to serial cable that you have from Jaycar uses a PL2303 chip. You should be able to get that working - I have a couple of them that work well with PICAXEs.

Make sure you have the PL2303 (USB010) driver from the PICAXE Website. Click on the "Free Software" link at the top of the PICAXE Forum webpage. Unload your existing PL2303 driver before loading the new USB010 driver.

Let us know how you go. Forum members can help further if required.
 

Goeytex

Senior Member
@npomeroy,

While grossly overpriced, the adapter you purchased uses the PL2303 Chip and should work ok. Be sure you have the 10K & 22K resistors placed correctly if you are using a breadboard. Also, the Picaxe ground must be tied to the adapter ground.

It is difficult if not impossible for folks to assist you much further if you do not provide more information on your setup. Are you using a Project board of some kind? What Cable are you using between the Adapter and Picaxe ? Have you done the serial port test available in the Programming editor ? What was the result?

Programming Editor > Options > Serial Port > Port Test Tools > Test Port > Follow Instructions
 

npomeroy

Member
Thanks for the comments. I am using an 8-pin proto board with an 08 chip. The board has been used many times in the past and the various resistors and connections are correct. I'm powering the picaxe with a 5 volt regulator chip and smoothing capacitor. When I do the "test port" the voltage goes -0.5v and +0.65v (shouldn't it be more like +5v?). When I go "scan for USB cable" it says "no AXE027... has been found ... but you can continue to use port 4". I swapped 08 chips in case it was a bad one but no change. I have downloaded the driver.
@ eclectic: By local I meant in my local town - I wanted the cable yesterday and the other sources are fine but take a few days to deliver.

This is a fairly brief holiday project and my alternative is to go back into my workplace where the computers have serial ports. But it WOULD be nice to be able do this stuff on my laptop at home.
 

Goeytex

Senior Member
Since the serial port test shows only .5v there is either a connection problem or a faulty adapter. But more likely a connection problem.

You did not say what kind of cable you are using between the Adapter and the Picaxe? Did you make your own cable or are using an AXE026 Serial Download Cable ?

You may want to confirm the adapter is working properly with a serial loop back test before going any further.
 

inglewoodpete

Senior Member
First, ensure your Prolific Cable is plugged into your computer. From within the Programming Editor, click on the "Options" button on the tool bar. Select the "Serial Port" Tab on the options dialogue box. You should be able to find you Prolific cable in the port list box: it may not be COM6 as in my case. However, it should say "Ready for use."

Click on the image below to view.
Prolific2303_PE_W7.jpg

If not, go to the device manager. It should show the device and com port number like this:
Prolific2303_W7.jpg

Please report back for the next instalment:)
 

npomeroy

Member
It does show that the Prolific cable is ready to use.
The serial cable between adaptor and picaxe is home-made but works just fine direct from a serial port. I use these chips as a set of about 15 for an electronics block at a high school so have several chips, boards and cables. I do have a genuine AXE026 somewhere I could try. Actually today I probably completed the programming task on a serial ported computer at the school (same cable, same chip, board, power supply as does not work with the adaptor).
 

Goeytex

Senior Member
I suggest doing a serial loop back test to confirm operation of the USB Adapter.

To do a loopback Test:

With the USB to Serial Adapter plugged in to the PC \ Laptop ...

1. Unplug the stereo plug from the board
2. Connect the paper clip as shown in the drawing below.
3. Open Picaxe Programming Editor
3. Goto Options > Serial Port
4. Select the correct Port > Click OK
5. Press F8 .. The terminal will open
6. Type < Hello > in the Output Buffer area at the bottom
7. Press send

If the adapter is working properly, you should see < Hello > echoed back in
the Input Buffer area at the top.
 

Attachments

npomeroy

Member
@ Goeytex "I suggest doing a serial loop back test to confirm operation of the USB Adapter."

OK I tried this - the port was "ready to use - prolific USB to serial..."
But when I tried to type anything into the input buffer space I just got little clang noises and nothing appeared on the screen. I tried different baud rates but it was all the same. So does that mean a bad serial cable?
 

npomeroy

Member
It makes a noise?

You were supposed to type into the Output Buffer box then click Send.
Aaargh. And I moan at people who don't follow instructions!
Yes when typing into the output buffer it is reflected back. But if I type too fast the return is partly garbled.
Thanks for the correction.
 

npomeroy

Member
I tried it again, with various baud rates, and the return was always correct.
I don't know why it was sometimes corrupted before.

Edit:
Re-tried the cable on the picaxe - still get error messages
Re-installed latest version of programming software - no change.
 
Last edited:

nick12ab

Senior Member
So when you did the break signalling test, you got unusually low voltages but the loopback test works. This could suggest that the voltage converter circuit isn't working, but it could also indicate a counterfeit PL2303 chip. Are you able to check the voltages of the serial signal produced by sending something from the terminal?
 

Goeytex

Senior Member
And it could also suggest that TX/ RX signals are reversed in the home-made cable between the Adapter and the Picaxe.

Do the serial port test again but this time with the stereo jack unplugged. Measure the voltage on the stereo plug with the Meter ground on the tip and the plus lead on the center ring. What is the voltage?. Do the test again with the plus lead on the long part of the plug. What happens ?
 

Attachments

npomeroy

Member
Centre ring is -2.5v with button off, + 5.0 v with button on. Longer part of jack is about zero (+ 0.02v) in both situations (homebuilt cable)
With a bought picaxe serial cable I get + 7v on and - 6v off (??!!). But the bought cable still gaves the same error signals.

And it could also suggest that TX/ RX signals are reversed in the home-made cable between the Adapter and the Picaxe.

Do the serial port test again but this time with the stereo jack unplugged. Measure the voltage on the stereo plug with the Meter ground on the tip and the plus lead on the center ring. What is the voltage?. Do the test again with the plus lead on the long part of the plug. What happens ?
 

nick12ab

Senior Member
This suggests that the problem is that you've incorrectly wired the download socket.

The view in Goeytex's attachment is from the bottom.
 

npomeroy

Member
I have about 15 of these picaxe 08 proto boards - they all work fine with the serial cables from computers with serial ports.

This suggests that the problem is that you've incorrectly wired the download socket.

The view in Goeytex's attachment is from the bottom.
 

Goeytex

Senior Member
Centre ring is -2.5v with button off, + 5.0 v with button on. Longer part of jack is about zero (+ 0.02v) in both situations (homebuilt cable)
With a bought picaxe serial cable I get + 7v on and - 6v off (??!!). But the bought cable still gaves the same error signals.
Since the home made cable has different voltages than the bought one when connected to the USB adapter, it only stands to reason that the home made cable has a problem. However, since the adapter does not work with either cable, it seems to be the common denominator.

It should take less than 1 hour to troubleshoot and identify or correct a USB Adapter problem. Assuming that you have not withheld any pertinent information about your setup, my advise at this point is to order an AXE027 and send the USB Adapter back where it came from.
 
Top