PDA

View Full Version : Circuit diagram for Stamp



dk_akj
08-20-2004, 01:04 AM
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 !

Newzed
08-20-2004, 06:05 AM
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 (http://hometown.aol.com/newzed/index.html)
·

dk_akj
08-20-2004, 11:13 AM
Newzed >>

Our final product must be able to run without a pc nearby. I think a PC is a very expensive powersupply http://forums.parallax.com/images/smilies/wink.gif

Regards
Anders

dk_akj
08-21-2004, 02:48 AM
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

Newzed
08-21-2004, 02:50 AM
For a starter, your DB9 connector is wired wrong.

Sid

Jon Williams
08-21-2004, 03:03 AM
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

dk_akj
08-21-2004, 03:36 AM
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

Newzed
08-21-2004, 03:40 AM
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 (http://hometown.aol.com/newzed/index.html)
·

Newzed
08-21-2004, 04:52 AM
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 (http://hometown.aol.com/newzed/index.html)
·

KenM
08-21-2004, 10:16 AM
What is the turns ratio of your transformer?

Loopy Byteloose
08-21-2004, 09:21 PM
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 Savage
08-21-2004, 10:28 PM
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_akj
08-22-2004, 12:43 AM
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

Newzed
08-22-2004, 07:26 PM
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 (http://hometown.aol.com/newzed/index.html)
·

Newzed
08-22-2004, 07:44 PM
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_akj
08-23-2004, 12:30 AM
Once again thanks.

I'll go for NPN

//akj

Mike Cook
08-23-2004, 01:33 AM
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_akj
08-23-2004, 05:55 PM
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 Cook
08-23-2004, 07:55 PM
Anders,

Check your Private Mail.

Thanks,

Mike

nick bernard
08-24-2004, 04:20 AM
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_akj
08-24-2004, 12:11 PM
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

Loopy Byteloose
08-24-2004, 03:43 PM
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

Loopy Byteloose
08-24-2004, 03:54 PM
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_akj
08-24-2004, 04:45 PM
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 bernard
08-24-2004, 09:30 PM
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 Williams
08-24-2004, 10:21 PM
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_akj
08-25-2004, 01:25 AM
Sorry Nick, I dont understand what you mean.

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

Anders

dk_akj
08-25-2004, 01:27 AM
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 bernard
08-25-2004, 02:00 AM
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_akj
08-25-2004, 02:27 AM
Nick,

Thanks alot.

I'll add diodes too.

All you guys helping me are GREAT, can't thank you enough
Anders

dk_akj
08-25-2004, 05:49 PM
Hi,

A few more questions from the stupid Dane http://forums.parallax.com/images/smilies/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

nick bernard
08-27-2004, 09:19 PM
1: yes you can put 5v on pin pin 21(vdd) and nothing on pin 24.
pin 24 is an input to an internal regulator.

2&3: pin 4 is a voltage reference for the serial interface for debugging and programming. pin 23 is the supply ground

rox on
nick B

Chris Savage
08-27-2004, 09:24 PM
Hey Nick, this is Off-Topic, but my wife made me type it...She just walked into the shop and saw your avatar, and said you look like Gilligan, from Gilligan's Island...No disrespect intended.
http://forums.parallax.com/images/smilies/smilewinkgrin.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
·

nick bernard
08-28-2004, 06:46 AM
LOL
that pic is so old it just makes a dandy headshot.
i took that picture in the spring of '99 right after my bowling team won 2k in a league, hence the wad of cash...

ah memories

rox on
nick B

MacGeek117
02-17-2005, 10:18 PM
Yes, Put a 1000uF capacitor on the output of the 7805 or it will occilate.
bugg

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I know what I'm doing...
...Maybe...