The IRTEMP module from Freetronics is an infrared remote temperature sensor that can be incorporated into your Arduino / microcontroller projects. It can scan a temperature between -33 to +220 C, and can be operated using a 3.3 to 5V power supply. It can be powered directly from the Arduino 5V pin. This module can also provide an ambient temperature reading if required. The Servo used in this project is a SG-5010 standard servo which will be utilised to display the temperature reading from the IRTEMP module.
Gauge parts: Paper (to print the face of the gauge), and some glue to stick it to the wood. MDF Standard panel (3mm width) - for the top and base of the gauge. Galvanized bracket (25x25x40mm) Timber screws: Hinge-long threads csk head Phillips drive (4G x 12mm)
/* ------------------------------------------------------- Analog IR Temperature Gauge: written by ScottC on 1st Dec 2012. http://arduinobasics.blogspot.com/2012/12/arduino-basics-analog-ir-temperature.html
* Some of the code was adapted from a sketch by Andy Gelme (@geekscape) * For more information on using the IRTEMP see www.freetronics.com/irtemp * IRTemp library uses an Arduino interrupt: * If PIN_CLOCK = 2, then Arduino interrupt 0 is used * If PIN_CLOCK = 3, then Arduino interrupt 1 is used ---------------------------------------------------------*/
#include "IRTemp.h" #include <Servo.h>
Servo servo1; staticconstbyte PIN_DATA = 2; staticconstbyte PIN_CLOCK = 3; // Must be either pin 2 or pin 3 staticconstbyte PIN_ACQUIRE = 4;
/* If you want the ambient temperature instead - then use the code below. */ //float ambientTemperature = irTemp.getAmbientTemperature(SCALE); //printTemperature("Ambient", ambientTemperature);
Ambient temperature: If you want to get the ambient temperature from the IRTEMP module, then have a look at lines 58-59. Servo Angles: You will notice on line 36, the maximum servo angle used was 175. This value was obtained through trial and error (see below).
Calibrating the servo angles You may need to calibrate your servo in order to move through an angle of 0 to 180 degrees without straining the motor.Change the minAngle on line 35to a safe value (for example: 10), and the maxAngle on line 36 to a value like 170. Remove the comment tag (//) on line 76, and then run the sketch. Lower the minAngle until it reaches the minimum value on the gauge, making sure that the servo doesn't sound like it is straining to keep it in position.
Add the comment tag (//) back in, and then take out the comment tag for line 79. And follow a similar process, until you reach the maximum value on the gauge. Once again, make sure that the servo is not making a straining noise to hold it at that value. Make sure to add the comment tag back in, when you have finished the calibration.
In this example, the servo's minAngle value was 0, and maxAngle value was 175 after calibration, however, as you can see from the video, the physical range of the servo turned out to be 0 to 180 degrees.
The Temperature Gauge Picture
The following gauge was created in Microsoft Excel using an X-Y chart. Data labels were manually repositioned in order to get the desired numerical effect.
Have you ever wondered if there was a way to store and retrieve data from a USB stick with an Arduino UNO? Most people choose SD cards to store their project data, but you may be surprised there IS a way! IC Station have a nice little module which allows you store and retrieve your Arduino (or other MCU) project data to a USB stick. I am not too sure why USB storage is not widely used in Arduino projects? These modules are not expensive, they have been around for quite a while, and are relatively simple to use. You do not need any libraries to get them to work, however, I must say that documentation for this module is not that easy to find. This site and this document proved to be very useful in my endevour to get this module working, and I hope my tutorial below will help you get started and bridge some of the information gaps. The...
Introduction Nextion is a programmable human machine interface (HMI) that can be customized and designed to simplify the interaction between you and your project. This Nextion Enhanced module (NX4827K043) with a resistive touch screen display, has some additional features not seen in previous traditional versions of the Nextion series. A built in real time clock (RTC) Accessible flash memory (32MB) GPIO functionality Faster clock speed Before you connect the Nextion Enhanced module to your project, you need to design your interface with the free Nextion Editor. The editor can be downloaded here. In this project, I will be designing a simple dynamic interface, which will allow me to interact with a stepper motor in two different ways. The first interface will let me control the direction and speed of the stepper motor through the use of a simple GUI. I will have left and right arrows for the direction, and up and down arrows for the speed. I will also map the Expansion board...
PART THREE If you happened to land on this page and missed PART ONE , and PART TWO , I would advise you go back and read those sections first. This is what you'll find in partone : Downloading and setting up the Android SDK Downloading the Processing IDE Setting up and preparing the Android device Running through a couple of Processing/Android sketches on an Andoid phone. This is what you will find in part two : Introducing Toasts (display messages) Looking out for BluetoothDevices using BroadcastReceivers Getting useful information from a discovered Bluetooth device Connecting to a Bluetooth Device An Arduino Bluetooth Sketch that can be used in this tutorial InputStream and OutputStream We will now borrow some code from the Android developers site to help us to establish communication between the Android phone and the Bluetooth shield on the Arduino. By this stage we have already scanned and discovered the bluetooth device and made a successful connection. We now need to create ...
Comments
Post a Comment