• Skip to primary navigation
  • Skip to main content
  • Skip to footer

VapOven

Induction heaters for DynaVap. Get baked!

  • Home
  • Shop
    • Rechargeable
    • Wall Powered
    • VapOven Kits
    • Accessories
  • Roll Your Own
    • Videos, Diagrams and Tutorials
    • VapOven Kits
    • Tools and components
  • Contact
  •  

VapOven Arduino Shield Technical Docs

Overview:

  • Built around an Arduino NANO – a compact Arduino that has a USB port for simple programming.
  • A high power MOSFET to control the current to the ZVS module
  • On board resistors allow for LEDs to be attached without the need for any extra components – includes terminals to attach an RGB LED as well as 2 extra LED terminals (resistor values are specified for red, green or yellow LEDS)
  • A low power transistor controls a 12v circuit for attaching 12v LEDs (such as those in illuminated buttons)
  • A voltage sensor for monitoring battery charge.
  • A TMP36 temperature sensor protects the electronics from overheating if something goes wrong
  • A 1µf capacitor attached to the trigger button circuit prevents debouncing
  • Breakout solder terminals are included for I2C and Serial connections
  • 3 and 5V solder terminals for powering external sensors or modules

Pin Out:

Arduino PinInput / outputConnected to
D11OUTPUT (pwm)red pin of RGB LED
D10OUTPUT (pwm)green pin of RGB LED
D9OUTPUT (pwm)blue pin of RGB LED
D8DIGITAL INPUT trigger button
D5OUTPUT (pwm)LED 2
D4 OUTPUTLED 1
D3OUTPUT (pwm)MOSFET
D2OUTPUT12v out
A1ANALOG INPUTTMP36 temperature sensor
A4I2CSDA
A5I2CSCL
A6ANALOG INPUTvoltage sensor
A7ANALOG INPUTpotentiometer

Code:

/*

  • Starter code for VapOven Arduino Shield.
    *
  • This code will turn on the IH module and light up LED1 when the trigger button is pressed.
  • It uses the RGB LED as a battery indicator – green when battery is good, red when battery is low.
  • It monitors the temperature and will not activate the IH if the temperature is over 60 deg Centigrade
    *
  • Code is included to read the potentiometer output but the value is not used.
    *
  • This code is free to use and modify
    *
    */

//pins

int triggerPin = 3;

//LEDs
int LED12v = 2;

int LED1 = 4;
int LED2 = 5;

int blueRGB = 9;
int greenRGB = 10;
int redRGB = 11;

//inputs
int buttonPin = 8;
int potPin = A7;

//sensors
int tempPin = A1;
int voltSensorPin = A6;

bool buttonState;  //variable for the button press

bool ovenOn = LOW;  //the main oven on / off variable

int tempC; //temperature from TMP36 sensor
int tempCutOff = 60;  //temperature in Centigrade to stop IH activating

float voltage; //battery voltage
double lowBatteryThreshold = 10; //the voltage value to turn the battery indicator from green to red

int potValue; // value returned from potentiometer

void setup() {
 
//set up all the pins 
  pinMode(buttonPin, INPUT);
  pinMode(triggerPin, OUTPUT);
  pinMode(LED12v, OUTPUT);
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(blueRGB, OUTPUT);
  pinMode(greenRGB, OUTPUT);
  pinMode(redRGB, OUTPUT);

}

void loop() {
 
//check the temperature
  tempC = getTemp();
 
//check the battery voltage (if the button isn’t pressed)
  if(ovenOn == LOW) voltage = getVoltage();

//set the RGB LED colour to indicate battery level
  if(voltage >= lowBatteryThreshold){
    digitalWrite(redRGB, LOW);
    digitalWrite(greenRGB, HIGH);
    digitalWrite(blueRGB, LOW);
  }
  else{
    digitalWrite(redRGB, HIGH);
    digitalWrite(greenRGB, LOW);
    digitalWrite(blueRGB, LOW);
  }
   
//read the potentiometer value
  potValue = analogRead(potPin);

//check if the button is pressed
  buttonState = digitalRead(buttonPin);
 
//if the button is pressed set oven to on, else set it to off
  if(buttonState == HIGH)  ovenOn = HIGH;
  else  ovenOn = LOW;
 
//if the temperature is above the cutoff, set the oven to off
  if(tempC >= tempCutOff){
    ovenOn = LOW;
  }

// on off switch for oven
  if(ovenOn == HIGH){
    digitalWrite(LED1, HIGH);
    digitalWrite(triggerPin, HIGH); 
  }
  else{
    digitalWrite(LED1, LOW);
    digitalWrite(triggerPin, LOW);
  }
}

//returns temperature in celcius from TMP36 sensor
int getTemp(){
   
int tempReading = analogRead(tempPin);

// converting to voltage
double voltage = tempReading * 5.0;
voltage /= 1024.0;

// output the temperature
double tempCdoub = (voltage – 0.5) * 100 ;  //converting from 10 mv per degree wit 500 mV offset
                                              //to degrees ((voltage – 500mV) times 100)
//parse from double to int
int tempCint = tempCdoub;

return tempCint;

}

//returns the battery voltage
float getVoltage(){

    int data = 0;
    float V = 0.0;
    float R1 = 47000.0; 
    float R2 = 22000.0;

    data = analogRead(voltSensorPin);
    V = (data * 5.0) / 1024.0;
   
return(V / (R2 / (R1 + R2)));

}

Footer

QUICK LINKS

Ready Baked

Rechargeable

Mains

Roll Your Own

VapOven Kits

Tools and components

Videos, diagrams and guides

Useful information

Shipping and packaging

Warranty and returns

About our batteries

Get in touch

[email protected]

Contact us

© 2025 VapOven · Baked by Blackbird

This website uses cookies to improve your experience. We'll assume you're ok with this, because who doesn't like cookies, but you can opt-out if you wish. Cookie settingsOK
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT