Shop OBEX P1 Docs P2 Docs Learn Events
Cheap PropPlug replacement - USB-TTL converter US$4.60 and a modification — Parallax Forums

Cheap PropPlug replacement - USB-TTL converter US$4.60 and a modification

Cluso99Cluso99 Posts: 18,069
edited 2012-08-17 05:05 in Propeller 1
A few weeks ago I spied this USB-TTL converter on eBay. Some even came inside a plastic case. I bought mine direct from www.buyincoins.com for US4.58 including postage to Australia.

It uses a CP2102 USB to UART chip from Silicon Labs. Unfortunately, it uses a QFN package. On the output pin header it has (from left to right) +5V, GND, RXD, TXD, RST, 3V3. Now the RST is an input pin to reset the CP2102 externally.

The modification I did was quite simple...
1. I cut the RST input track before the pullup resistor
2. I scraped and tinned the RST track on the connector side
3. I soldered a wire from the CP2102 DTR pin 28 (top left pin) to the tinned track *****

***** BEWARE ! Soldering the wire to the QFN CP2102 is quite difficult, to say the least.
USB-TTL-2.JPG


Now, next I made a big mistake...

I just connected the relevant 4 pins (GND, RST, TXD, RXD) to my TriBlade board and applied external power. I then plugged in the USB-TTL converter into my laptop. I had done this previously with TXD & RXD linked together and so I knew the driver was already working. I then loaded PropTool and searched for the prop.

Now for my error... NO NO NO. It DID find my prop! Yes, I had forgotten about the transistor reset circuit. I proceeded to download a simple program to flash a LED. It worked. I could reset my pcb and download again and again.

Now, I am unsure how long, without the transistor reset circuit, this is going to work, but certainly it IS working now.

