I´m having some issues with with my project on arduino.
What I´m trying to do is generating sparks by sending signals to four ignition coils with digital outputs. I´m using inputs to decide which coil to "activate".
I´ve used a delay of 1ms to generate a spark that I´m happy with. Example:
This makes the spark bad ("slow"), and for some reason when I´m using Uno I get no spark at all if I active both sparks at the same time. This works when using Mega.
I´ve tried using millis() method instead of delay with same result.
Any ideas of how to get this to work, activating up to 4 coils from inputs and still get the 1ms delay sparks? I understand that reading inputs takes time, but there is probably a better way to do this
Paul_KD7HB:
Without seeing your schematic of how you have this all wired up, I can tell you you have wiring problems and POWER problems, not software problems.
Everyone starts somewhere.. but a flamethrower? I’m assuming you’re new to hardware and programming since you’re using PowerPoint for a schematic, quick or not.
czu001:
Everyone starts somewhere.. but a flamethrower? I’m assuming you’re new to hardware and programming since you’re using PowerPoint for a schematic, quick or not.
The flamethrowers have been used for 3 years and is working just fine. But when igniting all flamethrowers at the same time spark gets slower and sometimes fails to ignite. That´s what I need help with.
I´m not that new to hardware and programming. In this case making a Powerpoint in 2 minutes is enough to explain how its wired in a forum instead of making a serious schematic. It´s a pretty simple wiring.
Steffeluring:
I understand that reading inputs takes time
It does take time, but it's measured in the microseconds. If a matter of microseconds is important for your application, then use the technique suggested by CrossRoads to get it down into the nanoseconds range. However, I have trouble believing this is the source of your problem.
Steffeluring:
The flamethrowers have been used for 3 years and is working just fine. But when igniting all flamethrowers at the same time spark gets slower and sometimes fails to ignite. That´s what I need help with.
I´m not that new to hardware and programming. In this case making a Powerpoint in 2 minutes is enough to explain how its wired in a forum instead of making a serious schematic. It´s a pretty simple wiring.
Have you given any thought to using ready made gear for spark generator?
As an example, I use a four pin CDI control box along with a CDI GY6 coil, both available on Ebay and operated via a hall effect.
In this instance the hall could quite easily be replaced by an opto isolator which would resolve any interference problems.
Code then would be rather straight forward I would imagine.
Cost of the parts is around AU$15.00 delivered.
Of cource I´m not feeding the coil directly from the Arduino, thort that was clear when I drawed the "signal" line. If thats what you mean The coils uses ~6A@12V..Or do you mean the 5V signal?
I got it to work, the slow spark was just a programming issue. But for some reason I had to use Mega. When using Uno it freezes when using all flamethrowers at the same time. Will try using optocouplers next time to see if that helps.
I didn't see any feedback from the gas controller to avoid gas on / no ignition.
I presume that safety function is internal to the 'certified' gas controller
or you have a LOT of public liability insurance (which may not pay out anyway)