49 votes

How did people realize they could do logic with electronics?

From the Wikipedia article, Boolean algebra: In the 1930s, while studying switching circuits, Claude Shannon observed that one could also apply the rules of Boole's algebra in this setting, and he ...
The Photon's user avatar
  • 129k
34 votes

How did people realize they could do logic with electronics?

As with so many other important developments in logic and computer science, it was almost certainly the mathematician and philosopher Charles Sanders Peirce, whose work predated Shannon's by decades: ...
Mark Dominus's user avatar
29 votes
Accepted

How to convert a digital signal from 24V to 5V

If this is for an industrial project you are probably better off using an opto-isolator to do your conversion. It provides several benefits. Current loop on input side is impervious to common mode ...
Trevor_G's user avatar
  • 46.6k
25 votes
Accepted

Replace BSS138 with AO3400A in level shifter circuit

TL;DR; It will work, but it will be slow. Probably no more than 200kHz data rate. \$R_{ds(on)}\$ is irrelevant in this circuit to be honest. The channel resistance essentially acts as a potential ...
Tom Carpenter's user avatar
25 votes
Accepted

What does the voltage of an I/O pin mean?

In the case of an input, it means don't connect a voltage higher than 3.3V to the pin. In the case of an output, it usually means that the pin will output either 0V (or close to), or 3.3v (or close to)...
Tom Carpenter's user avatar
23 votes

Does a BJT controlled relay need protection diodes?

You are pretty close, except your transistor is upside down. You should also add a diode across the relay coil contacts to avoid back EMF and a resistor on the base of the transistor. simulate this ...
Ron Beyer's user avatar
  • 2,578
22 votes
Accepted

7400 series CMOS vs 4000 series logic IC

The difference depends on your system definition. On the one hand, 74HC operates over a limited voltage range, with 6 volts specified as the maximum supply voltage. The CD4000 series, on the other ...
WhatRoughBeast's user avatar
17 votes
Accepted

Logic-level transistor not switching

If the lamp is really 0.75A @ 5V, then it's resistance is closer to 7 ohms (when hot). The Vgs of 2.5V is the threshold, where it will just start to conduct, so you have not chosen a good MOSFET. ...
Mattman944's user avatar
  • 15.7k
14 votes
Accepted

What's the purpose of this diode in this level-shifter?

One purpose for that diode is to block a leakage current path if the +3VRUN rail is powered up but that the +5VRUN rail is not powered up. Allowing an unpowered rail to get leakage current from other ...
Michael Karas's user avatar
14 votes
Accepted

What design decisions must I make to select a suitable P-Channel MOSFET

I need a PFET with a logic level gate to trigger a power connection to a hobby servo that pulls more current than my MCU pin can handle. ... I'm trying to understand how to go about designing the ...
Russell McMahon's user avatar
  • 150k
12 votes

Does a BJT controlled relay need protection diodes?

You are close. Your transistor is upside down and you need a base resistor. You should also add a fly-back diode to protect the transistor. simulate this circuit – Schematic created using ...
Trevor_G's user avatar
  • 46.6k
12 votes

Driving a 74HC245 in one direction with 3.3V when Vcc is 5V

There are 74HC devices and there are 74HCT devices. The HCT device works with TTL levels at the input: - Guess what the "T" might stand for. If you can swap-out the HC for a HCT you'll be good to ...
Andy aka's user avatar
  • 453k
11 votes

Logic-level transistor not switching

I found the FQP50N06L to have a max Vgs of 2.5V, so it should work (right?). 2.5 V is not the 'max' Vgs, it is the threshold voltage at which the FET should draw at least 250 uA when Vds is 2.5 V, ...
Bruce Abbott's user avatar
  • 56.2k
10 votes

Why are so many pins of 8086 active-low?

In the TTL era, active low was the standard. The old NMOS parts like the 8086 were designed in that time period- note that the input levels are TTL-compatible Vih=2.0V and Vil=0.8V. Active-low ...
Spehro Pefhany's user avatar
10 votes

How to shift-up logic signal from 3V3 to 5V for NeoPixel

Here's quite a simple one and it is bi-directional too: - When the data input from the 3.3 volt side is low, U1 turns on and connects the right hand data pin to the input data pin hence the output is ...
Andy aka's user avatar
  • 453k
