Comments (3)
See below some answers.
1° I changed the original schema with a MOSFET to have a higher voltage on the heater. Using a BC337 is fine but, even saturated, you don't have 5V on the heater. There is always a drop of voltage in the transistor (Vbe). For the BC337, you end with 4.3V for the heater in ideal conditions. With the MOSFET, you have 5V for the heater, it is better the reach the temperature.
3° The voltage on the analog input is calculated by using the analog to digital from the Arduino. The analog input returns a value between 0 and 1023 which is corresponding the 0V to 5V. So, voltage (VRL) = analog value / 1024 x 5V.
The second part needs a bit more calculation...
The Rs and the RL in the circuit are a voltage divider. The concept of a voltage divider is by putting two resistors is series. The VRL measured on the Arduino analog pin is the final voltage coming from the voltage divider (usually called Vout). We also know the Vin (5V).
Vout = Vin * (R2 / (R1 + R2))
Where:
- Vout = VRL
- Vin = 5V
- R2 = RL
- R1 = Rs
We try to find Rs (so, R1)... The first line is the formula of a voltage divider to know the Vout (not easy reading in GitHub...)
Vout = Vin * (R2 / (R1 + R2))
Vout / Vin = R2 / (R1 + R2)
Vin / Vout = (R1 + R2) / R2
(Vin * R2) / Vout = (R1 + R2)
((Vin * R2) - R2) / Vout = R1
R1 = ((Vin * R2) - R2) / Vout
R1 = ((Vin / Vout) - 1) * R2
So... Rs = ((5V / VRL) - 1) * RL
4° R0 can vary, of course. According to some readings on the internet, the calibration process should be done every 3 months but I don't have specific experience on this. Calibration should be in clean fresh air, you should not do it at every sample.
5° No articles published (it was already a long time ago and not about this discipline ;-) ).
from arduino-mq131-driver.
Hi Oliver, again, thank you veeeery much for doing this! I wish you the best!
The last one!
Could you have chosen "any" resistance instead of 5.1kOhm, since the Hfe ranges from 100 to 630? (respecting the 40mA Arduino limit and knowing that the sensor needs 150mA)
I understand that the current is not relevant as the voltage for the heater...
Thanks!!!
from arduino-mq131-driver.
Hi Marina,
You can choose any resistor to control the transistor. I'm used to use the 5.1kOhms to pilot my NPN. The goal is to saturate the transistor. The voltage on the heater is key, that's why I recommend using a MOSFET.
KR
from arduino-mq131-driver.
Related Issues (20)
- Two sensors MQ131: LOW and HIGH concentration in project HOT 3
- Mixed up formulas in the environmental correction ratio HOT 3
- Collection of data points in the data sheet to define equation HOT 1
- MQ131 analog out less than 1V HOT 1
- doesn't print correctly HOT 1
- Ozone Analyser (03) HOT 1
- Additional processing during the heating/reading process HOT 1
- live data HOT 1
- PPB values HOT 1
- confusing wiring diagram HOT 3
- MQ131 and ESP32 HOT 4
- high concentration mq131 HOT 1
- MQ131 module.
- Ground connection in schematics HOT 1
- Load resistance with 3.3V microcontroller HOT 1
- Unusual Sensor Reading HOT 3
- Low Concentration Qualitative Detection MQ131 with ESP32 HOT 2
- Wrong Readings PPB HOT 1
- Always on? HOT 1
- control temperature HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-mq131-driver.