Velocity-sensitive, contactless MIDI keyboard with polyphonic aftertouch for Teensy synth

Yes, the purpose of those transistors is to allow to implement power saving. Since there are lots of Hall sensors their total power consumption might be >300mA. The idea for those was to enter power-saving mode when keyboard is not used for extended periods of time. There is also 0.5V voltage drop on those transistors that is actually good so I limit output voltage of Hall sensors.
 
Last edited:
Yes I thought I needed extra protection, but then I checked 4067 analog multiplexer data sheet. https://www.ti.com/lit/ds/symlink/cd4067b.pdf
Every input is protected internally (see below) and since I am using Vdd=3.3V supply for the analog multiplexer, I seem to have that covered, especially considering the fact that I am supplying SS49E with something like 4.5V only (note bipolar transistor keys in the schematics) and at full swing SS49E outputs not more than 3.8V, so I am within 4067 specs.

View attachment 35192
That only protects the digital signal inputs, not the analogue signals. Note the asterisk that is on each of the digital control pins.
 
As I wrote: spec say max voltage on any pin Vdd + 0.5V. I am within specs even under most extreme situation (wrong assembly, reverse orientation of magnets, keys with wrong orientation pressed to max).
Under normal operation I am always below 2.5V.

I guess that if I ever made this "commercially" I would put those extra diodes just for the "peace of mind", but with my prototype build, I am not worried.
 
Last edited:
As I wrote: spec say max voltage on any pin Vdd + 0.5V. I am within specs even under most extreme situation (wrong assembly, reverse orientation of magnets, keys with wrong orientation pressed to max).
Under normal operation I am always below 2.5V.

I guess that if I ever made this "commercially" I would put those extra diodes just for the "peace of mind", but with my prototype build, I am not worried.
You want to protect the Teensy from over voltage. It didn't want more than 3.3V on its ADC pins. The AH49E can send +5V and the CD4067 can pass it through without the clamping that you had previously assumed so you can get 5V at the Teensy. You can test this by disconnecting from the Teensy then applying a reverse magnetic field to a sensor then measuring the voltage at the output of the CD4067.

Of course you may remain lucky that the sensors don't come near to a reverse polarity magnet but someone may put a loudspeaker near the keyboard at sometime and kill the microprocessor.

I considered some ideas to mitigate this risk, including:

- Driving the AH49E from 3.3V. This reduces the range and hence resolution. I am testing this now.
- Controlling the CD4067 enable pin from it's output. This may cause it to oscillate.
- Clamping the output of the CD4067. Probably the _right_ thing to do.
- Adding 5V to 3.3V converter at output of CD4067. Probably not linear.

Anyway, I have some magnets and sensors so will play with them to see what works. Thanks for the ideas and inspiration.
 
Apparently you did not notice what I wrote before.
Teensy never sees voltage above 2.5V in real life at the analog input.
I would need to get the assembly completely wrong to get anything above 2.5V.
Typically you don't protect circuits against wrong assembly.

And you are overestimating those "loudspeaker fields" as they fall off with at least (distance)^3 factor.
To get anything above 3V I would need to put Hall sensor INSIDE loudspeaker.
That would never happen.

The schematic I have sent in the first post did not show the microcontroller part. In fact I do have Schottky diodes
between analog input of microcontroller and +3.3V, but even then, Schottky diodes have still something like 0.3-0.4V dropoff voltage
and would only clamp voltages above 3.3V+0.4V = 3.7V.
In the circuit I have shown such voltages simply don't exist, since SS49E output swing is Vdd-1V and Vdd for Hall sensors in my circuit is NOT 5V. It is 4.5V due to collector-emiter drop on Q1/Q2 transistors used in power circuit. So in practice, even in worst case the output at SS49E would be 3.5V. Which is below what those protection diodes would even react.

Anyway my project works fine already, I have fully working keyboard, playability is excellent, much much better than mechanical solution.
 
Last edited:
Back
Top