Measuring Current,Vacuum and controlling Temp.

I have a home made heated vacuum lamination table I designed that will sandwich two peices of glass together with EVA (Sorta like hot glue) in the center.

The way the table works is:

-There are two heating elements, 18amps, 120vac
-There are two vacuum pumps and two vacuum chambers seperated by a silicon bladder.
-Before the table reaches the melting temprature of the EVA, the upper chamber pulls ~27" of vacuum, this sucks the bladder to the surface of the lid.
-The lower chamber vacuum pump turns on and pulls ~29" of vacuum, removing the air, and applying a few inches of pressure accross the bladder squeezing the two peices of glass and the EVA together.
-The temprature gets raised to the appropriate crosslinking temprature of the EVA and held for 10 mins (About 235F), then cooled back down and the proccess is finished.

The table is working just fine but I've been running the above process manually using a stop watch and manually controlling the heat and vacuum by switches. I did have a PID controller in the mix but it stopped working after about a month of use, it used a K type Temp Sensor that I still have connected to just a temprature monitor.

I think the Arduino is a perfict canidate to assist in the above procedures. I've already purchased a UNO starter kit, a 20x4 LCD and a few DS18b20 to play with. So here are my thoughts.

-Let the arduino control the SSRs using the DS18b20 as a temp sensor and display the current temp.
-Also monitor the amps of the two heating elements, the reason is I've had a few cases where one of the heating elements have burned out, and I had no clue other than it took longer for the table to heat up. I Also had an instance where the SSR failed and stuck on and I didnt' realize it right away.
-Use the arduino to also display the Vacuum in both chambers.

Maybe configure the Arduino so it has a start and a stop. In stop mode, the table maintains the temprature just below the melting point of the EVA (Preheat), in start mode, it cycles through the above process including turning the vacuum pumps on and off appropriatly (Via SSRs).

Thus far I've been able to to display the temp and use the Arduino as a thermistat using pices of code found through these forums, apparently I'm pretty good at looking at some example of code and making changes to fit my needs.

For sensors:
DS18b20 //For the temp Sensor
MPX4250DP (x2) //For vacuum sensors
Current Sensor //No idea for current sensor, any suggestions on a current transformer that interfaces with the arduino nicly?

Any suggestions, ideas or comments are greatly appreciated. I have had a little experience in circuit design, but that was about 15 years ago.

Thanks Richard, I was just looking at the data sheet of the MAX6675 to see if I could keep the K-type thermocouple and if I can buy a board already assembled thats even better! I'm going to go ahead and place an order an interface board, and also buy two current sensors.

The thermocouple interface board is on order and so is the current sensors. The Vacuum Sensors however did arrived today, MPX4250DP.

I'm questioning the sensors, as they both read ~.195v with no pressure difference and 5.00v in. With one of my vacuum pumps connected the output voltage reads 1.905v.

Datasheet Reads

Pressure Diffrence 0kPa - 250kPa
Full Scale Span - 4.705v

If I understand correctly, 4.705/250 = .01882 volts per kPa

However if I pull ~ 29" of vacuum (according to my analog gauge on the pump), I get 1.71v (thats is minus the offset of .195) on the output pin of the sensor.

1.71v / .01882 = 90kPa / 3.3864 = 26.57"

