In converting a Casavant console to a solid-state combination action, I told the organist that I could provide him with a piston sequencer, even though the combination action had no provision for this. I decided to use an Arduino to scan the 15 general pistons and use relays to operate the combination action instead
Last week I must have spent two days trying to track down a problem with the piston sequencer where operating pistons, especially toe studs, would randomly cause a general combination to be activated. After going down various rabbit holes (additional pull-up resistors, relays to isolate the inputs) I discovered that removing the connections to the general pistons (which run to three of the four manuals) the problem went away.
Now a pipe organ is, electrically speaking, a noisy environment and it appears that the Arduino was picking up and responding to this random noise. You see, I had written the code to respond immediately to the push of a general piston not seeing any reason to debounce that input. So I rewrote the program code to ignore all inputs that did not come from a solid piston push lasting at least 10 ms. After I uploaded the new code, the random behaviour immediately disappeared and the sequencer was responding promptly to its inputs exactly as it should.
Lesson learned: Debouncing can be used to squelch electrical noise.
Last week I must have spent two days trying to track down a problem with the piston sequencer where operating pistons, especially toe studs, would randomly cause a general combination to be activated. After going down various rabbit holes (additional pull-up resistors, relays to isolate the inputs) I discovered that removing the connections to the general pistons (which run to three of the four manuals) the problem went away.
Now a pipe organ is, electrically speaking, a noisy environment and it appears that the Arduino was picking up and responding to this random noise. You see, I had written the code to respond immediately to the push of a general piston not seeing any reason to debounce that input. So I rewrote the program code to ignore all inputs that did not come from a solid piston push lasting at least 10 ms. After I uploaded the new code, the random behaviour immediately disappeared and the sequencer was responding promptly to its inputs exactly as it should.
Lesson learned: Debouncing can be used to squelch electrical noise.
Comment