So after this long-winded explanation, this is the situation I am left with: I need to generate a >20kHz PWM signal ~40% duty cycle across 11 Mega pins. This sounds complicated in my explanation but it really isn't. The PWM-generating Arduino would be constantly generating a 40% duty cycle 31kHz PWM signal across all the power control MOSFET gates, and when one of its inputs was high, it would change to 100% duty cycle for a split-second on the line connected to the correct solenoid group. Whenever a MIDI note came in, the key-triggering Arduino would make the line high that corresponded to the driver board that MIDI note's solenoid was attached to. The key-triggering Megas would simply have 11 output lines between them running into my PWM-generating Mega. If I'm messing with timers, then I've decided I'm probably best off using another standalone Mega for generating the PWM, especially as my MIDI-decoding code works perfectly. Raising the frequency to 31kHz by setting the timer prescaler to 1 works very well for eliminating this hum. At the default Mega 2560 PWM frequency of 490Hz, the solenoid is very audible. I've tried this with an individual solenoid, and it works very well - sort of. When a solenoid needs to go down, the duty cycle goes to 100% for a split second before going back to 40% to hold it in. My plan is to PWM the "PWM control MOSFETS" at around 40% duty cycle when no solenoids are being triggered. Now that I have my explanation of my setup complete, here's where stuff gets more difficult. This is working beautifully, ignoring the absurd power consumption and solenoid heating. How does this setup work? I'm using 3 Arduino Megas to control the individual notes (using only 2 would work in terms of pins, but I'm using 3 for wiring purposes).They are all reading serial data off the same data line and triggering notes accordingly - currently all the PWM MOSFET gates are just pulled high, effectively bypassing them. These are actually in groups of 8.Ĩ8 keys/8 per group = 11 groups of PWM control = 5 and a half driver boards. Of course, this schematic is only showing a 4-channel setup. I've designed and ordered 15x (!!!)(I can't make any changes now) of a 16-solenoid driver PCB, and each half of this driver board (groups of 8 solenoid driver circuits) has another MOSFET controlling the overall power, like so: Of course, it would be fairly impractical to generate and control 88 PWM channels, so I'm going to PWM them in groups. Continuously feeding them 12V also results in a large amount of heating after just a minute of being held in they get intolerably hot. They stay down with just 4V (therefore just over 400mA of current). However, once they are down, they don't need nearly as much power to stay in. Solenoids are special because they need a lot of power to pull in: in my case, my solenoids draw 1.3A 12V each. I've given some extensive background on the project that's not particularly necessary to the specific technical challenge.Īnyway, I'm converting a reed organ (pump organ) to be MIDI-controlled with 88 solenoids, one under every key. Jump down to the bolded section to get right to the technical challenge at hand. Obligatory: Long-time lurker, this is my first post here! I'm excited to join this community!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |