Got the model itself where I’d like it, the arduino doesn’t play very well with 9 volt input though it seems(this isn’t an authentic board, so who knows how good the components are). I ordered a buck converted to step it down to the native 5 volts, the case should be more than large enough to accomadate. Failing that, I might look into lipo packs, but that’s a headache I don’t feel like giving myself.
These are the .stl files for printing
print ready v1body.stl (128.5 KB) print ready v1lid.stl (73.1 KB) print ready v1sensorlid.stl (100.5 KB) sensorbody.stl (124.8 KB)
I’ll probably make small changes to it with time, a recharging port, for instance.
Parts required:
Arduino, I used a pro micro but whatever fits works
SSD1306 OLED screen
MLX90614 IR sensor - I need to come up with a lens or reflection tube, it has too wide of a FOV as is
2x 7mm panel mount momentary spst switches
1/4" loc-line
6x M2 x 4mm button head screws
4x M3 x 5mm button head screws
9v battery
9v battery connector
buck converter
dupont wires, but you can hard solder if you’re braver than I
21mm panel mount on/off switch
Code:
Came from this video, with the code changed to be in Fahrenheit instead of celcius
/* This code works with MLX90614 (GY906) and OLED screen
* It measures both ambient and object temperature in Fahrenheit and display it on the screen
* Please visit www.surtrtech.com for more details
*/
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
//Declaring the display name (display)
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
mlx.begin();
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Start the OLED display
display.clearDisplay();
display.display();
}
void loop() {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,4);
display.println("Ambient");
display.setTextSize(2);
display.setCursor(50,0);
display.println(mlx.readAmbientTempF(),1);
display.setCursor(110,0);
display.println("F");
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,20);
display.println("Target");
display.setTextSize(2);
display.setCursor(50,17);
display.println(mlx.readObjectTempF(),1);
display.setCursor(110,17);
display.println("F");
display.display();
delay(1000);
}
btw, I don’t know if the summary feature will properly format code, @sidco @soxhlet, is there an option to allow for posting code? I know most forums have a feature
also, anyone who can improve the code will get a free body printed by me. I’d like to add a status indicator RGB led(red=hot, green=good kinda thing), and use the buttons to adjust target temperature