go_away

Author Topic: sensors,digital or analog interface?  (Read 743 times)

0 Members and 1 Guest are viewing this topic.

Offline roboSonnyTopic starter

  • Jr. Member
  • **
  • Posts: 35
  • Helpful? 0
sensors,digital or analog interface?
« on: December 02, 2010, 03:21:59 PM »
what is easier to program and work with?an analog or a digital interface sensor?

Offline UAE

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: sensors,digital or analog interface?
« Reply #1 on: December 04, 2010, 11:09:50 AM »
Well it depends on the sensor and the microcontrollers ur using

for an example, if you are using an arduino there is a built-in function for reading analog values and this will make your life easier. On the other hand, if you are using a pic18f4520 you will have to write a function by changing different values of registers and could take you an extra few lines.

In general, the digital sensor is easier to use but it only can provide you with two values (0 and 1). Some times they use different kind of pulses to interpret different data.
 
On the other hand, the analog sensor will give you only one value that can be interpreted into more detailed information.

It is difficult to answer your question without details, it depends

Offline roboSonnyTopic starter

  • Jr. Member
  • **
  • Posts: 35
  • Helpful? 0
Re: sensors,digital or analog interface?
« Reply #2 on: December 04, 2010, 01:24:03 PM »
i intend to use axon.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: sensors,digital or analog interface?
« Reply #3 on: December 04, 2010, 09:17:06 PM »
Hi,

In general, the digital sensor is easier to use but it only can provide you with two values (0 and 1). Some times they use different kind of pulses to interpret different data.
Like a serial protocol that can give you any number of bits you need.

Analog or digital... Usually you need to use what the sensor provides, so better learn to deal with both.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline UAE

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: sensors,digital or analog interface?
« Reply #4 on: December 05, 2010, 03:00:05 AM »
If you are using axon, I would say programming the analog sensor is easier

it is as simple as: analogRead(Sensor);
 or you could use it as a condition if(analogRead(Sensor)<30) StopMotor();

for the digital you might have to write a function to interpret its values

but the number of cycles and the time taken could be more in the analog(depending on the type of sensor)

and you should learn how to use both

Offline roboSonnyTopic starter

  • Jr. Member
  • **
  • Posts: 35
  • Helpful? 0
Re: sensors,digital or analog interface?
« Reply #5 on: December 05, 2010, 05:02:21 AM »
thanks for the help!

 


Get Your Ad Here

data_list