Need flame sensors to shut off specific solenoid valves but keep the rest going

Hi

I am currently working on a project that involves 5 different fire effects, "booshed" in a specific sequence to make a show lasting a minute or so. I have flame sensors for the pilot system of all 5 effects and a dedicated Arduino nano (lets call this Arduino #2) to continiously monitor them, incase the flame boosh blows out the pilot system. The idea is that if one of these flame sensors blows out, a signal is passed to Arduino #1 to deactivate the solenoid that doesn't have a functioning pilot system, and turn on the ignition to try and re-light it. I could do this with a whole lot of "if" statements, but I'm wondering if there's a more elegant solution? Maybe an interrupt that deactivates the solenoid somehow until the flame sensor is able to sense flame again. I'm quite new to Arduino's so I'm not entirely sure how to go about this.

Any help would be greatly appreciated!
Thanks

I got some of it.

I don't have any flame sensor and don't know about such stuff, but(!) I have been reading datasheets for 50 years and using new circuitry with success. Do You get it? Please provide links to their datasheets.

You are ignorant regarding interrupts. Interrupts are difficult things to use, not any miraculous solution for newbies.

Once knowing how to read the flame sensors the rest is simple program design. Do You know flowcharts? That's a way to design, describe and document program action.

Your reply?

Sure, here is a link to the datasheet.

No, I have never used flowcharts. I usually just make it up as I go, but as I'm adding complexity its becoming more challenging. I will look into it. Cheers.

Before going any further with your design. Please test your theory right here showing you can actually detect a pilot going out with whatever a "booshed" is, is happening.

This is another one of those projects that may have great safety implications and or may be illegal ( building your own gas controls ) , depending on what it is and where used ( certainly not indoors ) .

Hi Paul,

I have tested it and it does detect it consistently. A boosh is basically a mini (20cm) flame ball going off. I can upload a video of the flame sensors working in a couple of days.

To anybody concerned about being an accomplice to anything unsafe, I have wired in a push button that needs to be pressed the whole time for the circuit to function, and also for the gas line to be open. The gas bottle is located 20m away from the project. Taking your hand off the push button shuts off all gas lines, the normally closed solenoids don’t function, and the Arduino which opens solenoids is turned off.

I live remotely in Peru, I have checked the laws here and basically there are only standards and laws regarding industrial and commercial installation, or if you are connecting to the grid. And yes, the project is outside and protected by a very high covering to protect from rain and weather.

That all sounds good to me. Except when you mention gas bottle, that means propane gas. The gas is heaver that air and will sink to the ground and flow over the ground until it ignites. Without a propane sensor on the ground you will not know of a leak until you see it! Please get one and use it!

Using two or more Arduino in a single project is a classic beginner error.

Another classic beginner error.

There will be, yes. We would need to know much more about your circuit to be able to advise.

But most of us, including me, don't want to advise you, because that might encourage you to do something that leads to a terrible injury or death.

The propane sensor is a great safety idea, I will implement one.

I understand the concern for safety, and the worry of being an advisor to something dangerous. I understand the risks with propane. I am asking for advice for implementing safety features to help minimize this risk. Everything we have done is first tested with compressed air, until the point where it needs to be tested with propane. But no matter how safely I try and do this, of course there is always a risk playing with fire, and I willingly know and accept these risks.

I will learn to draw the diagram out properly, along with the code I have so far, not to waste anyones time. It’s my first time posting here so I have a bit to learn! I understand if you don’t want to help, but if anybody is willing to it would be hugely appreciated. Thanks for the advise so far!

Remember, a cloud of propane gas does not just "go away" like compressed air does.

Here is a circuit diagram of my set-up. Apologies if its a bit basic or organised incorrectly, it is my first diagram.

For simplicity I have just drawn out one solenoid and flame sensor, but in reality there are 5 (the other 4 are setup exactly the same). The flame sensor works very simply by sending a HIGH signal to the Arduino if it senses a flame, the sensitivity of it is adjusted on the component. The ignition system is a 1.5V BBQ ignition system and is controlled by a relay, when turned on it activates the ignition (the sparks) for all 5 pilot lights at the same time, they are not independent. The valve for the low pressure ignition propane system is a normally closed 12V electric ball valve, also controlled by a relay.

The push button needs to be held down constantly for anything to happen, if your hand is removed the whole system loses power and shuts off as all the valves are Normally Closed.

There are 2 gas lines, one low pressure for the ignition (already explained) and one high pressure for the boosh's (mini flame balls).

I have decided based on the suggestions above to remove the second arduino, and install a gas sensor (probably 2 or 3 gas sensors in case one malfunctions, ive bought 5). The gas sensors are very simple, with an adjustable digital output (HIGH if gas is detected)
https://www.watelectronics.com/mq2-arduino-gas-sensor/

Below is my code. What I want to achieve is this:

  1. If the pilot system isn't ignited somewhere - on flame 1 for example, I would like to be able to continue on with the rest of the sequence while flame 1 tries to relight. If flame 1 doesnt manage to relight in 5 seconds, turn the whole thing off and troubleshoot. I'm sure there's an elegant way to do this but I really dont know how.

  2. I would make my code much simpler using a loop. Is it possible to assign each solenoid and sensor somehow to be accessable from a loop of 1-5? This way I could just loop through effects 1 to 5 very easily.

Let me know if you guys require anything else in order to help me, anything you have to offer is greatly appreciated. Thanks so much for everything so far

#include <Arduino.h>


// define pins for fire features, flame sensors, and ignition system

#define FIRE_1 9
#define FIRE_2 10
#define FIRE_3 11
#define FIRE_4 12
#define FIRE_5 6

#define IGNITION_PIN 7 //pin to light ingition of pilot system
#define PILOT_VALVE 8  //pin to open pilot system valve

#define PROPANE_SENSOR 2

#define FLAME_SENSOR_1 A0
#define FLAME_SENSOR_2 A1
#define FLAME_SENSOR_3 A2
#define FLAME_SENSOR_4 A3
#define FLAME_SENSOR_5 A4

// function for if gas leak is detected, turn off pilot system valve and wait
void gasLeak()
{
  //turn off pilot valve
  digitalWrite(PILOT_VALVE, LOW);

  //stay here forever until arduino is manually reset 
  delay(9999999999);
}

void setup()
{
  // put your setup code here, to run once:

  // turn on delay for initiation
  delay(3000);

  // setting pin modes, solenoid switches and ignition system are outputs
  pinMode(FIRE_1, OUTPUT);
  pinMode(FIRE_2, OUTPUT);
  pinMode(FIRE_3, OUTPUT);
  pinMode(FIRE_4, OUTPUT);
  pinMode(FIRE_5, OUTPUT);

  pinMode(IGNITION_PIN, OUTPUT);
  pinMode(PILOT_VALVE, OUTPUT);

  //sensors are inputs
  pinMode(FLAME_SENSOR_1, INPUT);
  pinMode(FLAME_SENSOR_2, INPUT);
  pinMode(FLAME_SENSOR_3, INPUT);
  pinMode(FLAME_SENSOR_4, INPUT);
  pinMode(FLAME_SENSOR_5, INPUT);

  pinMode(PROPANE_SENSOR, INPUT);

  //attach interrupt to propane sensor, to turn everything off if there is a leak
  attachInterrupt(digitalPinToInterrupt(PROPANE_SENSOR), gasLeak, HIGH);

  //open up pilot valve and turn on ignition system for 10 seconds to light it
  digitalWrite(PILOT_VALVE, HIGH);
  digitalWrite(IGNITION_PIN, HIGH);
  delay(10000);

  //if all pilot lights havent been lit in 10 seconds, there is a problem that needs investigating
  //goes to gasLeak program which shuts off the propane
  if (FLAME_SENSOR_1 == 0 || FLAME_SENSOR_2 == 0 || FLAME_SENSOR_3 == 0
  || FLAME_SENSOR_4 == 0 || FLAME_SENSOR_5 == 0)
  {
    gasLeak();
  }

  //else - if all pilots are lit, we're good to go
  else
  {
  digitalWrite(IGNITION_PIN, LOW);
  }
}

void loop()
{
  // put your main code here, to run repeatedly:
  // simple test sequence

  // check flame sensor, is pilot flame on?
  // if true then open the solenoid for a quick boosh, before moving to the next one

  if (FLAME_SENSOR_1 == HIGH)
  {
    digitalWrite(FIRE_1, HIGH);

    delay(40);

    digitalWrite(FIRE_1, LOW);

    delay(1000);
  }
  

if (FLAME_SENSOR_2 == HIGH)
  {
    digitalWrite(FIRE_2, HIGH);

    delay(40);

    digitalWrite(FIRE_2, LOW);

    delay(1000);
  }

  if (FLAME_SENSOR_3 == HIGH)
  {
    digitalWrite(FIRE_3, HIGH);

    delay(40);

    digitalWrite(FIRE_3, LOW);

    delay(1000);
  }

  if (FLAME_SENSOR_4 == HIGH)
  {
    digitalWrite(FIRE_4, HIGH);

    delay(40);

    digitalWrite(FIRE_4, LOW);

    delay(1000);
  }

  if (FLAME_SENSOR_5 == HIGH)
  {
    digitalWrite(FIRE_5, HIGH);

    delay(40);

    digitalWrite(FIRE_5, LOW);

    delay(1000);
  }
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.