Author Topic: Sharing Button input between two microcontrollers  (Read 28484 times)

0 Members and 1 Guest are viewing this topic.

Offline 24602Topic starter

  • Contributor
  • Posts: 28
  • Country: au
Sharing Button input between two microcontrollers
« on: June 26, 2023, 12:03:26 pm »
Hi All

Ive got a project with two microcontrollers (redundancy)

Button connected to both microcontrollers. Internal pull-ups on the micro inputs. Button goes to GND when closed. This works but not ideal.

What would be the best way of sending that button signal to both controllers in the event that one micro dies or shorts the input HIGH or LOW?

 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4288
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Sharing Button input between two microcontrollers
« Reply #1 on: June 26, 2023, 12:04:52 pm »
Simple 74 series buffers/inverters with a series resistor at the ouputs.
 

Offline Damianos

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: gr
Re: Sharing Button input between two microcontrollers
« Reply #2 on: June 26, 2023, 08:06:52 pm »
Two diodes with the cathodes connected to the button and the anodes, via resistors in series, to the inputs.
 

Offline 24602Topic starter

  • Contributor
  • Posts: 28
  • Country: au
Re: Sharing Button input between two microcontrollers
« Reply #3 on: June 28, 2023, 02:52:35 am »
 Like the attached image?
« Last Edit: June 28, 2023, 03:34:46 am by 24602 »
 

Offline Shonky

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: au
Re: Sharing Button input between two microcontrollers
« Reply #4 on: June 28, 2023, 02:59:32 am »
Don't you mean Cathodes to the micro instead like attached image?
Your diagram has the cathodes going to the switch.
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 721
  • Country: sc
Re: Sharing Button input between two microcontrollers
« Reply #5 on: June 28, 2023, 03:28:01 am »
You don't even need any diodes.

Change resistor values to your preference. Keep R1/(R2||R3) small enough to make sure the common point still above VIH(MIN) when one of the IO stuck low. Beware of "always on" internal pullup like STM32's 40kΩ on reset pin, picking a too high value for R2 and R3 may cause IO pin to not go low enough below VIL(MAX) when needed.
It was for reset circuit so you probably also don't need the caps, although it's still nice to have for debounce.
« Last Edit: June 28, 2023, 04:00:55 am by ArdWar »
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 10429
  • Country: gb
Re: Sharing Button input between two microcontrollers
« Reply #6 on: June 28, 2023, 10:50:35 am »
If you want true redundancy, you might want to go for a double pole push button. It might limit your choice a bit but the button contacts are probably one of the less reliable elements in the system.
Best Regards, Chris
 
The following users thanked this post: Ian.M

Offline DarkMode

  • Contributor
  • Posts: 45
  • Country: au
Re: Sharing Button input between two microcontrollers
« Reply #7 on: June 29, 2023, 08:04:32 am »
Howdy, from my basic understanding, if the Button Pulls Low (Ground), and the Micro's are both pulling up 'High'. Pushing the Button will draw energy from BOTH pins of the Micro.

I think they will both 'short' and flow the energy to the Ground (via the button), you might have to add a resistor after in the circuit to stop it from Shorting too quickly, but that's my Guess.

Corrections welcome  :-+
This one, a long time have I watched. All his life has he looked away, to the future to the horizon. Never his mind on where he was, what he was doing, HA! Adventure Ha, excitement Ha ... you are reckless - Yoda
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf