scherbakov.al
The optical sensor responds by changing the voltage to the distance to the hammer. This voltage is compared using a comparator. Data from the comparator goes into a shift register, which collects data from many sensors and transmits it sequentially to the microcontroller pin. In the microcontroller, if a signal is present, an interrupt is triggered in which data associated with the timer value and a specific sensor is processed. Next, a midi message is generated and sent to the computer.
CyberGene I would like to express my gratitude for the inspiration your project provided! A few years ago, digital pianos with real mechanics came out that I was drooling over, but the prices were completely unaffordable for me. And then you go and do something similar to Yamaha or Kawaii! And I thought, why not? And the Cybrid project showed that anything is possible!
Perhaps the circuit with comparators and optical sensors was borrowed. It is also quite common on the Internet (sites about Arduino are full of something similar). Next.. - shift registers and what follows them along the signal path had to be invented by myself. Some logic chips had to be added between the shift registers and the microcontroller to “cut” the signals. I also came up with the processing code myself. Cool C++ language. I like!



