# Using a potential divider to connect 12V input to 3.3V components

I'm planning a project which will involve converting an old pipe organ console into an electronic MIDI controller. I intend to use a Teensy 4.1 in conjunction with an array of shift registers to control the many inputs and outputs required.

Each key on each keyboard (there will be between 2 and 4 keyboards, each with 61 keys) is fitted with phosphor bronze contacts which act as a push-to-make switch when a key is pressed. I have been informed that these will not work reliably at 3.3V and were intended for use at 12V. To overcome this I am thinking of using an external 12V power supply along with a simple potential divider at each shift register (74HC595 EDIT: 74HC165) input pin to reduce the voltage level to ~3V:

The shift register Vcc and ground pins will be connected to the microcontroller (at 3.3V). Please correct me if I'm wrong but I think this arrangement will enable both the higher potential switching at the keyboard contacts and also the lower ~3V input required at the IC level.

I understand that a ratio of 3:1 for R1:R2 is required to reduce the voltage from 12V to 3V (slightly less than 3.3V to allow for fluctuations), and that the absolute values of R1 and R2 then determine the current draw. So values of R1 = 9k and R2 = 3k will result in a draw of 1 mA when the key is pressed. Larger resistance values therefore mean improved efficiency, i.e. less power wastage? Note also that I expect the phosphor bronze contacts which constitute the switches will have a substantial resistance of their own, which I will measure when I acquire the instrument. I understand I will have to factor in this resistance and the associated voltage drop when determining the values of R1 and R2.

The switches are arranged in parallel circuits, so I don't believe that opening/closing one should have an effect on the other parallel branches? If the current draw when the switch is closed (as determined by the R1 and R2 values) is << than the current rating of the power supply then the current should be fairly constant in each branch regardless of how many keys are pressed?

My background is (clearly) not in electronics. I would appreciate any critique/corrections of this proposed plan and any advice on alternative solutions etc. I will be assembling the electronics by hand, most likely using stripboard and soldered components, so a straightforward solution would be ideal.

• 1 mA wetting current may be insufficient for the switch contacts. Apr 19 at 11:21
• @Andyaka thanks for the comment- I guess I could determine experimentally what current is needed for reliable operation. But I'm correct in thinking that by keeping the resistance values high I am reducing the power consumption & hence running costs? Apr 19 at 11:27
• I would hope that the "substantial" contact resistance of the switches would be in the milliohms range - nothing to affect your calculations. Apr 19 at 11:31
• If the switches are individually accessible and removable, it may be possible to clean and hard-gold-plate each contact point; then it should work reliably at 3.3 Volts. Suggest the expertise of a plating company if possible, at least for an analysis of feasibility (phosphor-bronze should be plateable, but there may be caveats only they know.) Apr 19 at 12:02
• Reducing the current through the voltage divider will reduce power loss. However the output voltage will also be more susceptible by the load (here the shift register). The shift register will effectively put a resistor in parallel to the lower resistor of the voltage divider and therefore alter the ratio. Edit: I checked the datasheet of the 74hc595 and the input pin current is 1uA. So it should be negliable for this application. In this case the switch contact resistance will have a greater effect on the ratio. Apr 19 at 12:09