0
\$\begingroup\$

I am building a self playing piano. I daisy-chained 11 74hc595 shift registers to control (11*8) solenoids. (figure 1 only shows 1). The solenoids are rated at 2 Amps each. I use SPI from the arduino to bit bang data to get PWM over the outputs at about 20 kHz to make the keys play harder and softer. But only for about half a second until the key is pressed, then is sets it to 255/255. But even when I power a solenoid directly at 255/255 it is only capable of pressing the piano key 1 out of about 5 times. I think it doesn't always get the power it needs.

I thought it would be a good idea to add a parallel capacitor (C1) close to every group of 8 solenoids. But what would be a good capacitance?

[EDIT] I don't have a o'scope. I am using IRFZ44N Transistor N-Channel Rectifier Power Mosfets. 8 mosfets are grouped togheter (total 11 groups), the wires from my PSU to these groups are 18 AWG and ranging from 30 to 100 cm in length.

[EDIT 2] I added a gnd wire in the schematic between logic and solenoid side. I added 3 photos, pls dont judge the solder quality, its from 3 years ago. I also still need to do some wire management and actually fix the boards onto something because now they are just hanging there. I am currently testing with 47 uF, 220 uF, 470uF and 1000 uF. But dont see any difference so far. I also have a old (but still usable) car battery, would that be a better power supply?

1 shift register setup

bottom side of one of the 11 boards

up side of one of the 11 boards 11 boards for 88 solenoids overview

\$\endgroup\$
13
  • \$\begingroup\$ It sounds like you don't have an oscilloscope available to test your theory of it not always getting the power it needs. In which case, why not add the 1 mF capacitor you have illustrated and try it, then try with two, etc. \$\endgroup\$
    – Neil_UK
    Jun 22, 2021 at 13:37
  • 2
    \$\begingroup\$ simple test: if you just pull the FET gate high by touching the wire to +12V, do you get enough drive? \$\endgroup\$
    – danmcb
    Jun 22, 2021 at 13:40
  • \$\begingroup\$ I will take a guess but it appears you are not getting enough power from the power supply, it is probably folding back leaving enough for the Arduino but not the solenoid. Consider if you activate more then one key. If you want to go the capacitor route you will need several thousand Uf, 2A is a lot of current. What size is your wire and how long is it? \$\endgroup\$
    – Gil
    Jun 22, 2021 at 16:37
  • \$\begingroup\$ What MOSFETs are you using, and are you sure you are driving the gates hard enough? \$\endgroup\$ Jun 22, 2021 at 17:21
  • \$\begingroup\$ you might want to use several caps in parrelel so that ESR is divided and they can respond N times faster than a single large cap. \$\endgroup\$
    – dandavis
    Jun 22, 2021 at 19:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.