Shop OBEX P1 Docs P2 Docs Learn Events
Circuit diagram for Stamp — Parallax Forums

Circuit diagram for Stamp

dk_akjdk_akj Posts: 37
edited 2005-02-17 15:18 in General Discussion
Hi,

I'm going to make a PCB for my project.

Because I'm am new to electronics I'd like to see som circuit diagrams where the stamp is used.
On my·pcb I need:
  • Stamp
  • Powersupply·for·Stamp ( Input is·230VAC)
  • Digital inputs through optocoupler. (Can the same optocoupler handle 24/230VAC or 24 VDC·input ??)
  • Digital output for relays.
  • A few LED's

I really hope someone has some diagrams they will share. I've searched Google but cant find anything.

Kind regards

Anders

NB: I don't want a solution,· I want inspiration so that I can learn !
«1

Comments

  • NewzedNewzed Posts: 2,503
    edited 2004-08-19 23:05
    Why bring 230VAC to your PCB.· Take a look at the USB-powered Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    The Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • dk_akjdk_akj Posts: 37
    edited 2004-08-20 04:13
    Newzed >>

    Our final product must be able to run without a pc nearby. I think a PC is a very expensive powersupply wink.gif

    Regards
    Anders
  • dk_akjdk_akj Posts: 37
    edited 2004-08-20 19:48
    Hi.

    This is my first diagram. I made it·with PCBExpress.

    Is it complete foolish ??

    Will the inputs and outputs work ??

    Will my Stamp explode ??

    //akj
    1020 x 770 - 121K
    test.JPG 121.4K
  • NewzedNewzed Posts: 2,503
    edited 2004-08-20 19:50
    For a starter, your DB9 connector is wired wrong.

    Sid
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-20 20:03
    Sid's right: your DB-9 connections are wrong and could damage your BASIC Stamp if you actually hook it up that way.· Attached is a correct diagram for the BASIC Stamp's programming/DEBUG connection.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
    599 x 555 - 16K
  • dk_akjdk_akj Posts: 37
    edited 2004-08-20 20:36
    Hi, and thanks.

    I know that the "programming port" DB-9 is wired wrong, I'll make a special cable for programming. ( to save components on X pcb and only make 1 special cable)

    Regards
    Anders
  • NewzedNewzed Posts: 2,503
    edited 2004-08-20 20:40
    Why do that?· Your PC serial cable plugs onto the DB9 and the DB9 needs two caps between it and pin 3 on the Stamp.· Take my word for it - install the DB9 on the PC board so you can connect it properly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    The Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • NewzedNewzed Posts: 2,503
    edited 2004-08-20 21:52
    What is the output on the secondary of T1?· Don't forget that with a bridge rectifier you will see an output of about 1.414 times the input.

    If the output of T1 is 24 volts, then you are looking at an input to the 7805 of about 34 volts, which is too much for the 7805.· I suggest you look at a PT5101N - expensive, but a lot safer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    The Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • KenMKenM Posts: 657
    edited 2004-08-21 03:16
    What is the turns ratio of your transformer?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-21 14:21
    In crusing the local electronic supplier, I have seen some new 'wall warts' that designate for digital equipment use. These are in 230vac and 115vac or both at various voltages and power ratings.

    I need to take another look, but I assume that these have super low ripple, transient suppresion, RFI suppresion, and maybe even low voltage protection built in.

    Since these 'higher quality' wall warts now exist, why design the power supply at all. Besides, working side-by-side with 240VAC and 5VDC seems to just beg for burning up everything if you get an accidental short.

    If the power supply fails, you just replace it as a unit. Also, you seem to want to save componets on the PCB -- this saves quite a few.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Herzog) : 8/21/2004 2:24:19 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-21 15:28
    I would have to agree with Herzog...Our School and colleges I went to all used Prototype/Design boards with inegrated Power Supplies...When one failed, the school would discard the unit...Too expensive to replace.· I noticed that Parallax uses Wall-Warts with ALL their boards, which I find a better practice, since if one fails, you don't need to replace the whole unit, just the Wall-Wart, and they're cheap enough.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • dk_akjdk_akj Posts: 37
    edited 2004-08-21 17:43
    Hi all,

    Thanks alot for your comments.

    1: I'll make the programming port as described by Jon Williams.
    2: It is not possible to use a wall plug ( I'd be glad if it was ) The board must be installed on a machine.
    3: T1 has 12 VAC output.

    How about inputs and outputs ? Is it okay ??

    Once again, thanks alot for your help
    Anders
  • NewzedNewzed Posts: 2,503
    edited 2004-08-22 12:26
    It appears the transistor outputs are wired incorrectly.· The emitters of all transistors should go to ground.· Your transistor load - whatever you want to turn on and off - should be between the load voltage and the collector terminal.

    You do not indicate the size of the resistor in series with the base, but it should be about 2K.

    There is no protective resistor on P0 and P1.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    The Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • NewzedNewzed Posts: 2,503
    edited 2004-08-22 12:44
    I just looked at your schematic again.· Looks like your transistors are PNP, in which case some of you connections are correct.· However, if you haven't built it yet, I would suggest you go to NPNs.· They would be more consistent with the overall circuit.

    Sid
  • dk_akjdk_akj Posts: 37
    edited 2004-08-22 17:30
    Once again thanks.

    I'll go for NPN

    //akj
  • Mike CookMike Cook Posts: 829
    edited 2004-08-22 18:33

    Anders,

    Your power supply looks ok but make sure it can supply enough current for your modem. I would also add some more capacitance to the output of your voltage regulators, the data sheets on the regulators will suggest what's required. I normally use 1000 uf to the output of a regulator just because I've always done it and haven't had any problems. Also I don't know if it's a good idea to parallel the outputs of the LM7805 to get a get a higher output current and the LM7805's will get very HOT if powered from a 12 VDC input, make sure you have an adequate heat sink. Take a look at www.national.com for other regulators. You can download a program from them that's called "Switchers made Simple", this really helps if you are determined upon building your own power supply. You said it was to be mounted in a machine and you didn't want to use a wall wart. Depending on your design, and if I was doing it, you might want to opt for a commercial power supply board. These can usually be had for a fraction of what they cost new via the surplus market, and as a side benefit most of them ARE new! Here's some links to surplus houses I use for power supplies:

    www.mpja.com

    www.allelectronics.com

    www.goldmine-elec.com

    Also this will keep the high AC voltages somewhat isolated from the DC powered electronics and provide a safer design. Can you give us some more information on the modem you are using? If it happens to be an Enfora modem, I would most definitely be concerned about the power supply design. Most of our integrator problems have to do with power supply problems.

    Mike

    Post Edited (Mike Cook) : 8/22/2004 7:14:55 PM GMT
  • dk_akjdk_akj Posts: 37
    edited 2004-08-23 10:55
    Hi Mike,

    Thanks alot for your input.

    Yes, it is an Enfora modem (SA-GL)

    I'll take a look for a PSU on the sites you mentioned. And see if I can find some "gold".

    The 2 LM's in parallel is an error. The meaning was one for 5V and one for 9V.

    Anders
  • Mike CookMike Cook Posts: 829
    edited 2004-08-23 12:55
    Anders,

    Check your Private Mail.

    Thanks,

    Mike
  • nick bernardnick bernard Posts: 329
    edited 2004-08-23 21:20
    yo,
    i build industrial apps for the bs2sx and i have a few niblets of advice; i even use the same software and board house for our pcb's.

    check out TI's tpic6a596. it is a high current - open drain output - shift register. you can cascade them to make several open drain outputs and you'd only have to dedicate 3 io's to interface. i use them to pull relays and drive indicators.

    to save board space investigate sip and dip resistor networks. just be cautious; they are low power devices

    try using a line drive such as a 74hc541 to drive your serial data. if a surge appears on your serial line dont let your stamp take the fall. bc $1·< $50 you can also tie the inputs together to make muliple outputs if it makes you happy.

    toss some led's in series with your inputs and other led's to monitor various situations to indicate possible circuit failures.

    wago makes these super din mounts for pcbs. hence you can mount your pcb on a din rail if it makes you happy

    this is the best advice that i can offer that hasnt been said, this promises to be a really resourceful thread you

    nick B
  • dk_akjdk_akj Posts: 37
    edited 2004-08-24 05:11
    Hi Nick,

    Thanks alot for your input.

    Can i simply put a LED in series with my inputs and outputs ??

    Right now 6 inputs and 6 outputs is enough, mayby later I'll need the shift register output.

    Thank you
    Anders
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-24 08:43
    No, you need to add a current limiting resistor 330 to 470 ohms (sometimes you see 220ohms, but why use more current?)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-24 08:54
    I did take a look at those "ITE - information technology equipment" power supplies.

    They cost $12-20 USD.

    They have an AC cord (about 1 1/2 meters) in. They are rated 100 to 230VAC. And they come in various single outputs (up to 5 amps) from 4.2 volts to 24volts with a cord out (and plug).

    Spike protection, transient protect, and low voltage protect are not specifically mentioned. So, I was wrong and would recommend adding the first two.

    These units appear to be more powerful counterparts to the wall warts and designed for one unit which fits all world markets.

    They are sealed plastic units, not open chassis. So they can be put into small tight configurations and never clog up with dust.

    No fuse, so I assume some internal shut off for heat or overvoltage

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • dk_akjdk_akj Posts: 37
    edited 2004-08-24 09:45
    Also thanks to herzog for his inputs.

    regarding the LED on the input. Do you mean like this

    Inputpin
    R330
    LED
    Contact
    +5vdc

    Regards
    Anders
  • nick bernardnick bernard Posts: 329
    edited 2004-08-24 14:30
    I reccomend you put an LED pre optoisolator like this. that way you are sampling the unbuffered input. you could also place an LED on the Collector of the isolator or other bjt driver, but i would only do this to monitor outputs.
    the input·resistor in this circuit was used for TTL to ·+/-10V levels and worked just fine.

    i also reccomend you use a LED array because they are much smaller.


    nick B

    ps i know the op+/- isnt entirely accurate. loads requre pullups
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-24 15:21
    I agree with Nick -- if this is an industrial application then protect ALL BASIC Stamp pins with optical isolation; in the long run you'll be happy you did.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • dk_akjdk_akj Posts: 37
    edited 2004-08-24 18:25
    Sorry Nick, I dont understand what you mean.

    Is the optoisolator placed on the serial connection to the modem ?

    Anders
  • dk_akjdk_akj Posts: 37
    edited 2004-08-24 18:27
    Oops, I didnt see Jon's post before my last post.

    I have now put optocouplers on all inputs.
    I have relays on all·outputs ( via a transistor ).

    Anders

    Post Edited (dk_akj) : 8/24/2004 6:30:33 PM GMT
  • nick bernardnick bernard Posts: 329
    edited 2004-08-24 19:00
    sorry man,
    thats not a retrofit to your design but a snippet of a design i've been working on, i added an led on the output collector just for demonstration.

    also i highly recommend you use diodes across the coils of your relays to eliminate any problems generated by counter emf (or flyback.... i forget the nomenclature). in any case i've had these problems with off-pcb 12vdc relays that was easily repaired with a shunt diode. some transistors have internal diodes across the Drain/Source. this supplies some protection, but i always use a shunt diode just to be sure.

    in any case when you move on to the pcb design phase make sure that all your traces are well within their current limits and avoid ground loops if rf may be a problem

    nickB
  • dk_akjdk_akj Posts: 37
    edited 2004-08-24 19:27
    Nick,

    Thanks alot.

    I'll add diodes too.

    All you guys helping me are GREAT, can't thank you enough
    Anders
  • dk_akjdk_akj Posts: 37
    edited 2004-08-25 10:49
    Hi,

    A few more questions from the stupid Dane smile.gif

    1: I'll use a 5 vdc powersupply. Is it correct if I connect +5v to pin 21 ? and 0v to pin 23. Pin 24 is not connected at all.
    2: Is VSS supposed to be connected to both pin 4 and pin 23 ?? or is one of them enough ?
    3: Whats the difference between VSS and ground ??
    Fx. On this image posted by Jon (http://forums.parallax.com/forums/attach.aspx?a=141) is it OK to connect the 0.1 microF capacitor to VSS ??

    Regards
    Anders
Sign In or Register to comment.