Simple question about transistors

Hey guys. I have a project where I'm looking to control some solenoid valves (VXD2130) from car voltage (12v-ish). The datasheet (http://www.coastpneumatics.com/metric/valves/vxd_series_valves.pdf) says that the power consumption (holding) is 6W.

I assume that means I need to supply this solenoid with 0.5amps at the 12v-ish that the car will supply.

The last time that I needed to switch 12v, I had less power requirements and used some AQY212GS (500mA, 60v, solid state relay) driven directly from arduino pins (with a resistor). Being that this project would be right at the upper limit for that part, I wanted to step up the capacity of the relays. I quickly found that larger capacity SSRs with control voltages less than 5v are much more expensive ($10+ per!). I need to drive eight of them, so I'd rather not be wasteful.

The little schematic at arduino.cc for driving relays (Arduino Playground - HomePage) mentions using a 2N222 transistor for small relays and a TIP102 darlington array for larger. If I used the TIP102, could I not drive the solenoid directly with this? Would the benefit of the SSR be only optical isolation? How important is that?

So I guess my question is which would be better for this application? A TIP102 directly (is this possible/good idea?) or a 2N222 or similar driving an SSR?

A DC SSR ( most are AC only) has two advantages over the transistor, one is optical isolation, the other is that having a FET inside them with a low ON resistance it is likely to not get so hot.
A look at the data sheet will show that a TIP102 has just over a volt across it when fully saturated. That means it is going to dissipate 0.5W which might mean using a heat sink.

A cheaper alternative to a SSR is just to use a FET, typical ON resistance is in the order of less than 0.4R so with you half amp that will give you only 0.2W dissipation. Go for a logic level HEX FET and you can switch it direct from the arduino pin. (via a small gate resistor)

A quick look at some FETs means that I'll have to do some reading.

In this application each solenoid will only be switched about a second at a time. It's for controlling an airbag system in a "low-rider" truck. (not crash safety airbags)

Would this work, or am I way off?

That's the sort of thing but it is a p-channel FET you need an n-channel one. Also it's surface mount so it is a bit fiddly to play with.

If it's only a second in say every 30 seconds then the heat dissipation is not so important so a transistor might be easer for you to wire up.

Thanks Mike, you've been a big help again.

SMD parts (NOT BGA) aren't a problem for the final project, I plan to have a pcb fabbed like my last project (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236735887/15) But it does make prototyping a bit more difficult. I didn't see any n-channel HEX FETs that weren't teesy weensy.

I guess I'll test with TIP102, see how hot it runs with regular use, go from there.

I plan to make this a one board project when finished, with the arduino built into the same board as everything else. Not plugged in seperately like my last one. Baby steps.

One more thing, should I protect my transistor from the solenoid with a reverse diode like I would with a relay? If so, is that something I could put on my board even if the solenoid will be after several feet of cable, or should the diode be as close to the solenoid as possible? I don't see anything on the solenoid sheet that mentions whether it has this already or not.

Edit: Looks like all the solenoids are all wired directly to ground, I can only control from the hot side, the ground won't come back to my box.

the ground won't come back to my box.

Yes it must come back into your box in some form. See:- http://www.thebox.myzen.co.uk/Tutorial/Power.html

In general any diode protection should be as close to the diode as possible. Just because you power it with a current source and not a sink doesn't mean you don't need the diode.

Baby steps.

:slight_smile: Yes that's the secret to all successfully projects.

the ground won't come back to my box.

I mean not in the way I was expecting.

The solenoids are all the the back of the vehicle. The control box sits up front. All the control box is now is a bunch of switches. It switches a 12v source to the 8 solenoids. There isn't even a ground wire ran to that box. (I'll need to do that.)

So the power goes to the solenoid and then directly to ground in the back. For some reason I was thinking that the solenoid's ground wire came back to the box.

I don't want to change anything in the back. So I won't be installing a diode across the solenoids. This means that I can't operate them with transistors because they won't be protected from the spike.

I was thinking that I could protect them with a diode inside the box, albiet further from the source. But since the ground wire from the solenoid doesn't come back to the box first, I can't.

I'll probably just use mechanical relays then. Maybe I can get them cheaper. I wanted to go all solid state, because I tend to equate solid state with longevity. But it's not worth the extra cost to me for this project.

why not just add a small wire from the chassis of the car? its connected to the ground of the battery

yea pretty much anything thats real metal or screwed down is grounded to the body

I know that pretty much anything metal in the truck is a ground. Are you guys implying that running a diode 'backwards' from the power wire headed to the solenoid (from a darlington) to 'any' ground will protect the darlington array just fine? I've only ever seen them directly across relays. Ground is ground I suppose...

While putting a reverse biased diode across the darlingtons will protect the darlingtons it will not help with protecting the rest of the circuit. Also if there is a long run between the relay coil and the protection the large voltage spike can still cause interference to other things. You are best putting the diode across the relay coil. I don't see what this is too difficult as diodes are only very small and can be wired across the terminals.

The problem is that the solenoids are in the bed of the truck in the open. The connections are water-tight. If I were to put some diodes across each one, I'd have to seal them up some way. Also, I was looking to modify his setup as little as possible. I was hoping to make a 'direct replacement' for the box he was using. This way, anything I do can be undone easily. I'm thinking of a scenario where something doesn't work right on his setup later on, and he can easily rule out anything I've done by simply removing it, using the old controls, and not clipping diodes off. That way he can fix it without breaking what I've built, then put it back later.

Since I'm controlling when to send power to the solenoid and not controlling the ground, can I still use the TIP102? Put the solenoid off the emitter?

So, will this work or is it just crazy? I tried to make a point to show that the ground of the solenoid and the ground that the arduino and TIP102 use are connected to the chassis of the truck in at different locations.

I can breadboard this and test it out easily enough to see if it operates, but I can't really measure if the voltage spike taken care of or not.

No it won't work.
What you have here is an emitter follower. That is the emitter will not get any higher than the voltage on the base minus two times the Vbe which is about 0.7V. So with 5V out of the arduino you will only get a maximum of 3.6V across your solenoid.

so to drive this from the positive side, I should just use a relay and be done with it? Would a solid state relay need a diode to protect it from the solenoid? Also, would the diode work as above?

I apologize if I'm coming off as needy, I do appreciate all the help i've received from this post, as well as everything I've learned just reading through these forums.

You need to drive this with a PNP transistor. Emitter to +12V collector to solenoid base to 470R to +12V. Base also to 6K8 to arduino input.
This is a pull up drive.
Alternative you need a High Side driver like the VN750-E, this would probably be best. Although there are lots of them some providing more than one drive per package.
Look at: http://uk.farnell.com/jsp/search/results.jsp?N=500006+1004404&Ntk=gensearch_001&Ntt=High+side+driver&Ntx=&isGoback=false&isRedirect=false