Skip to content

piano midi controller diy

Khuja Wangtishvili

How is the progress going on? 🙂


scherbakov.​al

Good time!

The boards made for testing showed that they work. They work in the sense that the circuit performs its function. Sensors work, signals come. Observation with an oscilloscope showed that some signal distortion does not seem to interfere with normal operation. But I have not yet installed the boards over the hammers in order to understand HOW these boards work qualitatively. But nevertheless, I decided to manufacture the entire set of boards for the entire instrument.

In the fall, I spent a lot of time arranging the parts on the board in such a way that the automatic routing could complete. But I still didn't like the result. All the same, several dozen connections remained under-routed. And there were many deformities in the paths of the tracks.

Then my work began. I work as an accompanist at a music school and accompany students on the piano who are learning to play the saxophone, oboe and percussion instruments. This reduces free time and energy for enthusiasm and study + the body has become more lazy after the covid period. (we are gradually coming back from this and getting stronger)

After the new year, I redid the boards and made all the connections by hand. It also took a couple of weeks. Then I expected some sub-accumulation of funds in order to place an order for the manufacture of boards. About a week ago I tried to order production and ran into some difficulties. I chose to make in Taiwan as the cheapest. In Russia, you can order production from local manufacturers, but it comes out 5-20 times more expensive + there is no convenient editor from which you can immediately start production. Production here, apparently, is focused on large batches and the production of small series of boards is extremely unprofitable (+ fuss with documents is very difficult for me).

First of all, the difficulty turned out to be that it was impossible to pay for the order from Russia and produce boards with surface mounting of electronic components. America simply forbade Taiwan from doing so.

But, nevertheless, I tried to order and the manufacturer did not yet have the required number of qre1113 sensors for production (this is still the second difficulty). While the process is waiting for the sensors to arrive at the warehouse. I expect that in a month and a half everything will happen!

If everything works more or less, then I will try to post a description of this project.

And so, attention still goes to learning C++ programming, learning how Git, Сmake, Qt, Openframeworks work, and Linux features. During this period, it was very interesting to program the barometer on the ESP32 with a small screen and output information to the home network. It was interesting to make a ws2812b LED lamp. It was interesting to start programming the synthesizer on physical simulation. It was interesting to start programming the Fourier wavelet analyzer. It was interesting to parse Pomodoro timer data and display charts on the screen of an Android phone. Well, you need to sleep well))))

It all eats up a hell of a lot of time.

So it goes...



scherbakov.​al

Khuja Wangtishvili

The package with the boards was received by a friend of mine in a neighboring country. Soon she will come to me!


Khuja Wangtishvili

scherbakov.​al good. We will be a
Waiting for update🙂

BTW, are you living in Russia?



Khuja Wangtishvili

scherbakov.​al
If possible, please write to me on PM, I have one topic to you. Thanks 🙂



DavisB

scherbakov.​al

That's very nice!

Would you mind explaining how does it work?

Why does it have LM393 voltage comparator (another elements) per key/optical sensor, etc?


CyberGene

scherbakov.​al congrats, that’s a great result already! How does it work, have you used an existing design or it’s your own design?


scherbakov.​al

DavisB

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!


CyberGene

scherbakov.​al I would like to express my gratitude for the inspiration your project provided!

Thank you 🙂

scherbakov.​al shift registers and what follows them along the signal path had to be invented by myself.

That’s quite interesting although I’m not sure I understand it but I had to just read what shift register is, so maybe I need more time to think of it.

Do you use trimpots to set the comparator voltages?

Again, great job! And excellent playing 👏🏻


DavisB

CyberGene
I suspect it's a parallel in, serial out shift register which captures results from multiple comparators and then shifts them out one by one using a clock signal. (it's another way to do multiplexing to save pins)

The main question I had is where does the two reference voltages come from? Are they fixed voltages same for all sensors (coming from resistors/voltage dividers?), are there trimpots (or digital trimpots), or something else entirely?

What's the element with five feet in the schematic?

