PDA

View Full Version : Could some one tell me if this would work

Nerd2
09-05-2006, 08:14 AM
I am new to electronics I came up with this and wonder if it would work.

The drawing is attached. The·green wires go to the Basic Stamp I/O pins. The red wires are 110vac. The light blue wires are -12vdc. The purple is·+12vdc.

Thanks

PJ Allen
09-05-2006, 09:30 AM
I'm guessing that you're trying to activate relays...

take a look at the picture attachment you'll find to get a better handle on this "FAQ".

Chris Savage
09-05-2006, 10:23 PM
The main thing that·stands out to me is you have no resistors between the transistor bases and the I/O lines.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Nerd2
09-06-2006, 02:20 AM
Should I use a 330 ohm resistor?

Beau Schwabe
09-06-2006, 03:26 AM
Nerd2,

A 330 ohm resistor MIGHT work, but you shouldn't get in the practice of just slapping a resistor in place
to validate if something is going to work or not.

I'm trying to understand your circuit, and from the looks of it "J3" acts as a by-pass or an over-ride is that
correct?

Assuming that is the case, I have attached a circuit configuration that depicts only 1/4th of what you have drawn

First you want to determine R2... In order to do this you need to determine what the current requirements are
to drive the front end of the EDR201A12... I could not find a datasheet on this device.

R2 = (Vsupply - .6V)/ (Current required)

(Transistor Base current) = (Current required) / hfe··<- The minimum hfe for the 2n2102 is about 30

Note:

·- As a rule of thumb I usually double the required amount of current ; effectively you could half the hfe value

·- In this circuit Vsupply could be something other than 5V

R1 = (5V - .6V) / (Transistor Base current)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Nerd2
09-06-2006, 08:14 AM
You are right j3 is an overide.

Here is the relay data sheet http://oeiwcsnts1.omron.com/pdfcatal.nsf/PDFLookUpByUniqueID/F6E49F13E7C6A6A486256FC8005C7AEB/\$FILE/D20G3MB0305.pdf

Im using the 12 volt relay

Here is the data sheet for the transistor http://www.st.com/stonline/books/pdf/docs/5279.pdf

Beau Schwabe
09-07-2006, 03:13 AM
If you are using the 12V version, then Vsupply needs to be at least 9.6V according to the data sheet. Also R2 is not necessary, because the datasheet already indicates it uses an internal 1k resistor.

The Hfe is about 1000, so for R1 figure a nominal current of 20mA for your relay...

20mA / 1000Hfe = 20uA ( x2 for good rule of thumb = 40uA)

R1 = (5V - 1.2V) / 40uA

R1 = 95,000 Ohms = 100K resistor

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Nerd2
09-07-2006, 05:40 AM
Do you think everything will work then?

stamptrol
09-07-2006, 06:45 AM
Nerd,

Other than the discussion above on the transistor issues, the other thing that jumps out at me is the mixing of high AC voltage and low DC voltages on J1. Assuming its a pin header with 0.100" spacing, it will be very easy to accidently get the AC onto your logic circuits with resultant smoke and light show.

Good practice would have them separated. For instance, add another just like J2 for the fused side of the contacts.

Cheers

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk

http://www.siskconsult.com
·