Picaxe programmer PCB for CH340 "Gold" USB Serial Adapter

lbenson

Senior Member
From Goetex via Erco, this PCB plugs into this CH340 usb serial adapter and programs a picaxe with 3-pin SIL programming socket, using a 74HC14 to invert the signals.


Attached Eaglecad brd and sch files must have ".txt" removed from their names to be used. Zip file can be sent directly to (for instance) JLCPCB.com--cost for 5 with slow boat shipping is $8.33 to U.S.

(For some reason, all the tools are greyed out, so I can't make links or post photos--I'll fix if they reappear.)
 

Attachments

Last edited:

lbenson

Senior Member
Pics attached because I can't insert them.
picaxe ch340 programmer2.jpg
picaxe programmer ch340 PCB.jpg
(Hmmm, but they did get inserted. Still don't know why all the tools, like link and insert image are greyed.)
 
Last edited:

cachomachine

Senior Member
I did something similar 2 year ago using 2 2N2222 and 4 resistors to invert the signals (the 8 pins socket allows on board programming of complete m2 serie and microswitch for hard reset for onboard programming) and lately, a full programmer for 8m,14m,18X 20m amd 20X using the same signal inversion.
 

Attachments

marks

Senior Member
What most people like about the ch340 USBserial to TTL modules ,
being a modern device plug them into Windows 10 and drivers load instantly ready for PE6 to use!

The ch340g module you have also has a little brother ch340c(which should also suit your board)
comes with a micro usb port cost me about US $1.21 + 0.69 postage ,
handy because I seem to have a few of these cables everywhere and small enough you can leave in the project.
I was surprised how small these ttl to rs232 driver modules 2 for US $0.69 + 0.69 postage.( but haven't tried them yet)
perhaps these could be added to rev ed 401 like shield with a 20 pin socket would make an ideal board .I'd buy some lol!
littlebroCH340c.JPG
For cables of 10 ft or less, you can easily communicate with an RS-232 port by using these inexpensive interfaces
nearly all that are available today use 5V TTL like the FTDI module above and the picaxe027 rather than RS-232 voltages.
you can usally get a 5 fold increase in distance just using a Max232 driver TTL to RS232
Early standards of the RS-232 devices recommended limiting cable length to
50 ft, and this is still a good general guideline. For data rates of 20 kbps or less,
you can use just about any type of cable at this length or less.
 

GY44

New Member
Sorry to mention this IBenson, but all UNused inputs on the 74HC14 hex inverter should be tied to either rail. This prevents false triggering on used
inverters. The quote below is from the 74HC14 datasheet--Pg12
Unused inputs must be terminated to either VCC or ground. These can be directly terminated if the input is completely unused, or they can be connected with a pull-up or pull-down resistor if the input is to be used sometimes, but not always. A pull-up resistor is used for a default state of HIGH, and a pull-down resistor is used for a default state of LOW. The resistor size is limited by drive current of the controller, leakage current into the SN74HC14, as specified in the Electrical Characteristics - 74, and the desired input transition rate. A 10-kΩ resistor value is often used due to these factors.
Regards GY44
 

lbenson

Senior Member
Sorry to mention this IBenson, but all UNused inputs on the 74HC14 hex inverter should be tied to either rail.
So you say (following the tech documents), and so have said others, and that is no doubt safest. But I have never had a problem related to the lack of pulldowns, and I believe Erco has reported the same.
 

hippy

Technical Support
Staff member
Most time 74xx inputs can be left floating without any problem but it is recommended they aren't left floating.

If I were not leaving them floating I would normally tie all unused inputs direct to 0V or +V, tie the first and daisy chain output to input of unused gates,r connect all inputs together, or some combination which works out easy to do..

Adding pull-downs or pull-ups is useful on used gates if boards are to be disconnected from one side or the other to prevent spurious signals being generated towards what is left connected. I was quite surprised how sensitive 74xx inputs can be to moving ones hand near them when floating, especially on breadboard or strip-board where the track works as an aerial.
 

erco

Senior Member
The ch340g module you have also has a little brother ch340c(which should also suit your board)
comes with a micro usb port cost me about US $1.21 + 0.69 postage ,
@marks Thanks for the tip! I just bought 15 of these tiny modules and they are lovely! Under a dollar each incl. shipping from AliExpress: https://www.aliexpress.com/item/4000537333540.html

As you said, who doesn't have a pile of unused micro USB cables laying around? I'll comp up an inverter when I can, but I normally use @Goeytex 's circuit with a DIP chip, which is the same size as this whole board! I'll have to order some SMT inverters to try my hand at fabbing small adapters.

IMG_4248.JPG
 

NigelT

New member
Hi Marks
Just started looking at the PICAXE to get the grandchildren into programming - Do you have the schematic for the SFH 610A inverting adapter. I have got a 08M2 working with a AXE027 cable but now looking at a more cost effective solution as I am going to need 4 kits - 1 for each grandchild.
Regards Nigel
 

marks

Senior Member
Hi NigelT,
I myself like the idea of having a project completely isolated.
from anything I connect like a pc or a laptop which can be pricey these days.

The actual optoisolator used is a SFH610A-2 the transfer ratio can vary between models.
It happened to be some I had, so the resistor values may need to be tweaked if you use different ones.
it should work from 3v to 5v picaxe supply upto 38400 baud.(which exceeded my expectations)
from memory it was tested at a slightly lower voltage and the higher board rate but in ideal conditions.

Actual programming of a picaxe is at 9600 baud so for this I suspect you could even use PC817 opto's
which have a slightly lower transfer ratio. Unfortunately, don't have any to test.
goldprgmSFH610A-2.JPG
On the picture shown I rely on the 15k pulldown resistor on the optoboard
this is so I can also test a 18m2 which has serin on a different pin. (So remains connected so the picaxe can run)

Usually on a finished project board you would tie serin down with a 100k resistor permantly like they do on the axe401.
Or leave the standard 22k and 10k resistor serin circuit in place. You can still use the optoboard to reprogram the picaxe chip
which can then be removed.
 

NigelT

New member
Hi marks - Thank you - I appreciate your prompt and comprhensive reply.
From the image I had not appreciated that the circuit totally isolated the USB port - This seems to be a very sensible approach that I will pursue.
Regards NigelT
 
Top