I am planning out a midi controller because not enough of those exist. Down to my inexperience please point out some gotcha I may be missing.
The short version of what I am doing.
Basically 16 hall sensors connected to an analog multiplexing board. From there scale the output to 0-2.9 volts, and the read it with the ADC on a microcontroller. Adding resistors and a diode along the way to limit current and prevent negative voltage.
The long version of what I am planning is~
I would power it from a power bank 5v 2amp(min 4.7v to max5.5v). I would be reading with 3.3v logic micro controller. Probably esp32.
The main feature is 16 hall effect sensors for reading long spring loaded buttons like a trumpet.
Most hall effect sensors want higher voltage (5v typically) and around 5ma of current.
49E seems a good choice for supply voltage 2.3v to 10v. It outputs 2.5v to 4.2v or 2.5v to 1v. 1200gs range.
44E seems good too. It wants 4.5-5.5v in. Outputs 0.12v to 2.5v and 2.5 to 4.88v. A greater range of linear voltage to magnetic field. 1700gs range.
These 16 hall effect sensors should be in parallel. Shared power rail, shared ground. A large resistor should be on the input +5v 2amp power rail. 846 ohms spits out as the answer for 5.5v and 6.5mA. But I am not sure if that is the correct calculation when it is 16 sensors in parallel.
I imagine 900 ohms would be a safe number which would be cut down to 800 or 700 if I am drawing too little current.
Next it seems people put a 10k or 20k ohm resistor between the first and third pin of the sensor. Pin 1 being +voltage, pin 2 ground, and pin 3 output.
Then some people also put 0.1uF capacitor between pin 3 output and pin 2 ground. Maybe that is to help cut down on noise/smooth the signal.
I would then connect the 16 hall sensors to a 1$ analog muxer board.
The output of that would connect to an op amp resistor configuration as described by this Texas Instruments excel sheet. https://e2e.ti.com/blogs_/b/analogwire/posts/three-ways-to-scale-an-analog-input-signal
The resistors chosen would be relatively low because there would be no further need to lower current. The reference voltage I plan to be 3.3 from the microcontroller.
The output of 2.5-4.88 or 0.12v to 2.5v would be scaled to 0v to 2.7v. I am only interested in reading one or the other. They represent either reading a North or a South pole magnet but in my case it is only ever going to be one side or the other. A different poled reading would have to come from someone sticking a magnet up to the instrument. Which I have to assume is a possibility.
Given that I think I should chose the 2.5-4.88 power range because it has a higher balance vcm value. That way if 0.12 to 2.5 volts get fed in it won't go over 3.3 v out but might go negative volts. So I plan to add a diode on the output then it should stop reading anything below 0 volts.
Would there be problems with the signal if I hook these 5v 5mA sensors up to an analog multiplexer and then amplify/scale the output on the other side with an op amp and then read it with a microcontroller like an esp32.
Is this or anything else I missed going to be a problem. I am sorry if this is not a good question.