Search This Blog

Friday, July 23, 2010

Robotics Tutorials - Intermediate - Hardware - Analog and Digital

All micro controllers, including the Basic X are digital devices. This means they can only deal with 2 states, on and off. This is fine for sensors such as bump sensors and so on but not all sensors are digital. For example, a light sensor can tell you how bright a light is by varying its output voltage. This is clearly not digital, it can be on (5 volts) or off (0 volts) or at anywhere in between. To enable the Basic X to use these sensors it is fitted with an onboard analogue to digital converter or ATD for short.

If you are using a different processor like the Basic stamp or other similar processor and want to use analogue sensors you will need to buy a separate ATD and interface it with your controller.

What the ATD does is convert an analogue voltage into a digital form that can be understood by the processor. This is typically as a number between 0 and 255, 0 being off and 255 being on.

The main factor to look for in a ATD is its resolution. Most ATD's used in robotics will offer 8 bit resolution. An 8 bit binary number has a maximum value of 255 in decimal (or 11111111 in binary), so you get a resolution of 255 intervals in 5 volts. This roughly means that an 8 bit ATD can detect a 0.02 volt change in voltage, plenty for most applications.

The Basic X offers great performance in this department, it has an inbuilt 10 bit ATD which can be used on 8 of its 16 pins.

No comments:

Post a Comment