hello,
i built gasifier a year ago ,but could not use it otherwise than just burning flare and heating workshop, because engine of the generator was missing magneto.
as solution i tried to use an arduino hooked to hall sensor and two ASIC ignition coil drivers.
now the generator is putting out 2.5 - 3.5 kw of power, depending on gas quality.
here is link to the video of the generator running ))
Hello Andris,
This looks very good to me. I also want to build an ignition system. I have an old Briggs and Stratton generator. I want to be able to control the ignition timing. You told us about the Arduino, Hall switch, and ASIC coil drivers. That tells me a lot. But I would still be interested in in any more information you can tell us.
Rindert
here is link to code, it is far from optimal, i guess, because i just took solar tracker control program i wrote earlier as base.
it was convenient, because tracker program contained sort of user interface using rotary encoder and OLED display and provided easy way to change all sorts of parameters.
the hall sensor is latching type and there are two magnets embedded in aluminum fan on the crankshaft,
one magnet at TDC turns hall sensor output to high state, second magnet which is placed 90 degrees prior to TDC turns hall sensor output to low state.
for driving the coils, i did use MOSFETS first, but they did not last long, because coils are creating terrible voltage spikes of all sorts in primary windings, IGBTs can handle them, but then again they need gate drivers to operate properly and that gate driver died when i tried to use IGBT. ))
the ASIC i use now is called VB525SP-E, it can be driven by arduino pin directly though 1k resistor, but i drive it through an optoisolator, because of voltage spikes mentioned above.
if you have more specific questions, i will be glad to answer ))
Thanks Guys,
I have some really good info now. I think Iâm going to try using a Raspberry Pi, just because I have one. And I want to use C language, just because I took a course in it.
Rindert
the raspberry pi is an applications processor, the Pi Pico is a microcontroller. You are best served to use the microcontroller for timing specific applications. It is basically all about scheduling.
The .ino files he has posted are from the arduino IDE which are C/C++ and you can use the arduino IDE with the Pi Pico as well as many other microcontrollers. `
That being said you might be able to get away with it on a newer pi and dedicate a single core to the application. Then the scheduler isnât bumping the process to time share with something else. There is also real-time linux kernel, that you can use.
I would change that to âMAY result in faster codeâ. Optimizers have improved considerably over the last decade. I donât know if that has all filtered back to arduino, which uses an older version of the gnu compiler. but I suspect a lot of it has.
Most microcontrollers, including the Arduino, have hardware timers with interrupts. An interrupt allows you to âinterruptâ the main program loop and run specific subroutines with precise timing. This is exactly what you would want for engine control. Programming an MCU is close to âbare metalâ so you have the advantage of directing things exactly but at the cost of having to know exactly what should happen and how.
Raspberry pi is much easier to program but generally speaking, software timing is less precise especially with an operating system like linux doing its own work in the background. That said, an ARM chip like the rpi has is a beast compared with a typical micro controller. The overhead from Linux may be low enough it doesnât matter.
I will eventually want to control timing based on knock sensor feedback, like OBD2 systems. Will this Pi Pico allow me to do this? Maybe the Pi Pico H is better?
I think the pico and pico H are essentially the same except the soldered on male pins on the H. They mention something about the debugging port but that is a hardware debugger so it is really low-level debugger to the point it is irrelevant for 99% of the pico audience. the W adds wireless networking.
How are you going to add a knock sensor or are you looking at a larger engine in the future? Are you looking at adding CANBus like ODB2 has as well? you can buy boards with the canbus chip on them, and they will connect either via spi or i2c buses to the chip. There are some development boards that have the canbus chip already on them which is why I asked.
I am asking in part because the arduino had issues with multiple cylinder engines, and the pico is faster but the m0+ series isnât the fastest series of arm microcontrollers either. It is about the lowest budget controller with the current ARM designs. It is a good one for small projects and good to get your feet wet with. It isnât really that hard to jump to a faster chip either even low level stuff should work on the m4 or m7/h7 series arm microcontrollers. They just add features like FPUs and faster/more clocks.
a new video of generator at work, charging solar battery bank
intercooler is used for heat extraction from exhaust gases,
also i installed an oxygen sensor, although it is just connected to
a multimeter for now.
it seems that this sensor is very well suited for ATMega 328 MCU, its
output is between .02 and .85 volts, so it can be connected directly to an
ADC pin, using MCUâs internal 1.1 volt reference voltage.
i drilled a 2mm hole in the lowest point of intercooler in order to drain condensed water.
it is squirting in bowl, as you can see in the video. ))