1
\$\begingroup\$

I have a circuit that has about a 1V input that gets boosted to 3.3V.

To enable the boost converter IC, a switch is pressed which causes the enable signal [EN] of the converter to go high (and stay high, there is more circuitry to latch the signal that is not shown).

After this, I'd like to be able to sample the push button presses with a microcontroller [SW_IN], but the 1V logic level is too low; it needs to be around 3.3V, the boosted voltage.

schematic

simulate this circuit – Schematic created using CircuitLab

I am considering just putting a diode at the output of V1 to prevent any back feeding, but I am a little worried about the signal integrity due to forward voltage drop. The minimum enable voltage for my boost controller is 0.8V, so I'd have to get a pretty low voltage drop diode and am wondering if there's a better solution.

schematic

simulate this circuit

I also considered a tri-state buffer where the boosted voltage turns off V1 and is connected to the switch input.

schematic

simulate this circuit

I'd like the solution to be as inexpensive as possible, so I'm wondering what the optimal and simplest solution would be and if there's options I'm missing.

\$\endgroup\$
  • 1
    \$\begingroup\$ Reading this I am completely confused about what you are trying to achieve, after the first diagram. You want to use the same switch that turns on the 3V3 regulator to be readable by the microcontroller? Is that the issue? \$\endgroup\$ – danmcb Jun 30 '18 at 14:13
  • \$\begingroup\$ Yes, that's correct. Is there a way I can clarify that in my diagram or explanation? \$\endgroup\$ – BTPankow Jun 30 '18 at 14:56
  • \$\begingroup\$ Possible duplicate of electronics.stackexchange.com/questions/382486/… \$\endgroup\$ – Elliot Alderson Jun 30 '18 at 18:59
  • \$\begingroup\$ Don't you have an analog input or comparator input on your microcontroller? \$\endgroup\$ – Dorian Jul 3 '18 at 15:58
3
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. An innocent bystander's interpretation of the question.

It seems that you are trying to describe something as shown in Figure 1. If you can clarify in your question we can proceed from there.

schematic

simulate this circuit

Figure 2. A possible solution.

If V1 is high enough to turn on Q1 then the circuit of Figure 2 might suffice. The switch logic will be inverted but this should be easily handled in software.

\$\endgroup\$
  • \$\begingroup\$ Yes, Figure 1 is a good way of showing what I'm describing. I'm going to edit my schematics to clarify that. Also, your solution is very helpful to me as well. I was stuck thinking I somehow needed both voltages on the same input, but it makes sense just to use a transistor with a low turn on voltage. \$\endgroup\$ – BTPankow Jun 30 '18 at 19:10
  • \$\begingroup\$ Try it out and see if it works. I recommend that you unaccept my answer for a day or two to encourage others to answer. You may get other, better answers. \$\endgroup\$ – Transistor Jun 30 '18 at 19:22
  • \$\begingroup\$ Okay, that makes sense; I'll unaccept for now and do some testing with this. \$\endgroup\$ – BTPankow Jun 30 '18 at 19:42
  • \$\begingroup\$ Looks great. +1. I think I will add another answer that doesn't invert the sense. Worth a look, anyway. Just a supplementary answer to yours. Not a replacement. \$\endgroup\$ – jonk Jul 1 '18 at 4:51
1
\$\begingroup\$

You can avoid the inverted sense in the software using the following schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

The above keeps the sense of the switch.

When the switch is open, the emitter of \$Q_1\$ is pulled down by \$R_1\$, causing the collector of \$Q_1\$ to also be pulled down towards ground. The emitter voltage will be about \$1\:\text{v}-V_\text{BE}\approx 300\:\text{mV}\$. So the collector will be about the same, or perhaps \$ 400\:\text{mV}\$. This should be well below the input threshold of \$SW_\text{IN}\$ for a LOW result.

The main criteria here is that \$R_2 \ge R_1\frac{3.3\:\text{V}-800\:\text{mV}}{1\:\text{V}-V_\text{BE}}\$. So plug in your value for \$R_1\$ and work out the value for \$R_2\$, if you like. (The value for \$800\:\text{mV}\$ comes from whatever you find in the datasheet for your MCU as the worst case LOW voltage value.)

When the switch is closed, the emitter of \$Q_1\$ is at \$1\:\text{V}\$ and \$Q_1\$ is therefore off. So, then \$R_2\$ pulls the input up to the \$3.3\:\text{V}\$ rail.

That's it, really. This keeps the sense the same (HIGH IN = HIGH OUT), etc. (It even has one fewer part than Transistor suggested.)

I'd recommend adding a small base resistor for \$Q_1\$. Something on the order of \$220\:\Omega\$ to perhaps \$1\:\text{k}\Omega\$. But the above schematic is simpler to explain and probably will work okay for your needs.

\$\endgroup\$
  • \$\begingroup\$ @BTP: Despite my username, transistor theory isn't actually my strong point and jonk is much better at it (as well as doing MathJAX instead of sleeping). This is a common base configuration and although common emitter is much more, um, common it would be worth your while studying this and understanding jonk's maths - if you don't already. \$\endgroup\$ – Transistor Jul 1 '18 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.