[PD] electro-mechanical piano (player piano) - Arduino, Solenoid Issue

Charles Goyard cg at fsck.fr
Mon Aug 5 12:42:55 CEST 2013


Hi,

You're not doomed !

There are two ways to solve your problem:

The proper one is to use PNP transistors or P-channel mosfets (remember
I already told you about that ? :))

See this document, you can find the wiring at the end:
http://julianvogels.de/wp-content/uploads/2013/06/stromkreis_transistorschaltung_final-1024x627.png

http://julianvogels.de/extending-pwm-output-pins-with-a-texas-instruments-tlc5940-led-driver/


The good enough one is to put a pull-up resistor (10k works) on every
NPN transistor base, and use the TLC as a pull down. In this case, the
on-time on the TLC corresponds to the off-time on the solenoid. Also
when the arduino reboots and every time the BLANK is issued, every
solenoid will act for a veeeeery short time. This can be a big problem
in your project. I did this for a 96 channels motor+led strip system,
and I regret not using PNPs instead.


Enjoy,

-- 
Charles



Epic Jefferson wrote:
> Hey guys,
> 
> updating on this project. I got the pwm shields and i've hit a wall. The
> driver circuit I'm using to control the solenoids via arduino is this one
> from instructables
> (link<http://www.instructables.com/id/Controlling-solenoids-with-arduino/)>)
> and
> it uses a single pin to control the pwm signal.
> 
> The pwm shield (link<http://www.practicalmaker.com/products/arduino-shields/pwm-shield-assembled>)
> is
> based on the tlc5940 which requires each pin to have it's own ground
> instead of a common ground across all drivers. This is a problem because
> all of the information i've found suggest that the signal from the pin
> controls the gate (transistor - TIP102). But i think, in the case of the
> tlc5940, the 5v supply is constant and the ground is being controlled,
> that's why it works perfectly for LED's but seems to be ill suited for this
> circuit.
> 
> Any suggestions on how to modify the instructables circuit for use with the
> shields? or would the circuit have to completely change?



More information about the Pd-list mailing list