Author Topic: pcb design help  (Read 814 times)

0 Members and 1 Guest are viewing this topic.

Offline hsn93

  • Regular Contributor
  • *
  • Posts: 86
  • Country: bh
pcb design help
« on: May 03, 2018, 09:25:23 am »
hello, im doing PCB design and i need help

the 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 things

is 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?


 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 13123
  • Country: gb
  • 0999
Re: pcb design help
« Reply #1 on: May 03, 2018, 09:41:02 am »
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?
 
The following users thanked this post: hsn93

Offline hsn93

  • Regular Contributor
  • *
  • Posts: 86
  • Country: bh
Re: pcb design help
« Reply #2 on: May 03, 2018, 01:56:32 pm »
hello, yes 9 wires = 9 solenoid + pin 25 of D-sub is'nt connected yet to 24v





the 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 features


Protection Diodes:
this is question mark for me now, i'll explain why:

 its (common positive common negative) valve
i 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 the back-emf voltage will reach to -24v to my 3v3 mcu and 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 assume
Hfe = 200
Ic 30mA -> Vbe = 0.7v @ 25C

Ibe = 30mA / 200 = 150nA
R ~= 17K

thats 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..
« Last Edit: May 03, 2018, 01:58:09 pm by hsn93 »
 

Offline ajukarandikar11

  • Contributor
  • Posts: 8
  • Country: in
Re: pcb design help
« Reply #3 on: June 08, 2018, 09:11:25 am »
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).
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 1673
Re: pcb design help
« Reply #4 on: June 08, 2018, 12:14:07 pm »
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.
 

Offline hsn93

  • Regular Contributor
  • *
  • Posts: 86
  • Country: bh
Re: pcb design help
« Reply #5 on: June 11, 2018, 07:46:05 am »
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.

hello 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
« Last Edit: June 11, 2018, 07:48:17 am by hsn93 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf