Shop OBEX P1 Docs P2 Docs Learn Events
Do I really need a prop plug? — Parallax Forums

Do I really need a prop plug?

kutalinelucaskutalinelucas Posts: 80
edited 2011-07-04 09:43 in Propeller 1
Sorry if this has been asked or is moronic, but I can't seem to find a difinative answer.

What exactly is the propeller clip/plug? is it a USB -> serial connector? Couldn't I just use a USB-B plug and socket to communicate with it that way?
I have a usb rig built to communicate with one of my PICs, and that works beautifully.

If this isn't possible I have a basic stamp 2 carrier board with a usb -> serial connector (usb to computer, serial plug to the board with an adapter in between)...would this be of any help to me?

This is my first delve into the prop chip, I'll order a clip if nessesary, but i'd rather figure out a way around it instead of waiting for the postman...

Any suggestions or info would be appriciated.

Comments

  • LeonLeon Posts: 7,620
    edited 2011-07-02 11:15
    It is basically a USB-serial converter, using an FTDI chip.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-02 11:20
    The PropClip/PropPlug is just a USB to 3.3V serial adapter that also implements DTR as an open collector signal that goes low briefly at the leading (and trailing) edge of DTR. Anything that works the same way should work.

    There is a 3-transistor interface for RS-232 shown on the Propeller Downloads webpage. You can use this as a model for your own interface.
  • kutalinelucaskutalinelucas Posts: 80
    edited 2011-07-02 13:07
    Hi Mike, thanks for getting back to me. So is the only way to program a prop chip through a serial port?
    As I don't have a desktop computer I do not have access to a RS-232 socket, hence the reason I am using a serial to usb converter for the bs2 programming board. So, following the scematic above, would I be 1. converting a usb connection from the prop chip to a serial connection,
    2. then using my converter to switch it back to usb before plugging it into the computer?

    I'm a little coffufled. I was hoping I could just use the USB interface I built for my pic. I've looked up the prop plugs and they cost £30+, where in america they cost $13!
  • LeonLeon Posts: 7,620
    edited 2011-07-02 13:20
    Just build that circuit and connect it to a USB-serial adapter. It should work. It might not work with a home-made adapter, though.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-02 13:24
    The Prop has a bootloader in the on-chip ROM that looks for an attached PC after reset. If there's no active PC, it downloads a program from the attached EEPROM. The Propeller Tool uses DTR to force the Propeller to reset, then there's a "conversation" between the bootloader and the Propeller Tool.

    Without knowing anything about the PIC - USB interface you built, there's no way to tell whether you can use it or parts of it. Presumably, you ought to be able to use it with some kind of interface circuitry to match voltages and provide the right reset signal.
  • kutalinelucaskutalinelucas Posts: 80
    edited 2011-07-02 13:50
    OK, again thanks for all the advice. How confident would you be that the 3 transistor circuit above would work when using a serial to usb converter? I really need to get going as soon as possible. I'd rather not spend another £30 but then if theres ANY chance the above circuit may not work with the above schematic, then i'll go for the plug...
  • Mike GreenMike Green Posts: 23,101
    edited 2011-07-02 14:51
    It depends on the serial to USB converter. Some converters don't provide the DTR signal or their drivers have problems with timing (the Propeller download protocol is time sensitive). Pretty much any FTDI-based converter should work and I've also used a Keyspan High Speed USB to serial adapter. Yes, there is a chance your adapter won't work for downloading programs to a Propeller. It has little or nothing to do with the 3-transistor circuit though.

    If you have the parts on-hand for the 3-transistor circuit, by all means try it with your USB to serial converter. If you don't, getting Parallax's or the equivalent FTDI adapter is a fool-proof choice.

    If you can post a schematic of your PIC - USB interface, we can comment on what you'd need to adapt it for the Propeller.
  • Mark_TMark_T Posts: 1,981
    edited 2011-07-02 14:52
    I've used a 5V Sparkfun FTDI Basic board and used 4k7 resistors in series with Tx and Rx successfully - DTR is connected to cathode of a 1N4148, anode to Propeller RESn line. I haven't tested faster than 115200 baud. I chose 5V so that the same header plug can be used to supply power to onboard regulator (I have circuits that have 5V stuff as well as 3V3.)
  • kutalinelucaskutalinelucas Posts: 80
    edited 2011-07-02 15:58
    Sorry for the late reply, I've been searching tirelessly for the box of my adapter, and even then I can't find anything which identifies the product! every number I enter into google brings back a plethora of products and none which look like my adapter! it was just a standard adapter from maplins...so i can't realy figure out if it is an FTDI type converter...let alone whay FTDI is!

    I don't have the components but they will be a short train journey away which I will do on monday. I'll also get a new converter...just in case.

    Thanks for all your help, and i'll let you know how I get on

    Martyn
  • localrogerlocalroger Posts: 3,452
    edited 2011-07-02 16:27
    There are basically three families of Propeller boards with respect to downloading:

    1. Boards with RS232, such as the PropRPM. These have a MAX232 chip on board to convert RS232 to 3v3-TTL and if your computer has a serial port, all you need is a cable; if it doesn't, you need a USB serial adapter, and just about any of them should work. Such boards are pretty rare in PropLand though. The PropRPM is the only one I've ever used.

    2. Boards with FTDI chip on board, basically they come with their own built-in PropPlug, such as the DemoBoard and ProtoBoard USB. For them all you need is the USB cable and driver.

    3. Boards that expect a PropPlug. These have a four-pin header that expects 3v3 TTL serial signals (including the handshake pin Mike G mentions). There is basically no simple way to connect a random PC to these boards. You can spring for a PropPlug or try the transistor circuit with a real serial port or with a USB to serial adapter that may or may not work. If you are a hobbyist and you're just going to buy one or two boards to re-use for projects it might make more sense to just get Prop boards with the USB onboard for a bit more. But if you're developing for things you'll want to make in quantity you won't want to pay for the USB-serial circuitry on every single one when most will just be programmed once and sent into the wild, and then you need either a PropPlug or an equivalent solution.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-02 17:04
    The FTDI is just a reference to the IC that does the USB to serial conversion. Google FT232RL (that is the chip part number).

    However, any USB to Serial RS232 with a DB9 connector should work with the 3 transistor circuit. The 3 transistor circuit is cheap enough to try. Note that basically any general purpose npn and pnp transistor should work, so if the electronics shop does not have the transistors in the circuit, substitute them with cheap transistors, as long as they are correct npn and pnp.

    Some of the converters with fewer pins (designed for connection to arduino, pic, etc) do not have the full set of serial pins (so they may have RTS instead of DTR) and may be 5V TTL (no RS232 converter). If they are TTL, and 5V, then use a 3K3, 4K7 or probably even 10K in series in the RXD line and TXD line should all work. Now, for the DTR line (or RTS line if that is only available - see below) you can use the transistor circuit of the propplug (DTR to 10nF to base of transistor (any general purpose npn transistor 2N2222, etc - ensure you get the correct pinout), a 10K across the base emitter of the transistor and tie the emitter to ground, and tie the collector to the prop reset pin).

    Now, you can modify the PropTool to use RTS instead of DTR in the preferences section.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-07-02 18:00
    As stated above, any USB to serial adapter will work. I've been picking them up on ebay for $2 each. Then you can use the transistor circuit as mentioned above. Any small signal transistors will do as long as you get the pinouts and you use the correct NPN or PNP transistor.

    My personal favourite circuit is a Max232 and a BC557 on the reset line. I like the max232 because then you can reuse the download pins as a standard RS232 port for inter-prop communications (and comms to other things).

    There are quite a number of different solutions, and dare I say it, they all do work out cheaper than the prop-plug.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-07-03 08:37
    Also you can put a $5.00 (USD) RS232 adapter in your computer and just use serial.
  • RoadsterRoadster Posts: 209
    edited 2011-07-03 09:48
    No, but I have used all those other circuits and nothing works better for debugging than a prop plug
  • potatoheadpotatohead Posts: 10,261
    edited 2011-07-03 10:52
    With all that has been said, I like the Prop Plug. You really only need one, and I put mine on the end of a nice, quality USB cable, so I don't lose the darn thing. Did once. Worried over it for a week or two.

    It's nice to have the option handy, and it's got the advantage of only building one serial port on your computer. As you setup lots of boards, the ports kind of pile up on XP. Not a big deal, just a consideration.

    Anyway, once you have the thing, you have it, and it means just being able to quickly deal with many of the boards out there.
  • kutalinelucaskutalinelucas Posts: 80
    edited 2011-07-03 16:38
    Raarr that is alot of information, so cheers guys...to be honest I need to get the prop side of my project working on the asap, and although I could probably follow the info above, i'm thinking I better not risk anything going wrong, and fork out for a prop plug and hope for the best with my converter...

    Chanks for the info
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-07-03 19:44
    You do not require a propplug!!!

    We just need to know what you have. It appears you have a proper USB to RS232 adapter with a DB9 connector on it. If so, build the 3 transistor circuit (on Parallax's website). You require general purpose 2x NPN transistors (2N2222, BC107, BC108, BC109, 2N3904, etc) and 1x PNP transistor (2N3906, BC177, BC178, BC179, etc). The TO-92 plastic case is probably the easiest obtained (check the pinout from the manufacturer on google because some pinouts vary e.g. the P2N2222A is not the same as 2N2222 from another manufacturer). Here is just one link http://www.kpsec.freeuk.com/components/tran.htm

    A PropPlug is easier, but it will cost you. You could also consider that the new Starter Board from Parallax is cheap ($20) and includes the FTDI chip on the pcb. Once you have this running simply, we can tell you how you could use this to make a prop-plug for from it.

    I do understand this is frustrating because you have some gear you wnat to try and don't have the required bits to get it going. Hang in there, and give us a bit more info.
  • localrogerlocalroger Posts: 3,452
    edited 2011-07-04 07:41
    The prop plug is only $15. Unless you have all the parts already, you will spend at least half that on the parts for the three transistor circuit and the world's cheapest USB-serial cable. (Yes, I know the parts are much cheaper than that but not when you are only acquiring a few units; the OP will probably end up paying top dollar at Radio Shack or minimum shipping from DigiKey.) Then you must assemble and test it, and if testing fails figure out what went wrong. Do you have an oscilloscope? And really, what is your time worth? I don't see the savings in cheaping out instad of just buying the prop plug.
  • SapiehaSapieha Posts: 2,964
    edited 2011-07-04 07:55
    Hi

    It is not so simple.
    $15 = about 100 sek
    http://www.lawicel-shop.se/shop/ In Sweden = 123,00 sek with taxes and some EURO countries have more extra payment them add to it.

    123 sek is more that I need for eating on one day!


    localroger wrote: »
    The prop plug is only $15. Unless you have all the parts already, you will spend at least half that on the parts for the three transistor circuit and the world's cheapest USB-serial cable. (Yes, I know the parts are much cheaper than that but not when you are only acquiring a few units; the OP will probably end up paying top dollar at Radio Shack or minimum shipping from DigiKey.) Then you must assemble and test it, and if testing fails figure out what went wrong. Do you have an oscilloscope? And really, what is your time worth? I don't see the savings in cheaping out instad of just buying the prop plug.
  • TorTor Posts: 2,010
    edited 2011-07-04 08:18
    Sapieha wrote: »
    Hi

    It is not so simple.
    $15 = about 100 sek
    http://www.lawicel-shop.se/shop/ In Sweden = 123,00 sek with taxes and some EURO countries have more extra payment them add to it.

    123 sek is more that I need for eating on one day!
    But when you've eaten the food is gone.. if the Prop Plug is useful then you'll have it day after day, and if it's useful for a long time then the cost, seen in perspective, drops to almost nothing. For the cost of two beers in Stockholm ;)

    In general, if things are useful for me for years and years I won't look at the cost at all. I bought some things in my youth that I had to save up a long time for. I still have them, good as new, while friends who bought cheaper low-quality items had to buy them again and again. My way was cheaper in the long run.

    (When that's said - I haven't been using a propeller for long enough to know if the Prop Plug is something that will continue to be useful for a long time. My QuickStart doesn't need it.)

    -Tor
    EDIT: On the other hand - I had a look at that Swedish site, and what they're re-selling they're selling for prices which are close to the price of individual components ordered from the US sites with UPS or high-price option USPS shipping. The prices are listed without VAT, so I don't see any value in ordering from them when you can, for the same price, order a single item and ship it at high cost from the US, and pay VAT here. The only thing may be shipping time, but if internet shops in Sweden are as bad as in Norway then they won't actually ship when the order is received - it'll be some five-six days later.
  • LeonLeon Posts: 7,620
    edited 2011-07-04 08:38
    Sweden is a very expensive place, from what I've heard.
  • localrogerlocalroger Posts: 3,452
    edited 2011-07-04 08:45
    According to the currency converter, 123 sek is about $20, which is a reasonable markup for an importer who is keeping stock in your country and selling in your currency. At US minimum wage (which most Europeans would probably find laughably inadequate) that's about three hours wages. I would guess that you will spend a lot more time than that figuring out where to order or buy all the parts, actually buying them, and assembling and testing the three transistor circuit -- and that's not even counting the money you will have to spend, probably at a high premium since you only want small quantities.

    Additional thought: While I can and often do spend less than $20/day on food, I have also often spent that much on one meal for myself at a notch above fast food chain restaurant such as Chili's or TGI Friday's.
  • TorTor Posts: 2,010
    edited 2011-07-04 09:43
    Yeah the markup on the prop plug isn't too bad. I had a look around at the site though - their sparfun prices are very high from what I can tell. There must be something wrong when their price is the same as the original sparkfun price plus UPS. Because they don't buy at end-user prices from sparkfun, do they? That would be a strange (and pointless) deal.
Sign In or Register to comment.