Skip to content

Reflowduino Demo

Timothy Woo edited this page Jun 7, 2018 · 18 revisions

Reflowduino Demo Code

Ready to have some fun? Assuming you've gone through the set up and got the blink sketch working, now is the time to start testing for real!

  • If you're using the Reflowduino32, plug it into the first six pins of the ESP32 dev board such that the screw terminals are on the same side as the dev board's micro USB port
  • Attach the K-type thermocouple with the red and yellow wires as indicated next to the appropriate screw terminal (these will be labeled as "RLY+" and "RLY-")
  • For Reflowduino, load the Reflowduino Demo sketch in Arduino IDE but use the Reflowduino32 Demo instead for the ESP32/Reflowduino32. For Reflowduino make sure that you also have the file "pitches.h" in the same folder as the Reflowduino_Demo.ino sketch otherwise it won't compile
  • Upload the sketch to the Reflowduino or ESP32 and open the serial monitor.
  • If you haven't already, follow these instructions to install the demo Android app.
  • You should see the temperature values appearing periodically in the serial monitor. This should be approximately the ambient temperature where you're at (typically around 21-25 degrees Celsius)
  • If you haven't already, you should go through the Reflowduino Oven Tutorial to get your hardware (toaster oven, wiring, etc.) set up!
  • Connect to the Reflowduino or ESP32 via Bluetooth from the app and you should see the temperature values appear on your screen
  • Optional: Put a test PCB, like a scrap from an old appliance or an extra prototype board, and put an extra surface-mount resistor or capacitor on it with some solder paste. This tutorial assumes you are already versed in surface-mount PCB assembly basics
  • Press "START" on the app to start the reflow process! If your Reflowduino or ESP32 is still connected to your computer via USB you should see the start command appear in the serial monitor
  • Let the Reflowduino or ESP32 + Reflowduino32 do its magic and verify that the temperature does indeed follow the desired profile!
  • You can prematurely abort the process at any time with the "STOP" button on the app, but the process will automatically end on its own when finished
  • After the board cools to a reasonable temperature, take it out and see the results!
  • At the end of the reflow process the app will save the temperature and time data to your phone so you can import it to Excel later and analyze the results

Reflowduino Excel Keyboard!

NOTE: This feature isn't yet supported on the ESP32 for the Reflowduino32 module. I just haven't gotten around to adding support for this yet!

The ATmega32u4 can be used as an HID (human interface device) such as a mouse or keyboard. One really cool way we can use this is to make the Reflowduino "type" the data points in Excel and graph the data in real time! However, this requires that the Reflowduino be connected to a computer.

  • Open the demo Excel file Excel graph demo
  • Place the cursor on the first available cell (A2). This is where the Reflowduino will begin typing when the process is initiated via Bluetooth
  • Open the Android app (NOT on your PC!), connect to Bluetooth, and when you press "START" on the mobile app the Reflowduino should begin typing in the time and temperature values into Excel on your PC! Here is a demo video showing this in action. NOTE: Make sure you're in Excel when you press "START" otherwise it can't enter the data and you might see random things happen because it will simulate pressing Tab and Enter!
  • Once you press "STOP" it will stop inputting data into Excel

Controlling Reflow Without the App

If you simply want to send commands via serial (like the serial monitor) to control the process without using the Android app, you're free to do so! Simply uncomment the block of code at the very end of the loop() function:

// Alternatively, read commands from the serial monitor char serialByte;

if (Serial.available() > 0) { serialByte = Serial.read(); } if (serialByte == startReflow) { justStarted = true; reflow = true; // Reflow started! t_start = millis(); // Record the start time timer = millis(); // Timer for logging data points Serial.println("<-- ***Reflow process started!"); // Left arrow means it received a command } else if (serialByte == stopReflow) { // Command to stop reflow process digitalWrite(relay, LOW); // Turn off appliance and set flag to stop PID control reflow = false; Serial.println("<-- ***Reflow process aborted!"); }

Then you can send the letter 'A' in the serial monitor to start the reflow process, and the letter 'S' to stop the reflow!

Functionality Test Code

For example code to test the features individually, please see the following sketches. Note that for the Reflowduino32 everything is more or less tested already with the demo sketch so I didn't bother breaking up the individual features with their own sketches.