Shop OBEX P1 Docs P2 Docs Learn Events
Generating a variable voltage from bs2 — Parallax Forums

Generating a variable voltage from bs2

jbalatjbalat Posts: 96
edited 2009-09-21 11:54 in BASIC Stamp
How easy is it to generate a voltage between 0 to 5 volts (actually only require 0 to 0.5v to 0.01v accuracy but I can make a voltage divider to scale it down)

Comments

  • dev/nulldev/null Posts: 381
    edited 2009-09-17 11:44
    What do you want to do with the voltage? You can use a voltage divider (with a digital potentiometer), use a DAC chip, or generate a PWM signal directly from the Stamp, depending on what you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • jbalatjbalat Posts: 96
    edited 2009-09-17 23:46
    I want to monitor the o2 sensor signal which varies from 0-1 v like a sine wave. I assume I could use RC time to do this ?

    Then I just want to add some voltage to this from the Stamp from 0-0.5v.. I dont really want to produce the total voltage from the stamp since this may confuse the ecu.

    The idea being that if the ecu sees a higher voltage it leans the mixture (this will allow my hho to be used)

    If I add too much then ecu will go into open loop which will produce a fixed voltage. When the stamp reads a fixed voltage from the ecu it can start backing off the added voltage until the signal starts jumping again.

    I realise if I am adding voltage from the stamp to the o2 signal then I will need to isolate the stamp from the Cars Negative wire..So I will run a small 12V lead battery to keep it powered.

    Thanks for your info.

    I already have a very simple voltage adder circuit powered by a 1.5v battery and 5Kohm Linear Pot. I was even thinking maybe to power a servo with the stamp to automatically turn the Pot. !!!. This will look pretty cool !
  • G McMurryG McMurry Posts: 134
    edited 2009-09-21 04:25
    I have had great luck using the PWM to voltage converter as in Experiment #22. If you need anything better than this, you will need to use something like an AD7233 DAC.

    As for using RC time, for me that is one of the most un-reliable methods of taking in an analog voltage. Go right for the inexpensive ADC such as the ADC0834. It is a snap to interface and has 4 input channels.

    Greg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    AUTOMATE EVERYTHING
    http://www.trainyard.net
  • jbalatjbalat Posts: 96
    edited 2009-09-21 11:54
    Thanks for the info Greg..

    I have since connected up an oscilliscope to my o2 sensor to monitor what is going on and realised that as long as I set a constant voltage under 360mV the o2 doesnt go into open loop on its own accord. It is influenced only by MAF (load) and TPS etc.

    I guess that means a couple of things.
    (1). That my theory of reducing the extra voltage on the fly is not going to help the o2 sensor stay in closed loop..
    (2). and more importantly that I wont be able to lean my mixture enough using the o2 sensor.....

    Anyway back to the drawing board.. Try to reduce the MAF frequency or perhaps reduce the duty cycle of the fuel injectors ???
    Much harder since the stamp is so slow......Bugger.
Sign In or Register to comment.