Go Down

Topic: circuit for automatic air organ (Read 2647 times) previous topic - next topic


Hello everybody,
together with my dad we are creating an automatic air organ.
Here you'll find an older picture. Right now
we are, except for the electronics, almost done and it contains 3 of those boxes with pipes and built in solenoids.

I would like to let multipcb create my board which I'm creating right now in eagle. But my experience in eagle and PCB's is none. I only have experience in experiment boards...Could anybody have a look at my schematic?

The schematic
On the top left site you'll find the outs of an arduino. Because I want to have the possibility to open the solenoids very slowly I want to use PWM. Since arduino does not have enough PWM, I use the TLC5940, thanks to Acleone's Library. How to connect it you'll find here.
And here are the eagle files.

This is the solenoid, a special
one for air organs.

Here are my most important questions:
- I have 8 warnings in eagle. This are the two different ones:
 "POWER pin U$1 IREF connected to N$1"
 "POWER pin U$1 VCC connected to +5V"
 "Part jp1 has no value" (I thought the JPt is just a block were you can put pins in, don't get it)

- If I look at this schematic, the solenoid is before the collector. That's unpractical for me, can't it be after the emitter?I just hear something about mosfets, I have to check that out...don't know them.

- The previous schematic uses tip102, I was told to use tip122 but now I don't understand why I don't use tip102. maybe a mosfet is the answer....

- I tested the solenoid on PWM and it works great, but on the solenoid itself there is a p6ke diode. Not a shotky...should I replace them anyway because I use PWM?

- I'm a bit worried about the speed. I used one tlc before to control lego motors with max/msp. It worked fast but I don't know what will happen if you use 3 tlc's and so many out's. I also want to use max/msp in the end for this project...I want it to have a not noticeable latency of course....

thanks in advance!


Hi Yurk;

I've never laid out a PCB either so I can imagine this has been quite a project for you to take on. One point I would make is that the 24vdc solenoids you are using only draw 90ma of current so you don't need such high power switching transistors. Logic level MOSFET devices should work just fine and save a lot of components and space on your driver board. I think board size has a lot to do with board costs also.

The popular 2N7000 is a very inexpensive device in a TO-92 package:




The schematic shows an NPN transistor.  If you want to put the solenoid between the transistor and power use a PNP transistor (though that will be turned on with a "0" output).  That swaps the position of the emitter & collector in the circuit.

To way oversimplify, the rule of thumb is to always put the load on the collector side of the transistor.  If the load is on the emitter, it can change the voltage the emitter "sees" and cause erratic behavior.  If you put it on the collector side, then you are OK as long as the base and emitter voltages have the right relationship.  

I agree the transistor doesnt need to be huge.  I use PN2222/PN2907 (small switching transistors) for relays and have no problems with heat.   Using too small of a base resistor is going to burn them up easier than too much load.

"Electrical Engineering 101 - everything you should have learned in school but probably didnt" by Darren Ashby has the best intuitive explanation of this that I have ever seen.  Unfortunately the last third of the book is how to deal with engineering managers.....


That organ looks like the sort of thing they make at the Early Music Centre in Bradford, not too far from where I am now.

Why are you using TLC5940s? Do you need the PWM capability of it to proportionally open the relays? If not then there is no advantage in using them.
What is more because you have a higher voltage than the supply I think you need to clamp the output to the rail. There was an application note about this but I don't have it to hand.

Before you delve into making a PCB then do try at least one channel works first. Personally I wouldn't bother with a PCB at all and I would make it on strip board.


Power Shift Registers might make more sense...

Like maybe these:  L9822E

Available from Mouser


The application note that contains information on using the TLC5940 with higher voltages is slva280.pdf (google for it). or see:-

Other application notes on this chip are:-
slvc106.pdf - big flow diagram about how to drive it.


Jan 21, 2009, 06:46 pm Last Edit: Jan 22, 2009, 03:08 pm by yurki Reason: 1
Thanks for all the reply's!

the shift register L9822E looks interesting but as far as I understand
it needs a serial input which is a bit too hard for me, specially with PWM, I think.

Thanks for the pnp npn story, I understand that much better now.

The 2N7000 looks very good, specially the dual-in-line version.
But I think what might be slightly better is the ULN2803. An advice of
a Dutch guy.. He also advised me a 100nF capacitor between the power and the ic's.

Tomorrow I want to update my circuit with this new information, I'll post it when I'm done!

The reason I want to use the tlc5940
is that I indeed want
to use PWM. We want to make the organ a bit special and
we think the sound is interesting you get when opening
air holes very slowly...

The reason I want to make a PCB
is that I made one circuit on a
strip board before and I used 2 tlc's (only the half of the second)
to control lego motors. I soldered first to use 2 lego motors and
it worked great, then I soldered the rest I completely got lost in
an enormous amount of wires ( I also needed to use resistors,
a lot of diodes, L298ne's etc). It ended up in a big Italian meal with
solder sauce were nothing worked anymore. (I finished the project
by start all over again and make it work for only 4 motors, without
tlc's...) I expect this project to have at least the same amount of
wires....I really don't
want this wire nightmare again :)


I indeed want to use PWM. We want to make the organ a bit special and we thing the sound is interesting you get when opening
air holes very slowly

Yes but feeding a PWM into a solenoid will not result in it opening slowly. It will stick until you get to a certain reading then it will snap shut.


Jan 22, 2009, 05:10 pm Last Edit: Jan 22, 2009, 05:17 pm by pwillard Reason: 1
I also agree.  A solenoid will actually "hang on to" the pulses... and only when enough holding current is drained from the coil will it release. The PWM pulses will not make a solenoid open and close if they are very close together... which is what PWM... is. (very close together pulses).  

The solenoid is clearly a binary device and you want it to behave like an analog device.  In my opinion, your theory about slow opening and slow closing of a binary device needs a better explanation.

You can achieve the same results with a solenoid driver chip and making them turn on and turn off  with timed controlled delays directly with software control.

Or, sadly... you are in the land of "SERVOS" if you want control over opening speed.


hmmm, actually I didn't try it out on the real organ with air yet, since
this is finished. Coming Tuesday I'll go to my parents town and I will test it...But I thought it will work because it DOES seem to work with PWM already quit nicely. I tested it out on one of the PWM ports of the arduino using a tip122... (so the tip122 also works here, but still I understand it's not a good option) The only thing I'm starting to worry about now is that the solenoid with a half PWM isn't strong enough any more to fight against the air pressure. We will know in a few day's...  

I quickly made a small film so you can check it out how it works with PWM:
(in the background is my hand controlling a fader to open en close
it as fast and slow as I want)


I made an update of the circuit.
- 6 * ULN2803
- 6 * 100nF



Oh.  Well, I guess we misunderstood.  Technically, that's not truly a solenoid as much as it is magnetically driven linear actuator. (now that I see it work)


Yes that's not actually a solenoid but an electro magnet. Also if you are adding a capacitor to smooth the PWM output then you are in effect driving it with a varying DC voltage. So yes your original idea does carry water.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131