(3.3864kPa - 1")

Is it safe to say my gauge is that far off, or am I doing the math wrong?

Sorry, I got cut / copy / paste happy and pasted the wrong number, the sensors are MPX4250DP. datasheet here.

http://www.mouser.com/catalog/specsheets/MPX4250D.pdf

The other port I am leaving open to current atmosphere, using them as a differential. I am on the right port, and not sure on the pull-up/down resistor as the datasheet doesn't indicate I need one.

The Thermocouple Interface came in the mail today.

Talk about fast shipping! Product looks good too! Very well made.

Still waiting on the current sensors. :wink:

So how are you wiring up the pressure sensor? It makes a difference to what you read.
Here is how to connect them up:-

Down load the image and zoom in.

Thanks Grumpy,

I downloaded the pic and tried to zoom in, but it gets a bit fuzzy. After removing the offset voltage, it seems to be reading more accurately. I also ordered a new vacuum gauge so I can see if maybe my gauge is off.

Was able to hook the arduino up to the lamination machine for a quick test run and it did a fantastic job at controlling temperature and measuring the vacuum. I basically want to have the arduino configured to control three modes, Off, PreHeat and Bake. I would like to have one simple push button (pin 0) to walk through each mode but I keep running into an issue not reading the button during the delay. I'm going to do some research tonight though the forums looking for an example of buttons used in an environment where a delay is used.

// Griddle II Controller

#include <LiquidCrystal.h>
#include <MAX6675.h>

                          // Connections:
                          // rs (LCD pin 4) to Arduino pin 12
                          // rw (LCD pin 5) to Arduino pin 11
                          // enable (LCD pin 6) to Arduino pin 10
                          // LCD pin 15 to Arduino pin 13
                          // LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

int relay = 6;            // relay controls heat tubes
int backLight = 13;       // pin 13 will control the backlight
int CS = 7;               // CS pin on MAX6675
int SO = 8;               // SO pin of MAX6675
int SCK = 9;              // SCK pin of MAX6675
int units = 1;            // Units to readout temp (0 = [ch730]F, 1 = [ch730]C)
float error = 0.0;        // Temperature compensation error
float temperature = 0.0;  // Temperature output variable

MAX6675 temp0(CS,SO,SCK,units,error);

void setup()
{
  pinMode(backLight, OUTPUT);
  pinMode(relay, OUTPUT);        // Sets relay pin to Output
  digitalWrite(relay, HIGH);     // turn heater tubes on for first time.
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(20,4);               // columns, rows.  use 16,2 for a 16x2 LCD, etc.
  lcd.clear();                   // start with a blank screen
  lcd.setCursor(0,0);            // set cursor to column 0, row 0 (the first row)
  lcd.print("Griddle II");       // change this text to whatever you like. keep it clean.
  
}

void vacu0(void) {
  float sensorValue0 = analogRead(0);
  float vacuv0 = sensorValue0*0.0048828/.01882/3.3864;
  lcd.setCursor(0,2);
  lcd.print("Vacuum 1= ");
  lcd.print(vacuv0, 1);
  lcd.print(" ");                         //Keeps screen clean
}

void vacu1(void) {
  float sensorValue1 = analogRead(1);
  float vacuv1 = sensorValue1*0.0048828/.01882/3.3864;
  lcd.setCursor(0,3);
  lcd.print("Vacuum 2= ");
  lcd.print(vacuv1, 1);
  lcd.print(" ");                         //Keeps screen clean
}

void ttemp(void) {
  temperature = temp0.read_temp(10);
  float fahrenheit = temperature*9/5+32;  // Convert [ch730]C to [ch730]F
  lcd.setCursor(0,1);

  if(temperature == -1) {                 // If there is an error with the TC, temperature will be -1
    lcd.print("Error!!");                 // Temperature is -1 and there is a thermocouple error
    } else {
    lcd.print("Temp: ");
    lcd.print( temperature, 0 );          // Print the temperature [ch730]C, Whole Number
    lcd.print("C/");  
    lcd.print( fahrenheit, 0 );           // Print the temperature [ch730]F, Whole Number    
    lcd.print("F");
  }
}  
  
void PreHeat(void) {                                    //PreHeat Mode
  
  lcd.setCursor(0,0);
  lcd.print("PreHeat Mode        ");
  if (temperature <= 49) {digitalWrite(relay, HIGH);}   //Turn on HEAT
  if (temperature > 51) {digitalWrite(relay, LOW);}     //Turn Off HEAT
}

void Bake(void) {                                       //Bake Mode
  lcd.setCursor(0,0);
  lcd.print("Bake Mode           ");
  if (temperature <= 104) {digitalWrite(relay, HIGH);}  //Turn on HEAT
  if (temperature > 106) {digitalWrite(relay, LOW);}    //Turn Off HEAT
}

void Off(void) {                                        //Off Mode
  lcd.setCursor(0,0);
  lcd.print("OFF                 ");
  if (temperature <= 49) {digitalWrite(relay, HIGH);}   //Turn on HEAT
  if (temperature > 51) {digitalWrite(relay, LOW);}     //Turn Off HEAT
}




void loop()
{
  ttemp();
  PreHeat();
  //Bake();
  //Off();
  vacu0();
  vacu1();
  delay(1000);
}

Perfect, the BlinkWithoutDelay tutorial put me on the right path, now onto the next issue. :cry:

Pressing the button causes unpredictable results. It seems to be going through the menu, but where it lands is a surprise. Some forum search indicated it might be a button bounce issue. I found this in the tutorials, http://www.arduino.cc/en/Tutorial/Debounce. I am trying to use "1" button to change the menu from Bake, PreHeat and Off. Configuration is Digital port to Ground when button on.

I've tried to implement and it didn't seem to change my results any. So am I having a bounce issue, or did I incorrectly implement debouncing?

// Griddle II Controller

#include <LiquidCrystal.h>
#include <MAX6675.h>
#define buttononePin 1
                          // Connections:
                          // rs (LCD pin 4) to Arduino pin 12
                          // rw (LCD pin 5) to Arduino pin 11
                          // enable (LCD pin 6) to Arduino pin 10
                          // LCD pin 15 to Arduino pin 13
                          // LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);


int val1 = 1;
int relay = 6;            // relay controls heat tubes
int backLight = 13;       // pin 13 will control the backlight
int CS = 7;               // CS pin on MAX6675
int SO = 8;               // SO pin of MAX6675
int SCK = 9;              // SCK pin of MAX6675
int units = 1;            // Units to readout temp (0 = [ch730]F, 1 = [ch730]C)
float error = 0.0;        // Temperature compensation error
float temperature = 0.0;  // Temperature output variable
long previousMillis = 0;
long interval = 1500;
long previousMillis2 = 0;
long interval2 = 1500;
long previousMillis3 = 0;
long interval3 = 1500;

long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers
int buttonState;             // the current reading from the input pin
int lastButtonState = HIGH;   // the previous reading from the input pin

MAX6675 temp0(CS,SO,SCK,units,error);

void setup()
{
  pinMode(buttononePin, INPUT);  // declare first button as input
  pinMode(backLight, OUTPUT);
  pinMode(relay, OUTPUT);        // Sets relay pin to Output
  digitalWrite(relay, HIGH);     // turn heater tubes on for first time.
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(20,4);               // columns, rows.  use 16,2 for a 16x2 LCD, etc.
  lcd.clear();                   // start with a blank screen
  lcd.setCursor(0,0);            // set cursor to column 0, row 0 (the first row)
  lcd.print("Griddle II");       // change this text to whatever you like. keep it clean.
  
}

void vacu0(void) {
  float sensorValue0 = analogRead(0);
  float vacuv0 = sensorValue0*0.0048828/.01882/3.3864;
  lcd.setCursor(0,2);
  lcd.print("Vacuum 1= ");
  lcd.print(vacuv0, 1);
  lcd.print(" ");                         //Keeps screen clean
}

void vacu1(void) {
  float sensorValue1 = analogRead(1);
  float vacuv1 = sensorValue1*0.0048828/.01882/3.3864;
  lcd.setCursor(0,3);
  lcd.print("Vacuum 2= ");
  lcd.print(vacuv1, 1);
  lcd.print(" ");                         //Keeps screen clean
}

void ttemp(void) {
  temperature = temp0.read_temp(10);
  float fahrenheit = temperature*9/5+32;  // Convert [ch730]C to [ch730]F
  lcd.setCursor(0,1);

  if(temperature == -1) {                 // If there is an error with the TC, temperature will be -1
    lcd.print("Error!!");                 // Temperature is -1 and there is a thermocouple error
    } else {
    lcd.print("Temp: ");
    lcd.print( temperature, 0 );          // Print the temperature [ch730]C, Whole Number
    lcd.print("C/");  
    lcd.print( fahrenheit, 0 );           // Print the temperature [ch730]F, Whole Number    
    lcd.print("F");
  }
}  
  
void PreHeat(void) {                                    //PreHeat Mode
  
  lcd.setCursor(0,0);
  lcd.print("PreHeat Mode        ");
  if (temperature <= 49) {digitalWrite(relay, HIGH);}   //Turn on HEAT
  if (temperature > 51) {digitalWrite(relay, LOW);}     //Turn Off HEAT
}

void Bake(void) {                                       //Bake Mode
  lcd.setCursor(0,0);
  lcd.print("Bake Mode           ");
  if (temperature <= 104) {digitalWrite(relay, HIGH);}  //Turn on HEAT
  if (temperature > 106) {digitalWrite(relay, LOW);}    //Turn Off HEAT
}

void Off(void) {                                        //Off Mode
  digitalWrite(relay, LOW);
  lcd.setCursor(0,0);
  lcd.clear();
  lcd.print("OFF                 ");
}




void loop()

{
  Off:
  unsigned long currentMillis3 = millis();
  if(currentMillis3 - previousMillis3 > interval3) {
    previousMillis3 = currentMillis3;  
    Off();
    }
  
  val1 = digitalRead(buttononePin);                                    //Get Button Press (Button to ground)
  if (val1 != lastButtonState) {                                       //DEBOUNCE
    lastDebounceTime = millis();                                       //DEBOUNCE
    }
  if ((millis() - lastDebounceTime) > debounceDelay) {                 //DEBOUNCE
    buttonState = val1;                                                //DEBOUNCE
    } 
  if (val1 == LOW) { 
    lastButtonState = val1;                                            //Save Last button State 
    goto PreHeat; 
    }
  goto Off;
  
        
  PreHeat:
  unsigned long currentMillis2 = millis();
  if(currentMillis2 - previousMillis2 > interval2) {
    previousMillis2 = currentMillis2;   
    ttemp();
    vacu0();
    vacu1();
    PreHeat();
    }
  
  val1 = digitalRead(buttononePin);                                     //Get Button Press (Button to ground)
  if (val1 != lastButtonState) {                                        //DEBOUNCE
  lastDebounceTime = millis();                                          //DEBOUNCE
    }
  if ((millis() - lastDebounceTime) > debounceDelay) {                  //DEBOUNCE
    buttonState = val1;                                                 //DEBOUNCE
    } 
  if (val1 == LOW) { 
    lastButtonState = val1;                                             //Save Last button State
    goto Bake; 
    }
  goto PreHeat; 
 
  Bake:
  unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;   
    ttemp();
    vacu0();
    vacu1();
    Bake();
    }
 
  val1 = digitalRead(buttononePin);                                       //Get Button Press (Button to ground)
  if (val1 != lastButtonState) {                                          //DEBOUNCE
    lastDebounceTime = millis();                                          //DEBOUNCE
    }                                                                                                                                           
  if ((millis() - lastDebounceTime) > debounceDelay) {                    //DEBOUNCE
    buttonState = val1;                                                   //DEBOUNCE
    }                                                                        
  if (val1 == LOW) { 
    lastButtonState = val1;                                               //Save Last button State
    goto Off; 
    }
  goto Bake;
 
}

