Author Topic: Microcontroller must deliberately set pin high -- glitch prevention  (Read 909 times)

0 Members and 1 Guest are viewing this topic.

Offline ezalysTopic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Suppose I have a microcontroller that controls some pyrotechnics (specious example). When I turn the microcontroller on, I want to ensure that the microcontroller doesn't blip the pin that sets the firework ablaze. Is the pin state guaranteed during startup? Will an external pulldown do? What are some ways to design in this guarantee?

An overkill solution might be a timer outputting a square wave, followed by a crystal BPF, rectifier, and comparator, as it's basically impossible for the microcontroller to come up in such a way that the thing is configured to emit a square wave of a particular frequency. Any other ideas?
 

Offline Pawelr98

  • Regular Contributor
  • *
  • Posts: 105
  • Country: pl
Re: Microcontroller must deliberately set pin high -- glitch prevention
« Reply #1 on: September 23, 2020, 03:08:27 am »
CD4017 and output on 9.
Would require 9 pulses to set things off.
Continuous output won't increase the counter state.

Or if the pulse is short then just use an RC network with a long enough delay.

Test the particular uC for behaviour of output.
« Last Edit: September 23, 2020, 03:11:02 am by Pawelr98 »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11751
  • Country: us
    • Personal site
Re: Microcontroller must deliberately set pin high -- glitch prevention
« Reply #2 on: September 23, 2020, 03:13:56 am »
That really depends on the MCU type, but generally behavior on startup is predictable. But often the default state is a weak pull-up. But in any case, if your control signal is active high, then just place a pull-down resistor and be done with it.
Alex
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3898
  • Country: us
Re: Microcontroller must deliberately set pin high -- glitch prevention
« Reply #3 on: September 23, 2020, 03:48:01 am »
Most microcontroller start up with most IO pins in a high impedance state.  However during power up when the supply voltage is less than the minimum operation voltage that may not be guaranteed.  A fairly stiff pull down may help here as the intermediate states are likely to be fairly high impedance.  It would be better to have an inhibit circuit that is enforced until the power is good and the micro core has started.  For instance you could do this with a power supply sequencer.  The power for the pyrotechnics only turns on X milliseconds after the mcu regulator power good is active.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8097
  • Country: ca
Re: Microcontroller must deliberately set pin high -- glitch prevention
« Reply #4 on: September 23, 2020, 04:07:30 am »
Use a 2 input and gate with 1 input having a 1uf cap to GND and a 100k series resistor to a uC output as power-good, or enable, or call it your lock/key output.

Share that 1 signal between multiple and and gates inputs for each channel you want to drive a protected output.

Add a backwards diode to VCC on that and gate input to rapid discharge the cap on loss of system power making sure a brownout relocks the and gates..

For each channel, drive the other input of each and gate with an IO.

A bottom end 74HC08 will do and you should not see a pulse to high during powerup.

You will need to drive that series 100k 'un-lock' for a good 2 seconds prior using any of the protected channels.
« Last Edit: September 23, 2020, 04:09:49 am by BrianHG »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf