SparkFun According to Pete #30: Analog to Digital Conversion

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 20

  • @obiwanjacobi
    @obiwanjacobi 11 лет назад

    I love the "Behind the Arduino" take on this. Love to see more of those kind of subjects. Thanx.

  • @nickheyes67
    @nickheyes67 11 лет назад

    Thank you. This old man now understands!

  • @LReBe7
    @LReBe7 11 лет назад

    Been there, done that, was quite usefull to make a fast PID line follower with arduino. The prescaler is ok if you set it to about half the value and the big gamechanger is doing the left adjust, so the readout is 8 bits and everything(well, everything except the integral term, which tends to be huge) in the control loop can be processed with bytes(which use only 8 bit-instructions)! I wish this would have been posted a month or 6 ago!

  • @technobabble_
    @technobabble_ 11 лет назад

    I just watched this again and took some notes. This is a great video, Pete. I think I'm going to try to do something similar with a wheatstone instead of a pot. Keep the vids coming. Maybe make a companion vid to to DAC next?

  • @montanaharkin
    @montanaharkin 11 лет назад

    Great explanation of the ADC. Was always a mystery until today.
    Explanation starts at 5m37s

  • @lejink
    @lejink 11 лет назад

    I'm off to find the rest of Pete's videos!

  • @DarkInsanePyro
    @DarkInsanePyro 11 лет назад

    Thought it was funny to correct an already correct value to a wrong value but we get you. No biggie. Thanks for the good content and please keep it up. I know a lot of the ins and outs of ADCs but still nice to go back once in a while.

  • @zsantolim
    @zsantolim 11 лет назад

    If the resolution is 10 bits, you are correct dividing the reference voltage by 1023. The extra number that completes the set of 1024 numbers from it is the 0 value.

  • @technobabble_
    @technobabble_ 11 лет назад

    1023 is the largest number a 10 bit binary can hold, but Zero is also a value. So it's a total of 1024 possibilities, so he should divide by 1024 just as he did.

  • @supersat
    @supersat 11 лет назад

    Also, AVR pro-tip: if you need to capture an accurate waveform, DO NOT trigger the ADC in software! Loops can take varying amounts of time to execute and your sample rate is unpredictable. I believe you can trigger the ADC off a timer. Use that instead!

  • @sunnuld
    @sunnuld 11 лет назад

    Dividing by 1024 is correct. 0-1023 in a micro controller is 1024 steps of resolution. dividing 3.3/5v by 1023 does not give you 1024 steps of resolution. It would give you 1023.

  • @anasshaikh5778
    @anasshaikh5778 8 лет назад

    so we cannot convert a an analog signal which is greater than Vref. what if I have to convert a signal greater than the reference voltage. pls help

  • @supersat
    @supersat 11 лет назад

    Yes, it should be 1023. Plug some numbers into the formulas and try it yourself. If Vin = Vref, then the ADC register should be at its max value, which is 1023. Off by bites again!

  • @DerTabak
    @DerTabak 11 лет назад

    I also think you have to divide by 1023.

  • @zsantolim
    @zsantolim 11 лет назад

    1023 divisions separate 1024 values.

  • @chrisBruner
    @chrisBruner 11 лет назад

    But you can't divide by 0!!! :)

  • @baselsw
    @baselsw 11 лет назад

    NOOOOOOOO......1023 is correct.. change it back!!!!

  • @123456789robbie
    @123456789robbie 11 лет назад

    are you joking?

  • @baselsw
    @baselsw 11 лет назад

    I'm getting tired of this.. Bro you need to go back to school! This is simple math.. Let us do a example: (5000mV - 0.000mV)/(1023 - 0) =~4.888mV/step .. The uC goes between 0 and 1023.. Now take 1024*4.888=5004.89mV and 1023*4.888=5000mV! You don't ever get 1024, why divide by it..??