USB-TTL-1.JPG
629 x 328 - 40K
238 x 277 - 12K
«1

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-27 01:44
    hm maybe schmartboard has a small adapter-pcb to transfer the CP2102 pins to 0,1" spacing.

    A longer time ago I watched a schmartboard video. These Schmartboard-PCBs seem to be quite simple to solder with a small but common solder-iron, because of the special surface of their PCBs
    keep the questions coming
    best regards

    Stefan
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-27 01:53
    I think the Schmartboard might be more expensive than the propplug???
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-27 07:22
    than of course it's no option.

    For propeller-heads in germany this is an alternative. It uses the same Chip CP2102 and you can solder Pins to the small PCB.
    I haven't checked the order of the Pins. Maybe a Pin-order-changing adapter is nescessary to be propplug-compatible
    http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=28776&flv=1&bereich=&marke=

    91859_F14_PlUM2102.jpg

    If you order the device no pins are soldered.

    I have tested it on a breadboard without reset-transistor just a capacitor like mentioned in the propeller-datasheet.
    I even left out any kind of capacitors between Vss and Vdd and it worked reliable up to 115200 baud. Even with Viewport which sends data all the time.

    best regards

    Stefan
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-27 08:35
    good found,

    It's the same chip CP2102. But a different connector and a different PCB as the chip is mounted diagonal.
    But I guess same functionality with all UART-signals connected to the 0,1" through-holes

    1.jpg
    Does this one include Rx/Tx activity LEDs like the Prop-Plug?

    best regards

    Stefan
  • jazzedjazzed Posts: 11,803
    edited 2011-07-27 08:44
    Great find Cluso99 :)
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-27 14:29
    StefanL38: Nice find!

    Looks like J1 pin 1 is the DTR pin. While it does not have the box like my find, it is easier to solder a pin header into J1. The cables are also provided too! Just a matter of hooking them up in the correct order (GND, DTR, TXD, RXD ---> Gnd, -RST, P31, P30). 5V is also available. 3V3 is also available up to 100mA MAX!

    How to make a propplug compatable cable with the provided cables:
    1. Fit each connector onto a 4 pin header (or longer - just use first 4 pins)
    2. As you do this, place a small dab of super glue onto the side of the connector so that when you put it onto the pin header, it becomes glued to the adjacent header.
    3. Do this for all 4 headers (3 glued joints)
    4. Wait till they dry
    5. Remove and label orientation - tip: use whiteout
    6. Now, connect the other ends to the relevant pins
    7. Cover the pcb with heatshrink tubing
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-27 14:40
    Oh the honor goes to prof_braino,

    he found the one at ebay that has moderate shipping fees

    best regards
    Stefan
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-27 15:37
    I stand corrected.. Nice find Prof_Braino. I have ordered one :)
  • K2K2 Posts: 691
    edited 2011-07-28 10:03
    StefanL38 wrote: »
    Does this one include Rx/Tx activity LEDs like the Prop-Plug?

    If D1 doesn't provide bidirectional indication (it probably doesn't), adding an LED should be simple.

    Thanks to Ray and all for pursuing this!
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-28 12:06
    I have the ELV CP2102-pcb which I guess operates identically to the one prof-braino found.

    I connected LEDs to the Tx and Rx-line buffered through a OP-Amp-voltage-follower to draw as less current away from the Tx/Rx-lines as possoble.

    If I sended/received data the LEDs flashed only very short at higher baudrates almost not visible. With the FDTI-chip the extra LED-outputs give always
    a bright shining LED regardless of the baudrate. To reach this brightness I guess a monoflop would be needed that creates a high-signal that is long enough
    to make the LED light up bright. And then there is almost no difference in price but more work to do than with a prop-plug.

    @Cluso: please report how LEDs connected to your converter are lighting up

    best regards

    Stefan
  • K2K2 Posts: 691
    edited 2011-07-28 12:46
    Good point, Stefan. A one-shot of some sort has to figure into the budget if one wants an activity indicator similar to the PropPlug. The PropPlug is mighty snazzy in this regard.

    I wonder if the persistence of the human eye would provide the necessary pulse lengthening? A transistor might be used to dump the charge of a cap across the LED, creating a brief but intense light burst. The cap could be charged through a high value resistor.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-28 18:30
    My CP2102 pcb has a single led which is power only. The CP does not provide the same TXLED & RXLED functions that the FT232RL provides. The CP2102 is only available in QFN which, IMHO, is just too difficult to hand solder without heaps of experience.

    The point to using these is to make a cheap and simple propplug replacement with as little modification as possible. Otherwise, it is simply not worth the exercise.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-07-29 07:40
    Cluso99 wrote: »
    The point to using these is to make a cheap and simple propplug replacement with as little modification as possible.

    In addition - once it works, if additional modifications are possible, then these are valuable as "advanced projects". For my purposes, they will be in a kid's education kit. The initial criterion is lowest price possible to get a usable unit. After a while, the kid may decide LED's for Tx and Rx would be nice. If a part can then be modded to add these, this part now has a greater value since it provides another project.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-07-29 08:30
    So as long as this is in a state of experimenting and a lot of prop-IOs are left free a cog could monitor the states of PIN30,31 and run a software-monoflop on two other PINs with LEDs connected.
    keep the questions coming
    best regards

    Stefan
  • K2K2 Posts: 691
    edited 2011-07-29 08:55
    Cluso99 wrote: »
    My CP2102 pcb has a single led which is power only. The CP does not provide the same TXLED & RXLED functions that the FT232RL provides. The CP2102 is only available in QFN which, IMHO, is just too difficult to hand solder without heaps of experience.

    The point to using these is to make a cheap and simple propplug replacement with as little modification as possible. Otherwise, it is simply not worth the exercise.

    No worries! Any addition I would be making would be added to the TTL side, and 0.1" pins make easy soldering targets. Indicator lights are just a nicety anyway.

    Thanks for the heads-up on the role of D1. I think I'll try the flashing-LEDs/persistence-of-vision idea just for the educational benefit and to use up a few more five-cent transistors.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-07-29 11:24
    StefanL38 wrote: »
    So as long as this is in a state of experimenting and a lot of prop-IOs are left free a cog could monitor the states of PIN30,31 and run a software-monoflop on two other PINs with LEDs connected.

    This is a really good idea. This would be a great example project.
  • Christoph_HChristoph_H Posts: 31
    edited 2011-11-08 07:58
    Today my CP2102 boards I bought off eBay arrived. As you can see from the attached photos, they're the same type as in StefanL38's post. They don't come with a case (this one would probably fit) but a 5x1pin cable was included.

    I cut both the RX and TX line and inserted 10k resistors to keep the current to a minimum if either the propeller board or the USB connector is not powered. For a baud rate of 115200 10k might be already a bit too much if there's more than a few pF of capacitive load on the cable.
    The transistor that pulls the reset line low sits together with the 100n capacitor on a piece of perfboard on top of the CP2102. The resistor at the base of the transistor is integrated in the transistor package (PDTC143XT).
    The RST pin is connected to the collector of the transistor after the trace it was previously connected to was cut.

    The pin nomenclature on the CP2102 board cost me a few minutes as the input (as seen by the CP2102) is labeled TXD and the output is labeled RXD - i just thought it would be the other way round. :)
    While I haven't done any kind of heavy testing, I have used it to program the propeller a few times with the project I'm currently working on. So far everything worked as expected.
    For price of approx. USD 3.5 per board (shipping included) this is quite a good price/performance ratio.

    top.jpg


    bottom.jpg
    1024 x 369 - 50K
    1024 x 363 - 31K
  • LeonLeon Posts: 7,620
    edited 2011-11-08 08:33
    I just ordered three of these:

    http://www.ebay.co.uk/itm/ws/eBayISAPI.dll?ViewItem&item=150689787403&ssPageName=ADME:L:OC:GB:1123

    At only $2.91 each including postage they seemed a good buy. I might modify one of them with a transistor so that it looks like a Prop Plug (I have a real one), but I mainly want them for use with other MCUs. I have a USB to RS-232 adapter, but it needs an RS-232 driver on the target MCU board.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-11-08 19:49
    Another nice find Leon. I presume the 3V3 is from the CP2102 internal regulator so will not supply much current.

    FWIW, all my new pcbs have an onboard 3V3 regulator for 5V input and the transistor reset circuit (which can be bypassed with a solderable link). For the small added cost, it makes cheap USB-TTL usable, although I am attempting to bypass the USB chip entirely ATM.
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-07-08 08:45
    great idea i have one of these i'm having trouble with could you post a little more detailed instructions for a newbie like me to do this please?
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-07-08 18:27
    purplemonkey: There are a number of variations. Can you post a pic (both sides)? What is your exact problem?
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-07-09 04:11
    photo.jpg
    photo.jpg


    here you go
    1024 x 768 - 122K
    1024 x 768 - 106K
  • Christoph_HChristoph_H Posts: 31
    edited 2012-07-09 06:07
    purplemonkey, you can see the modifications I made to this type of converter in post #19 of this thread.
    It's working without a problem since then. Instead of the PDTC143XT you can use any kind of NPN transistor, if you connect a 10k resistor between base and emitter.
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-07-09 07:05
    thanks did see that wasn't sure if it was the same, could you give detailed description or diagram of how its connected up as i'm a total newbie at this please?
  • Christoph_HChristoph_H Posts: 31
    edited 2012-07-09 08:08
    This is all you need:
    CP2102-Prop.png


    If you don't want to modify (cut tracks, directly solder to) the USB board, build the middle of the picture on a piece of perfboard or on a breadboard. Connect the TXD, RXD, GND to the existing pins on the edge of your board opposite the the USB connector; solder a pin to either RTS# or DTR# and also connect it to your circuit. Next connect Reset#, TXD, RXD and GND to your propeller board.

    If you want to modify the USB board (see following pictures): On the bottom side cut the traces to TXD and RXD and insert your R2, R3 resistors there. (The two small black rectangles on the second and third pin from top). Also cut the trace leading to pin labeled RST (bottom of the picture). Connect one wire to the RST pin, connect another one to GND.
    bottom.jpg


    Build the circuit C1, R1, Q1 and attach it to your board. Attach the other end of the RST wire to the collector of Q1 and the other end of the GND wire to the emitter of Q1. Solder one additional wire from the side C1 that isn't connected to anything yet to either RTS# or DTR#. The rest of the solder joints seen are just for mechanically stability.
    top.jpg
    601 x 575 - 36K
    1024 x 363 - 31K
    1024 x 369 - 50K
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-07-09 10:41
    Thank you that's really helpful. What is the function of the transistor is it absolutely necessary? If so could I use a jfet instead?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-09 10:51
    Yes, the transistor is necessary. It cleans up the pulse coming from the RC differentiator and inverts it so /RST is brought low to reset the Propeller. It also eliminates the negative going pulse from the differentiator. You can't just substitute a JFET for a BJT. They're not the same.
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-07-09 11:34
    Ok thanks!
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-07-09 12:12
    Can I substitute the capacitor for another value or is that value critical?
Sign In or Register to comment.