9 votes

How did people realize they could do logic with electronics?

As far as "eureka" moments go, I think the application of Boolean logic to electronics became inevitable the moment Boolean Algebra was formalized by George Boole in ...
MaxPRafferty's user avatar
8 votes

Help understanding 3.3v logic vs 5v logic with Raspberry Pi GPIO

From RPi 3.3V to 5V input, depends on the input IC's Input Logic High minimum. Most ICs are 0.7 * VCC, or 3.5V. So the 3.3V won't be enough to register as a Logic High. Some ICs are 0.6 * VCC, or 3V. ...
Passerby's user avatar
  • 73k
8 votes

How can a Switching diode act as a level shifter?

If the TxD output is high the diode is reverse biased, i.e. it blocks. The voltage at RxD is given by the 10k pull-up resistor connected to \$V_{DD}\$ (the lower positive supply voltage). If TxD ...
Curd's user avatar
  • 16.3k
8 votes

Gate resistor with "logic level" MOSFETs

If you're driving a gate directly with an MCU output you don't really need to worry about adding external resistance to the gate in most cases because the outputs are so weak they'll be the equivalent ...
Spehro Pefhany's user avatar
7 votes
Accepted

Interfacing open-collector optoisolator to 3.3V microcontroller

That open collector output V o is not pulled up internally according to the datasheet. Zero mention of it, and every diagram shows a simple npn open collector. Power the VCC at 5V, and pull up V o ...
Passerby's user avatar
  • 73k
7 votes

How did people realize they could do logic with electronics?

This excellent Atlantic article answers your question at length. Here's the closest thing to a Eureka moment: Today, Boole’s name is well known to computer scientists (many programming languages ...
Biro Cash's user avatar
7 votes
Accepted

ESP32 logic HIGH/LOW level voltage, not working?

The spec says that the input is guaranteed to be read as a Low below 0.25 Vdd, and as a High above 0.75 Vdd. It does not specify where the actual switching threshold is - from the spec, we only ...
Peter Bennett's user avatar
7 votes
Accepted

Driving a 74HC245 in one direction with 3.3V when Vcc is 5V

This will not work reliably. If you look at the TI datasheet you will see that \$V_{IH}\$ is specified at \$3.15\$V when \$V_{CC} = 4.5\$V, and it is clearly a strong function of \$V_{CC}\$. If we ...
Elliot Alderson's user avatar
7 votes

Logic level converter from 29V to 5V schematic

any improvements or suggestions? Instead of all that complication, what about two resistors forming a potential divider: - simulate this circuit – Schematic created using CircuitLab
Andy aka's user avatar
  • 453k
7 votes
Accepted

Switching line between 5 V and ground using a 3.3 V signal

The hard way: A single transistor can only pull that "central" node down to 0V, or pull up to +5V, not both. That's why a single transistor level translator can't work here. You will require ...
Simon Fitch's user avatar
  • 33.1k
6 votes

What design decisions must I make to select a suitable P-Channel MOSFET

5v 16MHz ATmega168 Arduino Pro Mini A 5V Arduino's digital output level is 0~5V, so you want a FET that turns on fully with this voltage. It should be specified as 'Logic Level' or '4.5V Gate ...
Bruce Abbott's user avatar
  • 56.2k
6 votes

Logic-level transistor not switching

2.5V is the gate-source voltage threshold which is where it just barely starts to turn on. You want your applied voltage to be considerably higher than that. Go by the gate voltages used to obtain the ...
DKNguyen's user avatar
  • 56.4k
6 votes
Accepted

Is there a component/method that can take any signal, then increase it to 5 volts no matter how small the signal is?

It's called a comparator, which is basically an op-amp optimized to provide as much gain as possible under all circumstances; So much gain that it provides maximum or minimum output and hits its power ...
DKNguyen's user avatar
  • 56.4k
6 votes
Accepted

Logic level converter from 29V to 5V schematic

Andy Aka's solution of a simple potential divider is what I would do, but your circuit will work too. R4 is redundant, you can replace it with a direct connection between collector of Q1 and base of ...
Simon Fitch's user avatar
  • 33.1k

Only top scored, non community-wiki answers of a minimum length are eligible