Go Down

Topic: interfacing a co2 sensor with arduino (Read 3524 times) previous topic - next topic


Hi all!

I buyed a Dynament Premier Sensor, a very good infrared sensor to get % of co2 in a gas. To connect it to arduino I must add a MAX232 interface. I used a MAX3232 connected:

sensor tx: t1in
sensor rx: r1out
arduino tx: r1in
arduino rx: t1out
Sensor 3,3v from arduino
max3232 5 volt from arduino

but I receive nothing, if I disconnect sensor TX I receive something but from MAX232 (I thing) 0 and 255 values sparse.

There are differences between MAX3232 and MAX232?

attached the document to read from sensor.

I'm using standard SoftwareSerial.h to try to read.

Could you help me?



Mar 17, 2013, 10:22 am Last Edit: Mar 17, 2013, 10:24 am by Erdin Reason: 1
Is your sensor the TDS0045 ?
Where can I find more information ?
Perhaps here, http://www.dynament.com/infrared-sensor-data/infrared-gas-sensor-applications.htm

Why did you power it with 3.3V, I think they can be used with 5V.
Are you sure that it uses RS232 levels ? Or is it using serial 5V TTL levels ?

Are you sure the sensor itself contains all the logic for serial communication ?
I think the document for communication protocol is for the OEM board.
The sensor itself seems to be analog.
I hope you didn't damage the sensor or the OEM board with high voltage levels from the MAX3232.

The MAX3232 is for 3.3V and 5V, and the older MAX232 is only for 5V.

Can you make a photo of how it is connected ?


I'm using the Premier version of sensor http://www.dynament.com/infrared-sensors/carbon-dioxide/premier-certified-carbon-dioxide-sensors.htm.

The staff of Dynament said me that sensor must communicate with max232 with this attached schema, I connected the 3,3v from Arduino.

what do you need? Some documentation? Did you see the attach with standard communication used by sensor?

he said me: "If you have RS232 input you need to invert the sensor towards max232. Please see attached diagram which actually is a working application. "


now I'm far from home, i'll post you the photo of schema connected in the afternoon


3.3v->sensor vdc in
gnd->sensor gnd
5.5v->max3232 vdc in
gnd->max3232 gnd
pin 10 (rx) -> max3232 T1OUT
pin 11 (tx) -> max3232 R1IN

ANALOG-> empty


Mar 17, 2013, 11:09 am Last Edit: Mar 17, 2013, 11:11 am by Erdin Reason: 1
STOP whatever you are doing.

The schematic is to make RS232 high voltage levels, to be able to connect the sensor to the RS232 serial port of a PC.

You don't have to make your own MAX232 or MAX3232 circuit. If you search Ebay for "rs232 ttl" you will find many adapters to make TTL (5V) level serial signals. It's always good to have something like that, in case you want to connect the sensor to a PC.

Explanation: If you take a look of the datasheet of the MAX232, the pins 8,13,7,14 are the high level signals, and the 9,10,11,12 pins are the 5V TTL level pins. Now take a look at the schematic they gave you, and you see that the 5V TTL level signals are connected to the sensor.

To connect it to the Arduino, forget the MAX232. Use the 3.3V (perhaps 5V is possible), and connect sensor RX to a Arduino SoftwareSerial TX pin, and sensor TX to SoftwareSerial RX pin.


Go Up