Ok, got debouncing working, so now I can use one button to set the device in Off, PreHeat or Bake. I'd like to add a countdown feature on the Bake mode.

Basically when temperature hits 105, it needs to hold that temperature, give the lcd display a 10 min countdown, then put the device back into Off Mode. Any example code doing something close that I can modify to fit my application?

And as you said, pretty easy. :smiley:

I should be getting the current sensors in the next week, that will be the final addition and maybe some polishing on on the display layout.

// Griddle II Controller

#include <LiquidCrystal.h>
#include <MAX6675.h>
#define buttononePin 1
                          // Connections:
                          // Pin 1 to Button
                          // Pin 6 to SSR
                          // Pin A0 Vacuum Sensor 1
                          // Pin A1 Vacuum Sensor 2
                          // rs (LCD pin 4) to Arduino pin 12
                          // rw (LCD pin 5) to Arduino pin 11
                          // enable (LCD pin 6) to Arduino pin 10
                          // LCD pin 15 to Arduino pin 13
                          // LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

int seconds = 0;
int mins = 0;
int val1 = 0;
int relay = 6;            // relay controls heat tubes
int backLight = 13;       // pin 13 will control the backlight
int CS = 7;               // CS pin on MAX6675
int SO = 8;               // SO pin of MAX6675
int SCK = 9;              // SCK pin of MAX6675
int units = 1;            // Units to readout temp (0 = [ch730]F, 1 = [ch730]C)
float error = 0.0;        // Temperature compensation error
float temperature = 0.0;  // Temperature output variable
long previousMillis = 0;
long interval = 1500;
long previousMillis2 = 0;
long interval2 = 1500;
long previousMillis3 = 0;
long interval3 = 1500;
long previousMillis4 = 0;
long interval4 = 1000;

