Serial inverter

I didn't really understand the schematic that well, if possible could you put it in words?

1 Like

But you said

So how do you know if my suggestion is any more or less of a headache than the thing you don't know how to do?

OK. The schematic shows an NPN transistor with Collector connected the input pin and the Emitter connected to Ground. This is a classic "Open Collector" output and thus needs a pull-up resistor (shown as "R2") between the input pin and Vcc. A resistor value between 1000 and 10000 will work. In the diagram it says Vcc is 3.3V but if you are using a 5V Arduino then 5V would be better. When the transistor is turned on by applying a HIGH signal to the Base, it drags the pin to Ground and reads LOW. When the transistor is turned off by applying a LOW signal to the Base, the pull-up resistor (R2) pulls the pin HIGH. The Base-Emitter junction acts like a diode, trying to ground your input signal. If you drive the Base directly it will draw a lot of current and heat up. That is why R1 is between the input and the Base. A value between 300 and 1000 is about right.

because a transistor is a fundamental circuit element and a logic gate circuit makes things more complicated.

Understood, thank you very much.

k-ohms or just ohms?

I have mosfet and PNP transistors with me, will that work instead of NPN or will I have to buy NPN transistors?

I didn't say 'k' so just ohms. 1k to 10k.

An N-Channel MOSFET will work. Collector becomes Drain. Emitter beomes Source. Base becomes Gate.

If you have any older electro-mechanical toys around they likely use a bunch of NPN transistors to drive motors and lights. :slight_smile:

For the designer of the logic gate circuit, it was. But they have done all the hard work, making it easier for you to use than a transistor circuit.

But whatever, your plea of ignorance in your first post now feels like an attempt to manipulate the forum members into helping you, which they would have done in any case!

That's interesting because I have always found logic gates easier to understand than transistors. No PNP, NPN types to understand, no confusingly named Collector, Base and Emitters to deal with and no resistors controlling current required at various points.

Instead, just simple inputs and outputs, either HIGH or LOW and nice simple concepts to deal with such as AND, OR and NOT

Obviously each to their own

1 Like

Okay, I'll have a look. Will most likely have some NPN transistors somewhere.

I would have a bought one of the chips that @PaulRB suggested just for kicks, but the availability is next to zero in India.

Reason I prefer using a transistor circuit as opposed to a logic gate circuit is because of the fact that I've been using transistors forever effectively.

I'm not denying the hard work of the creator of the logic circuit, but that hard work is no reason for me to use one rather than something of my own preference.

Might be simpler for you, but not for me. Good day!

I guess I'll try the logic circuit just for kicks, found one available.

will this work? if so, what is the schematic for it? I was able to figure out how to power it, but not too sure how it will connect to the RX pins.

The chip contains 6 inverter gates (hence the same "hex") but you will need to use only one of these, it does not matter which one you choose. Connect it's input to the output of your voltage divider and it's output to the Rx pin on the Arduino. Don't forget to connect a 0.1uF ceramic bypass cap close the the power pins of the chip.

I wont be using a voltage divider as I'm powering the board through the RAW pin.

So only three connections between the IC and arduino? (power, GND, signal)

Secondly, the wire from the receiver will first go to the IC and then to the arduino correct?

additionally what did you mean by this? Connect a 0.1uF ceramic bypass capacitor to the power pins of the logic gate IC?

You will need to voltage divider, regardless how you power the Arduino.

If you power the Arduino through the raw pin, you need at least 6.5V, if it is an Uno/Nano/Pro Micro, otherwise the Arduino will be running on less than 5V. But in practice the Arduino may run ok on, for example, 4.5V. Test powering the Arduino with your 5.9V to see what voltage you get from the 5V pin. Calculate your voltage divider to output that voltage.

Yes, if by "power" you mean the 5V pin (even though it may be a little less than 5V).

The wire from the receiver goes to the input of the voltage divider. The output of the voltage divider goes to the input of the inverter gate. The output of the inverter gate goes to the Rx pin of the Arduino.

Yes, the cap should be as close to the IC's power pins as is practical.

why is that?

on the inverter gate, what pins can I use as input signal apart from VCC and GND?

one end to GND and one to VCC correct?

also, my local dealer has 74HC147 and 74HC595 in stock, will those work?

With any digital chip, like with Arduino, you must not connect a data signal to any pin which is a higher voltage than the chip's Vcc pin, otherwise the chip can be damaged.

In your circuit, the IC will be powered by, let's assume, 4.5V. So your voltage divider must reduce the 5.9V signal to 4.5V for the IC's input pin.

The 6 inverter gates in the chip are identical. Connect the voltage divider output to the input of whichever gate you choose.


No. You need any 74hc00- series chip containing simple, inverting, logic gates. The 74hc04 you found on Amazon, for example.

Another example is 74hc00, which is quad nand gates. A "nand" gate is an and gate with an inverted output. Connect one of its inputs to Vcc and you can use it as an inverter.