Shop OBEX P1 Docs P2 Docs Learn Events
Building My Own Motherboard: Serial setup, Caps Etc. — Parallax Forums

Building My Own Motherboard: Serial setup, Caps Etc.

ZootZoot Posts: 2,227
edited 2007-01-22 02:46 in BASIC Stamp
I'm building my own small motherboard for my 'bot and BS2p40 so I can reclaim my demo board which is currently bolted into the guts of the 'bot.

I really want to use a 4 pin header for my serial connection and then use a PropPlug. The PropPlug documentation says it may be used for Stamps as well, and getting double duty out of the device would be great.

Questions:

- is that correct that I can use the PropPlug to program a Stamp?

- see below attachment of serial setup to Stamp. If I build 4 pin header connections to match the PropPlug, can I -- should I -- eliminate the caps on the Serial lines? I would think these apply only to true serial connection, not to USB -> PropPlug

- can I also not worry about loopback connections and the like on what would be non-existent serial port?

- if I didn't want to use PropPlug, could I wire my own serial cable terminating in 4 pin plug? But if I did, then I would think I would need proper loopback connections and caps on the custom-wired cable (I may do this while I wait on arrival of new PC notebook -- current PC has serial ports).

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST

Post Edited (Zoot) : 1/10/2007 5:50:29 PM GMT
252 x 266 - 47K

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-11 00:41
    Zoot,
    ·
    ·· You cannot use the PropPlug to program the BASIC Stamp.· The BASIC Stamp is expecting an inverted RS-232 signal at its programming port.· But the output of the PropPlug is non-inverted TTL level.· You can use it for communication on the I/O lines, but not for programming a module.· Now, if you have an OEM setup, you could use it by using the first schematic at the following link.· It says USB2SER, but either will work.· Again, this is for an OEM Stamp Module without the RS-232 interface circuitry which consists of 3 transistors and bunch of 10K resistors.· Take care.

    http://forums.parallax.com/showthread.php?p=567989

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • ZootZoot Posts: 2,227
    edited 2006-11-11 03:09
    Chris -- thanks so much for the clarification.

    Drat. I thought it sounded too easy -- I didn't read the description of the PropPlug closely enough... it says "communication with a Basic Stamp" not programming.

    That said, if I wanted to use a 4 pin header with a small connector plug instead of a DB serial connecter, could I still wire up my own DB to 4pin cable. I like the compactness of having a header for connecting rather than big ol' DB plug? I also have plenty of those lying around.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-11 05:54
    Zoot,
    ·
    ·· There is no doubt it’s great for simple communication with a PC because you don’t need RS-232 conversion…And, as I said, the bonus comes for those who built the BS2 into their design without the transistor circuitry.· Those units can be programmed.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-11-12 02:47
    The picture you've shown would work IF you connect the pin-5 ground to Vss. Currently, you have no ground reference between your PC and the BS2, so that won't work.
  • ZootZoot Posts: 2,227
    edited 2006-11-12 03:11
    Ummm... that's not a picture/schematic I created. That's the official schematic of the BS2p40/24 demo board. I've been using that board for nearly a year and it works.... ???

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • ZootZoot Posts: 2,227
    edited 2006-11-12 03:45
    I think I'd better restate my current goal; I don't think I'm being clear.

    - I've got the BS2p40/24 demo board bolted in as the motherboard for my 'bot. I'm replacing it with my own prototype board with a socketed BS2p40 and all the other stuff that I've got breadboarded currently.

    - I would think I'd need to duplicate the Serial socket to Stamp portion of the circuit above from the demo board.

    - then I thought that rather than running wires out to a DB-9 socket for programming the Stamp via serial, I wanted to use a 4-pin header instead, partly for aesthetic/space reasons, partly because I thought I might be able to use a PropPlug for programming (I can't since I'm not using an OEM stamp and don't plan to for this project -- but it's such a great idea)

    - then I'd need to make up my own cable with DB-9 on one end and 4pin header plug on the other (to plug into a USB2SER or a regular Serial cable) for programming.

    - so then I thought that I would eliminate parts of the circuit above (the loopback connection on the Serial DB-9 and the two caps) and just wire the loopback and the caps directly into my custom cable.

    Does that make sense?

    I guess the whole thing begins to sound a bit kludgy, and I would only be able to program with my custom cable. Maybe I'll just find room for the DB-9 socket which would certainly be simpler and easier smile.gif But I'd still need those caps on the Serial port?

    Below is full schematic of my version of the demo board. AllanLane5 -- it sounds like you are saying there is possibly an error in the schematic from Parallax? I can't pull the board right now and actually look at the traces. It's funny you bring that up because there is a cap physically on the demo board that is *unaccounted* for in the schematic; I just haven't had a chance to pull the board and see what it's connected to. The schematic and the board have the two 47uf caps for the regulator and the two tantalums on the Serial port, but there is a fifth tantalum cap on the board itself (it's about halfway down the board; seems unelated to the serial port or power supply).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    Post Edited (Zoot) : 11/12/2006 3:53:31 AM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-11-12 23:49
    Yes, it works because that little "Ground" symbol means all those pins marked with the "Ground" symbol are actually all connected to each other. However, if you're making a separate DB-9 to BS2 connector, you'll HAVE to include a fourth wire to connect the grounds. This is often overlooked, is my point. Which you MAY overlooked it with your "4-pin header" depending on the signals you want to sent across.

    Thus your adapter would be: Pin 6 tied to pin 7, and wires for TX, RX, DTR, and Ground.· With two capacitors -- one in-line with DTR, and one between DTR and Ground.· You COULD do without these capacitors IF you use the BS2 IDE.· These two capacitors 'decouple' the DTR signal from holding the BS2 in reset.· The BS2 IDE 'knows' about this, and only 'pulses' the DTR line to reset the BS2.· Hyperterm, on the other hand, is very stupid about this signal, and without the two capacitors will hold the BS2 in reset.

    Personally, I don't think it sounds too kludgy -- instead you get your BS2 with a cute little 4-pin header next to it on your board. Plug in your simple adapter to program.· Kind of clever, really.

    Post Edited (allanlane5) : 11/12/2006 11:55:44 PM GMT
  • ZootZoot Posts: 2,227
    edited 2006-11-13 00:34
    " Kind of clever, really." -- thanks.

    Yes, I'm always programming from the Pbasic IDE, not hyperterminal. And now I realize what you meant -- there are really six wires being used in a regular Stamp/Serial connection -- two for the loopback, 4 for GND, SIN, SOUT, ATN.

    Got it. Thanks to all for your help. Esp. thanks for explaining the purpose of the caps on the ATN line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • ZootZoot Posts: 2,227
    edited 2007-01-10 17:54
    I'm almost finished with the layout of my protoboad and am getting ready to solder. Two (I think) final questions:

    - I realized that the Basic Stamp manual schematic for wiring the serial port to a BS2p40 specs .1uf 100 V caps. I only have .1uf 50 V caps here. Can I get by with those? I have decided to wire the caps into the port and not into the cable, btw.

    - I'm using the AIN pin of an Emic for FREQOUTs (so that sounds from the Stamp can be amplified by the Emic's onboard amp). Is it generally better practice to keep analog audio and such off my motherboard? In other words, there's simple circuit with caps, resistors and a pot for conditioning the FREQOUT signal before amplification. Since the Emic is located a decent distance from my motherboard, am I better off running my digital FREQOUT wire to the filter circuit (about 6" say), rather than putting the filter circuit on the mother board and running a long analog wire to the Emic?

    Thanks to all for their help on this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-10 18:06
    Zoot,

    As for the caps…Typically you should spec capacitors for twice the expected maximum voltage in the circuit. So anything above that voltage would work for these type of caps (bypass). Short answer is yes, the 50V caps will work. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-10 18:07
    1. The .1 uF 50 volt caps should work fine.

    2. Digital circuits tend to be 'noisy' in audio frequencies. So yes, you should
    put the audio filter close to the Emic.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-01-10 20:53
    I was looking through a book called "Robot Builder's Bonanza" one day, and there was a schematic for a 4-pin setup for programming a BS2 mounted on a breadboard. If you can find that, it should work for your purposes, too.
  • ZootZoot Posts: 2,227
    edited 2007-01-17 19:41
    I've been assembling my planned proto-motherboard (finally) and want to test out the Stamp and power before I go further.

    Two unrelated questions:

    1. My BS2p40 was shipped already inserted into my demo board, where it's been in use for about a year. How can I extract the Stamp without breaking it? Popsicle stick? I don't have an IC extractor that big.

    2. I'm wiring up my own serial to four-pin header programming cable. Is the schematic for wiring to the serial port in the Stamp manual for a MALE plug, or is it showing a FEMALE plug from the solder side? Look at the two images below and you'll see what I mean. I'm wiring to a male DB9 and will be plugging that into a regular serial cable. I was just going to wire following the DB9-general pinout since it's labeled smile.gif. My screen grab doesn't show it, but the DB9-general pinout states that it is viewed from the pin side, not the wire/solder side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
    460 x 462 - 80K
    632 x 563 - 86K
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-17 19:58
    The connector on the BOE is a female DB-9 (in other words, it has Sockets, not Pins).

    This is because the BOE expects to be connected to the 'male' (with pins) DB-9, RS-232 connector on the PC with a straight-through Male to Female wired RS-232 cable.

    The picture you have is correct if you have a male (with pins) DB-9 connector, and are looking in at the pins. A female (with sockets) DB-9 would have its 'pin 1' on the bottom of the picture (so that they mate 1 to 1, 2 to 2, etc).

    I believe the schematic in the BOE manual is showing the 'back' end of a female DB-9 connector -- the 'inside' part, where the solder cups would be. That would make the pin-outs look exactly like a male connector, seen from the pin side.

    I KNOW the connector on the BOE is female (with sockets), and I KNOW the connector on the PC has pins, and it's fairly easy to find a Male to Female DB-9 cable with all pins wired straight through. I'd recommend you use a female DB-9 connector for your DB-9 to 4-pin adapter.
  • ZootZoot Posts: 2,227
    edited 2007-01-17 20:02
    Yeah, I am using a female. It'll basically be like an adapter with the 4pin on one side and the female DB9 on the other (as if it was a Boe) and I'm putting the loopback on the DB9 side. I just wasn't sure of my pinouts when looking at the Stamp schematic. But I tend to agree that the Stamp manual appears to show the DB9 from the solder side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • ZootZoot Posts: 2,227
    edited 2007-01-17 21:32
    Suggestions?
    Somebody said...
    1. My BS2p40 was shipped already inserted into my demo board, where it's been in use for about a year. How can I extract the Stamp without breaking it? Popsicle stick? I don't have an IC extractor that big.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-17 22:37
    Usually you gently pry the chip out using a small screwdriver.
  • ZootZoot Posts: 2,227
    edited 2007-01-17 23:38
    I'm not sure I would ever use a screw driver on a chip or a board -- seems accident-prone smile.gif. In any case, I bought a cheapo 99-cent sheet metal extractor and Radio Shack and stretched it wide to fit the BS2p40 -- it popped out cleanly but I had to pull *hard*.

    Thanks again to all. It's coming together nicely.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-01-17 23:48
    I use a wide-bladed pocket knife for these kinds of extractions. A butter knife would probably work just as well, but it's important that it be a wide one and not too flexible. From one end of the socket, slide the knife under the Stamp module all the way. Then rotate it slightly — don't lift it! — left-and-right, raising one side of the module, then the other, little bits at a time. Eventually, one side will pop completely free. Finally, while holding the free side down with the palm of your hand, and keeping the knife in place, rotate it until the other side pops out, too.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 1/17/2007 11:52:37 PM GMT
  • ZootZoot Posts: 2,227
    edited 2007-01-18 04:29
    Somebody said...
    Then rotate it slightly — don't lift it! — left-and-right

    Well, like I wrote above, I popped it out -- lifting pretty hard with the extractor rolleyes.gif

    In any case, I made up a cable and my PC downloads to the Stamp just fine. Attached below is a photo of the soldered board (with just IC sockets, power supply, programming/reset interface) that I just tested. Also attached is a photo of my working layout, sans trimmed wires and such.

    Thanks to everyone for their help, esp. on something that must seem simple to many. I don't know that I've ever had so much fun.

    When I get all the new sensors, LED display and the new moboard into my 'bot I'll be sure to post info in the Completed Projects forums.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
    1024 x 958 - 412K
    1024 x 778 - 421K
  • Special_KSpecial_K Posts: 162
    edited 2007-01-19 04:26
    zoot,
    if I may ask what does the underside of that pref board look like and where did you got it.
  • ZootZoot Posts: 2,227
    edited 2007-01-19 04:36
    The underside is just like the top -- the white stripes denote the solder pads. It's a protoboard made by onepasinc.com/bonnie/p1.html. It's pretty cool, but sometimes the "socket" setup is limiting, and there's a few strange spacing and rail choices. But for $9 it was a bit more flexible than a regular proto-board, and I wanted to try it out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-19 14:55
    That "One-Pas" board makes for a very professional appearance. Really nice.
  • ZootZoot Posts: 2,227
    edited 2007-01-22 02:46
    Thanks, allanlane5.

    Here's a pic of the assembled board, with and without labels. I tested it out last night and everything works perfectly.

    It's OK for my first real layout and design. Like I mentioned above, once I have this installed into my 'bot along with all the new bells and whistles, I'll post full photos/video/code/info at the completed projects forum.

    Thanks again for everyone's help -- I couldn't have done it alone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    Post Edited (Zoot) : 1/22/2007 2:58:42 AM GMT
    1200 x 874 - 360K
    1200 x 874 - 441K
Sign In or Register to comment.