MAX6675 temp0(CS,SO,SCK,units,error);

void setup()
{
  pinMode(buttononePin, INPUT);  // declare first button as input
  pinMode(backLight, OUTPUT);
  pinMode(relay, OUTPUT);        // Sets relay pin to Output
  digitalWrite(relay, HIGH);     // turn heater tubes on for first time.
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(20,4);               // columns, rows.  use 16,2 for a 16x2 LCD, etc.
  lcd.clear();                   // start with a blank screen
  lcd.setCursor(0,0);            // set cursor to column 0, row 0 (the first row)
  lcd.print("Griddle II");       // change this text to whatever you like. keep it clean.
  
}

void vacu0(void) {
  float sensorValue0 = analogRead(0);
  float vacuv0 = sensorValue0*0.0048828/.01882/3.3864;
  lcd.setCursor(0,2);
  lcd.print("Vacuum 1= ");
  lcd.print(vacuv0, 1);
  lcd.print(" ");                         //Keeps screen clean
}

void vacu1(void) {
  float sensorValue1 = analogRead(1);
  float vacuv1 = sensorValue1*0.0048828/.01882/3.3864;
  lcd.setCursor(0,3);
  lcd.print("Vacuum 2= ");
  lcd.print(vacuv1, 1);
  lcd.print(" ");                         //Keeps screen clean
}

