Solenoid control using arduino

Please gentlemen advise me on my project.
I am trying to build a weight sorting system using arduino.
I intend to use 0~5DCV from digital indicator which puts out such voltage when it gets reaction from strain gage of loadcell.
I believe arduino can receive up to 5DCV variables so I connected master arduino which will send commend signal(40mA) to slave arduino which will trigger solenoid using relay.
Through the link below, you can see some pictures how I made connection for all hardwares.
Imgur
My question is,
(1) Is this a proper (connection) way to achieve my intention?
(2) How can I use the output pin of the slave board to control the on/off mode of solenoid?

hi,
there's a tutorial on solenoids in the playground/wiki: Arduino Playground - HomePage

Thank you for letting me know such useful tutorial. Highly appreciated.
According to the below link, I must use heat sink on the transistor.

Then, what type of heat sink can I use to TIP102 transistor for control of solenoid?

If you use a TIP120 Darlington, it comes in a TO-220 package with a metal tab; that makes connecting a variety of heat sinks quite simple.

what about simple relays?

sounds much esier then the whole transister diode stuff

You'd need a transistor to drive the relay -- can't connect them (inductors) directly to a micro. The other nice thing about transistors is that they are silent when the switch; no clickity-clack when switching.

Then, do I need to install for both transistor and relay to control a solenoid?
This schematic shows only a transistor and a diode.

What type of heat sinks can I use for them? If you do have a picture of heatsink which corresponds to TIP102 or TIP120 transistor and relay, could you show me, please?

No - you can control the solenoid with just the resistor / diode setup.

All inductive loads, like motors, solenoids, relays, basically anything containing electromagnetic components need to be driven this way, because they draw more current than a microprocessor can supply,and because you need to protect the microprocessor from the "back emf current" (thats what the diode is for).

I bought Tom Igoes book "Physical computing" just before christmas, this book is a goldmine of information on how to hook things up to microprocessors. I really recomend it to anybody woring with stuff like that. He is not using the Arduini board, but variuos other processors, so the code from the book can not be used as is, but it is not difficult to translate to Arduino C.

Thank you very much for your insight.
Do you have a schematic of the setup using only resistor and diode?

just around the corner :slight_smile:

Thanks for your reply.
What type of heat sink is available for transistors?
I have TIP120 transistor but I can't understand putting a heat sink to this transistor.
I had an experience of transistor which gotten extremly hot after just short time when it is installed in a circuit so I definitely need a heat sink for a reliable long operation of controlling solenoid.
What kind of heat sink can I use for TIP120 transistor and how can I install it?

Mingoo,

I'll show you some examples. I think it will be easier for me show pics than explain. Try finding something like this on shops near you, or internet to buy.

The transistor with heatsink must look like this (not exactly, just an example):

Separated the parts look like this (it lacks the bushing - a plastic ring):

your transistor TIP120 is TO-220 package, like this TO-220 - Wikipedia.

You have to buy:

You must do a "sandwich", with transistor, thermal grease, mica insulator (or thermo pad), thermal grease again, and the heatsink.

Put the bushing in the hole of transistor, and pass a screw through the transistor/mica/heatsink hole ending it with a nut.

It is supposed that the transistor case is not in contact with the heatsink or with the screw. It is necessary no eletric contact, only physical contact for thermal transfer between transistor case and heatsink. The bush have this function. You can see it in first pic, between screw head and transistor. It is transparent.

I don't think you need to calculate this, but just for curiosity, it exists:

Hard for explain, but easy to do.
Good luck.

Thank you very very much, Adilson.
A starter like myself needs to look at something like this. ;D
Thank you.

We're here to help.

You're welcome.

Never, ever, ever throw electronic stuff away because there will invariably be a part in them you can use even if it's s silly piece of metal. You will also see how they assemble a part to a heat sink.

BTW you don't have to have that spiffy heat sink. Grab a pair of metal sheers/hacksaw or hammer and chisel if it's all you have. Cut some 1/8" thick or so aluminum so that it looks like the photos above and then drill a hole in it about where it needs to go, mount the transistor to that. Where the part is mounted has to be flat.

You should use heatsink grease but I'll tell you what, someone went to the trouble of trying common household items for that and found toothpaste works for the short term. Don't expect it to last forever but it will save you from buying the expensive stuff until you need to permanently mount the circuit.

http://www.dansdata.com/goop.htm

I've drilled and tapped a chunk of metal with a flat side and bolted transistors to that. In some cases the tab is connected to either the positive or negative so watch what other parts heat sink is connected to or might touch. You can test if the tab is isolated or connected to a pin with a meter.

Thank you very very much, Adilson.
A starter like myself needs to look at something like this. ;D
Thank you.

Thank you for the invaluable advise. I will try with your suggestion first and then I will move on to the next step which involves some money.
Thank you~!