Arduino Auto Mixing System

Kristijan, open the Blink example in the Arduino IDE and parse it for each line. It will be much faster this way.

And you will know the real joy of the fact that someone can do the work for you on and off the LEDs for free every day! :slight_smile:

Studying and using someone else’s code for self-education is common not only among programmers, but even AI is taught to program in this way today! You can also find Arduino programming lessons on YouTube.


Glister, welcome to Drive On Wood! I really like your insight into the problem statement! Oxygen sensors measure only the relative amount of oxygen in the exhaust pipe. And they don’t understand a damn thing about motor fuels!

If we blow clean, albeit hot enough, helium or argon into the exhaust pipe, then these sensors will try to convince us that our mixture is too rich! Without a single atom of fuel in the pipe! If there is pure oxygen in the pipe, or even fluorine!, then they will sing a song about a poor fuel-air mixture…

The process of controlling the fuel-air mixture using these sensors is very similar to the method of determining the age of a rabbit by its ears and its eggs. Sometimes it is possible to do this if you feel out a lot of rabbits you know before that time, but still among people it is customary to use not indirect signs, but direct measurements: ask the Day and year of Birth, and calculate based on the current date and knowledge of arithmetic.Praise be to the human mind, granted to us by the Creator of the Universe!!! Otherwise, it would be too ticklish for men every time… :wink:

The real purpose of oxygen sensors (except collecting money) is to save the catalyst from overheating and fire under the car. And the real purpose of the catalyst is to earn more and more money by automakers on the sale of supposedly new revolutionary technology to save inevitably decreasing fuel, brazenly covered with an imitation of caring for the environment. But people eat it too! As was already the case with freon, which is heavier than air, but manages to destroy the ozone layer, which is very high… As is happening now with the crazy idea that carbon dioxide, which is so much loved to convert all plants into pure oxygen and their own body, allegedly can cause a greenhouse effect… Carriers of less knowledge are easier to manage.

These sensors more or less work under the condition of more or less stable fuel parameters. Such as gasoline, diesel fuel, ethanol, propane-butane, methane, or at least charcoal gas. Provided that the charcoal is at least a little similar in its properties to the one that the adjuster of this system had during the setting of such an automatic regulator…

And the gas obtained from wood on the move of the car has fun on the move, and changes its composition during the movement of the car. So that the driver, apparently, was not bored on the way! :wink: And neither narrowband nor broadband oxygen sensors know about it. Neither expensive sensors (and at the same time absolutely not eternal) from Bosch, nor Chinese (and also not at all free) replicas of these sensors.

Another nail in the coffin of oxygen sensors is the regulator circuit based on the consequences: first, the engine tries to burn the gas of the wrong composition, and then, maybe, if we are lucky with a signal from such a sensor, we will know that something went wrong, either in one direction or in the other. Thus, a narrow strip of time of a good fuel-to-air ratio will be only a rare voluptuous sip for the engine. Which he will remember when he finally gets to the landfill, after continuous ordeals from a poor to a rich mixture in the work process of such a regulator…

A completely different approach looks like the idea of determining the parameters at which the fuel-air mixture based on wood gas will burn well for the desired engine operation mode we need at the next moment! I.e., we just need to build a system that will foresee the future that will happen in the engine. :wink:

To do this, you either need to know the quantitative and qualitative composition of fuel and oxidizer (and more or less hardy gas analyzers in real time for all this will cost more than a wood gasifier, the newest Mercedes and Space Shuttle combined!), or…

Or directly determine the boundaries of the ratios at which the mixture of momentary composition will burn steadily! Because the poor mixture ignites badly, and the rich mixture also ignites badly. If we put two identical small burners with the same gas flow through them, then by changing the air supply to each of them, and monitoring the presence or failure of the flame, we will be able to find out the extreme limits of the fuel-air ratio we need. What will need to be configured for the engine will be somewhere in the middle.

