I am trying to interface an arduino uno with the dynament TDS0066 methane and co2 sensor. I have written the code and when I connect Tx directly to Rx on the arduino it runs perfectly so the problem shouldnt be with the code. When I connect the sensor circuitry the value of Serial.available() is always zero since there is nothing being recieved at the buffer. Does anyone know why this may be?
The sensor is powered by the 5v supply on the board and I have checked the voltage and current with a multi meter and it's running at about 5v, 78mA which shuold be perfect for the sensor. There are two 3k3 resistors in series with the Tx and Rx pins which are connected to the Rx and Tx pins on the arduino.
It turns out the problem was using println() as it was sending extra values to the sensor so it would not respond.
This has been corrected and it is working now.
Can you post that code for the CO2 sensor ? I am trying to read this sensor and a CH4 to get values i am feeding into a Raspberry Pi.
I am getting values from the sensor based on the code posted above but not sure what those values are because i cant make hide nor hair of the dynament protocol document.
Just curious if anyone can help me get this sensor setup, i have 5v 1a to the power pins. I have tried hooking it directly to the arduino pins 10 and 11 (using the SoftwareSerial.h to use those pins for serial) the and noticed that the data sheet says we have to limit the voltage but the unit just blinks (heck i didnt even know it had a light in that lil thing)... need a helping hand please.
The code is attached as it is slightly too large to include in code tags directly.
Operating on a standard Arduino UNO, with software serial setup to communicate to the Dynament sensor on pins 6 and 7.
My main version is as a Modbus slave, where the Modbus master requests the data, whereas this version simply prints to the serial console at 115200 baud.
I have a problem with this.
So that these pins 6 and 7 combined sensor supply to arduino?
I know the nap on message has 2.8 Volt. Spindles 6 and 7 have 5 V
Because it is not possible to connect between 5V and 2.8V
So that these pins 6 and 7 combined sensor supply to arduino?
I don't understand what you are trying to say here.
I know the nap on message has 2.8 Volt. Spindles 6 and 7 have 5 V
Again, I have no idea what you are saying.
Because it is not possible to connect between 5V and 2.8V
Again, I can not understand at all.
Please write clear concise statements or questions that describe exactly what you have, what you are trying to do and exactly what errors you are getting.
I'm writing you right now,
That is why I ask you that these pins 6 and 7 connected directly to the sensor with communication?
I have 100% methane sensor from Dynament.
I have trouble communicating with the sensor.
I have a PCB, there are stabilizers and converter.
Because the communication impedance in the sensor is 2.8 V. The Arduino has 5 V.
As the arduino and sensor connected to the plate, the communication voltage for the sensor has been reduced by 1 V, 0-2V. And so the sensor does not respond.
ymkl, I am sorry, I am trying to understand better what you are attempting to write, but I am struggling with this.
I guess English is not your natural language to use, I am correct ?
As I recall, to use such a sensor on a small Arduino UNO style board with only a single UART, you need to use softwareserial library to then communicate with the Dynament sensor. In my code in this thread at post #9, I used Arduino pins 6 and 7 for this software serial interface.
The problem is the Arduino is a 5 volt device, and from reading the Dynament sensor documentation you need to have voltage translation to the Dynament sensor. Reading the documentation you will surely see that they suggest to simply use 3k3Ω resistors in series with the connection to Arduino pin 6 and also for pin 7.
I confirmed on my Dynament sensor that the use of 3k3Ω resistors is correct.
You are right that I am not an English expert.
And UART only uses UNO and not in MEGA?
I have UNO and MEGA, below was connected with UNO.
I ask, well pinned:
Arduino RX - TX sensor
Arduino TX - RX sensor?
The sensor responds with the use of your codes,
But will it show the serial number of the sensor, and after second time it's another serial number than the previous one? Is that ok?
A sensor does not respond to CH4 and temperature and so on. Each parameter will display 0?
So the fifth pin in the sensor, or pin output is what it serves?
Ymkl, who ever that is, I looked at your picture of the wiring and it is difficult to see, but the red wire, it that going to the +5V pin on the Arduino ?
On my board, I supply the Dynament sensor with 3.3V.
The resistors, why have you got such a complex network of resistors, you only need two resistors.
Looking at the picture, it looks like you have a 15kΩ + 15kΩ + 100Ω + 100Ω + 100Ω, which adds up to 30.3kΩ or 30300Ω, is that correct ?
Where did you read that the resistors need to be that value ?
I dropped the scheme.
The sensor has 5V power supply from arduino to red wire.
Since the instructions written from sensor power is between 3-5 volts.
So you used 3.3 V power supply? So you work?
Why do I need 2 resistors?
A resistors well folded in series, a total of 3.3 kOhm.
Where did I read the value of the resistor?
I have a set of resistors with values.
I also checked on the internet that a bar code that has values.
Have you measured the resistors with an electronic device such as a multimeter ?
Tell me the colours of the resistors you have to check.
I say you only need two resistors, not ten resistors.
If you think about it, what appears to be the three 100Ω resistors make such little difference, I mean, if I read correctly your resistors from your picture, I see 30.3kΩ, then the 0.3kΩ or 300Ω make no difference.
I say again, check with a meter your resistance, it should be around 3k3Ω.
Really, I have put together a resistor, it has a total of 3.3 k ohms in series.
Also, the multimeter will display the value 3.3, I see that is fine.
You are saying that only 2 resistors than 10 resistors.
Try to buy same 3.3k ohm resistors.
And I have a barcode resistors that I put in the link in #17.
1.5 kohm has left brown, green, red.
And 100 ohm has brown, black, brown
Tolerance has gold