void ttemp(void) {
  temperature = temp0.read_temp(10);
  float fahrenheit = temperature*9/5+32;  // Convert [ch730]C to [ch730]F
  lcd.setCursor(0,1);

  if(temperature == -1) {                 // If there is an error with the TC, temperature will be -1
    lcd.print("Error!!");                 // Temperature is -1 and there is a thermocouple error
    } else {
    lcd.print("Temp: ");
    lcd.print( temperature, 0 );          // Print the temperature [ch730]C, Whole Number
    lcd.print("C/");  
    lcd.print( fahrenheit, 0 );           // Print the temperature [ch730]F, Whole Number    
    lcd.print("F");
  }
}  
  
void PreHeat(void) {                                    //PreHeat Mode
  
  
  if (temperature <= 49) {digitalWrite(relay, HIGH);}   //Turn on HEAT
  if (temperature > 51) {digitalWrite(relay, LOW);}     //Turn Off HEAT
}

void Bake(void) {                                       //Bake Mode
  
  if (temperature <= 104) {digitalWrite(relay, HIGH);}  //Turn on HEAT
  if (temperature > 106) {digitalWrite(relay, LOW);}    //Turn Off HEAT
}

void Off(void) {                                        //Off Mode
  digitalWrite(relay, LOW);
  lcd.setCursor(0,0);
  }

void loop()

{
  Off:
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("OFF");
  delay(1000);                                               //Delay used for Debounce
  Off2:
  unsigned long currentMillis3 = millis();
  if(currentMillis3 - previousMillis3 > interval3) {
    previousMillis3 = currentMillis3;  
    Off();
    }
  val1 = digitalRead(buttononePin);
  if (val1 == LOW) { 
     goto PreHeat; 
    }
  goto Off2;
      
  PreHeat:
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("PreHeat Mode");
  delay(1000);                                               //Delay used for Debounce
  PreHeat2:
  unsigned long currentMillis2 = millis();
  if(currentMillis2 - previousMillis2 > interval2) {
    previousMillis2 = currentMillis2;   
    ttemp();
    vacu0();
    vacu1();
    PreHeat();
    }
  val1 = digitalRead(buttononePin);
  if (val1 == LOW) { 
    goto Bake; 
    }
  goto PreHeat2; 
 
  Bake:
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Bake Mode");
    delay(1000);                                               //Delay used for Debounce
  seconds = 0;
  mins = 0;
  Bake2:
  unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;   
    ttemp();
    vacu0();
    vacu1();
    Bake();
    }
  if (temperature > 104) {
    unsigned long currentMillis4 = millis();
    if(currentMillis4 - previousMillis4 > interval4) {
      previousMillis4 = currentMillis4; 
      seconds = seconds+1;
      if (seconds >= 60) 
        {                 
        mins = mins+1;
        seconds = 0;
        }
      if (mins < 10) {                        
        lcd.setCursor(14,0);
        lcd.print(mins);
        }
      if (mins > 9) {                        
        lcd.setCursor(13,0);
        lcd.print(mins);
        }
      lcd.print(":");
      if (seconds < 10) {                        
        lcd.print("0");
        lcd.print(seconds);
        }
      if (seconds > 9) {                        
        lcd.print(seconds);
        }
      if (mins > 10) {                              //Set Mins to Turn off Heat
        goto Off;
        } 
    }  
  }
  val1 = digitalRead(buttononePin);                                    
  if (val1 == LOW) { 
    goto Off; 
    }
  goto Bake2;
}