I like this design (if I understand it correctly), as it's a simple design that can be done fairly cost effectively on a SMT line.

QRE1113 functionally equivalent sensors can be had in bulk (200+) for 6-7 cents a piece and LM393 3 cents a piece (or quad LM339 versions for slightly more)

The instrument works very well, very beautiful playing too. Great job!


SouthPark

DavisB The main question I had is where does the two reference voltages come from? Are they fixed voltages same for all sensors (coming from resistors/voltage dividers?), are there trimpots (or digital trimpots), or something else entirely?

That's a good question, as an object hypothethically at the same physical distance from two different sensors of the same type/model/fabrication process etc might not output (from the sensors) the same ballpark voltage. But this is where everybody already put in the hard yards in thinking and strategy. That's where the fun and challenges come in, which makes projects like this fun to get into.

Keeping track of the states, and keeping all possible conditions covered is certainly important. Otherwise end up with what happened with the NU1X. Niggling issues due to not having a system that covers all bases properly.


scherbakov.​al

CyberGene

CyberGene That’s quite interesting although I’m not sure I understand it but I had to just read what shift register is, so maybe I need more time to think of it.

yes, DavisB discloses information.

CyberGene Do you use trimpots to set the comparator voltages?

I used trimming resistors to find out the required resistance value to switch the comparator at a given distance from the qre1113 sensor. This way I found out the required resistance values and subsequently used them on the boards.


scherbakov.​al

DavisB The main question I had is where does the two reference voltages come from? Are they fixed voltages same for all sensors (coming from resistors/voltage dividers?), are there trimpots (or digital trimpots), or something else entirely?

Voltages are generated by resistors with predefined values. But the question is, are the voltages the same? Ha! now I don’t know) .. this needs to be checked. I didn't think about it and didn't know. Thank you. Need to check.

DavisB What's the element with five feet in the schematic?

"five feet" I don't understand because of the translation. Please clarify.


scherbakov.​al

CyberGene

CyberGene Опять же, отличная работа! И отличная игра👏🏻

Heh.. the work is exciting, but the game.. something chattered from my student days.. I need to study more! Having practiced on this keyboard and learned pieces on it that we had to play at work, we, together with our oboist students, successfully performed at the competition. I am glad.


scherbakov.​al

SouthPark That's a good question, as an object hypothethically at the same physical distance from two different sensors of the same type/model/fabrication process etc might not output the same ballpark voltage.

I have to check this out. Voltage is supplied in the middle. Maybe the tension gradually sags a little towards the edges. Perhaps because of this, the distances at which the comparators operate are shifted. This should be checked.


SouthPark

scherbakov.​al Thanks for checking! For the photo-diodes and/or photo-transistors, if their performances etc are different in the different devices (of the same model and type etc), the output voltages could possibly be different, as in percentage differences could be significantly different. I got to order some of those devices to check out for myself later.

And in some other thread, I mentioned that I'm still on the long-haul wait (could be ages or forever) for absolute rotary optical encoders that a flat and compact enough - and haven't quite thought about physical coupling to key mechanisms yet hehe .... but the idea is to use absolute optical encoders for all or part of the tracking of key-mechanism position. Could possibly be used in conjunction with the optical velocity sensing device (based on that proximity sensing and timing measurement between two sensed pulses).


scherbakov.​al

I have not yet measured the power supply on the comparators, but I remember that there is definitely some voltage drop on the LEDs. And on the other edge of the board from the voltage input there is some voltage drop. If you look at the LEDs through a camera (to see this radiation inaccessible to the eye), it seems like they all shine the same way. But I also looked at the boards with a thermal imager and yes, the sensors on the edges of the tool get a few degrees cooler than those closer to the power input. But when I installed the boards by adjusting the distance to the hammers, I did not visually detect any noticeable difference in the distance at which the sensors were triggered. Also, when playing, we have not yet discovered any differences in the operation of the central keys compared to the outer ones.


« Previous Page Next Page »