Author Topic: Digital vs Analog inputs  (Read 2765 times)

0 Members and 1 Guest are viewing this topic.

Offline pete2009Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Digital vs Analog inputs
« on: June 24, 2009, 12:20:04 PM »
I see most board provide a ton of digital and only a few analog inputs. I have a proble there. Collision sensors, photo diodes and similar devices have analog outs.
Why is the digital more popular then?


Offline RoboChan

  • Full Member
  • ***
  • Posts: 77
  • Helpful? 0
Re: Digital vs Analog inputs
« Reply #1 on: June 24, 2009, 12:24:43 PM »
Can't you use digital as analog??

Offline pete2009Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Digital vs Analog inputs
« Reply #2 on: June 24, 2009, 12:28:17 PM »
Hi,

While I don't know the answer to that question, I stand corrected on my initial assumption. There are a few rangefinders there with a digital connection.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: Digital vs Analog inputs
« Reply #3 on: June 24, 2009, 12:30:24 PM »
Digital input are quite simple; but analog inputs are far more complex and take a lot of space on the chip.

If you need more analog inputs, look at analog multiplexer or external ADC like this one http://cds.linear.com/docs/Datasheet/2309fb.pdf or this one http://www.analog.com/static/imported-files/Data_Sheets/AD7992.pdf

Can't you use digital as analog??


Unless you meant to use them to access external DAC, I don't see how it is possible. Analog inputs can often be configured as regular digital I/O, in this case the analog/digital converter is completely bypassed.

Hi,

While I don't know the answer to that question, I stand corrected on my initial assumption. There are a few rangefinders there with a digital connection.


Digital rangefinders have a digital (!!!) output. They have a predefined range and outputs a 1 (or 0 I don't remember) when they sense an object in this range. You cannot get the actual distance of the object though, as opposed to analog rangefinders.
« Last Edit: June 24, 2009, 12:44:15 PM by chelmi »

Offline BEAMer

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Re: Digital vs Analog inputs
« Reply #4 on: June 25, 2009, 07:30:32 AM »
hi,

Quote
Digital input are quite simple; but analog inputs are far more complex and take a lot of space on the chip.


i totally agree with chelmi.....

If you need more analog inputs, you can use multiplexers.

But if you are using collision sensors and obstacle detectors, you don't need continuous measurement of the voltage. you just need to know when you are about to hit the obstacle! so generally we use comparators. They give you digital outputs, compatible with the controller boards. so you don't have to worry much!



Offline BEAMer

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Re: Digital vs Analog inputs
« Reply #5 on: June 25, 2009, 07:34:57 AM »
A comparator will give a 'high' or a 'low' output when the input voltage crosses a fixed reference value. there are lots of ready made comparator chips available.

More over, there are lots of microcontrollers with built in comparator modules (Eg: PIC16F877A). this can reduce your hardware........

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Digital vs Analog inputs
« Reply #6 on: June 26, 2009, 05:35:16 PM »
Hi,

Can't you use digital as analog??
Yes, in several ways, but the one I would recommend you for real analog (i.e. not just a comparator or a compare register), is a V/F converter (V/F = Voltage to Frequency) - then you just measure the frequency of the signal and multiply the number with a constant.
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 BEAMer

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Re: Digital vs Analog inputs
« Reply #7 on: June 27, 2009, 07:52:38 AM »
oh.... thats a good idea.  But how do i convert a voltage into a signal with varying frequency? by using a tank circuit or something?

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: Digital vs Analog inputs
« Reply #8 on: June 27, 2009, 04:09:37 PM »
most common example..... NE555....

But there are many specialized IC's for that....
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

 


Get Your Ad Here