Would you mind explaining the math on the analog read for the pressure sensor? I have the same sensor and am trying to figure out how to measure for positive pressure. I expect to be reading from 0 to 12psi on the positive side for monitoring the co2 pressure in a keg... :slight_smile:

this is what I have now, but I don't think it's correct....with both ports in open air (no pressure difference) I'm getting readings of
-1.24kPA
-0.18psi

does that seem right? See code below.

void setup() {
Serial.begin(9600);
}

void loop() {
get_pressure();
delay(100);
}

void get_pressure() {
// 5v/1024step == 0.0048828v/step
// ((ADC Val * Step) - Expected offset from datasheet) / mv per kPa
float pressure_0 = ((analogRead(0)*0.0048828)-.204)/.01882;

Serial.print("sensor = ");
Serial.print(pressure_0);
Serial.println(" kPa");
float press_psi = pressure_0 * 0.14504;
Serial.print("sensor = ");
Serial.print(press_psi);
Serial.println(" psi");
}

I'd like to see exactly what the sensor reading is. You don't store that in a variable, so you can't print it later. I would.

.01182 volts per kPa is the number I came up with when I took 4.705v (Full Scale) and divided it by 250 (Sensor Max).

I'm fairly sure its not accurate, but it gives me a reference point and for what I'm doing its not that critical. I just need to make sure I don't loose vacuum during the process. If you find a more accurate formula let us know.

With the sensors not connected to a vacuum (both ports open), I show almost three inches of vacuum, which would not be correct as these are not absolute sensors, they are differential.

And BTW, I still have not received the current sensors from Seed Depot. Ordered the 11th, and they are not set to ship till the 31st.

The specs on that pressure sensor say the accuracy is only +/-1.4% -- presumably of full scale. Given this, a +/- 3.5 Kpa reading is within spec.

Well, the project is coming along nicely, and I've been using the vacuum table and its doing wonderfully, thanks to all that have been helping me.

So Currently I have it measuring Dual Vacuum chambers, over all temperature (w/ k sensor) and I have a nifty timer configured to turn on after the table reaches a certain temperature, then it shuts the table off.

The Current Transformers came today and I'm a bit confused on how these work. I assume you clamp them on one wire and measure the voltage? Here is the data sheet, and I the P/N is SCT-013-030.

http://nicegear.co.nz/obj/pdf/SCT-013-datasheet.pdf

If I understand this right they can measure 30 amps, and I only need to measure about 20amps/110vAC.

Wouldn't this result in very low voltage AC? Do I need to run the output through a bridge? Like this?

With the meter on AC, I'm getting .52v when the heater element is on. With a diode, wouldn't that cut the AC voltage in half then minus the voltage drop of the diode? Maybe a tiny 1 to 10 transformer to bring the voltage up to 5.2 or am I dreaming?

Tonight I noticed if I made wrapped the wire though the sensor so it goes through the clamp twice, it doubled the voltage.

Measuring the current might be a bit over my head but I'm giving it a try. Passing the power wire of one of the heater wires three times through the current sensor I can pick up some decent voltage. I had some rectifiers (Radio Shack 276-1152) from a previous project so I just connected the sensor to the AC input of the rectifier.

Using my multimeter I can measure 1.12v DC when pulling about 12 amps with a floor heater I have under my desk.

I have a small variety of caps in my collection and the smallest I could find off hand was a .47uF one and I stuck it across the DC output to stabilize the voltage.

I connected the DC negative off the bridge to a ground on the arduino, and the positive to a 100ohm resister then to an analog pin on the arduino.

I regret I didn't save my code, but I did something like this:

void amps1(void) {
  float ampsValue1 = analogRead(2);
  float ampst = ampsValue1*0.0048828;
  lcd.setCursor(0,3);
  lcd.print("amps= ");
  lcd.print(ampst);
}

The end result was kinda odd, though I could only get my meter to measure 1.12 volts, the arduino would display much more and keep climbing and stop at 5 volts. Then it would hold it even if I powered off the heater, I suppose because of the capacitor, so I put a resistor (150m ohm) across the cap and that helped. As of now, I can put my fingers on the plug to the current sensor and arduino will display voltage.

Any idea what I have done incorrectly or how I should fix this?