As we know the comparison between microprocessor and the pin mapping have explained before this, the selection types of pin is important to ensure that unexpected things happens during the construction of DICM system. In the Atmega 328 microprocessor, there have two types of pin which are analog or digital. The analog pin will detect at any types of voltage from 0-5V either 0V, 0.1V, 3.2V, 4.5V or 5V. The digital pin will detect fix value of voltage which are 0V or 5V only. Figure below shows the sensor information.
Figure: IR distance sensor
For IR distance sensor, the analog pin was chosen as input pin. Figure bellow will explain the distance of the sensor to detect an object in front of this sensor.
By using analog pin as a input, this analog pins can detect at any changes of voltage from 0V until 5V. For example if the distance between this sensor and the object is 2ms, the output voltage that has produce around 1.2V and another example when the distance is 1ms, the output voltage that was produce around 1.7V. This analog pin is suitable for this DICM system because this IR distance sensor can detect at any range of distance between the crops and sensor to give the fertilizer or pesticide to the crops.
No comments:
Post a Comment