0

I don't think that there is an easy (or even any) solution to this, but maybe somebody can help me:

I got a GPS module connected to another MCU. The GPS module works on its own and should wake up the MCU when its ready. Therefore, the GPS module has an analog pin that continuously outputs one-second high-level followed by one-second low-level when it is NOT ready (HLHLHL...), and continuously low-level (LLLLLL...) when its ready. The MCU has an input pin that wakes up the MCU on high-level (Hxxxxx...). Obviously, this doesn't fit.

Is there any (easy?) solution to this problem? So I would have to switch HLHLHL... to LLLLLL..., and LLLLLL... to HHHHHH... (or at least Hxxxxx...), so there is at least a short high-level signal, when the GPS module is ready, and no high-level when it isn't. So the analog output of the GPS module has to be inverted.

                        _   _   _   _ 
Input (GPS Output):   _| |_| |_| |_| |____________________
                                           _______________
Output (MCU Input):   ____________________|
  • Other than a monostable multivibrator? – Ignacio Vazquez-Abrams May 15 '18 at 15:57
  • Could you draw some waveforms? this isn't making a lot of sense. You can buy inverters to invert the signal. – Voltage Spike May 15 '18 at 15:59
  • Thanks for tip @IgnacioVazquez-Abrams, I had a short look and this could work – Tobias Mai May 15 '18 at 16:10
  • @TobiasMai: I've added a part of a timing diagram for you. Please edit to clarify what you want to happen. Add four space characters to the start of the line to force {code} formatting. – Transistor May 15 '18 at 16:12
  • @laptop2d: The waveform is HLHLHL... when it should be LLLLLL... (as it is not ready so the host MCU should not be woken up by a H signal). And it ist LLLLLL... when it should contain a H for waking up the host MCU. Waveforms in datesheet page 14/15: https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf – Tobias Mai May 15 '18 at 16:13
  • @TobiasMai HLHLHL means nothing to me and it says nothing about how the signal is progressing through time, what about voltage levels – Voltage Spike May 15 '18 at 16:18
  • @laptop2d: H = 3.3V, L = 0V, each for 1 second – Tobias Mai May 15 '18 at 16:19

1 Answers1

0

Try this:

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Logic low input inverting delay timer.

How it works:

  • When GPS_OUT goes high Q1 turns on and discharges C1. MCU_IN is held low.
  • When GPS_OUT goes low Q1 turns off and C1 starts to charge up via R2.
  • If GPS_OUT stays low for long enough - approximate time constant is given by \$ \tau = R_2 C_1 = 10k \times 100 u = 1 \ \text s \$ - then MCU_IN will read a logic high.
Transistor
  • 168,990
  • 12
  • 186
  • 385
  • Thank you so much! Do you have a recommendation for the transistor (I'm an absolute noob)? – Tobias Mai May 15 '18 at 17:57
  • Pretty much any small signal NPN transistor will do. 2N2222 is the default in the editor so something like that should work. – Transistor May 15 '18 at 17:59
  • What about the other way around? So let's say: When the input is HLHLHL... the output should be HHHHHH...! And when the input is HHHHHH... the output should be LLLLLL...! The import thing is that the output only gets HIGH (3.3V) when the input is switch between HIGH and LOW (for let's say a second or something). – Tobias Mai May 17 '18 at 18:00
  • Well what about it? That's a different question to the one you asked. – Transistor May 17 '18 at 18:31