O'Reilly logo

Extreme NXT: Extending the LEGO MINDSTORMS NXT to the Next Level by Isabelle Hurbain, Philippe Philo Hurbain, Michael Gasperi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7Voltage Sensors

In Chapter 5 you learned that the NXT converts the voltage on a sensor input into a digital value. Until now, the only voltage being converted was the 5V supply inside the NXT, or some part of it divided through an external resistor. It probably doesn't come as a big surprise that you can connect an external voltage to the input and have the NXT convert that instead.

Caution Never connect these voltage sensors to anything but low voltage battery-operated equipment. Connecting them to household electricity could be lethal both to you and the NXT.

Design of a −5V to +5V Sensor

Figure 7-1 shows a circuit diagram of the NXT input with a simple voltage sensor. The only component needed is a 10kΩ resistor. The external voltage ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required