Electronics – GeoSaffer.com https://blog.geosaffer.com Apps, Electronics, 3D Printing & more Sat, 11 Jul 2020 09:36:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 179389722 Bluetooth Low Energy Thermometer https://blog.geosaffer.com/2019/12/26/bluetooth-low-energy-thermometer/?utm_source=rss&utm_medium=rss&utm_campaign=bluetooth-low-energy-thermometer Thu, 26 Dec 2019 08:56:50 +0000 http://blog.geosaffer.com/?p=67 You can create your own Bluetooth Low Energy Thermometer by just using a few components.

Some things you will need: 1. Arduino (Uno, Nano or Micro) We will be using the Uno for this demo.  

2. AT-09/HM-10 module  

3. DS18B20 thermal sensor

4. Some wires for connecting them (male to male, male to female and female to female)

5. a 4.7k resistor  6. an Android or iPhone

7. and finally the Arduino IDE  from Here  

Connecting all components

Connect everything up as shown in the diagram below, the connections are the same for HC-05 and AT-09

Required Libraries

Make sure to import the OneWire or 18b20 Library from Dallas Instruments

 

The Code to Run the project

Copy and paste the following code into your Arduino IDE or into the IDE of your choice  

// Include the libraries
#include <OneWire.h> 
#include <DallasTemperature.h>

// Data wire goes to pin 2 on the Arduino 
#define ONE_WIRE_BUS 2 

// Setup a oneWire instance
OneWire oneWire(ONE_WIRE_BUS); 

// Pass the oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

void setup(void) 
{ 
 // start serial port with a baudrate of 9600 
 Serial.begin(9600); 
 Serial.println("Temperature Demo started"); 
 // Start up the sensor library 
 sensors.begin(); 
} 

void loop(void) 
{ 
  //request temprature
 sensors.requestTemperatures(); 
 // get the first sensors data 
 Serial.print(sensors.getTempCByIndex(0));  
 // finalize the string
 Serial.println("\r\n");
 //wait for 1 second before it reads again
 delay(1000); 
} 

Click the Verify button  to make sure there are no code errors and if it’s successful Click the Upload.

When the upload is successful, the program will start running on the Arduino.

 

Testing

When the upload is successful, open your serial monitor by pressing “Ctrl+Shft+M” If everything is working as expected you should see an output on the serial monitor every second.

 

Connecting to your Bluetooth Device

Once you have verified that the Arduino is getting data from your ds18b20, you are ready to connect your phone to your Bluetooth Module.

Download our app from the Google Play Store.   Once the app is installed, connect it to the (AT-09) with your app by selecting the device from the list.

Once you have selected the device tap the connect button top right and it will connect to it and you should shortly start seeing the data updating on the app.

]]>
67
Bluetooth Thermometer https://blog.geosaffer.com/2019/10/30/bluetooth-thermometer/?utm_source=rss&utm_medium=rss&utm_campaign=bluetooth-thermometer Wed, 30 Oct 2019 08:13:37 +0000 http://blog.geosaffer.com/?p=18 You can create your own Bluetooth Thermometer by just using a few components.

Some things you will need:
1. Arduino (Uno, Nano or Micro)
We will be using the Uno for this demo.

 

2. HC-05 module

 

3. DS18B20 thermal sensor

4. Some wires for connecting them
(male to male, male to female and female to female)

5. a 4.7k resistor   

6. an Android phone

7. and finally the Arduino IDE  from Here

 

Connecting all components

Connect everything up as shown in the diagram below

Required Libraries

Make sure to import the OneWire or 18b20 Library from Dallas Instruments

 

The Code to Run the project

Copy and paste the following code into your Arduino IDE or into the IDE of your choice

 

// Include the libraries
#include <OneWire.h> 
#include <DallasTemperature.h>

// Data wire goes to pin 2 on the Arduino 
#define ONE_WIRE_BUS 2 

// Setup a oneWire instance
OneWire oneWire(ONE_WIRE_BUS); 

// Pass the oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

void setup(void) 
{ 
 // start serial port with a baudrate of 9600 
 Serial.begin(9600); 
 Serial.println("Temperature Demo started"); 
 // Start up the sensor library 
 sensors.begin(); 
} 

void loop(void) 
{ 
  //request temprature
 sensors.requestTemperatures(); 
 // get the first sensors data 
 Serial.print(sensors.getTempCByIndex(0));  
 // finalize the string
 Serial.println("\r\n");
 //wait for 1 second before it reads again
 delay(1000); 
} 

Click the Verify button  to make sure there are no code errors
and if it’s successful Click the Upload.

When the upload is successful, the program will start running on the Arduino.

 

Testing

When the upload is successful, open your serial monitor by pressing “Ctrl+Shft+M”

If everything is working as expected you should see an output on the serial monitor every second.

 

Connecting to your Bluetooth Device

Once you have verified that the Arduino is getting data from your ds18b20, you are ready to connect your phone to your Bluetooth Module.

Download our app from the Google Play Store.

Once the app is installed, pair your Bluetooth Device(HC-05) with your phone.

Open the app on your phone and have a look for the paired device that you have just added to your phone and select it from the list.

Once you have selected the device it will connect to it and you should shortly start seeing the data updating on the app.

]]>
18
Display turntable for 3D printed models https://blog.geosaffer.com/2018/03/22/display-turntable-for-3d-printed-models/?utm_source=rss&utm_medium=rss&utm_campaign=display-turntable-for-3d-printed-models Thu, 22 Mar 2018 01:29:58 +0000 https://blog.geosaffer.com/?p=144

 

]]>
144