Finaly ,Interfacing a K30 CO2 sensor to the Propeller [Video Added]
Igor_Rast
Posts: 357
I2C_comm_guide_2_1031.pdfHi ,
After some time has passed and i tried different methods to measure the co2 level in air , today I received a new kind of sensor
its the k30 co2 sensor , in the range of 1-10.000 ppm , and uses a ndir sensor .
Before i was doing some testing with the taguchi mg-811 but this sensor proven to be not so accurate and needs to be callibrated.
anyway . I thouth it would be intrested for others wanting to connect a pretty good co2 sensor to there project.
and a good way to get some help to get it connected without too much trouble
it communicates tru I2C ,. have to find out how and what still to get the communications going ,.
anybody have any experiance with this sensor ??? hoping me and other reading can learn allot
ill be posting the working code , when I get there :P
looking for a simple object to accomplish just this first step so it seems
After some time has passed and i tried different methods to measure the co2 level in air , today I received a new kind of sensor
its the k30 co2 sensor , in the range of 1-10.000 ppm , and uses a ndir sensor .
Before i was doing some testing with the taguchi mg-811 but this sensor proven to be not so accurate and needs to be callibrated.
anyway . I thouth it would be intrested for others wanting to connect a pretty good co2 sensor to there project.
and a good way to get some help to get it connected without too much trouble
it communicates tru I2C ,. have to find out how and what still to get the communications going ,.
anybody have any experiance with this sensor ??? hoping me and other reading can learn allot
ill be posting the working code , when I get there :P
looking for a simple object to accomplish just this first step so it seems
Comments
I found it easiest to use the serial interface rather than the I2C interface.
Here is the code I used:
I hope this helps,
Bean
the serial interface rather than the i2c , do you mean the uart connections ???
and are there pull up requierd like with the i2c bus ?
K30.char($FE) stop ??
K30.char($04)
K30.char($00)
K30.char($03)
K30.char($00)
K30.char($01)
K30.char($D5) adres ?
K30.char($C5) start ??
did you use a different adres from the factory default one
I'm not at work today, but I think they are the UART connections (RxD and TxD I think).
I'm pretty sure I just used the factory default address.
My sensor was WAY off before I did the calibration.
Good luck.
Bean
care to explaine where the folowing values come from , cause I cant realy relate them from the datasheet that I got
ok found it discribed in the mobus protocol sheet of it , but still cant seem to get any usefull data out of it
where is the start and stop bit ?
dont I need to wake the sensor up before ?
another question , I have the sensor powerd tru g0 and g+ feeding it 6 volts .
the prop and everything else runs off 3.3v. and like i see the sensor core also runs at 3.3 volts.
is is possible to connect it to 3,3 volt ( mayme the DVCC) to let it work on 3.3 volt . saving me to have to use the 6 volt regulator and some caps exclusivly for the sensor
thnx
I have got it working,
Turned out , I was using 2 power supplies ,
1 for the propeller , 3.3 volts,
and a different one for the 6 volts that I feed the sensor with , But I forgot to connect both grounds to each other ,
now its working fine , My sensor looks to be pretty accurate without doing the calibration ,
So thanks allot for the example. Ill be further incorporating the sensor into my project
You are welcome, I'm glad you got it working. Let us know how your project works out.
Bean
That,s exactly what I had in mind about how the calibration inside a room will effect the reading . In fact I im trying not to have to callibrate it at all.
I have a second co2 sensor ( picture ) that I use *** a reference to the reading that im getting from the k-30 sensor. and till now the reading does look pretty solid and accurate.
the 2 different sensor have a difference of about max 100 ppm at times , no difference at all . iff i leave the room and let the window open. to get the cleanes air posible I
end up reading about 430 ppm on both sensors .
So if you ask me , The sensor precalibrated that they claim it to be from factory , is pretty accurate . and doesnt need to be recalibrated to be used the first time ,
about the calibration after 6 months , is this really necessary ? Do you have experience to see the reading drift off in 6 moths time . I was hoping the auto ABC feature would allow me to never have to calibrate at all. Or is it that because in your case the sensor enviroment is usualy around 1500 ppm. meaning the sensor ABC function wil drift the 400 ppm mark towards the 1500 ppm . leading to the reading beeing off. ?
@Bean .
Your welcome ,
I was thinking about doing a small Video demo of the sensor attached at the prop .
Ill be posting it later on I think . have to figure out how still
left the room for a half hour to let the readings of both sensor stabilaze, that worked out pretty nice .
and excuse my bad english
tips are always welcome
Waiting for your reply
Yes the K-30 module is all you need, no need for the pump
connect it via the Rx TX lines and you can read out the CO2 value
ICEC