Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

The mass production first of automobiles, and now of smartphones, has resulted in a surplus of inexpensive sensor modules. Devices are trickling down rapidly into the hobbyist market, with industrial surface-mount components installed on breakout boards for easy soldering. I’m in the process of researching the sensors section for my new book, Make: More Electronics, but wanted to take a break and share a few of my most interesting finds.

sensor smorgasboard Electronics Fun & Fundamentals: Sensor Smörgåsbord

The Open-Collector System

Many all-in-one sensor modules operate on the principle of open-collector output. The detecting element in the sensor connects with the base of an internal transistor whose collector is “open,” meaning you can access it via one of the external leads.

Figure A

Figure A

A typical arrangement is shown in Figure A. The positive side of the power supply sinks current through an external pull-up resistor, through the transistor, to negative ground. When the detecting element switches on the transistor, its effective internal resistance falls, and the collector voltage drops. When the transistor turns off, the voltage rises to near the power supply value (provided the collector isn’t connected with a low-impedance device that takes too much current).

Figure B

Figure B

Instead of the meter in Figure A, you could substitute an input pin to a microcontroller, or the base of another transistor. A PNP transistor will give a positive output from a sensor whose effective internal resistance drops when triggered. The datasheet for a sensor should tell you its operating voltage and the maximum current it can sink, but won’t necessarily reveal the appropriate value of the pull-up resistor. You can find out by starting with 100K and working downward, while checking the voltage (as in
Figure A) and the current (as in Figure B). The current should not exceed the limit stated by the manufacturer.

Charles Platt

Charles Platt

Charles Platt is the author of Make: Electronics, an introductory guide for all ages. He is completing a sequel, Make: More Electronics, and is the author of Volume One of the Encyclopedia of Electronic Components. Volumes Two and Three are in preparation. makershed.com/platt


Related
blog comments powered by Disqus

Related Supplies at Maker Shed

Follow

Get every new post delivered to your Inbox.

Join 26,238 other followers