Shop OBEX P1 Docs P2 Docs Learn Events
Analog voltage control with ADC0831 — Parallax Forums

Analog voltage control with ADC0831

I just completed a circuit with a pulse train: PWM Pin, Duty, Cycles in the code feeding a capacitor and resistor, which made a digital to analog converter voltage. I then buffered this voltage and sent it to an infra red LED. The infra red LED shines on a infra red photo transistor that I have hooked to the input (pin 2 of the ADC0831), connected to the Basic Stamp. The output of the ADC0831 gives me a analog variable voltage when I shade the infra red LED with a gradient film strip shinning on the infra red photo transistor. The output of the ADC0831 is pin 6. The Debug screen shows this voltage changing slowly as I use the film strip to darken or lighten with the film strip. When I put my volt meter on pin 6 of the ADC0831 the voltage changes quickly as I move the film strip from light to dark. Why is the Debug screen slow in posting the voltages, and my volt meter is not slow? I converted the digital pulse train from digital to an analog voltage. I am feeding the ADC0831 an analog voltage from the infra red photo transistor. The ADC0831 is an analog to digital converter, so the output of the IC would be digital. Yet I get a voltage, and that voltage is being changed in an analog way. It is working. I am using a digital ADC to create a variable analog voltage at the output of the ADC. I am new to digital chips, so this seems very strange to me. But it is working. Is this odd?

Comments

  • ercoerco Posts: 20,254
    Might pwming the IR signal initially (from another Stamp?) be causing problems? Why not drive it with DC and see if things improve?
  • kwinnkwinn Posts: 8,697
    Pin 6 of the ADC0831 is the digital data output, not an analog signal so the voltage reading as measured by the meter on that pin has no bearing on the input voltage being measured.

    A schematic or connection diagram of your setup would be helpful. The measurement speed depends on the frequency of the clock signal. How fast are you clocking the chip.
  • My mistake. I was reading the voltage change at the input to the ADC0831 with a meter. The Debug Screen was showing the voltage change at the output of the ADC0831. I could improve the speed with some code changes, but
    this set-up is not really improving things. What I mean by that is I have used programming and a digital chip to do something I could do just as easy, with less parts in an analog way. Oh well. Move on to the next experiment. Thanks for trying to help.
Sign In or Register to comment.