Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Air quality and co detector

Status
Not open for further replies.
When mq7 sensor sense co,if it greater than a fixed value then uc pin connected with relay goes high and buzzer on.
How to connect buzzer on relay ckt.
Is it the rest of circuit dgm is ok
please reply
 
How to connect buzzer on relay ckt
You don't need a relay to turn on the buzzer. Use Q1 to turn it on.
Is it the rest of circuit dgm is ok
We can't tell, as we don't know how the micro has been configured.
 
That does not look like this data sheet. Additionally the data sheet covers, including a diagram, that the coil power should be a PWM signal between a Vhigh and Vlow.

Ron
 
Looking at this data sheet place a focus on figure 2. RL is chosen based on the charts shown on the data sheet. Rsense changes resistance based on concentration of gassas, RL is placed in series with Rsense to form a voltage divider and the output signal is taken off the top of RL. The only way to get accurate outputs is to expose the sensor to for example a calibrated gas mixture and make RL adjustable. Then adjust RL for an output based on a specific calibrated gas mixture. These are not precision devices and their output is also a function of the type gas sensed.

Additionally to be stable the heater element in the sensor should be allowed to "burn in" or cook for a few days before even using the sensor.

Ron
 
hi

this code for mq7 sensor. it is in ccs pic compiler program mode. but i want code in hitech c.
so please help me to convert it .
i don't have the header file <lcd_B.c> and <16f877A.h>
but i have <pic.h> & <pic168xa.h>
please help.......................................................





#include<16f877A.h>
#use delay(clock=20000000)
#include<lcd_B.c>
#include<math.h>
void main()
{
unsigned int16 reading0;
unsigned char level_c;
float
ad_co,rs_c,p_co,cpow=1.5val;
lcd_init();
set_tris_a(0b11);
setup_adc_ports(RA0_RA1_RA3_ANALOG);
setup_adc(ADC_CLOCK_DIV_32);
printf("\f");
command='a';
while(true)
{
set_adc_channel(0);
for(i=0;i<250;i++)
{
reading0=read_adc();
reading0=+reading0;
}
(float)reading0=(float)reading0*0.02;
delay_ms(200);
ad_co=reading0/255.0*5;
rs_c=(5.0-ad_co)/ad_co;
p_co=pow(rs_c,-cpow);
co=100.0*p_co;
reading0=0;
delay_ms(200);
if(command=='a')
{
printf(lcd_putc,"\fco=%ofppm\n,"co);
printf("a%1of,"co);
printf("c%c,"level_c);
}
 
You would likely do well to start another thread. Maybe in the micro controller section for help with the coding.

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top