2019_cargo_present_sensor
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 2019_cargo_present_sensor [2019/02/21 23:57] – [An inverter with one transistor] tell | 2019_cargo_present_sensor [2019/02/24 22:51] (current) – [combining open-drain outputs to make a logic gate] tell | ||
|---|---|---|---|
| Line 69: | Line 69: | ||
| The 2n7000 is a " | The 2n7000 is a " | ||
| - | * Source, which we connect to ground | + | * Source, |
| - | * Gate, an input which controlls | + | * Gate (pin 2), an input. Voltage on the gate controls |
| - | * Drain, | + | * Drain (3), into which current can flow |
| - | When the gate is connected to a positive voltage (with respect to the source) the source and drain are connected, and current flows. | + | When the gate is connected to a positive voltage (with respect to the source) the source and drain are connected, and current flows from drain to source. This causes the output to be low, because any current flows to ground. |
| When the gate is low (near ground potential or zero volts) the transistor is off, and the pullup resistor | When the gate is low (near ground potential or zero volts) the transistor is off, and the pullup resistor | ||
| provides a tiny bit of current to pull the output up to a 5 volts, representing a logic 1. | provides a tiny bit of current to pull the output up to a 5 volts, representing a logic 1. | ||
| - | For a lot more info, see https:// | + | For a few more details on discrete mosfets for logic, see [[mosfet hints]]. |
| Line 88: | Line 88: | ||
| Instead of pullup resistors, we can use a resistor in series with an LED. In fact, we can connect the output of this gate to one of our [[DIO tester and breakout]] boards. | Instead of pullup resistors, we can use a resistor in series with an LED. In fact, we can connect the output of this gate to one of our [[DIO tester and breakout]] boards. | ||
| + | |||
| + | If we build anything with mosfets as a standalone board, we never want to connect a mosfet gate only to an input connector (as drawn above for clarity). | ||
2019_cargo_present_sensor.1550811420.txt.gz · Last modified: 2019/02/21 23:57 by tell
