AlexanderBunt
For now, I try to remake your video (linked it below), but I cant't get the code right. Maybe you can help me with this? Like maybe you have that code anywhere, so you can send it me…?
For now, I try to remake your video (linked it below), but I cant't get the code right. Maybe you can help me with this? Like maybe you have that code anywhere, so you can send it me…?
AlexanderBunt I've forgotten almost anything about those early prototypes but from the video I could see the name of the program is "CNY70_Velocity_test_02" and so I found it on my computer.
It uses the Teensy development board which is also Arduino-language compatible.
Hello,
@AlexanderBunt Lovely project!!
If your are going to use an actual 'fist-pounding' manual like in your picture, then perhaps:
This is all just spontaneously from the top of my head, I am not yet among the microcontroller experts!
Cheers and happy pounding,
HZ
CyberGene Thank you very much! Yes, I understand the point haha, but for me this is very helpful… ;-)
HZPiano Hmm that is interesting. What you say is not realy what I need (because sometimes the carillonneur makes just very little movement with the key (only like 1cm up and then again press the key down to hit the bell). So de measurement of the movement has to be very small, thats why I think sensors like the CNY70 would be very suitable.
Thanks for the help and I will keep you posted!
AlexanderBunt only like 1cm up and then again press the key down to hit the bell
Hello,
Hmmm. Thinking about an actual carillon, I started to suspect that while writing.
Essentially, that is why in digital pianos 3 sensors instead of two, or even optical/continuous sensors are in vogue. And you'll need what is called analogue inputs on any microcontrollers you'd select for your project.
There, @CyberGene 's and @RIP 's project sure will give you lots of great clues.
Cheers and happy idea development,
HZ
CyberGene It's a pitty, but I can't get my sensor working. When I check my serial monitor, it only puts out '1 0', which (I think) is a result of a malfunctioning ciruit, or false components. See the the two pictures below for my circuit.
I see I made a mistake with the wiring for the sensor (blue and white wire not on the same line), but I fixed that and it didn't solve the problem…
You might get some ideas from the Pipe organ community. There are sellers of premade hardware although I don't know how much would be applicable.
https://web.archive.org/web/20180201185251/http://www.pykett.org.uk/completed_work.htm
https://forum.hauptwerk.com/viewforum.php?f=15
https://organforum.com/forums/
n-player Yeah maybe, but isn't this all without velocity?
HZPiano that is why in digital pianos 3 sensors instead of two
Is that for calculating velocity, even when the key has not been fully released?
AlexanderBunt When I have more time I will try to check your circuitry, I found one image of an earlier prototype with Arduino instead of Teensy which might be helpful for the wiring:
Also, I remember with the Teensy there were some stuff you had to enable in the Teensyduino for it to work properly, maybe the serial communication needs a specific configuration?
BTW, do your potentiometers have three connectors on the other side (not visible in the picture)? Because I see they have three on the visible side and you use only the middle one. Mine have two connectors on the left and one (middle) on the right.
AlexanderBunt Exactly that.
(And, in a well implemented (virtual) piano, this makes restriking the 'string' possible without it being dampened first. Raising the key to the full-up position also means the damper is then fully back on the string).
Cheers,
HZ
AlexanderBunt There may be sensors and upstream controllers that have velocity for broader applications.
CyberGene Yeah, three on one side and two on the other side… can that be a problem?
EDIT: Hm I thing there is the problem. I used Rotary Encoders… that's not the way how its is meant to be, I think…
I just bought a few 10kΩ cermet potmeters, which will arrive after the weekend, so I will try again then. Like I said before… I am just starting in this 'world'… ;-)
HZPiano Thank you! There will be many moments of learning during this project, I think. But that's a good thing!
HZPiano And, in a well implemented (virtual) piano, this makes restriking the 'string' possible without it being dampened first.
Yeah I understand that part, but on a carillon, there are no dampeners. Do I still need three 'measure points', or just two?
AlexanderBunt Three sensors (with strategic placement in the key travel to allow the restrike without having to go all the way back to the top, and still have velocity information between the en-route and lower sensors) at least.
Or have optical/magnetic position sensors which, with nifty programming, can do a lot more nuanced things than "just" three sensors. But there, my insights are theoretical rather than practical, but some great people here know a lot more about that.
Cheers and best,
HZ
@AlexanderBunt Ah, doing a carillon is an interestingly different technical challenge.
Some of the key differences I see from doing a piano:
But you still need to measure the instantaneous velocity as the key passes some triggering point?
I don't think using optical reflectance to measure distance is at all appropriate for you. That'll be a pain, and there's no reason you need to constrain yourself with physically small sensors.
My initial thoughts for you would be to use rotary encoders that can attach to existing shafts, like these https://www.cuidevices.com/catalog/motion/rotary-encoders and then measure the angular velocity at the shaft. You'll get clean values which directly correspond to physical motion you can understand. They're expensive, probably starting at $20/ea, likely more with limited availability of everything these days. But it might be possible to connect all the ones you'd need to a single sufficiently powerful microcontroller. That'd make your life quite a bit easier. But some design work, reviewing the interfaces available on those encoders, would be necessary.
Similarly, you could adapt some sort of fine-resolution rotary encoder like you already accidentally purchased to the task.
I'd shy away from potentiometers, if nothing else because you'd need to get a huge number of ADC channels and that is more of a pain in the ass than the casual observer realizes.
You could also apply optical reflectance sensors as they were originally intended to be used. Point one at the side of every key, and put a strip of alternating black and white lines on the key, such that as the key moves the sensor will swing between its minimum and maximum outputs. That'll get you a pulse train proportional to speed. You'd need a tiny bit of clean up on the signal and then it could go straight into a microcontroller. You could almost certainly get away with feeding 77 such signals into a single sufficiently powerful controller.