Hi all,
I've been working on an automated brewery system using propane and managed to burn up 2 hot surface ignitors. Since these seem to be so fragile, I thought I'd try spark ignition.
I'm using a barbeque spark ignitor
Which I've hooked up as a motor to the arduino - these BBQ ignitors are usually a motor which strikes a piezo crystal to generate 10kV to create the spark - which works quite well.
I've also wired up a DS18B20 to measure temperature, which also works quite well.
The problem is that when I try to run them together they don't work well.
The DS18B20 starts reading 0º and doesn't come back until I unplug the ground and plug it back in.
perature for the device 1 (index 0) is: 34.75
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 34.69
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 34.56
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 0.00 //begin firing the ignitor
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 0.00
... trimmed ...
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 0.00
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 0.00
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 0.00
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: -127.00 //unplugged
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 85.00 // plugged back in
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 38.94 //happy again
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 38.13
Requesting temperatures...DONE
Temperature for the device 1 (index 0) is: 37.63
This doesn't happen when I trigger the bbq ignitor manually using it's included power supply, a AA battery.
I've got the ignitor wired as a motor according to this diagram
Though I am using 3v from the arduino and a 600Ω resistor going to the base of the 2n222a transistor.
I've even tried using the battery as the power supply, which works -- albeit more slowly than the 3v from the arduino -- but I still get the 0 signal from the temperature sensor.
This can't be a simple case of EMI or RFI can it? I mean this doesn't happen with the ignitor being triggered by hand, so it can't be, right? How can I "separate" the two power supplies? Is that the issue?
Thanks
JR
PS, here's my sketch (it's the dallas temperature "simple" with "blink without delay" spliced in. LEDpin = motor pin
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 9
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
const int ledPin = 13;
int ledState = LOW; //
unsigned long previousMillis = 0; // will store last time LED was updated
// constants won't change :
const long interval = 1000;
void setup(void)
{
// start serial port
Serial.begin(9600);
Serial.println("Dallas Temperature IC Control Library Demo");
// Start up the library
sensors.begin();
pinMode(ledPin, OUTPUT);
}
void loop(void)
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
Serial.print("Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println("DONE");
Serial.print("Temperature for the device 1 (index 0) is: ");
Serial.println(sensors.getTempCByIndex(0));
unsigned long currentMillis = millis();
if(currentMillis - previousMillis >= interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa:
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
// set the LED with the ledState of the variable:
digitalWrite(ledPin, ledState);
}
}