Connect with us

Voltage switch

Discussion in 'General Electronics Discussion' started by Wawerp, Aug 3, 2013.

Scroll to continue with content
  1. Wawerp


    Jun 29, 2013
    I am building a project using CO2 sensor Mg811 it has very small output of 0 to 60 mV. I want it to switch another device when the CO2 drops to the certain level.

    Could someone please recommend a switch that would turn on when the sensors output voltage drops to around 20 mV and the device that would be switched on is of 230V

    Thank you.
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    You would need something to either amplify the signal to a level where it can be used for switching, or (probably better considering your use) is to use a comparator to compare the output to a reference voltage (say 30mV) and switch a relay when the level from the sensor falls below it. (clearly you need to be able to adjust the reference voltage.

    It is also possible to do a combination, by amplifying the voltage (say 100 times) then with an output between 0 and 6V you could compare it to a 2V reference.

    None of these options are simple like "a switch".
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    Do you have just the MG811 sensor, or do you have some circuitry already connected to it? The sensor needs a 6V regulator to drive the hot wire, and an amplifier with a very high input impedance to detect the voltage and produce a voltage output that another circuit could monitor. Do you have all of this already? If so, please post a circuit diagram and any other relevant information.

    You can monitor a DC voltage with a comparator to compare the detected CO2 value to a settable threshold; the output can drive an electromechanical or solid state relay to switch an appliance. I'm not aware of any off-the-shelf circuit that will do this. You will probably need to build something.

    Do you have any DC voltage source already? If so, what voltage?

    The comparator part is pretty straightforward. The tricky part is getting the sensor to operate. That's why I hope you already have the support circuitry for the sensor. The manufacturer's full data sheet is very poor. In fact, it's not even available from the manufacturer's web site! The relevant page ( has a link to a PDF, but it's only a single-page overview. The three page data sheet is available from some other site; Google MG811 carbon dioxide sensor.
  4. Wawerp


    Jun 29, 2013
    Thank you guys for exhausting answers.

    I have been working on it for some time and i would like to share with u what i have done.

    I recently won at University a MyDaq (none of the members of the winning team knows what to do with it :/ hehe... It is a programable device to acquire, send and manipulate various signals) i keep trying to use it and i have managed to get seemingly right signal. MyDaq has 15V and 5V DC output, I only switched the CO2 sensor on 5V rather than 6V and so the signal from the sensor was a bit lower than expected.

    I tried to step down 15V to 6V with resistors but i had connected something in wrong way, perhaps some of you guys know how to do it. That is what I have built:


    CO2 sensor description:

    -Working voltage 6V
    -Output signal 30mV – 50 mV
    -Range of co2 concentration 350 PPM – 10 000 PPM (atmospheric around 400 PPM)
    -35.5 Ohm resistance
    Last edited: Sep 7, 2013
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    The way you have connected the sensor board is wrong. First, the sensor board's 0V rail needs to be connected to the 0V rail of the acquisition device. Second the board requires a power supply voltage of 6V +/- 0.1V to drive the hot wire inside the sensor, and the sensor draws about 200 mA from this rail, so the source of this voltage must be able to supply that much current comfortably.

    You can provide the 6.0V DC voltage from an external power supply, or you may be able to use the data acquisition device's +15V DC output with a regulator. There are two types of regulators: linear and switching. Each has advantages and disadvantages.

    A linear regulator requires slightly more input current than its output current, so your +15V supply would need to be rated for at least 250 mA. The regulator may get quite hot, depending on the amount of voltage that's dropped across it; operating from +15V it will drop 9V and at 0.2A will dissipate 1.8 watts. It will need a smallish heatsink. It will produce a clean 6V supply to the sensor module. A suitable device is the 7806:

    Switching regulators are available through eBay as fully assembled PCBs. They boost current as they reduce voltage, so you would only need about 100 mA from the +15V DC supply. Also they are quite efficient so you would not need a heatsink. However, they generate significant noise, which could interfere with the accuracy of the sensor board. You could add external components (inductors and capacitors) to reduce the noise, but I can't say whether it would be a problem or not.

    If you have any more specific questions, please ask.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day