All Tutorials / Steve G / Using ADC (Analog to Digital) Ports, Commands and Controls.

Using ADC (Analog to Digital) Ports, Commands and Controls.

Step 3. ADC peripherals.

A number of sensors can be connected to an ADC port. Some sensors rated between 3.3v and 5v will work straight off the ports, and some will not. Possible sensors you can use are...

Smoke sensor modules
User-inserted image

Can be used to detect smoke and other gasses, such as methane and butane gas.

Sound sensors
User-inserted image

Adding these to a robot can give it the ability to hear what direction sound is coming from. (See step 7 for an example).

Pressure sensors
User-inserted image

These sensors allow you to detect physical pressure, and can be used on things such as a robot claw to detect pressure and stop the claw servo from moving. (Pull up or Pull down resistors mat be required. See the Flex Sensor Tutorial for details).

Passive Infrared (PIR) sensors
User-inserted image

These little sensors measure infrared light, and can be used for motion detection. Some PIR sensor modules have the option to work on analog ports, or on digital ports as well.

Gas detection sensor modules
User-inserted image

Similar the the smoke detection modules mentioned above, these do exactly what their name says... measures a range of different gasses.

Flex/bend sensors
User-inserted image

Much like the pressure sensors mentioned above, these can measure resistance and increase analog readings the further they are bent. What a look at the Flex Sensor Tutorial for more details and a video example.

Sharp infrared range sensors
User-inserted image

These can be used for object avoidance, much like the ultrasonic detection sensors, but use infrared. There are "Sharp Infrared Sensor" controls that can be found in EZ-Builder.

Temperature sensors
User-inserted image

Use these to measure ambient temperature levels.

Photosensitive diode sensors
User-inserted image

These detect "Light" and can be used for many applications. One example is to have one of these plugged in to your EZ-B, along with a low level spotlight. When the sensor levels change when in a dark room, this will trigger the spotlight to come on. (You can adjust the ADC values so the light from the spotlight doesn't cause the sensor to turn it off again).

And there are many more sensors you can use. Some sensors that are 5v can be used on the 3.3v analog pins without any additional hardware or resistors, but others will require some additional help to work properly. Please bare in mind though, that not all sensors available will work straight out of the box on an analog port. Also, research the sensors you wish to use on an analog port, as some are digital or serial. If you're unsure on anything, please feel free to ask in the Community Forum, and where possible, post a link, quote, or picture of the relevant data sheets for the sensor your asking about.