I was hoping for some advice on the best way to link up and control 30 x 12v motors (hair dryers).
I've successfully been able to control 9 x 12v motors using the pwm's on the arduino mega using tip120 transistors.
I then need more PWMs to connect to the 30 motors.
What would be the best way to achieve this?
The options I can think of so far is linking multiple arduinos (not sure how easy that is to do) or perhaps using the TLC5940 chip to expand the number of pwm's on one arduino - although this has proved to be tough so far... I can get the led to work but not the motor.
Are either of these any use or is there something completely different that would be more suitable?
Would really appreciate some guidance as this is becoming quite a headache!
this is becoming quite a headache!
Maybe it's the noise from all those hair dryers
What was the problem with the TLC5940? I assume you know it won't sink enough current to drive the motors directly, but I also assumed it would work for driving power transistors.
they are pretty noisy!
Unfortunately my coding/electronics knowledge is pretty limited, what I have tried so far is merging this:
and running a sketch which cycles through each output of the TLC5940
I connected one output pin with a 20k pull up resistor and the base of the transistor. The motor seemed to be on by default and when it the cycle reaches the motor the power dips then turns off. So it is controlling it of sorts but in the inverted way to what I was after. Hope i'm making sense and apologies for my ignorance!
I also stumbled across someone using the M5451 chip
Any ideas if this would be more successful/simpler?
So it is controlling it of sorts but in the inverted way to what I was after.
There are a couple of ways to deal with that. One is just to invert the duty cycle value: if you've calculated a value of, say, 400, you just change it to 623 with a statement like:
duty = 1023 - duty;
That will give you the transistor "on" time you want.
Or, you could use a PNP transistor, and switch the high side of the power supply instead of the low side. When the TLC5940 turns on its output and pulls it low, it will turn on the transistor. Which will work the way you wanted it to.
(Although I'd suggest you consider using a P-channel power MOSFET, instead of a PNP: it should waste much less energy. Which means significantly less heat to dissipate when controlling that many high-current loads)
The M5451 doesn't allow for different PWM values on the different channels like the TLC5490 does, so it's not really suitable for your purposes.