Picaxe power and comms via USB ?

Buzby

Senior Member
Hi,

I'm about to start designing a PicAxe gadget which will connect to a PC via USB for both powering the PicAxe and comms to the PC.

I know there is a USB PIC ( 16C745 ) but I don't think there is a PicAxe based on this chip. Also, talking USB is not easy. Enumerating my endpoint is beyond my abilities.

So, I intend to hack a USB-to-Serial cable into my gadget. This will make my PicAxe board look like a RS232 COM port, and my PicAxe can just 'serin' and 'serout' to my VB code on the PC. I think can pull 100mA to power the PicAxe from the PC without any problem.

Has anyone tried this ?. Any pitfalls likely to snare me ?.

Thanks,

Buzby
 

eclectic

Moderator
Just ramblings:

Are these similar to your proposed board?

http://world-educational-services.info/cart/index.php?main_page=index&cPath=9

I'm assuming that you've seen the circuit
on page 11 of
http://www.rev-ed.co.uk/docs/AXE027.pdf

I suppose that you could “practise” on
a cheap USB extension cable, before
breaking into your AXE027.


Finally, there have been several warnings,
on this Forum, regarding USB power.
eg.
http://www.picaxeforum.co.uk/showthread.php?t=12811&highlight=USB+power+circuit

e
 

Andrew Cowan

Senior Member
I've run circuits off USB before. It works fine, but just don't have stray wires, untested circuits, metal surfaces... Anything that could short the supply. Avoid that, and your PC will be fine.

A
 

tiscando

Senior Member
I had a USB powered desk fan, and it sometimes crashes the PC. I didn't see any decoupling on the brush DC motor. Here, I'm saying to avoid noisy high power consumption, as what the motor does. I added capacitors and inductors, and it performs better with the PC.
 

Mycroft2152

Senior Member
Buzby,

It is very do-able. It is pretty standard practice with other microprocessors.

Don't plan on driving servos or motors from USB power, as you can only get a max of 500 ma.

It is not necessary, but a 500 ma fuse is a good safety precaution.

As if using dual power supplies, a diode to keep them separate.

Here is a photo of an 08M powered from a USB to serial adapter.

There are many inexpensive adapters available. Two that I use most often are from

Modern Device ~$12

http://moderndevice.com/connect.shtml

Fundamental Logic ~$10


Myc
 

Attachments

Buzby

Senior Member
Hi All,

Thanks for the pointers.

The World Education boards do not have any info on the website. However, if I zoom the picture of the 28X board up, I can just make out the letters FTDI on the support chip. I presume the USB/Serial is connected to the Picaxe txd/txd pins, which is not really what I want. Anyway, I'll contact them and find out. It maybe that 50% of my gadget already exists.

Another idea was to use the FT232RQ chip as in the download cable, if it is available as a DIP. ( I didn't look at the download cable manual - it didn't occur to me that it would have a circuit diagram. Good work Rev-Ed ! )

The power limitations are not a problem, I'm not expecting to need more than 50mA. The forum posts were very informative. Luckily this gadget will not be a bare board exposed to the elements, it will be fully enclosed.


~~~ Tea break


The board from Modern Device looks exactly like what I need, either that or the MM232R from FTDI.

I think this is the way I will go.

Thanks again for all your help.

Buzby.
 

womai

Senior Member
For my latest project (an improved hobby oscilloscope, similar to my Picaxe scope but smaller/cheaper/less components and better performance) I'm using FTDI's (http://www.ftdichip.com/) USB-to-serial cable with wire ends, FTDI part no. TTL-232R-5V-WE (there is also a 3.3V version available). Really easy to use.

What is neat is that the USB-to-serial converter is integrated in the small USB plug. I am drawing ~250mA without any problems (the data sheet says 70mA max but so far no smoke - have been running two of them for several months so far. It may be that only the 3.3V version really has such a low limit - has an internal regulator - and the 5V version simply routes through the computer's 5V USB supply). You need to enable higher voltage draw with FTDIs MPROG tool (where you can also set several other parameters), the default when they are shipped out is set to 80mA limit. The USB spec actually allows up to 500mA to be drawn.

One thing to watch out, especially when running through non-self-powered USB hubs, is that the actual voltage can be somewhat less than 5V.

For the US, Mouser has it:

http://www.mouser.com/ProductDetail/FTDI/TTL-232R-5V-WE/?qs=sGAEpiMZZMtf8aSAtgR7DtM6b7hTwLVv

Wolfgang
 
Top