Shop OBEX P1 Docs P2 Docs Learn Events
New Tutorial: Reading voltage with the Prop — Parallax Forums

New Tutorial: Reading voltage with the Prop

Nick McClickNick McClick Posts: 1,003
edited 2011-08-19 00:14 in Propeller 1
Just put up a new tutorial on reading voltage with the Propeller - it's here. I cover sigma delta & using an ADC (MCP3208 in particular). I also talk about RC decay as an alternative for reading resistive & capacitive sensors. Here's a video intro & look at sigma delta;
[video=vimeo;19275458]
Full tutorial >>>
Let me know if you have any questions, and if you spot any errors, let me know so I can fix 'em!

Comments

  • prof_brainoprof_braino Posts: 4,313
    edited 2011-01-31 12:18
    ...Let me know if you have any questions...

    Pretty cool stuff, thanks.

    Twice you say voltage, but once you say current. Is the circuit measuring voltage, or current, or a combination or both? (Sorry, I'm a software guy). It this like RC time from PBASIC, where its measuring the time it takes the voltage on the I/O pin to drop below the LOW threshold (is this "below 1.8 volts is LOW" and "above 2.8 volts is high"?)

    It says 11 bits of resolution. It the display is scaled so that the wave varies by 11 pixels?

    At the end of the video, you say "you may not see it when you look at it" I think you mean the intensity of the light as it varies due to the AC current. But the intensity of the incandescent blub does not go down to zero, so the circuit is measure the few percent change in intensity for each AC cycle? Can we determine how much it varies in terms of some units (is it lumens?)
  • mparkmpark Posts: 1,305
    edited 2011-01-31 12:20
    Very nice, Nick. I'm just about to try that sigma-delta thing myself.
  • AJMAJM Posts: 171
    edited 2011-01-31 12:41
    Thanks Nick. I look forward to watching this later tonight.
  • mickalmickal Posts: 75
    edited 2011-01-31 14:03
    Thanks, good to see this tutorial.
  • Nick McClickNick McClick Posts: 1,003
    edited 2011-01-31 14:23
    @Prof - All good questions. I plan on doing an 'Electronics for software folks' series because a lot of the resources available explain more than you need to know to get started and confuse the issues. The MCP3208 & sigma delta measure voltage. The photodiode does cause a very small amount of current to flow, though. Whenever you connect two points in a circuit that are at a different potential (have different voltages), current will flow. The quantity of current that will flow depends on the resistance and the difference in voltage. That relationship is; Voltage = Current * Resistance.

    For the video demo, you're correct, the bulb doesn't go to zero. the wire heats up and it's continually emitting photons, although the intensity changes a bit. You could determine how much it changes - a proper photodiode will have a spec sheet telling you the relationship between luminosity & voltage output. The video display was hacked together from the 'microphone-to-vga.spin' in the Propeller tool download, but 11 bits of resolution = 2,048 possible values(2^11), not 11.

    For RC decay, you've got it - works the exact same way as pbasic.
  • lyassalyassa Posts: 52
    edited 2011-08-19 00:14
    Thanks for the tutorial on reading voltage using sigma-delta. I can't see though how it measures the voltage with the capacitors removed. Will you please explain a delta more :)
    Thanks.
Sign In or Register to comment.