Author Topic: interfacing 3.3V uC with 5V radio using keypad style buttons  (Read 309 times)

0 Members and 1 Guest are viewing this topic.

Online doublec4

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ca
interfacing 3.3V uC with 5V radio using keypad style buttons
« on: January 20, 2021, 11:52:59 pm »
Hi all,

I would like to use a 3.3V controller (Arduino) to "push the buttons" on a 5V radio. The radio uses key pad (carbon pill) style buttons to close the contacts. How can I get the 3.3V Arduino to essentially "push the buttons" with the minimal number of parts and not damage the Arduino by putting 5V through it's digital pins? A friend suggested putting the two sides of the keypad across a transistor/mosfet and using the Arduino on the base/gate of the mosfet... although I think this would work, a big mosfet seems like overkill to do this and then I would need one for each button on the radio...

Is there a simpler way?

Thanks!
 

Offline EEauroro

  • Contributor
  • Posts: 11
  • Country: au
Re: interfacing 3.3V uC with 5V radio using keypad style buttons
« Reply #1 on: January 21, 2021, 04:19:13 am »
1) Can you identify the ground of the 5V radio. If yes, can you connect the ground of the 5V radio to your arduino ground ? Note: By connecting these two, you may introduce some ground loops that may affect reception / cause interference

2) Check if one side of the keypad is internally connected to the ground of the 5V radio.

3) If yes, Check if the GPIO of the arduino is 5V tolerant (some are). If it is, try to configure the GPIO output pin to be "Open-Drain" and connect the GPIO output of the arduino to one side of the tactile switch. The other side connect to your arduino ground. Polarity is important

4) This should work.
 

Offline mvs

  • Frequent Contributor
  • **
  • Posts: 357
  • Country: de
Re: interfacing 3.3V uC with 5V radio using keypad style buttons
« Reply #2 on: January 21, 2021, 09:13:27 am »
Is there a simpler way?
Keypads are usually multiplexed. You can connect column and row lines throught 1K resistors to atmega and demultiplex keys in software.
You may use Pin Change Interrupts to track level changes on strobe lines and assert correct levels on data lines.
 

Online VEGETA

  • Super Contributor
  • ***
  • Posts: 1457
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: interfacing 3.3V uC with 5V radio using keypad style buttons
« Reply #3 on: January 21, 2021, 12:01:26 pm »
maybe look for voltage level shifter ICs, they are available with Arduino stuff. or just use transistors.

Online doublec4

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ca
Re: interfacing 3.3V uC with 5V radio using keypad style buttons
« Reply #4 on: January 21, 2021, 11:16:27 pm »
Thanks guys,

After prodding around a bit, I believe what is happening is that the one side of the button is constant 5V and when the button is pressed the line is pulled to GND and whatever controller on the radio then recognizes it as a button push.

I've used the ULN2003A a bit in the past... was thinking of putting the 5V sides of the buttons into the output/load side of the ULN2003A and my 3.3V arduino inputs into the input side... then configure my GPIO pins to pull the radio buttons to GND through the ULN2003A.

This way the Arduino is somewhat isolated from the 5V radio... and no resistors needed going into the ULN2003A because datasheet shows base resistors are built in... so its still pretty compact. What do you guys think?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf