pcb design help - Page 1
Forum section: electronics / beginners

author: hsn93
author_rank: Regular Contributor
timestamp: May 03, 2018, 09:25:23 am
content: hello, im doing PCB design and i need helpthe DB25 has 9 wires that goes to solenoid valves ..im using transistors to switch to ground side and using 24v as common positive for the solenoids ..(still didnt put 24v in the circuit but i will just put the 24v some where, in the future i want to place Switching regulator to 3v3. but i want to have idea about different thingsis it smart to have transistors in bottom and top layer on each other or thats wrong for some reason like heat ??is it better to go with mosfet instead of BJT ?how about the routing and any other things?

author: Zero999
author_rank: Super Contributor
timestamp: May 03, 2018, 09:41:02 am
content: How many solenoids? I know you said 9 wires: is that one common and one for each solenoid i.e. 9 solenoids in total?Where are the protection diodes?How much current do the solenoids take?What about replacing all transistors with an IC such as the ULN2803A or ULN2003A?

author: hsn93
author_rank: Regular Contributor
timestamp: May 03, 2018, 01:56:32 pm
content: hello, yes 9 wires = 9 solenoid + pin 25 of D-sub is'nt connected yet to 24vthe valve datasheet has too many configurations they dont specifiy electrical details in the specification (just 12v,24v, ac/dc , wire connector types)..although in some configurations i can find pictures of electrical featuresProtection Diodes:this is question mark for me now, i'll explain why:its (common positive common negative) valvei mean yeah they can put 2 leds like this (i found in some pictures in their datasheet):so im assuming this (zener diode should protect against the back emf of the solenoid ?? or they rated to 24v and theback-emf voltage will reach to -24v to my 3v3 mcuand burn it so i should use diode?Current:current i did put DC supply and it showed that it take 20mA which is in my opinion very low...(or the power supply is not accurate) .. but then i can see this in the datasheet of the valve:Base Resistor:im using Bipolar (BJT) Transistor NPN 45V 800mA 100MHz 300mW Surface Mount SOT-23-3 (TO-236)so i thought i will use resistor to limit current in base:i assumeHfe = 200Ic 30mA -> Vbe = 0.7v @ 25CIbe = 30mA / 200 = 150nAR ~= 17Kthats right ?What about replacing all transistors with an IC such as the ULN2803A or ULN2003A?thank you, i will need to research about darlington transistors and how they work, should i connect external resistors or not ...for now im going with this "bulk of transistors" because i bought them allready from digikey .. but i'll need to edit the circuit later after my first revision ..how about Traces of the pcb ? components location? and most important this "programming JTAG" there is way to get rid of it ? i just want to flash SAM-BA into the mcu and then always use USB as programmer..

author: ajukarandikar11
author_rank: Newbie
timestamp: June 08, 2018, 09:11:25 am
content: Hello,Diodes:Yes. The zeners will protect from the back emf. However, it would be good to have additional diodes on your board. 1N4007 would do.Driver:ULN2803A or ULN2003A would be a good choice as it has built-in diodes and base resistors.Regarding the power dissipation, for ULN2803A, per channel it would be about 21mA x 1.1V = 0.023W. which is low.I would use one ULN2803A (for 8 solenoids) + one transistor with a diode (for 1 solenoid).

author: dmills
author_rank: Super Contributor
timestamp: June 08, 2018, 12:14:07 pm
content: Crivens man!Ye got all the space in the world, no point in placing parts on both sides, that just makes the thing annoying to build (Two paste stencils!), you do it when you must, but this thing is such low density, why would you bother?My previous comments stand, status LEDs on the outputs are a good and happymaking thing, and a fuse never hurts, also power on LED and at least one hung off some random processor GPIO (trust me on this you will love it come debug time)....Is that really jtag? I ask because I don't see a connector footprint with the usual 4 jtag lines going to the processor, or the usual resistors to make tms end up reliably deselected.Your base resistor values are insane, you want the transistor hard into saturation, under which conditions HFE drops massively, rule of thumb for a saturated BJT is HFE of somewhere around 10 - 20 or so, give it at least 1mA of base current, and 5mA is not unreasonable, maybe 1k or such, but not 17k.You absolutely do want catch diodes on the board, look at them as fuckup fairy repellent.100uF or so of bulk cap would not hurt on the power input, speaking of which, where is the power input?On layout, if the USB connector was over to the right then you would have a direct run at the required pins without needing to snake all the way across the board.Mounting holes? Always a good thing....Seriously, all the stuff in the other thread should be considered for this one as well.Regards, Dan.

author: hsn93
author_rank: Regular Contributor
timestamp: June 11, 2018, 07:46:05 am
content: Quote from: dmills on June 08, 2018, 12:14:07 pmhello dan, thank you very much .. i 've learned alot.. now i understand about transistor datasheet Hfe is in linear mode.. and on saturation where u run transistor mostly as on-off instead of current amplifier,, hfe goes down.. i abandoned this circuit and started the other one on the other post. but i've learned from here as well..the connector is SWD