author
3Instructables54,833Views155CommentsKyiv, UkraineJoined January 28th, 2017
I love cyberpunk and work as an electronics engineer, not much to add here

Achievements

100+ Comments Earned a bronze medal
10K+ Views Earned a bronze medal
  • the_3d6's instructable Robotic Hand Control With EMG's weekly stats: 19 days ago
    • Robotic Hand Control With EMG
      61 views
      0 favorites
      2 comments
  • the_3d6's instructable ECG Based Heart Rate Indicator Ring's weekly stats: 5 weeks ago
    • ECG Based Heart Rate Indicator Ring
      160 views
      2 favorites
      0 comments
  • Your questions are perfectly valid :)Low quality DC-DC when attached to a small load (like tester) could produce really high noise (tens of mV). But when attached to a battery, noise would be significantly reduced - battery takes most of it, although on higher frequencies it does it not as efficiently. So battery + capacitor result in a good enough filter.If you want to attach it without battery, it's best to add a small resistor in series (~1 ohm), and both small and larger (5...10 uF) capacitors in order to be safe

    View Topic »
  • Hooking it into battery would reliably filter low-frequency noise, but if you want to be safe - add 100nF ceramic (that's important) capacitor across battery's + and -, that would reduce HF noise significantly (battery is too "slow" to react on HF noise, and small ceramic capacitor is "fast").All testers that plug into 110/220v have good input filters, it's really not complicated - a few capacitors after good LDO would do the trick. But tester that is designed to run from a battery doesn't have them

    View Topic »
  • Arduino Based ECG & Heartbeat Monitoring Healthcare System

    This module doesn't calculate bpm. You need to write an ECG analyzing code for this. If you want a simple way to get bpm - you'll need a device of another type, you can check how I did it in my instructable: https://www.instructables.com/id/Heart-Rate-Indicator-Ring/

    View Instructable »
  • Multimeter's power schematics should compensate any voltage change in like 7.5-9.5v range (exact range depends on model), but high frequency noise from any dc-dc converter most likely would get through since power schematics isn't designed to filter it out - and that noise would cause quite unpredictable effects. I'd really recommend either 9v rechargeable battery or 2-cells LiPo battery (when charged more than 50% it would provide enough voltage)

    The problem would be not voltage, but measuring precision. Battery provides super stable current supply with virtually no noise - so I suggest you to use a rechargeable battery. Any AC-DC or DC-DC converter will have a significant noise in its power line, and that inevitably would distort readings. If you want just to check connectivity or distinguish between, say, 3.5 and 3.7 volts - then it would work just fine (at least all my testers worked down to 7.5 volts battery before they became unreliable). But if you want to measure with 1% precision or better - then power supply noise might become a serious problem (it all depends on schematics of particular meter, so some might perform better that others, but to some degree it would affect any of them)

    View Topic »
  • Monitor Dress - Connect Heart Signals to the IoT

    Looks really cool! I actually made a similar thing just now ( https://www.instructables.com/id/Heart-Rate-Indicator-Ring/ ) - with an ECG sensor that works quite reliably while you move around. You might find it interesting.

    View Instructable »
  • the_3d6 commented on tamberg's instructable Web-enabled Polar Heart Rate Monitor6 weeks ago
    Web-enabled Polar Heart Rate Monitor

    I know it's been quite a while since you've asked, but now we made a device that can do exactly this :) You might want to check it: https://igg.me/at/uecg

    View Instructable »
  • the_3d6 commented on qthurtle's instructable DIY ECG EKG Portable Heart Monitor 6 weeks ago
    DIY ECG EKG Portable Heart Monitor

    You've got actually great signal quality! We were working on our ECG device ( https://igg.me/at/uecg ) for a while, and even with well optimized PCB it wasn't easy to reach high quality (mains noise still gets through) - and you did it with a bunch of separate modules!

    View Instructable »
  • the_3d6 commented on h_salaman's instructable Electrocardiogram (ECG) Circuit6 weeks ago
    Electrocardiogram (ECG) Circuit

    Not sure if that helps, but if you are looking for a project that can get you raw ECG and processed HRV data - then check out our device ( https://igg.me/at/uecg ). Its schematics (and a bit later source code, when we'll clean it up and properly comment) are available here: https://hackaday.io/project/164486-uecg-a-very-small-wearable-ecg

    View Instructable »
  • the_3d6 commented on BrunoV18's instructable DIY ECG + Arduino + LabView6 weeks ago
    DIY ECG + Arduino + LabView

    We are working on ECG device ( https://igg.me/at/uecg ), and we were unable to filter out 50/60 Hz using hardware filters - it just takes too many components to make it sharp enough. Instead, we developed a software filter that produces amazing results with quite simple math. You can read a bit (and see results) here: https://hackaday.io/project/164486-uecg-a-very-small-wearable-ecg/log/160808-project-timeline . Source code is not available yet (it is an open source device but we want to clean and comment code before making it publicly available), but if you want it now - I can clean and share the code of that filter :)

    View Instructable »
  • Arduino Based ECG & Heartbeat Monitoring Healthcare System

    Actually it's hard to get a good signal with this hardware - we tried a lot of approaches, and for a system that can be used while walking or running you need more than that. You might want to check my instructable (also there are links to the device we developed, and I'll be happy to answer any questions): https://www.instructables.com/id/Heart-Rate-Indicator-Ring/

    No, you can't get ECG signal from wrist alone - either you need to touch it with the other hand (so there will be a circuit going through heart), or you need to use PPG sensor instead (not reliable when you are not staying still). But if you want to blink LEDs with heartbeats - then check my instructable, I'm doing exactly that :) https://www.instructables.com/id/Heart-Rate-Indicator-Ring/

    View Instructable »
  • the_3d6 entered Heart Rate Indicator Ring in the Sensors Contest contest 6 weeks ago
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor2 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    Hi! I don't know where to start. Have you read sensor's datasheet and have you looked at the module schematics? I did both and found no way to make measurements in a way described in the datasheet using this module - and so I've developed a way to follow datasheet's procedure and described it here

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor3 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    You will need a significantly different schematics for this case to make it optimal.With discrete sensor, you want to completely separate heating and measuring circuits.For measuring part, it's simple: you connect Particle's 3.3V to one side of sensing wire, connect other side of sensing wire to analog input and to the ground via reference 10k resistor (R3 in current schematics). To get more stable readings you can add small (100-1000 nF) capacitor in parallel with this resistor.Heating part is more tricky. You want to connect one side of heating coil directly to LiPo positive side (to avoid power loss, LiPo voltage should be enough for the heating phase even when it's discharged). Another side of the heating coil should be connected to transistor that further goes to the ground (Q1 in ...

    see more »

    You will need a significantly different schematics for this case to make it optimal.With discrete sensor, you want to completely separate heating and measuring circuits.For measuring part, it's simple: you connect Particle's 3.3V to one side of sensing wire, connect other side of sensing wire to analog input and to the ground via reference 10k resistor (R3 in current schematics). To get more stable readings you can add small (100-1000 nF) capacitor in parallel with this resistor.Heating part is more tricky. You want to connect one side of heating coil directly to LiPo positive side (to avoid power loss, LiPo voltage should be enough for the heating phase even when it's discharged). Another side of the heating coil should be connected to transistor that further goes to the ground (Q1 in current schematics), but you can't connect this side directly to Particle's analog input: voltage there will be too high and it would damage it. You need to divide it with two 100k resistors: one resistor is connected to heating coil and analog input, second connected to that analog input and ground. And also you will need a capacitor (~1uF) connected in parallel with this second resistor.In this schematics, measured voltage should be multiplied by 2 in the program to get real voltage on the heating coil.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor3 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    It doesn't work here: during low heating stage, you should see a curve that actually has information about CO level - but instead you have a flat line. This definitely isn't right. I have no idea except for faulty schematics or faulty component somewhere...As for pm sensor - it requires quite a lot of power, not sure if it can work together with CO sensor - but you can check

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor3 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    These capacitors don't work here. They have too high internal resistance to provide filtering. Please use tantalum ones, or if you don't have any - ceramic. If you don't have 10uF, try using smaller value, probably 1uF still would work.Also, another important point: how you are powering the whole setup? If you use Arduino's Vin pin and battery - then it might not work depending on exact Arduino model - heating coil requires too much current and it will distort analog readings. Use USB power instead

    No, it is fine, problem is elsewhere. And what it prints during initial adjustment phase?

    ...I think I see the problem. What capacitors you have used as C1, C2? Value and type? If they are large electrolytic caps - then most probably they just don't work

    Yes, and it looks good... Try different R3 values - 1k and 100k instead of its current value. Maybe your sensor has parameters that are way too different from mine, then it could help

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor4 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    You seem to miss the point of resistor divider which is formed by sensor and reference resistor.Clean air value is what you get from this divider when sensor is at its maximum resistance. With CO concentration increase, resistance drops, and raw value gets higher - but definitely not linearly, not even close. So this setup allows measuring any CO concentration this sensor is capable of - with lower precision in high PPM area.If you want lower value at clean air - you can just decrease value of a reference resistor, but you will get lower sensitivity in low PPM area in this case (you actually can decrease it a bit - but when you will understand how it works, you will also know what is your ideal value and whether you want to tune it)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor4 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    You can revert time to normal but that will cost you buzzer :) I'm using Timer0 to generate sound for buzzer and there are no free timers to replace that. But if you don't need one - then you can do the following:line 18: int time_scale = 8; -> change it to 1line 24:void setTimer0PWM(byte chA, byte chB) //pins D5 and D6{ TCCR0A = 0b10110011; //OCA normal,OCB inverted, fast pwm...change that tovoid setTimer0PWM(byte chA, byte chB) //pins D5 and D6{return; TCCR0A = 0b10110011; //OCA normal,OCB inverted, fast pwm...this will make program to ignore all attempts to change Timer0 settings, so it will keep standard timing parameters

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor5 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    I thought that too initially, and only when you've sent your data, I realized that it's not like that: both Rs/R0 and PPM are in log scale, so dependence is in fact linear.What is the raw reading from the sensor when you measure 54 ppm with analyzer? If you can send several points in 0-100 range then we can find out what would be a proper equation (just checked again - my current formula more or less fits datasheet, not precisely in high ppm area but not to the point where it would give 2 instead of 54)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor5 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    Wow... I've made a serious mistake there: I've misinterpreted datasheet, thought there was exponential relation of PPM on relative resistance, but actually it is linear. Not sure how I got quite reasonable results when I tested it, the only explanation is that I tested it only in 0-40 PPM area and there difference between linear and exponential wasn't that big. For everything higher than 50 PPM my results were much higher than real concentration.I've fixed it and updated code in the instructable, please download and test it. Also if you can test it in high PPM area, that would be awesome.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor5 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    Arduino Mega-2560 has totally different PWM pins. I'm using hardware timers so pins are linked to particular mcu. When you switch from atmega328 to atmega2560, following changes must be applied:Arduino Uno pin -> Arduino Mega pin:3 -> 95 -> 46 -> 139 -> 1110 -> 1211 -> 10

    Yes, what's the problem? If you have set it using calibrated CO-meter - then one formula is applied. If you don't have one, it remains -1 and another formula is applied

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor6 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    Hmm. these sensors really have high variation in resistance of sensitive coil - but it looks a bit too much (one with low readings implies sensing resistance of ~40k instead of 10k, one with high readings implies sensing resistance of ~3k instead of nominal 10k). Still not impossible, especially if sensors are from different manufacturers.Have you added capacitors C1 and C2? From your data it looks like in modified_modul file you are missing C2: values are very noisy.As for CO measurements - in the second case (sensor_with_pcb_only), data look +- fine, so you can replace R3 with something like 30k and then calibrate the sensor (fill sensor_reading_clean_air variable at line 95 with your actual reading and fill reference_resistor_kOhm variable with actual R3 value in kOhms)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor6 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    *actually, if you modified my code - please upload your project here. I'm heavily using hardware timers, if you added library that uses them too, then that might be the answer ))

    What powers Nano? Is that source good enough? If you are powering it via USB from a PC port, it might not be able to send more than 100 mA (due to usb configuration specifics - depending on exact Nano model that might or might not be the case). You can check that by powering it via USB that is connected to some phone charger.*if you are powering Nano with some kind of 9V battery - then it's most likely the case, 9V ones normally can't output enough current.Also have you checked that base/emitter/collector of transistor are connected in the right way? You never can rely on how a package looks, always need to check datasheet for this exact part.If all of it is not the case - and if you are storing not calculated CO values but raw analog output from the sensor - then I need to see a longer...

    see more »

    What powers Nano? Is that source good enough? If you are powering it via USB from a PC port, it might not be able to send more than 100 mA (due to usb configuration specifics - depending on exact Nano model that might or might not be the case). You can check that by powering it via USB that is connected to some phone charger.*if you are powering Nano with some kind of 9V battery - then it's most likely the case, 9V ones normally can't output enough current.Also have you checked that base/emitter/collector of transistor are connected in the right way? You never can rely on how a package looks, always need to check datasheet for this exact part.If all of it is not the case - and if you are storing not calculated CO values but raw analog output from the sensor - then I need to see a longer sample, maybe I'll have a guess what else could be wrong here

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor6 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    80mA might be ok, it varies a lot from sensor to sensor. But it's worth checking if you are powering it properly - what power source you are using?As for your chart - not sure how you got it, if it is CO value from my program then probably something vent wrong ))

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor9 months ago
    Arduino CO Monitor Using MQ-7 Sensor

    I'm not 100% sure but it's very likely that mq-135 would require the same procedure of heating-cooling cycles and taking sample at the end of cooling cycle

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    They shouldn't be reversed logically, but I can't guarantee it without re-assembling the board :) The most reliable way to tell is to check how it reacts to high CO concentration

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    This looks like red and green leds are mixed. Please put lighter next to the sensor so CO level will rise - if you'll see red led turning off and green one lighting up, then that's it - change places of red and green ones :)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    I'm so sorry for your loss! It's terrible! I actually want to create a wearable sensor one day, but still hadn't found a low power option for CO measurement.When you put lighter, readings will update at the end of measuring cycle - so if you put it in the middle of heating phase, you will see the result only in about 2 minutes. If you will put lighter during heating phase, and then will remove it still during heating phase - sensor won't see it at all (heating phase clears sensor surface).But if you put lighter soon before measuring cycle ends, and won't see any result - then something is definitely wrong.Burn cycle is required only once in a lifetime for a sensor (maybe once again if it wasn't used for years, but definitely not days).Sensor without cap and resistor removed will produce...

    see more »

    I'm so sorry for your loss! It's terrible! I actually want to create a wearable sensor one day, but still hadn't found a low power option for CO measurement.When you put lighter, readings will update at the end of measuring cycle - so if you put it in the middle of heating phase, you will see the result only in about 2 minutes. If you will put lighter during heating phase, and then will remove it still during heating phase - sensor won't see it at all (heating phase clears sensor surface).But if you put lighter soon before measuring cycle ends, and won't see any result - then something is definitely wrong.Burn cycle is required only once in a lifetime for a sensor (maybe once again if it wasn't used for years, but definitely not days).Sensor without cap and resistor removed will produce wrong results, although there is a way around it with a neat trick in the code - but I hadn't thought about it when created this project, and so hadn't implemented (also, it isn't clear if it will work well with BJT transistors, it could be that it will give accurate results only with mosfets).Also, for accurate measurements, correction by humidity and temperature must be introduced (humidity/temperature change can move zero point very significantly, for 50-100 ppm, so without them sensor is good only for quite high concentrations, but might not detect less dangerous ones) - I started this work and even made a dedicated PCB for it, but never really completed. Maybe I will soon

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    The value won't change anymore. Put current value as clean air value in the code

    Great that you figured that out! :)720 measuring, ~200 heating looks very good, I'm almost sure you have everything right now

    Clean air value of 970 is completely wrong if you have correct load resistor. Since before you had reasonable PPM value, it almost surely means that you had correct schematics before. On my photo there is a relatively rare transistor package which has base pin not in the center.In any case, you can't use neither photo nor breadboard diagram as a reference: base, collector and emitter are not marked there, and for different transistor models they will be placed in different places. You need to look at schematics and make sure you connect base, collector and emitter to the correct points - and you can find function of each pin of your transistor by looking at its datasheet.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Blue pot doesn't have any effect if you made modification described in step 2.But you need to measure and write in the code clean air value after 10 hours run: each sensor is different, value in the code works only for my particular unit. When you will put it there, in clean air it should reliably produce 0-5 ppm. Without that adjustment, 38 ppm looks completely normal.Thanks :)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Thanks :)These resistor and capacitor are connected from AO to sensor's GND pin. The problem is, in this setup sensor's GND is not connected to the schematic's ground, but to transistor which controls heating coil using PWM (the main problem of the module is that heating coil is connected in parallel with measurement sensor - and modification breaks this connection). Resistor would prevent getting any reasonable readings when PWM is on, and capacitor would introduce PWM-induced noise, so both have to go. Recently MakerMaik proposed alternative approach in comments that will work without modifying the module - to turn off PWM and open transistor during (short) measurement phase - but I hadn't thought of this during initial development. Also this would work reliably only with MOSET transi...

    see more »

    Thanks :)These resistor and capacitor are connected from AO to sensor's GND pin. The problem is, in this setup sensor's GND is not connected to the schematic's ground, but to transistor which controls heating coil using PWM (the main problem of the module is that heating coil is connected in parallel with measurement sensor - and modification breaks this connection). Resistor would prevent getting any reasonable readings when PWM is on, and capacitor would introduce PWM-induced noise, so both have to go. Recently MakerMaik proposed alternative approach in comments that will work without modifying the module - to turn off PWM and open transistor during (short) measurement phase - but I hadn't thought of this during initial development. Also this would work reliably only with MOSET transistor (because BJT, which I used in this case, will introduce generally unknown voltage shift).R3 forms voltage divider with sensing element - because sensor is a resistor, which resistance depends on CO concentration. Yes, technically it is a load resistor - but I don't like term "load" when resistor has higher resistance than sensing element, it may lead to a wrong idea about the sensor behavior.C2 is used to stabilize readings, and is connected to Vcc because at the moment I thought that Vcc might be a bit more stable than GND on a breadboard (since we switch transistor on GND side, not on Vcc side). Although this might be not true depending on particular wiring approach and I believe it won't make any real difference if C2 is connected between AO and GND. But without C2 at all, readings are significantly worse - I showed oscilloscope output with and without it in step 3.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    I see - but you put there wrong formulas. Columns B and C don't make any sense, *0.001 and *0.9999 are parts of the filter, they are used to average over tens of thousands of readings - you can't put them into excel sheet and expect any result.Arduino code measures thousands of values per second, each with significant random noise, and this approach allows to get rather precise result by averaging them

    Have you changed clean air value in the code to your real data?3V in clean air is a correct value, depending on sensor, for given resistor it could be between 2 and 3.5 V.Also, how do you increase CO concentration to test the system?You can send your data to my mail aka.3d6@gmail.com

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    What data you are getting? Have you performed 10-hours running before calibration? Without it, value drifts a lot, often to a complete nonsense.1. yes, 0-1023, it is value from Arduino's analogRead.2. if you will send your raw data, I can make a guess what is wrong

    Wow, great visualization!Converting from mV into ppm is relatively simple using charts from the datasheet, but is never precise without direct calibration

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    The board is good btw, although I prefer smaller PCBs with separate MCUs for quite a while already, but here size is not a problem I think. I've made a version with atmega328 and connector for dht11, but when it came from board house I didn't liked it - it's just not useful like this, need at least to add some radio, or switch MCU to nRF51 altogether

    Hi! It's a good experiment, but concentration is a bit too high to get useful data. If you burned charcoal well, then CO concentration was in 10-15k ppm range - so after 20:500 dilution it is in 600+ ppm. No wonder you won't see huge difference between single and double, triple concentrations - all of them are in saturated area of this sensor. I don't think it's possible to precisely estimate concentrations in this area without humidity measurements, and also I'm not sure if this is area of high interest - if you have any control over situation, you want to do something when CO hits 100 ppm already (because at 1000 it might be too late).The most interesting is whether it's possible to measure something like 30-50 ppm at various humidity

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    On the output, raw value is ADC reading - so it's not resistance, but middle point of voltage divider where one side is sensor, other is 10k. Actually it's a great idea to transform this reading into resistance itself and plot graphs, will do.But in order to move further with analysis I need rated samples for different humidity (it would be perfect to get verified ones, but relative where we have x1, x2, x4 concentrations without knowing absolute value would also do) - that's what stopped me all this time :)NN is a very simple and rather predictable method (if it is a small MLP and you know what you are doing :) ), that's the only reason why I want to use it - just might be faster and more reliable. Even though I would prefer exact model of physical processes going there, for now I'm no...

    see more »

    On the output, raw value is ADC reading - so it's not resistance, but middle point of voltage divider where one side is sensor, other is 10k. Actually it's a great idea to transform this reading into resistance itself and plot graphs, will do.But in order to move further with analysis I need rated samples for different humidity (it would be perfect to get verified ones, but relative where we have x1, x2, x4 concentrations without knowing absolute value would also do) - that's what stopped me all this time :)NN is a very simple and rather predictable method (if it is a small MLP and you know what you are doing :) ), that's the only reason why I want to use it - just might be faster and more reliable. Even though I would prefer exact model of physical processes going there, for now I'm not understanding all details deep enough

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Thanks for the data!Can't agree with this formula though. I've attached a sample from your data, with levels adjusted so initial value is zero in both cases. As you can see, in high CO case, we get exponential decrease (slow enough for it to look like linear), while in low CO case we see slow increase. From physical point of view, both cases must have asymptotic behavior - resistance can't get to zero or infinity - and I believe its position depends on all conditions.I actually can't explain physics of high CO case, why resistance decreases when more CO is absorbed. Has it something to do with temperature of maximum sensitivity? Like during cooling, at seconds 5-15 sensor bonds with more CO than would be its equilibrium state at temperature which is reached later? But if that is the cas...

    see more »

    Thanks for the data!Can't agree with this formula though. I've attached a sample from your data, with levels adjusted so initial value is zero in both cases. As you can see, in high CO case, we get exponential decrease (slow enough for it to look like linear), while in low CO case we see slow increase. From physical point of view, both cases must have asymptotic behavior - resistance can't get to zero or infinity - and I believe its position depends on all conditions.I actually can't explain physics of high CO case, why resistance decreases when more CO is absorbed. Has it something to do with temperature of maximum sensitivity? Like during cooling, at seconds 5-15 sensor bonds with more CO than would be its equilibrium state at temperature which is reached later? But if that is the case, why we see the opposite in low CO? Is it because there are so few CO molecules that we need much longer time to reach equilibrium state?In any case, this is not exp * linear. Neural network is just a simple way to deal with function without analyzing it directly :) For a good function I would gladly write some fitting algorithm - but it's necessary to understand the role of each parameter of such function to interpret the result

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Great experiment, thanks! It's very interesting that absolute values of sensor readings are affected by humidity really a lot, but shape of the curve remains very similar. Can you send the data too? Plain difference between beginning and end of 90s period works, but I believe much better result can be obtained by analyzing first 30-40 seconds, I still think neural network could be the best solution here (although that requires confirmation).If you have time/inspiration to make more quantitative CO samples (like I did, using syringe and putting in 5, 10, 20, 40 cc of high-CO sample into a known sensor's air volume), for several humidity levels - then I can promise that I will make NN-based part and share its code really soon :) I wanted to make such set of measurements myself for quite a...

    see more »

    Great experiment, thanks! It's very interesting that absolute values of sensor readings are affected by humidity really a lot, but shape of the curve remains very similar. Can you send the data too? Plain difference between beginning and end of 90s period works, but I believe much better result can be obtained by analyzing first 30-40 seconds, I still think neural network could be the best solution here (although that requires confirmation).If you have time/inspiration to make more quantitative CO samples (like I did, using syringe and putting in 5, 10, 20, 40 cc of high-CO sample into a known sensor's air volume), for several humidity levels - then I can promise that I will make NN-based part and share its code really soon :) I wanted to make such set of measurements myself for quite a while already, but just can't find enough time and will for it

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Interesting! Intuitively I would expect that DHT22 is sensitive only to very high CO concentrations (500+ ppm) - can you confirm whether it's true? Overall, by analyzing dynamics it could be possible to estimate concentration quite well even if humidity and temperature are unknown - I saw indications of it in my experiments, but never really studied it well. If you can record a set of data in different conditions, I would be happy to analyze them and we can publish the result :)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    They wanted to make a digital output that switches at given CO concentration but failed to do so, because haven't followed sensor datasheet

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Resistance is correct, but your values are not good. In clean air you should get something around 600-700 if schematics works. Value of 987 could be caused by non-working transistor - please triple check if you connected it right.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Hi! DO connection is left unused, that's right.90uF are fine, as for polarity - caps that have polarity have some markings on their case, if you are not sure you can try to google by how it looks.You should see raw data output in serial monitor. Also, after you'll run your sensor for ~10 hours, you'll need to write this raw value in .ino sketch to calibrate the sensor (each sensor is a bit different, so program doesn't know what is "zero" before you fill it - this code works for my particular sensor).

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Hi! Excellent point about modification, really we can just turn on 100% to get value, haven't thought of that! Will use it for sure.But can't agree with reading at 90s only - in this case we lose signal dynamics, which tells a lot about actual concentration. It's possible to detect high CO level much earlier than in 90 seconds, and it's possible to estimate low level more precise looking at the whole curve. I wasn't using it in this instructable, but these data are generally useful. It's not complicated to adjust program so PWM cycle is stopped each second for 5...10 ms to get sample at that moment. - great idea about 60+10+10... cycles, really can make it fully independent this way. Will use it too, thanks :) - yeah, I even made a 2nd version with DHT11 and its own PCB, but still haven...

    see more »

    Hi! Excellent point about modification, really we can just turn on 100% to get value, haven't thought of that! Will use it for sure.But can't agree with reading at 90s only - in this case we lose signal dynamics, which tells a lot about actual concentration. It's possible to detect high CO level much earlier than in 90 seconds, and it's possible to estimate low level more precise looking at the whole curve. I wasn't using it in this instructable, but these data are generally useful. It's not complicated to adjust program so PWM cycle is stopped each second for 5...10 ms to get sample at that moment. - great idea about 60+10+10... cycles, really can make it fully independent this way. Will use it too, thanks :) - yeah, I even made a 2nd version with DHT11 and its own PCB, but still haven't run full experiment with it, but I will one day )) - as for raw values, that's for sure, I just hope that relative change of resistance is more or less consistent across different sensors (so with proper initial value adjusted in the code, result will be fine). But I haven't checked, if it's not true, then I see no way to get accurate readings without full calibration of each particular one

    What is your sensor resistance (between AO and Vin) when it is completely disconnected from the board? Another person wrote me recently with the same problem, and it appears that particular sensor had completely wrong resistance, it could be the case here too (maybe they changed production line and new sensors just have different default value? Or they just randomly produce wrong ones? I have no idea)Also, have you filled correct clean air value in the code? Even though with such readings you won't get useful data, it would be closer to real level then....on Fritzing that connection really does nothing, I just forgot it ))

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    I have no idea, for my particular sensors it seems +-10 ppm precise for low concentrations (haven't tested much past 100 ppm), but I tested only with 2 units bought at the same time - who knows, maybe for different ones from different production lines it will be much worse

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    You can try - noise will be higher, but it still will work. If you are looking for higher precision, then it's better to get 10 uF.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    I'm not sure - never worked with them - but probably they are

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Yes, but you must connect its ground to Arduino's ground

    With 2560, hardware timer pins probably are not the same - so it won't work as intended without some modifications. Need to check atmega2560 datasheet to see whether timer code will work, and which pins will be affected

    transistors can't have 4 logical pins (they might have 4th thermal pad, but logically transistor by definition has 3 pins - one where charge goes into it, one where charge goes out of it, and one which controls whether charge will flow or it's blocked)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    The simplest way to produce a sample of CO is to cover an ordinary candle with a glass jar. Inside the jar flame will consume significant part of oxygen and will produce some CO. It's hard to say how much exactly, but probably it will be inside 3000...10000 ppm range. If you produce it in a jar with volume less than 1 liter, then even if it's opened in a small room, concentration won't get anywhere close to a dangerous level

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    I don't see any way to use it for battery powered device while following manufacturer's datasheet.It might be used in a different mode, with heating turned completely off most of the time. In this case we can monitor its resistance, and detect increase in CO concentration when it drops too fast. But in this scenario sensor surface will be covered with other substances over time, so probably no static threshold can be used at all, and once in a while you'll need to run 60-second heating cycle to clean the sensor.Experiments are required to determine how often this is actually needed, if it will be enough to heat it for 60 seconds once in several hours, then it can be used with batteries. Measurement precision will be much worse in this mode, but probably still good enough to detect 50 pp...

    see more »

    I don't see any way to use it for battery powered device while following manufacturer's datasheet.It might be used in a different mode, with heating turned completely off most of the time. In this case we can monitor its resistance, and detect increase in CO concentration when it drops too fast. But in this scenario sensor surface will be covered with other substances over time, so probably no static threshold can be used at all, and once in a while you'll need to run 60-second heating cycle to clean the sensor.Experiments are required to determine how often this is actually needed, if it will be enough to heat it for 60 seconds once in several hours, then it can be used with batteries. Measurement precision will be much worse in this mode, but probably still good enough to detect 50 ppm. Any application of such sensor in this mode requires extensive experiments with multiple units (performed better than ones in manufacturer's datasheet)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Everything is correct: sensor signal isn't stable when we turn heat down, it stabilizes only at the end of the low heat cycle. So program makes decision about CO concentration a few seconds before turning on heating. Therefore, when placed in high-CO environment, you will see alarm approximately at the beginning of the next heating cycle.For really high CO concentration decision can be made much faster (just a few seconds into cooling phase), but my program is optimized for scenario when concentration is changing slowly.Pins 10 and 9 depend on timer channels - arduino timers often have 2 separate channels, they share the same counter and all settings, but have different threshold values (so you can make 2 PWM signals using a single timer). In order to switch between pin 9 and pin 10 in ...

    see more »

    Everything is correct: sensor signal isn't stable when we turn heat down, it stabilizes only at the end of the low heat cycle. So program makes decision about CO concentration a few seconds before turning on heating. Therefore, when placed in high-CO environment, you will see alarm approximately at the beginning of the next heating cycle.For really high CO concentration decision can be made much faster (just a few seconds into cooling phase), but my program is optimized for scenario when concentration is changing slowly.Pins 10 and 9 depend on timer channels - arduino timers often have 2 separate channels, they share the same counter and all settings, but have different threshold values (so you can make 2 PWM signals using a single timer). In order to switch between pin 9 and pin 10 in my program, in all places where function setTimer2PWM is called, you need to switch first and second parameters (now first is 0, second is some value, so one channel of this timer isn't used).

    It depends mostly on 2 parameters: reference resistor (10k in my schematics, but you can use different value) and sensor's manufacturing process - they are supposed to have the same clean air resistance, but I believe it actually varies quite significantly

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    ...and also you need to add modification into code lines 212-216:pinMode(5, OUTPUT);pinMode(6, OUTPUT);pinMode(3, OUTPUT);pinMode(9, OUTPUT);pinMode(10, OUTPUT); - change pins numbers to new ones

    Yes, pin 3, controlled by timer2 - everything else is optional. AnalogWrite according to this page: https://www.arduino.cc/en/Reference/AnalogWrite produces PWM at 490Hz. This is very low frequency, power-related noise at such frequency won't be filtered by capacitors and, therefore, will distort readings. With direct timer setting, PWM frequency is 62.5KHz - more than 100 times higher - so capacitor filters it quite well

    In order to make it work with the same pins, all timers code must be rewritten. Here are timer pins: https://playground.arduino.cc/Main/TimerPWMCheatsh... My code simply writes values into timer control registers (with names like TCCR1A), I got values from atmega328p datasheet (like pages 131-135 for TImer 1, it's easy to find them when you are looking for timer register description).Timers are devices that are independent from microcontroller core, in this case I'm using them to generate PWM signals. Timer has cycle length which is defined in control registers (in this program it's 255), and threshold. When counter is below threshold, corresponding pin is low, when it's above threshold, corresponding pin is high. Counter is increased automatically with configurable rate.PWM, in turn, i...

    see more »

    In order to make it work with the same pins, all timers code must be rewritten. Here are timer pins: https://playground.arduino.cc/Main/TimerPWMCheatsh... My code simply writes values into timer control registers (with names like TCCR1A), I got values from atmega328p datasheet (like pages 131-135 for TImer 1, it's easy to find them when you are looking for timer register description).Timers are devices that are independent from microcontroller core, in this case I'm using them to generate PWM signals. Timer has cycle length which is defined in control registers (in this program it's 255), and threshold. When counter is below threshold, corresponding pin is low, when it's above threshold, corresponding pin is high. Counter is increased automatically with configurable rate.PWM, in turn, is needed for 3 different purposes:1. it controls heating coil, in order to provide low heat phase (according to MQ-7 datasheet, CO measurement must be performed not with heater turned off, but when it runs at lower power). This part is essential and PWM is the only reliable way to achieve it.2. it's used to change intensity of green and red LEDs. It's not really important, but gives more visual information about detected concentration.3. it's used to generate sound on piezo buzzer. Can be replaced with some kind of piezo generator that only requires power to produce sound.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Everything seems to be correct (assuming that you never connected "gnd" of MQ-7 board to Arduino's GND). Are you sure that your "D2" actually is connected to D3 pin of Arduino? Are you 100% sure that you put transistor in a correct way, not swapped emitter and collector? In which way you are providing power to all components?

    Are both collector and emitter connected to GND? I'm not sure if I recognized your labels correctly

    I'm sorry - I never really looked in Arduino Mega datasheet and assumed that it has the same pins as others arduinos, based on atmega328p processor. But it's not like this!Arduino Mega has different pins for timers 0, 1, 2. And since everything here is based on timers, pin connections must be different:pins 5, 6 must be changed to 13, 4;pin 3 must be changed to 9;pins 9, 10 must be changed to 12, 11.Please write if it will work - I can't confirm right now that my code will init/set timers for atmega2560 correctly, I briefly looked at datasheet and it seems ok, but I easily could have missed something

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Because these modules are designed by people who are supposed to finish such PCBs within a couple of days (so their price stays really low). It's only natural that they have design mistakes

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Link is at the end of chapter 5 of this instructable :)

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor1 year ago
    Arduino CO Monitor Using MQ-7 Sensor

    Sure, arduino uno will work in exactly the same way. Most arduino models have the same chip in their core - atmega328p - so schematics and software will be 100% compatible

    View Instructable »
  • MIDI-Controlled 88 Key Reed Organ With MIDI-Over-Bluetooth

    Awesome work! It's a completely different level, one of the most complicated DIY projects I've ever seen - and I mean it, 88 keys fully reworked and calibrated so they work flawlessly, that's something!You can somewhat simplify electronics by using shift registers - 11 of them will be enough to control the whole range, in this case a single Arduino will handle everything. But that's a minor thing, not sure if it's worth working on it.

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor2 years ago
    Arduino CO Monitor Using MQ-7 Sensor

    It seems you did everything correctly, maybe you just put red led on a place of a green one? Because if you'll switch red and green, it works like it should - normally blinks green, and when there is CO, blinks red.Is buzzer working when you put lighter there, or you haven't attached one?

    View Instructable »
  • the_3d6 commented on the_3d6's instructable Arduino CO Monitor Using MQ-7 Sensor2 years ago
    Arduino CO Monitor Using MQ-7 Sensor

    That means that detected CO level is too high. This, in turn, could be caused by problem in calibration. Have you left it on for 10 hours before measuring calibration value? How you performed calibration?

    View Instructable »
  • the_3d6 commented on TanyaAkinora's instructable Elveet. Kinetic Charger Powerbank2 years ago
    Elveet. Kinetic Charger Powerbank

    I believe you have not measured this properly. If there really was present 300mA current, it would have destroyed NCP1402 which you used: your coils have copper resistance of more than 50 Ohms, so if you would get there 300mA, it would mean that at the very least 15 Volts of EMF were produced (that completely ignores all other parts of circuit and inductances, so more likely you'll need 25V to get 300mA through coils). NCP1402 absolute maximum input voltage is 6V.Since it survives your device operation, it can be safely assumed that your peak current doesn't normally get above 50mA.And even if it was going higher than 300mA for a few milliseconds, any decent capacitor would have reduced it greatly. Average current in this device will be in a few milliamps range. 10uF might be not suffic...

    see more »

    I believe you have not measured this properly. If there really was present 300mA current, it would have destroyed NCP1402 which you used: your coils have copper resistance of more than 50 Ohms, so if you would get there 300mA, it would mean that at the very least 15 Volts of EMF were produced (that completely ignores all other parts of circuit and inductances, so more likely you'll need 25V to get 300mA through coils). NCP1402 absolute maximum input voltage is 6V.Since it survives your device operation, it can be safely assumed that your peak current doesn't normally get above 50mA.And even if it was going higher than 300mA for a few milliseconds, any decent capacitor would have reduced it greatly. Average current in this device will be in a few milliamps range. 10uF might be not sufficient for that purpose, but 0.47F supercap would be more than enough.BQ25504 is much more efficient in converting power, so this is a good option.

    View Instructable »
  • the_3d6 commented on medinc's instructable Build This TinyLiDAR Arduino Radar2 years ago
    Build This TinyLiDAR Arduino Radar

    Thanks for the info! I was thinking of using two separate lenses (which is complicated in such a small footprint), but proper light insulation still is an issue in this case. Overall, I'm not sure if it is technically feasible, but I'll try

    Wow, VL53L0X seems to be a great part, thanks for sharing!Have you tried to put there some optics in order to increase operating range?

    View Instructable »
  • More Activities