Naturally, we will need not only two ionization flame sensors, but also two spark plugs to resume it. Although it is possible with the help of the same Arduino (there is still no escape from it on the path of small home automation), and two simple high-voltage converters, to do with just two car spark plugs, which will perform both the function of igniting the lost flame, and monitoring the presence of this flame, measuring the current consumption of each converter after the next attempt ignition of the flame.

I would be very happy to collect and try out this idea in practice, but I hate to keep new thoughts secret inside my head for a long time! Probably because they are very bored in the void … :wink: In fact, discussing new ideas with other people long before they are implemented is very useful to eliminate the weaknesses of these ideas.


Hello Marat, I rarely read such a good article as yours, it’s perfectly written, you gave good examples, it looks like it was written by an expert, an electrician, a programmer, a person with a good idea and knowledge, thank you, you enrich this forum a lot. :+1::clap:


Thank you for your thoughts on this subject.
Being that my application is for the generation of power for battery bank charging, I am searching for a fuel/air regulation system that can modulate when unattended to account for small changes in load.
This system does not have to be a feedback loop from an O2 sensor, I am open to any fairly simple form of sensing and automation. One thing that interests me is the sensing of differential pressures in the intake manifold. One sensor at the entrance, and one on the engine side of the throttle valves.
Much the same as some have done using diaphragms in their vehicles.
The vacuum tells the controller that the engine is under more or less load, but it cannot quantify the current mixture of air/gas.
However, if we know that the optimal mix for an engine is 51% / 49% then we can manually set that mixture when at the operating speed of the engine/generator (1800 rpm in my case).
Any deviation from that speed would be sensed by the differential sensors and depending on the reading the amount of fuel can be temporarily added or reduced.
It may be necessary to automate both the air and gas valves.
A very interesting and enjoyable problem.
I am still in the learning phase of this journey :slight_smile: One of the best places to be.


Yes every fuel has its own scale. On the gasoline scale the stoich mixture for woodgas will read higher on wood / char gas around 15.5 / 15.7. I believe you can change the fuel scales on the AEM. Ive never played with that but I will when I resume next controls development.

Always remember the best code is the code that is already written!


Glister, what kind of fuel will your gasifier run on?

Firewood or charcoal? Automation of the charcoal gasification process is much easier, and maybe it’s worth using a ready-made @Matt Ryder solution to get a quick result?

Own research is undoubtedly very interesting, but it’s a long way. And in the amount of money spent, including money, this way is much more expensive than a broadband oxygen sensor.

Another question is if you want to automate the process of gasification of firewood - very few people do this. But the prospect of putting 75% of the success of this type of gasification into the Arduino program is a very worthy goal! Which is especially nice to do here on DOW! :wink:


I am not sure which fuel to settle on.
I do see the benefits of charcoal.
I have been watching Matt’s excellent videos of how to build the Ammo Can Gasifier.
That unit seems to match my engine size quite well.
Regarding automation, I am more concerned about maintaining the proper engine fuel mixture than the automation of the gasifier, although I would like to control future larger versions by monitoring burn temperature, air inlet flow, and wood chip/charcoal feed. But that is far off at this point.
I have been building small off grid generators for 10 years but they used diesel or alternative liquid fuel systems. I have programmed many Arduino and RasPi automation projects, but where my knowledge lacks is in this area of gasification and fuel mixture control.
Fortunately there is a lot of smart people and discussion on this forum where people can learn.

@Matt Ryder,
I noticed that you do not use any auto throttle system on your Ammo Can units when powering a generator. Is that because you found through experimentation that it is not needed?
And thanks kindly for the great videos that you have produced. :slight_smile:


Yeah the Charcoal systems dont really need it. They run pretty stable but you do at times need to make minor adjustments. So charcoal could benefit from an automixer as well. On a small scale wood gas system I wont bother to operate one without this system. Not worth my frustration restarting a stalled out gasifier system along with the power inconsistencies.