Home Blog Page 17

Hanging Gear Weather Station – Driven By Stepper Motors & An Arduino

In this project, I’ll be showing you how to build your own hanging gear weather station, which is made from laser-cut MDF components. An Arduino Pro Micro uses a DHT11 sensor to take temperature and humidity measurements and then drives two stepper motors to turn the hanging gears to indicate the measured values.

The weather station is supported by two legs on a flat base, making it perfect to stand on your desk, or on a shelf or side table.

The DHT sensor has a range of 20-95% relative humidity and can measure temperatures between 0-50°C. I’ve designed the gears for the full humidity range and with a negative temperature range so that you can easily use a different sensor if you’d like to place the sensor outside to measure the outdoor conditions.

The stepper motors are almost silent and their noise level can be adjusted by slowing down their movement, so you won’t be bugged by them if you use the weather station on your desk.

Here’s a video of the build and weather station in operation:

What You Need To Build Your Weather Station

Building Your Hanging Gear Weather Station

We’ll start off by laser cutting the MDF components, then assemble the electronics and install these onto the MDF components, then finish the assembly of the weather station and then finally program and set up the Arduino.

Laser Cut The MDF Components

I designed the laser cut components in Inkscape. The components are all on a single sheet in the download, so you’ll need to split them up to suit the bed size of your laser cutter.

Designed The Weather Station Components In Inkscape

I used a cheap K40 laser cutter to cut and engrave these components. If you don’t have access to a laser cutter, consider using an online laser cutting service. There are a number of services available online and most will even deliver the components to you once they’re cut.

I started out by engraving and then cutting the gears. I always use masking tape over the MDF when engraving or cutting so that the smoke doesn’t mark the surface.

Laser Engraving The Gears
Laser Cutting The Gears

I then engraved and cut out the front panel, and finally cut out the remaining stand components.

Laser Cut Weather Station Components

Once all of the parts have been cut, you’ll need to remove the masking tape from them.

Remove The Masking Tape

Installing The Stepper Motors

Next secure the two stepper motors to the front plate using two M3 x 10mm machine screws for each motor.

Install The Stepper Motors With Screws

It’s a good idea to glue the stand support plate with the cutout for the motors to the back-side of the front panel before adding the motors, as it’s a bit easier than having to work around the motors later. It’s best to use wood glue to glue the MDF components together.

Back Plate For Motors

Next, you’ll need to assemble the gears.

Stack your gear pieces onto your servos with a drop of wood glue between each. Start with the disc with a hole in it and then the gear.

Assemble The Motor Gears

You’ll then need to add a small spacer between the gear and the front disc to create a bit of room for the gears to move freely. I used a flat washer for each of these. You could even use a small circle of thick card or plastic.

Install The Spacer Washers
There Should Be Some Space Between The Gear Components

Assemble The Electronic Components

Here is a sketch of the connections between the Arduino and the DHT sensor and stepper motor drivers:

Wiring Connection Diagram

The circuit is quite simple and includes basic connections from digital IO pins 2 to 9 to the two stepper drivers and then a connection between the DHT11 sensor data pin and digital IO pin 10. You’ll also need to add your power connections to the sensor and stepper drivers as well as a 10k resistor between the connection to digital pin 10 and 5V.

I assembled the header pin connections and DHT sensor onto a prototyping PCB so that the Arduino and stepper motor drivers could just be plugged into it.

Assembled PCB And Headers For Motors On Weather Station

I then made up some Dupont connector cables to connect the PCB and the stepper motor drivers. You can use jumpers or create your own header cables by soldering some ribbon cable to the female header pin connectors.

Connector Cables

Now that the electronics are complete, let’s install them onto the MDF components and complete the assembly of the weather station.

Complete The Assembly Of The Weather Station

I used a glue gun to glue the Arduino PCB to the back plate of the weather station and the two stepper motor drivers onto the two side stand pieces.

Use A Glue Gun To Stick Electronic Components To MDF
Stick Motor Drivers Into Place

Once you’ve got the electronics glued into place, we can assemble the rest of the weather station using wood glue.

Components Stuck Into Place

Glue the two legs into the base and then add the front plate onto the legs.

Assemble Wooden Components Using A Glue Gun

Finally, glue the back plate into place and allow the glue to dry. Make sure that the Arduino’s micro USB port is facing towards the base of the weather station.

Assembled Wooden Components For Weather Station

Once the glue is dry, plug the stepper motors into the drivers and then connect the drivers to your Arduino using the cables you’ve made up.

Plug In Motor Cables

Try to tuck the cabling in so that it doesn’t hang out of the bottom or protrude out of the top of the back area.

Plug In The Additional Wiring

If you’d like to close up the top, use the piece cut out of the support stand plate. Don’t glue this into place until you’ve tested out your stepper drivers and connections as you may need to access the cables again to make changes.

Add A Top Cover To The Back Of The Weather Station If Required
Cover Back Of Housing

Plug your micro USB cable into the bottom of your weather station and you’re now ready to upload the code.

Programming Your Hanging Gear Weather Station

Now that your hanging gear weather station is built, you need to program the Arduino to take temperature and humidity measurements from the sensor and move the stepper motors to display the measured values.

Here is the sketch:

//The DIY Life
//Weather Station
//28 July 2020

#include "DHT.h"          //Import the required libraries for the sensor

#define DHTPIN 10         //DHT Sensor Pin
#define DHTTYPE DHT11     //DHT 11 Temperature & Humidity Sensor
DHT dht(DHTPIN, DHTTYPE);

int tempPins[] = {2,3,4,5};   //Define the temperature motor pins
int humidPins[] = {9,8,7,6};  //Define the humidity motor pins

int temp = 25;                //Create a variable for the temperature
int stepsPerDeg = 338;        //The number of motor steps for 1 degree celcius on the gear
int humid = 50;               //Create a variable for the humidity
int stepsPerPer = 69;         //The number of motor steps for 1 percent on the gear
int movementSpeed = 30;       //The motor movement delay in milliseconds

void setup(void) 
{
  Serial.begin(9600);         //Used initially to display measured values
  for (int i = 0; i <= 3; i++) 
  { 
    pinMode(tempPins[i], OUTPUT);   //Assign the motor pin functions
    pinMode(humidPins[i], OUTPUT);
  }
  dht.begin();                      //Connect to the DHT Sensor
  delay(2000);
}

void loop(void) 
{
  float startTime = millis();
  int newTemp = dht.readTemperature();   //Read in the current temperature
  int newHumid = dht.readHumidity();     //Read in the current humidity
  Serial.println(newTemp);               //Display values on serial monitor
  Serial.println(newHumid);
  int tempDiff = newTemp-temp;           //Calculate the difference between the actual indicated values
  int humidDiff = newHumid-humid;
  temp = newTemp;                        //Set the current values to the updated values
  humid = newHumid;
  int tempSteps = abs(stepsPerDeg*tempDiff);  //Calculate the number of motor steps to get to the new value
  int humidSteps = abs(stepsPerPer*humidDiff);
  bool tempDir = 0;                      //Create variables for the motor movement directions
  bool humidDir = 0;
  if (tempDiff < 0)                      //Set the motor movement directions
  {
    tempDir = 1;
  }
  if (humidDiff < 0)
  {
    humidDir = 1;
  }
  moveMotors(tempSteps, tempDir, humidSteps, humidDir);   //Call the moveMotors function to move the two motors
  float endTime = millis();
  if (endTime-startTime < 5000)    //Wait at least 5 seconds between updates
    delay(5000-(endTime-startTime));
}

void moveMotors(int tempSteps, bool tempDir, int humidSteps, bool humidDir) 
 //Function to move motors
{
  for(int i=0; i<tempSteps ; i++)      //Move the temperature motor the required number of steps
  {
    static byte out = 0x01;
    if (tempDir)                       //Set the temperature motor direction
    {
      out != 0x08 ? out = out << 1 : out = 0x01; 
    }
    else
    {
      out != 0x01 ? out = out >> 1 : out = 0x08; 
    }
    for (int i = 0; i < 4; i++)        //Ring out the motor movement
    {
      digitalWrite(tempPins[i], (out & (0x01 << i)) ? HIGH : LOW);
    }
    delay(movementSpeed);              //Wait the delay time between steps
  }
  for(int i=0; i<humidSteps ; i++)     //Move the humidity motor the required number of steps
  {
    static byte out = 0x01;
    if (humidDir)                      //Set the humidity motor direction
    {
      out != 0x08 ? out = out << 1 : out = 0x01; 
    }
    else
    {
      out != 0x01 ? out = out >> 1 : out = 0x08;
    }
    for (int i = 0; i < 4; i++)        //Ring out the motor movement
    {
      digitalWrite(humidPins[i], (out & (0x01 << i)) ? HIGH : LOW);
    }
    delay(movementSpeed);              //Wait the delay time between steps
  }
}

We start by importing the library for the DHT11 sensor. We then assign the sensor pin and create a sensor object using the correct sensor type.

We then assign the pins for the two stepper motor drivers.

We then create variables for the temperature and humidity measurements as well as two values for the number of steps the stepper motors need to make in order to move the temperature gear by one degree and the humidity gear by one percent.

The values set as the temperature and humidity here are the initial values that should be set when you place the gears onto the motors before powering up the weather station. The gears will then move to the correct measured values from these starting values. You can make adjustments to these values if you’d like to more accurately suit the measured values you expect.

We also have a motor movement speed. The speed is essentially a delay between steps in milliseconds, so a higher value is a slower speed.

In the setup function, we start serial communication, which is used to see what the actual measured values are in order to compare them with what is displayed during the initial calibration and setup.

We then assign the stepper motor driver pins numbers and then connect to the DHT sensor.

In the loop function, we record the start time for the cycle. Then take a new temperature and humidity measurement. We display these on the serial monitor and then calculate the difference in temperature and humidity from the last measurements taken. We can then replace the old measurements with the new measurements.

We then take the differences and convert them into a number of steps required to get to that indication on each gear, then set the directions of motor movement and then call a function called moveMotors to move each of the motors the required number of steps and in a particular direction.

Finally, we check to see that at least five seconds have passed between each update. If not, because neither gear moved in that cycle, the delay waits out the additional time until 5 seconds have passed. This delay can be increased or decreased depending on how quickly your environment is likely to change. If you’re in a large room of outdoors then you could change the update time to be every couple of minutes rather.

The move motors function just rings out the movement of each motor by the required number of steps and in the required direction, with a short delay between each pulse to slow the motors down.

That’s the code, now let’s see how it works.

Setting Up And Using The Weather Station

Before you upload the code, place the two gears onto the motors, setting them to indicate the values set up initially in the code, these were 25°C and 50% humidity in my code.

Add Gears At Correct Starting Points

You can then upload the code.

If you open up your serial monitor, you’ll see the first measurement taken by the sensor and the motors will then start moving the gears to get to these values from the initial values. Mine were 22°C and 62% relative humidity.

Weather Station Gears Will Then Move Into Position

Once the movement finishes, you should see a second set of values and the gears may move again.

Temperature And Humdity Shown On Two Gears

It usually takes a couple of minutes for the sensor readings to stabilise and you’ll then get move consistent data and less movement of the gears.

Calibrating The Gear Movement

If you notice that your displayed values are not the same as those shown in the serial monitor, first check that your motor movement directions are correct, then check your initial values are correct. If both of those are correct, you may need to make adjustments to the number of steps per degree or percent values in order to calibrate your weather station.

To do this, set the gear you’re calibrating to a known position, say 0°C or 0% humidity, and then set the corresponding motor to move a certain number of steps, the more the better. I’d suggest using around 5000 steps for each as a starting point. Wait for the motor to move the set number of steps and then make a note of the finishing position. In order to calculate the stepsPerDeg or stepsPerPer, simply divide the total number of steps moved by the motor by the number of degrees or percent moved on the gear.

For example, if I set my temperature motor to move 5000 steps and it moved from 0°C to 14.8°C, then my stepsPerDeg value should be 5000/14.8 = 338. Meaning that the motor needs to move 338 steps to move the temperature gear by one-degree celsius.

That’s it! Your weather station can now be set up on your desk or shelf to indicate the current temperature and humidity.

Let me know in the comments section if you’ve built a weather station before and what you used to display the values.

Share This Project

Hanging-Gear-Weather-Station-Social

Arduino Soil Moisture Monitor – Never Forget To Water Your Indoor Plants

Do you often forget to water your indoor plants? Or perhaps you give them too much attention and over-water them. If you do, then you need to make yourself a soil moisture monitor. This Arduino based, battery-powered monitor uses a captive sensor to measure the moisture level of the soil it is stuck into and then flashes LEDs and provides an OLED display readout telling you whether you’re over or under watering your plant.

Two potentiometers on the monitor allow you to set a maximum and minimum moisture level which then activates either the red LED, to indicate a low moisture level, to tell you that you need to water your plant, or the yellow LED on a high moisture level, to tell you that you’re overwatering your plant. You can also push the button next to the display to turn on the OLED display and to see the exact moisture level as well as the two set points.

Here’s a video of the build and the monitor being turn on and used, read on for the step by step instructions to build your own.

What You Need To Build Your Own Soil Moisture Monitor

Components Required

To Power The Monitor

How To Build Your Soil Moisture Monitor

Assembling The Electronics

I started out by designing the circuit, with the intention of making it into a PCB. There are quite a few external components to this monitor, so a PCB helps make assembly easy, with fewer loose wires, and makes the monitor into a more robust device that can be mounted onto the moisture sensor spike.

Soil Moisture Monitor Schematic

If you don’t want to build the monitor onto a PCB, it can also be easily assembled onto a breadboard and you can just use the lead included with the capacitive moisture sensor to connect the sensor to the breadboard.

Soil Moisture Monitor PCB

I ordered the boards from PCB Way, which charges only $5 for 5 basic PCBs up to 100 x 100mm. They were manufactured and shipped out just three days later and arrived in less than a week.

PCB Way PCB Delivery

I was also really happy with the quality of the boards, they’re a lot better quality than the typical cheap PCBs available online.

Unpacking The PCBs

I’d really recommend trying them out for your own PCBs. I’ve put links to my PCB files which you can order from PCB Way if you’d like to try build your own moisture monitor.

PCB Quality

The board is designed for a 3.3V Arduino Pro Mini to be run on a single 18650 lithium battery, but you can also use a 5V Pro Mini, you’ll just need to use a higher voltage battery pack to supply the board and use 220Ω LED resistors.

If your Arduino Pro Mini came without the header pins attached, you’ll need to start by attaching them. Also, remember that this design needs the two analog pins A4 and A5 to communicate with the OLED display, so don’t forget to add these two pins as well.

Ensure that pins A4 and A5 Are Added

Solder the components into place on the circuit board, paying attention to the orientation of the LEDs and the tactile push-button.

Solder All Components To The Board

In order to connect the moisture sensor to your circuit board, you’ll need to remove the connector which comes pre-soldered onto the sensor. You can then add three male header pins and solder the sensor directly onto your circuit board.

Once you’re done, use some side cutters to clip the ends off of the header pins to make the board more compact.

Trim the pins on the back of the PCB

Your soil moisture monitor is now complete and just needs a power source.

Completed Soil Moisture Monitor

I powered my monitor using a single 18650 lithium cell mounted into one of these USB charging boards. You can use a different battery if you’d like or power your monitor using a USB charger or power bank.

Powered with an 18650 Lithium Battery Holder

Connect your battery pack or power supply to the power supply terminals on the side of the circuit board, paying attention to the polarity.

If you’re using a single battery, or a compact battery pack, try glue the battery to the back of the circuit board so that it’s all one unit.

Programming Your Monitor

To program the Arduino Pro Mini, you’ll need to use a USB programmer. Plug jumpers between the programmer and the header strip on the circuit board, making sure that the programmer pins go to the correct Arduino pins and that you use the correct Vcc voltage pin on the programmer to suite the board you are using, 3.3V for the 3.3V Pro Mini and 5V for the 5V Pro Mini.

Use A USB Programmer To Program The Arduino

You’ll also need to use the programmer when you’re using Serial communication to transmit the sensor values to your computer in order to calibrate your moisture monitor.

Here is the code:

//The DIY Life
//Michael Klements
//31 July 2020

#include <SPI.h>                                  //Import the libraries required for the display and low power mode
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <LowPower.h>

#define SCREEN_WIDTH  128                         //OLED display width, in pixels
#define SCREEN_HEIGHT 32                          //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); //Create the display object

#define statusLED 4                               //Define the LED & sensor pins
#define lowLED 5
#define highLED 6
#define sensorPin 10                              //Only used for the additional low power settings

#define dryCal 1000                               //Define the wet and dry calibration limits
#define wetCal 500

#define buttonPin 2                               //Define the button pin number

#define moisturePin A0                            //Define the analog input pin numbers
#define lowSetPin A1
#define highSetPin A2

int moisture = 0;                                 //Create variables for the analog inputs
int lowSet = 0;
int highSet = 0;

int cycleCount = 0;                               //Create a counter to flash the status LED

void setup() 
{
  Serial.begin(9600);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);      //Connect to the display
  display.clearDisplay();                         //Clear the display
  display.setTextSize(1);                         //Normal 1:1 pixel scale
  display.setTextColor(SSD1306_WHITE);            //Draw white text
  display.setCursor(10,5);                        //Display splash screen
  display.print(F("The DIY Life"));
  display.setCursor(10,15);
  display.print(F("Soil Moisture Meter"));
  display.display();
  delay(2000);
  display.clearDisplay();                         //Clear display
  display.display();
  pinMode(statusLED, OUTPUT);                     //Set the pin modes
  pinMode(lowLED, OUTPUT);
  pinMode(highLED, OUTPUT);
  pinMode(sensorPin, OUTPUT);
  pinMode(buttonPin, INPUT);
}

void loop()
{
  updateValues();                                 //Call the function to update the analog input values
  if (digitalRead(buttonPin) == HIGH)             //If the button is pushed
  {
    while(digitalRead(buttonPin) == HIGH)         //While the button stays pushed
    {
      display.clearDisplay();                     //Display the analog input values
      display.setCursor(10,3);
      display.print(F("Moisture: "));
      display.print(moisture);
      display.print(F("%"));
      display.setCursor(10,13);
      display.print(F("Low Setpoint: "));
      display.print(lowSet);
      display.print(F("%"));
      display.setCursor(10,23);
      display.print(F("High Setpoint: "));
      display.print(highSet);
      display.print(F("%"));
      display.display();
      delay(1000);                                //Wait 1000ms between each display update
      updateValues();                             //Get updated analog input values, allows pots adjustments to be seen
    }
    display.clearDisplay();                       //When button is released, clear the display to turn it off
    display.display();
  }
  if(moisture<=lowSet)                            //If the soil moisture level is low, flash the low LED
  {
    digitalWrite(lowLED, HIGH);
    delay(50);
    digitalWrite(lowLED, LOW);
  }
  if(moisture>=highSet)                           //If the soil moisture level is high, flash the high LED
  {
    digitalWrite(highLED, HIGH);
    delay(50);
    digitalWrite(highLED, LOW);
  }
  if(cycleCount>=5)                               //Every 5 cycles, flash the status LED and reset the counter
  {
    digitalWrite(statusLED, HIGH);
    delay(50);
    digitalWrite(statusLED, LOW);
    cycleCount=0;
  }
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); //Enter low power mode for 8 seconds
  cycleCount++;                                   //Increment the cycle counter
}

void updateValues ()                                              //Function to update the analog input values
{
  //digitalWrite(sensorPin, HIGH);                                //LOW Power Mode - Turn the moisture sensor on
  //delay(200);                                                   //LOW Power Mode - Wait for it to power up and stabilise
  moisture = map(analogRead(moisturePin),wetCal,dryCal,100,0);    //Read the soil moisture measurement
  Serial.println(moisture);
  //delay(50);
  //digitalWrite(sensorPin, LOW);                                 //LOW Power Mode - Turn the moisture sensor off
  lowSet = map(analogRead(lowSetPin),0,1023,0,100);               //Read in the low setpoint pot value
  if (lowSet>=highSet)                                            //Make sure that the low setpoint cannot be greater than the high
    lowSet=highSet-1;
  highSet = map(analogRead(highSetPin),0,1023,0,100);             //Read in the high setpoint pot value
  if (highSet<=lowSet)                                            //Make sure that the high setpoint cannot be less than the low
    highSet=lowSet+1;
}

We start by importing the libraries required for the OLED display and the low power mode. The library for low power mode is used to put the Arduino into a state where it uses less power than usual in order to prolong the battery life of the monitor.

We then set up the display parameters and create the display object.

We then define the LED and sensor PIN numbers. The sensorPin is only required for the additional low power settings which are explained later on.

We then have the wet and dry calibration set points, the button pin and then the analog input pin numbers.

Finally, we have variables to read in the analog inputs and a counter which is used to flash the status LED every 5 cycles.

In the setup function, we start Serial communication, which is used during setup to get the raw sensor values to set up the calibration, then connect to the display and show a splash screen. After two seconds of displaying the splash screen, we clear the display and then define the pin modes.

The loop function is quite simple. We call a function called updateValues to update the sensor and potentiometer readings, then check if the button has been pushed. If the button has been pushed, we then have a while loop which runs until the button is released again, which displays the soil moisture reading and potentiometer set points on the OLED display and updates the displayed values once every second.

When the button is released, the OLED display is turned off again to save power and the LED set points are then checked. If the soil moisture level is higher than the high set point, then the high LED is flashed and if the soil moisture level is lower than the low set point then the low LED is flashed.

We also have an if statement which flashes the status LED every 5 cycles or around 40 seconds to tell us that the monitor is still on. This is useful if you remove the Arduino’s power LED, are described in the additional low power settings, in order to further prolong battery life.

We then put the Arduino into a low power sleep for 8 seconds in order to save battery power and then increment the cycle counter.

The update values function reads in the soil moisture level and maps the reading between the two calibration values to a moisture level between 0 and 100%.

We also read in the two potentiometer set points and map them to a 0 to 100% range and have checks to ensure that the low set point can’t be set higher than the high set point and that the high set point can’t be set lower than the low set point.

Additional Low Power Settings

You’ll notice that there are a couple of lines which have bee commented out and some notes mentioning some further low power settings.

The current setup without any code or hardware modifications draws around 8-10mA. This means that a 4200mA battery will last around 20 days before needing to be recharged.

This can be extended by connecting the Vcc pin on the sensor to the Arduino’s digital IO pin 10 so that the sensor is only turned on during readings.

Connect the moisture sensor VCC pin to the Arduino IO pin 10

The sensor alone draws about 5mA, so turning it off for 8 seconds between readings dramatically increases the battery life. This will slow the code down a bit too as you’ll need to wait for the sensor to startup and stabilise before getting meaningful readings from it. This won’t really affect the normal operation of the monitor but will be noticeable when the OLED display is on, as you’ll need to wait longer for readings to update.

Another thing to do to further improve the battery life is to physically remove the Arduino’s green power LED or cut through the PCB trace to it to turn it off. This reduces another 2-3mA.

Remove The LED From The Arduino

Doing both of the above modifications will allow this monitor to run for around 50-60 days on a single charge.

Using The Soil Moisture Monitor

When powering the soil moisture monitor on, you should first see the splash screen and then the display should turn off.

Soil Moisture Monitor Startup Splash Screen

Once off, you can push the button and then wait a few seconds for it to finish the sleep cycle and then turn the display on. You can then see the actual measured moisture level and the two set points.

Moisture Level & Setpoints Being Displayed

Calibrate The Wet & Dry Levels

Before you get meaningful information from the monitor, you’ll need to calibrate the wet and dry limits and update the values in the code.

Use the USB programmer and your Serial monitor to display the raw sensor values being read on the analog input. Start by taking readings in dry air and then in glass or jug of water, making sure that you don’t submerge any of the components. Use the maximum and minimum values displayed as the two calibration limits in the code.

Calibrate The Soil Moisture Monitor

Try The Monitor Out

Once you’ve updated the calibration limits, you should be getting more meaningful results from your monitor. You can see the moisture level go up if you put your hand around the sensor.

Use a screwdriver to set the high and low setpoints on the two potentiometers.

Use A Screwdriver To Adjust The Two Setpoints

You’ll notice that you can’t set the high potentiometers lower than the low setpoint and likewise, you can’t set the low setpoint to be higher than the high set point.

Stick the sensor into the soil in your indoor plant, making sure that the soil does not touch the electronics, and then leave it for a few seconds to stabilise.

Test Your Moisture Meter Out In A Pot

You should then get a soil moisture reading and you can start setting the correct set points depending on the type of plant you have. This may require some trial and error in the beginning as certain plants like more water than others.

I also added a simple acrylic faceplate to screw over the PCB to protect the electronic components from leaves and water droplets

Acrylic Face Plate To Protect Soil Moisture Monitor Components

Have you tried making your own soil moisture monitor? Let me know what you built and how you used it in the comments section below.

Share This Project

Soil Moisture Monitor Pinterest

The Easiest Way To Get Started With Arduino – Grove Beginner Kit

If you’ve been looking at getting into Arduino, but have been intimidated by the idea of having to learn both electronics and programming at the same time, then the Grove Beginner Kit for Arduino may be the answer. This kit makes it really easy to get started with learning how to connect and program a number of different sensors and output devices, without having to worry about breadboards, jumpers, and the smaller electronic components required to interface with the Arduino.

Watch my video unboxing and using the Grove Beginner Kit, else read on for the written review.

Unboxing The Grove Beginner Kit

The kit is called a Grove Beginner Kit and is available from Seeed Studio.

You can buy one of the Grove Beginner Kits from Seeed Studio for $19.95 at the time of writing this review – Buy Here

Grove Beginner Kit

The kit comes in the form of a single PCB which includes a Seeduino in the middle, which is essentially an Arduino Uno clone that has been adapted to include 12 Grove connectors, surrounded by 10 Grove modules.

Grove Beginner Kit Inside

Briefly looking at the included modules, you get an LED, a buzzer, an OLED display module, a pushbutton, a rotary potentiometer, a light sensor, a microphone or sound sensor, a temperature and humidity sensor, an air pressure sensor and finally a 3-axis accelerometer. All of these modules are already connected to the Arduino, so you don’t need to worry about doing any wiring.

Seeeduino - Grove

The kit comes with 6 included Grove cables to connect the Grove modules once removed and a micro USB cable to program the Arduino. All of the cables are neatly packed into the sides of the box.

6 Included Grove Cables
Included Mico-USB Cable

Grove modules are essentially a rapid prototyping platform, with each module designed to be a plug and play device which is connected to the microcontroller using a four-wire Grove cable. The modules are standalone components and therefore don’t require any further electronic components to work, so you can move right on to programming.

Grove Modules

The system has grown to over 300 modules and can be used across a number of different platforms, including Arduino, Raspberry Pi, Microbit and Beaglebone.

What makes this kit particularly easy to use is that the modules are already wired to the various power supply and IO pins on the Arduino through the PCB, so you can literally start programming it immediately.

Prewired To The Arduino - Seeeduino

Each module is labeled with it’s associated IO port or interface and a set of example lessons guide you through using and programming each module.

Each Module Is Labelled With It's IO Pin

What separates this kit from other pre-wired kits, is that you can also break the Grove modules and Arduino off of the PCB and use the included grove cables to connect the modules with the PCB in order to create actual projects. So you’re not limited to using all of the components in place on the PCB. You can also buy additional Grove modules and use them with the included modules and Arduino to build more complex projects.

The modules and the Arduino are designed with through-hole “tabs” which make them easy to break out of the main PCB to use on their own.

Modules Can Be Removed Afterwards

The 6 included grove cables can then be used to connect the modules to the Arduino once they have been removed. They also don’t need to only be used with the IO port assigned to them in this kit. Once removed, each module can be used with any available digital, analog, or I2C Grove port, depending on the module type.

Grove Cables Can Be Used Once Modules Are Removed

Powering It Up & Programming It

When you first plug in the included USB cable to power up the board, a demo program allows you to fiddle around with all of the sensors, using the pushbutton and potentiometer to scroll between and select different options.

Grove Beginner Kit Demo Program To Start With

This gives you some idea of what each modules does and what it could potentially be used for.

Grove Beginner Kit Demo Program

There is a digital copy of the user manual available for download from the product page. I’d suggest downloading the last file, called all resources in one, which includes all of the required libraries and the example lessons and projects referenced in the manual. There is also some other documentation on the sensors used on the Grove modules as well as the Arduino IDE.

Download The All In One File

The Grove Beginner Kit manual is pretty good and explains how to install the Arduino IDE as well as how to program and use each of the included Grove modules, along with example code and explanations.

Grove Beginner Kit User Manual

There are also two basic projects included at the end, which each make use of multiple modules and give you an idea of how the modules can be used in your own projects.

Using The Kit For Your Own Projects

Rather than take you through one of the included projects, I’ve put together an example that makes use of the temperature and humidity sensor, the potentiometer, LED, buzzer, and OLED display. All of the elements used in the code were copied over from the example Lessons and modified slightly to work together as a single project.

The OLED display shows the current humidity and temperature, read from the DHT sensor, and the potentiometer allows you to adjust a temperature set-point. If the temperature fluctuates 5 degrees above or below the set-point then the LED will light up and if it fluctuates 10 degrees above or below the set-point then the buzzer will also sound.

//The DIY Life
//Temperature & Pressure Example
//25 July 2020

#include "DHT.h"                                                          //Import the required libraries for the sensor and OLED display
#include <Arduino.h>
#include <U8x8lib.h>

#define DHTPIN 3                                                          //DHT Sensor Pin
#define DHTTYPE DHT11                                                     //DHT 11 Temperature & Humidity Sensor
DHT dht(DHTPIN, DHTTYPE);

int potPin = A0;                                                          //Set the potentiometer pin number
int ledPin = 4;                                                           //Set the LED pin number
int buzzerPin = 5;                                                        //Set the buzzer pin number

U8X8_SSD1306_128X64_ALT0_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);          //Create an object to control the OLED display

int setPoint = 0;                                                         //Variable for the target temperature
int alertRange = 5;                                                       //Range above or below the target to light up the LED
int alarmRange = 10;                                                      //Range above or below the target to sound the alarm buzzer

void setup(void) 
{
  pinMode(ledPin, OUTPUT);                                                //Define the component pin modes
  pinMode(potPin, INPUT);
  pinMode(buzzerPin, OUTPUT);
  dht.begin();                                                            //Connect to the DHT Sensor
  u8x8.begin();                                                           //Connect to the OLED display
  u8x8.setPowerSave(0);                                                   //Set the display modes
  u8x8.setFlipMode(1);
}

void loop(void) 
{
  float temp, humi;                                                       //Create variables to store the temperature & humidity
  temp = dht.readTemperature();                                           //Read in the current temperature
  humi = dht.readHumidity();                                              //Read in the current humidity
  setPoint = map(analogRead(potPin),0,1023,0,50);                         //Read in the pot value and scale it to a temperature range of 0-50C

  if (temp >= setPoint+alertRange || temp <= setPoint-alertRange)         //If the temperature reading is above or below the alert range, turn on the LED
  {
    digitalWrite(ledPin, HIGH);
  }
  else
  {
    digitalWrite(ledPin, LOW);
  }

  if (temp >= setPoint+alarmRange || temp <= setPoint-alarmRange)         //If the temperature reading is above or below the alarm range, sound the buzzer
  {
    analogWrite(buzzerPin, 150);
  }
  else
  {
    analogWrite(buzzerPin, 0);
  }
  
  u8x8.setFont(u8x8_font_chroma48medium8_r);                              //Set the display font
  u8x8.setCursor(0, 33);                                                  //Set the cursor positions and display the text
  u8x8.print("T:");
  u8x8.print(int(temp));
  u8x8.print("C ");
  u8x8.print("H:");
  u8x8.print(int(humi));
  u8x8.print("%");
  u8x8.setCursor(0,50);
  u8x8.print("T Set: ");
  u8x8.print(setPoint);
  u8x8.print("C");
  u8x8.refreshDisplay();
  
  delay(200);                                                               //Wait 200 milliseconds between updates
}

Upload the above code and try it out on your own Grove Beginner kit. Try adjusting the set-point to be 5 or 10 degrees above or below the actual measured temperature and you’ll see the LED light up and hear the buzzer sound at the different stages.

Test Program Running

This isn’t a particularly complex project, but it shows how easy it is to get a project up and running using this kit. The code literally took ten minutes to write up by combining pieces from the included example lessons.

Conclusion

This is probably one of the best kits for new beginners as it not only makes getting started really simple, but it still includes a number of useful modules that can be separated and used in actual projects.

It’s also a fantastic design for classroom environments, where learners can get started with connecting sensors and programming the Arduino without having to worry about getting the wiring wrong and potentially destroying the components or the Arduino. You could literally have a half-hour lesson with this kit and leave having connected a couple of sensors and programmed an Arduino with little to no prior experience.

So if having to learn electronics and programming to get into Arduino sounds intimidating to you, then this kit is perfect to break the ice and get started.

All you need is one of these kits and a computer.

Let me know in the comments section if you have a favourite beginners kit and what you like about it.

Grove Beginner Kit Unpacked

Make a Celebrity Style Lounge Area in Your Backyard

If you have a backyard, you can consider yourself lucky, as you’re already blessed with extra space in the fresh air that you can use to relax or have guests over. Sometimes people get too distracted with various ideas that they tend to make mistakes when it comes to designing the lounge. It’s understandable, since suggestions are everywhere, so it’s easy to get carried away. But do you know who seldom makes a mistake? Celebrities. Their homes and backyards are always immaculate, so if you’re looking to redesign your lounge area, take some advice from the most stylish people in Hollywood.

Reese Witherspoon’s dreamy backyard with a vegetable garden

Well, of course, we’re starting this list with Reese, the ultimate queen of everything cool. Her California property boasts a gorgeous backyard equipped with an outdoor kitchen, a swimming pool, an outdoor fireplace, a spa, and a vegetable garden. What’s not to love there? Obviously, no one expects you to have all that. After all, you’re not a Hollywood celebrity. But, what you can do is take some inspiration from Reese. For example, you can build your own DIY fireplace to replicate the stylish celebrity home look. And if you’re just as obsessed with green smoothies as Reese is, you can start your own veggie garden so you always have some greens on hand.

Next to Reese’s swimming pool, there’s a beautiful lounge area, so if you already have a pool, make sure to create a sitting area where you can relax and sunbathe during the hot summer months. If not, you can still have a lovely place only for yourself and your family.

vegetable garden

Kristin Cavallari and Jay Cutler’s perfectly private backyard retreat

This reality star has a gorgeous Mediterranean-styled villa that, of course, has a breathtaking backyard with a huge plot of grass and a lounge area with sunbeds and potted plants. So it’s perfect for tanning and relaxing with a book. The whole area is super private and secluded, so it’s ideal for dinner parties and children playdates. If you think your backyard lounge could use some privacy, consider adding privacy panels or a screen of curtains. You could also go with a green living wall – simply plant some shrubs and plants and voila – you’ve got your own private retreat!

Since the style of this reality star’s house is inspired by Mediterranean Italy, it’s no wonder that the entire side of their home overlooking the lounge is covered with elegant stone wall cladding, which further ensures the Mediterranean vibe even in the middle of Nashville.

backyard retreat outdoor lounge area

Lea Michele’s beautifully decorated patio with cozy rugs

The former Glee actress said herself that, when she was looking to buy a home, she needed something that would be her refuge from the noise, close to mountains and nature. So her backyard has a pool (duh, it’s Hollywood, everyone has a pool!) and a lot of grass surfaces. However, all of that would be nothing without a lovely patio area. Equipped with stylish outdoor furnishings and chic outdoor rugs to cozy up the place, the California dream patio looks perfectly welcoming and is ideal for evening dinners with the closest friends. Since Lea is known to be a great hostess, it’s no wonder she wanted her secret garden to be both elegant and comfortable for her guests. To make your own patio area more inviting, try to incorporate chic textiles. Pillows, blankets, and floor coverings are all great finishing touches to a comfy patio – just make sure to stick to a limited color scheme so that everything looks cohesive.

cozy rugs

Jared Leto’s gorgeously outdoor lounge with tropical plants

We know he can transform himself into almost any character and that being in a band also suits him, but Jared Leto also knows how to make a perfect-looking backyard. His place looks more like tropical heaven rather than a typical Californian backyard somewhere in Hollywood Hills. He has a pool surrounded by a lot of greenery and everything’s paved in gorgeous dark stones which just adds even more elegance to the place.

If you want to transform your outdoor area into a tropical heaven à la Jared Leto, add palm trees, various bushes, ferns, begonias, and large-leaf plants. These will help create shade and add more privacy to your backyard. Aside from planting exotic-looking greenery, you can also add water features and tropical decor, install bamboo fencing, and build your own Tiki bar to create your own tropical paradise DIY-style.

tropical plants outdoor  lounge area

So, it’s obvious that celebrities have more resources to create their dream homes than us regular folks. But that doesn’t mean that you can’t and shouldn’t dream big!

Instead of spending obscene amounts of money, try to be as creative as possible, so that your friends will be stunned by your new outdoor lounge area. Aim to create a sitting space that’s stylish and relaxing and feel free to use these celebrity examples as an inspiration.

Make Your Own 3D Printed Tensegrity Tables

I made a laser-cut desktop tensegrity table set a few weeks ago and since then a number of people have asked for a similar 3D printable version. Have a look at those tables if you haven’t already. I made two designs, one which uses fishing line as the center support and another which uses two magnets. I’ve converted both of them into 3D printable parts as more people have 3D printers at home than access to a laser cutter.

Different Types Of Tables

The tables look like they’re floating, but they’re actually a clever demonstration of the principle of tensegrity. The principle of tensegrity originated in the nineteen fifties and is still used in the design of modern buildings and structures. The world’s largest tensegrity structure is currently the Kurilpa Bridge in Brisbane, Australia.

When you first look at them, it appears that the top surface is being supported by the three outside pieces of fishing line, but taking a closer look, you will see that the line doing all of the work is actually the one in the centre. The piece of fishing line in the centre of the structure is in tension and is supporting the load of the surface of the table and whatever is placed onto it. The three pieces of line on the outside are simply holding the top surface in place so that it remains directly overhead the centre line and doesn’t fall over. If any of these four lines are cut, the table will collapse under its own weight.

Here’s a video of the build, read on for the full step by step build instructions.

What You Need To Make Your 3D Printed Tensegrity Tables

You’ll also need a 3D Printer,

  • Creality Ender 3 Pro used in this guide – Buy Here

How To Build The Tables

To start off, you’ll need to 3D print the table parts.

For each version, there are two print options. One which is a print in place model which requires some support structure to be printed to support the overhanging arm.

Print In Place 3D Printed Tensegrity Table

Then another flat version which allows the table surface and the arm to be printed separately and then glued together. If you choose this option then you’ll need to simply clean up the edges and then glue the arm into the slot.

Flat Assembly Components

Print the models using PLA or ABS and a 15-30% infill.

3D Printing The Magnet Tensegrity Table

Once your models are printed, remove the supports and clean up any excess print material.

Clean Up The 3D Print Supports

I’ve added a 0.5mm hole in each corner of the table surfaces for the fishing line. Your 3D printer probably won’t be able to print these accurately enough to use right away but at least the slicing software will add the necessary walls in the area so that you can clean up the holes with a 0.5mm or 1mm drill bit, depending on your fishing line diameter.

Drill Holes For The Fishing Line

I used fishing line because it doesn’t fray and it’s a bit more rigid than cotton or string, so it’s easier to thread through the holes.

Cut four lengths of fishing line, one around 8-10 cm long and another three of exactly the same length, around 12 to 13cm. If you’re using knots instead of glue then cut them a bit longer to allow for the knots.

Cut Strips Of Fishing Line

Start by gluing the three longer pieces into either the top or the bottom table end.

Glue One Half First

Next, glue them to the second half, making sure that they’re exactly the same length on each of the three sides. This part is more difficult if you’re knotting the line.

Then Glue The Other Side

Then glue the centre line into place to pull on the three outside lines and hold the table up. It should be tight enough that the table stands without feeling loose or wobbling around but not too tight that the ends of the table bend.

Then Add The Centre Line To Pull Tight

Once you’re happy with your table, trim any excess fishing line and make sure that the glued joints are secure and dried.

Centre Line

If you’re using magnets, glue the outside three lines into place at the correct and even length and then add the magnets to the middle afterward with opposite poles facing each other.

Magnetic Set

The magnetic table can’t really hold much weight, but you could get more by positioning the magnets closer together. There is a bit of a tradeoff here though because if they’re too close together then you can’t see the gap between them well and then it just looks like the magnets are rigidly holding up the tensegrity tables.

I tested the fishing line table in my previous guide, to see if it could hold up my phone. It held up around 200 grams but the outside lines did start flexing, so it probably couldn’t take too much more than this.

Two Different Tables
Both 3D Printed Tables Complet

Enjoy making your own tensegrity tables. Let me know how it goes in the comments section below.

Share This Guide

3D Printed Tensegrity Tables

Arduino Based Obstacle Avoiding Robot Car

In this guide, I’ll be showing you how to build your own Arduino based obstacle avoiding robot car. The car uses a servo mounted ultrasonic sensor to detect objects in front of and on either side of the car and an L293D DC motor driver shield to drive four geared motors, one on each wheel. An Arduino Uno underneath the motor driver controls the motor shield, ultrasonic sensor and the servo.

Because all four wheels are driven, we can drive two on one side of the car forward and two on the other side backwards in order to turn the car, so we don’t need a steering mechanism and the car can turn around on the spot, instead of requiring forward movement.

Here’s a video of the build and the car running. Read on for the full step by step instructions.

Here’s What You Need To Build An Obstacle Avoiding Robot Car

  • Arduino Uno – Buy Here
  • L293D Motor Driver Shield– Buy Here
  • Micro Servo – Buy Here
  • Ultrasonic Sensor Module – Buy Here
  • 4 x Geared DC Motors & Wheels – Buy Here
  • 9-12V Battery Pack
    • A 9V block battery can’t usually produce enough current to drive the four motors. Rechargeable battery packs for RC cars tend to work best for this project.
  • 8 x M3 x 15mm Socket Head Screws – Buy Here
  • Ribbon Cable – Buy Here
  • Header Pins – Buy Here

How To Build Your Robot Car

Before we start building the actual obstacle avoiding robot car, let’s take a look at the motor driver shield. The control of the motors is done through an L293D motor driver shield which uses two L293D driver chips and a shift register. It also has some power breakout pins, pins to connect two servos and a breakout for IO pin 2. Oddly, pin 2 and pin 13 are unused by the board but only pin 2 has a breakout for a solder joint.

L293D DC Motor Driver Shield

You’ll need to solder some female pin headers to the power pins along the bottom of the shield and one for pin 2 and one for pin 13. Pin 2 you can solder into the breakout hole, pin 13 you’ll need to solder directly onto the back side (top) of the shield’s pins.

The object sensing is done by an ultrasonic sensor that uses ultrasonic sound waves to measure the distance to an object by timing how long it takes the pulse to bounce off of the object and return to the sensor. Because we know the speed that sound waves travel through air, we can use the time it takes a pulse to return to the sensor to calculate the object’s distance using the formula:

Distance = Pulse Time x Speed of Sound In Air / 2

We need to divide by two since the pulse travels to the object and then back to the sensor, so it is traveling twice the object’s distance.

Each of the four wheels on the obstacle avoiding car is driven by a geared DC motor, you will need to attach a short power lead to each with some pins to screw into the terminals on the shield.

Assembling The Car

I designed a simple chassis for the car to be 3D printed. I printed mine using black PLA with a 30% infill for the vertical supports.

Tinkercad Model of Obstacle Avoiding Car

There are three printed components, the top and bottom chassis sections and then a holder for the ultrasonic sensor.

Download The 3D Print Files – 3D Print Files

3D Printed Components

Once you’ve got all of your components together, let’s start assembling the obstacle avoiding robot car.

The components are mostly glued into place using a glue gun. Start off by gluing the servo into place with the ribbon cable facing towards the back of the car.

Glue The Servo Into Place

Next, glue the ultrasonic sensor into the housing, making sure that there is some space around the pins for the plug connectors. Then glue the servo arm into the bottom of the holder, so that it can be pushed onto the servo.

Glue The Ultrasonic Sensor Into Place

Next, glue the motors into place. Try to keep the wiring to motors on the outside so that you can get to them if any come loose. Don’t worry about the directions that the motors turn, this can be changed by swapping the wires at the shield terminals later.

Glue each motor into place on the bottom chassis plate.

Glue The Four Motors Into Place

If you are using a rechargeable battery, put the battery into place in the middle section between the motors to free up from space on the top chassis plate. Once the top plate is in place, you won’t be able to get to the battery pack without removing it, so may sure that any leads you to need to get to in order to charge it are available out the back of the car.

Glue The Top Deck Into Place

Put a drop of glue onto the top of each motor and then screw the top chassis plate into place.

Add The Top Deck Screws

Next, screw your Arduino onto your top chassis plate.

Screw The Arduino Into Place

Then plug your motor driver shield into your Arduino.

Add The Motor Driver Shield

Now screw your motors into each terminal pair. Make sure that each motor is connected to the correct pair of terminals, the front motors to the front terminals, and the back motors to the back terminals. Don’t worry about the polarity of the motors yet, if any turn the wrong way around when you power the car up then simply swap the two wires for that motor around and it’ll then turn the correct way.

Connect The Motor Wires

Put a drop of glue on the sides of the car to hold the wires away from the wheels so that they don’t get caught up while the wheels are turning.

Plug the servo into the servo 1 header pins on the shield with the signal wire facing inwards.

Plug In The Servo

Feed a power cable for your battery in under the board and to the power terminals. If you are not using a rechargeable battery, then place the battery pack into the space between the servo and the Arduino, making sure that it doesn’t get caught on the sensor when it moves.

Add A Power Lead For The Battery

Important – Don’t plug the battery into the motor shield and a power supply into the Arduino as you’ll damage the Arduino or the shield. Only ever have the battery connected to the shield and feeding power to the Arduino OR the supply plugged into the Arduino (or USB cable) and feeding power to the motor shield.

Plug In The Sensor Leads

Then plug four wires into the sensor and over to the shield. Plug the ground and Vcc wires into the ground and 5V pins on the shield and then the trigger pin to pin 2 and the echo pin to pin 13.

Motor Driver Shield

Lastly, put the four wheels onto the geared motors and the car is now complete.

Obstacle Avoiding Robot Car Top

Programming The Arduino

Now that the obstacle avoiding robot car is complete, let’s have a look at the code.

//The DIY Life
//Michael Klements
//29 June 2020

#include <AFMotor.h>                              //Import library to control motor shield
#include <Servo.h>                                //Import library to control the servo

AF_DCMotor rightBack(1);                          //Create an object to control each motor
AF_DCMotor rightFront(2);
AF_DCMotor leftFront(3);
AF_DCMotor leftBack(4);
Servo servoLook;                                  //Create an object to control the servo

byte trig = 2;                                    //Assign the ultrasonic sensor pins
byte echo = 13;
byte maxDist = 150;                               //Maximum sensing distance (Objects further than this distance are ignored)
byte stopDist = 50;                               //Minimum distance from an object to stop in cm
float timeOut = 2*(maxDist+10)/100/340*1000000;   //Maximum time to wait for a return signal

byte motorSpeed = 55;                             //The maximum motor speed
int motorOffset = 10;                             //Factor to account for one side being more powerful
int turnSpeed = 50;                               //Amount to add to motor speed when turning


void setup() 
{
  rightBack.setSpeed(motorSpeed);                 //Set the motors to the motor speed
  rightFront.setSpeed(motorSpeed);
  leftFront.setSpeed(motorSpeed+motorOffset);
  leftBack.setSpeed(motorSpeed+motorOffset);
  rightBack.run(RELEASE);                         //Ensure all motors are stopped
  rightFront.run(RELEASE);
  leftFront.run(RELEASE);
  leftBack.run(RELEASE);
  servoLook.attach(10);                           //Assign the servo pin
  pinMode(trig,OUTPUT);                           //Assign ultrasonic sensor pin modes
  pinMode(echo,INPUT);
}

void loop() 
{
  servoLook.write(90);                            //Set the servo to look straight ahead
  delay(750);
  int distance = getDistance();                   //Check that there are no objects ahead
  if(distance >= stopDist)                        //If there are no objects within the stopping distance, move forward
  {
    moveForward();
  }
  while(distance >= stopDist)                     //Keep checking the object distance until it is within the minimum stopping distance
  {
    distance = getDistance();
    delay(250);
  }
  stopMove();                                     //Stop the motors
  int turnDir = checkDirection();                 //Check the left and right object distances and get the turning instruction
  Serial.print(turnDir);
  switch (turnDir)                                //Turn left, turn around or turn right depending on the instruction
  {
    case 0:                                       //Turn left
      turnLeft (400);
      break;
    case 1:                                       //Turn around
      turnLeft (700);
      break;
    case 2:                                       //Turn right
      turnRight (400);
      break;
  }
}

void accelerate()                                 //Function to accelerate the motors from 0 to full speed
{
  for (int i=0; i<motorSpeed; i++)                //Loop from 0 to full speed
  {
    rightBack.setSpeed(i);                        //Set the motors to the current loop speed
    rightFront.setSpeed(i);
    leftFront.setSpeed(i+motorOffset);
    leftBack.setSpeed(i+motorOffset);
    delay(10);
  }
}

void decelerate()                                 //Function to decelerate the motors from full speed to zero
{
  for (int i=motorSpeed; i!=0; i--)               //Loop from full speed to 0
  {
    rightBack.setSpeed(i);                        //Set the motors to the current loop speed
    rightFront.setSpeed(i);
    leftFront.setSpeed(i+motorOffset);
    leftBack.setSpeed(i+motorOffset); 
    delay(10);
  }
}

void moveForward()                                //Set all motors to run forward
{
  rightBack.run(FORWARD);
  rightFront.run(FORWARD);
  leftFront.run(FORWARD);
  leftBack.run(FORWARD);
}

void stopMove()                                   //Set all motors to stop
{
  rightBack.run(RELEASE);
  rightFront.run(RELEASE);
  leftFront.run(RELEASE);
  leftBack.run(RELEASE);
}

void turnLeft(int duration)                                 //Set motors to turn left for the specified duration then stop
{
  rightBack.setSpeed(motorSpeed+turnSpeed);                 //Set the motors to the motor speed
  rightFront.setSpeed(motorSpeed+turnSpeed);
  leftFront.setSpeed(motorSpeed+motorOffset+turnSpeed);
  leftBack.setSpeed(motorSpeed+motorOffset+turnSpeed);
  rightBack.run(FORWARD);
  rightFront.run(FORWARD);
  leftFront.run(BACKWARD);
  leftBack.run(BACKWARD);
  delay(duration);
  rightBack.setSpeed(motorSpeed);                           //Set the motors to the motor speed
  rightFront.setSpeed(motorSpeed);
  leftFront.setSpeed(motorSpeed+motorOffset);
  leftBack.setSpeed(motorSpeed+motorOffset);
  rightBack.run(RELEASE);
  rightFront.run(RELEASE);
  leftFront.run(RELEASE);
  leftBack.run(RELEASE);
  
}

void turnRight(int duration)                                //Set motors to turn right for the specified duration then stop
{
  rightBack.setSpeed(motorSpeed+turnSpeed);                 //Set the motors to the motor speed
  rightFront.setSpeed(motorSpeed+turnSpeed);
  leftFront.setSpeed(motorSpeed+motorOffset+turnSpeed);
  leftBack.setSpeed(motorSpeed+motorOffset+turnSpeed);
  rightBack.run(BACKWARD);
  rightFront.run(BACKWARD);
  leftFront.run(FORWARD);
  leftBack.run(FORWARD);
  delay(duration);
  rightBack.setSpeed(motorSpeed);                           //Set the motors to the motor speed
  rightFront.setSpeed(motorSpeed);
  leftFront.setSpeed(motorSpeed+motorOffset);
  leftBack.setSpeed(motorSpeed+motorOffset);
  rightBack.run(RELEASE);
  rightFront.run(RELEASE);
  leftFront.run(RELEASE);
  leftBack.run(RELEASE);
}

int getDistance()                                   //Measure the distance to an object
{
  unsigned long pulseTime;                          //Create a variable to store the pulse travel time
  int distance;                                     //Create a variable to store the calculated distance
  digitalWrite(trig, HIGH);                         //Generate a 10 microsecond pulse
  delayMicroseconds(10);
  digitalWrite(trig, LOW);
  pulseTime = pulseIn(echo, HIGH, timeOut);         //Measure the time for the pulse to return
  distance = (float)pulseTime * 340 / 2 / 10000;    //Calculate the object distance based on the pulse time
  return distance;
}

int checkDirection()                                            //Check the left and right directions and decide which way to turn
{
  int distances [2] = {0,0};                                    //Left and right distances
  int turnDir = 1;                                              //Direction to turn, 0 left, 1 reverse, 2 right
  servoLook.write(180);                                         //Turn servo to look left
  delay(500);
  distances [0] = getDistance();                                //Get the left object distance
  servoLook.write(0);                                           //Turn servo to look right
  delay(1000);
  distances [1] = getDistance();                                //Get the right object distance
  if (distances[0]>=200 && distances[1]>=200)                   //If both directions are clear, turn left
    turnDir = 0;
  else if (distances[0]<=stopDist && distances[1]<=stopDist)    //If both directions are blocked, turn around
    turnDir = 1;
  else if (distances[0]>=distances[1])                          //If left has more space, turn left
    turnDir = 0;
  else if (distances[0]<distances[1])                           //If right has more space, turn right
    turnDir = 2;
  return turnDir;
}

Download The Sketch – RobotCarSketch

We start by importing two libraries, one to control the motor shield and one to control the servo.

We then create an object for each motor and one for the servo.

We then define the ultrasonic sensor pins and create variables for the maximum sensing distance, the distance before an object to stop and calculate the timeout time to stop the sensor from waiting if an object is further than the maximum sensing distance. The timeout is automatically calculated to account for any adjustments which are made to the maximum sensing distance.

We then create variables for the motor speed as well as one to compensate for one sides motors being slightly more powerful causing the car to slowly turn while driving. If you find that your car pulls left or right while driving in a straight line, then make adjustments to this variable to correct it. Lastly, we have a variable for the turn speed, which is the amount of speed to add to each motor when turning to give the car more turning power as the motors are working against each other to rotate the car.

In the setup function we set the motor speed to the defined motor speed, then disable all of the motors to make sure that they’re off and then assign the servo and ultrasonic sensor pin numbers.

In the loop function, we turn the servo to look straight ahead, then wait for the servo to turn. We then call a function called getDistance to measure the distance of an object in front of the sensor. If no object is within the stopping distance we then start the motors to drive the car forward.

We then continually measure the distance to objects in front of the car every 250 milliseconds until an object is within the stopping distance.

We then stop the motors and call a function called checkDirection to decide whether to turn left or right or turn around.

A switch statement then calls the correct method to turn the car. Because we don’t have any movement sensors on the wheels, we have to turn the car for a certain amount of time before we know that it has turned 90 or 180 degrees. If you make adjustments to the motor speed or the turning speed then you might need to adjust these times up or down until you get a 90 degree turn again.

Now let’s have a look at the movement and sensing functions.

I’ve created an acceleration and deceleration function which ramp up and down the motor speeds. I haven’t used these in this version of the code, but they may be useful for future projects.

We then have two functions to set all of the motors to turn in the forward direction and another to stop all motors and then another two to turn left and right. The turn left and right functions turn the wheels on opposite sides of the car in opposite directions in order to turn the car around. So the car can turn around on the spot without needing any forward movement or a steering mechanism.

We then have two sensing functions.

The first is to measure the distance to an object. This function uses the ultrasonic sensor to send a 10 microsecond pulse out and time how long it takes to return. We can then use this time to calculate how far the object is away from the car.

The second function uses the first and turns the ultrasonic sensor to the left and then to the right, taking measurements in each direction. These measurements are then compared in order to decide whether to turn left or right. The car will always turn towards the direction with more space. If both sides have less space than the stopping distance, then the car will turn around and drive back the way it came. This decision is returned to the main loop as a 0, 1 or 2, which then uses the switch statement to execute the turning.

Let’s upload the code and see how the car works.

Setting Up The Obstacle Avoiding Robot Car

The first thing to do is to check your wheel rotation directions when you first run the code. All of the wheels should be turning in the forward direction when the car first starts moving. If any turn in the wrong direction, swap the motor leads around in the terminals to change the motor direction.

Next check that when an object is detected in front of the car, the servo moves left first and then right. On some servos, the signal direction is reversed which will cause the robot car to look right and then left and to turn towards the closer object rather than away from it.

Test The Obstacle Avoiding Robot Car

Next allow your car to drive in a straight line with no objects in front of it. If the car pulls left or right, make adjustments to the motorOffset variable to compensate by increasing or decreasing power to the motors on that side. The offset is added to the motors on the left, so if the car turns to the right, you’ll need to decrease the offset and if the car turns to the left then you’ll need to increase the offset.

Lastly, allow the car to detect and object and then try to turn left or right. The car should turn approximately 90 degrees. If it turns too little then you’ll need to increase the turning times in the switch statement. If the car turns too much then you’ll need to decrease the times.

If the car drives into a tight space, it will turn around and drive back out the way it came.

Obstacle Avoiding Robot Car Will Turn Around In Tight Spaces

The obstacle avoiding robot car runs well on both carpeted and tiled surfaces as all four wheels are driven. You might need to add a bit extra motor speed on carpeted areas if you find your car has difficultly.

Obstacle Avoiding Robot Running On Tiles

In future, I’ll be adding left and right movement to the ultrasonic sensor during forward movement to detect objects slightly off-center which may come into the robot’s path, and then gently turn the robot car away from them. At the moment if the robot gradually drives towards a slightly off parallel wall, it eventually drives into it and gets stuck because the wall hasn’t come into the sensor’s range. By looking slightly left and right while driving, we should be able to detect this wall slowly getting closer and add some speed to the motors on that side to drive the car away from the wall.

Have you built your own Arduino based obstacle avoiding robot car? Let me know what modifications and additions you made to yours in the comments section.

Share This Guide

Obstacle Avoiding Robot Car

How To Add A Radial Fan Air Assist System To A K40 Laser Cutter

I’ve seen quite a few people have added an air assist system to their K40 laser cutters using either an aquarium air pump or a radial fan. There are a couple of different reasons given, but most say that the fan blows the smoke away and improves engraving quality, that you get better cutting results and that you have less chance of your material catching fire. I’ve never had significant problems with any of these but I thought I’d try one of these solutions out and see what the results were. I chose to go with the radial fan air assist option as a fan is only a couple of dollars, which is much cheaper than an aquarium compressor.

Here’s a video of the modification, read on for the step by step instructions, and print files.

Make sure that you turn off and unplug your K40 laser cutter before working on it and allow the machine to stand for 10 minutes before working on it. While this addition is made to the low voltage DC side of the supply, there is always a risk in working in the open electrical compartment with the power still on.

What You Need For This Addition

How To Install The Radial Fan Air Assist On Your K40

Mount The Radial Fan And Duct

I started out by measuring the head of the laser cutter in order to design a 3D printed bracket to hold the fan and a duct to direct the flow towards the cutting area. I designed the duct away from the lens rather than around the lens as it didn’t seem like a good idea to direct dirty air from inside the cutting chamber towards the lens. On compressor systems where the clean air is being drawn in from outside the cutting chamber, it makes sense to direct the airflow past the lens to keep it clean.

Measuring The Laser Cutter Head

At the same time, I designed an arm to support a red dot laser pointer to make it easier to see exactly where the laser is going to be cutting and avoid wasting materials. I’ve included print files for the model with and without the pointer. Have a look at my other guide on adding a red dot laser pointer to your K40 laser cutter if you’re interested in that option as well.

K40 Laser Pointer 3D Model

Download 3D Print Files – Fan & Laser Pointer Files

I printed out the bracket using black PLA with a 50% infill.

3D Printed Radial Fan Air Assist Bracket & Duct

There are three included models in the download, one for the pointer only, one for the fan assist only and one for the pointer and fan assist.

3 Options For Printed Brackets

I ordered one of these 24V radial fans which are said to be designed as laptop cooling fans as this can be powered straight from the existing 24V supply and the fan outlet is perfect to attach to a duct to direct the airflow towards the cutting area.

24V Radial Fan

Push the fan into the top of the ducting. It should be a fairly snug fit and you can add a bead of hot glue around the edges to seal it up and hold the fan in place.

Assembled Radial Fan

An M3 x 15 hex head screw and nut is used to clamp the bracket around the head of the laser.

Adding M3 Screw To The Bracket

Slide the bracket onto the bottom of your head of your laser and then secure it by tightening the screw.

Tighten The Nut To Hold It In Place

Now that the fan is in place, we need to add the power connection and a pushbutton to turn it on. I’m going to be doing this next step in conjunction with the red dot pointer addition, but the method is exactly the same whether you’re doing one or both modifications.

Supply Power To The Radial Fan

You’ll need to add a drag chain to support the power cables to the head of the laser so that they don’t get caught up when the laser is moving. The one end of the drag chain gets connected to the head of the laser and the other onto the sidewall of the machine.

First, we’ll need to add an anchor screw onto the laser cutter head. I took the head off for this step as its easier to work with. I drilled a 4mm hole on one side of the head and add an M4 x 25mm screw which was long enough to fit through the drag chain and then replaced the head.

Adding Screw For Drag Chain Support

Place the end of the drag chain onto the laser cutter head and then measure out the length that you need. You want it to be long enough to reach all four corners of your bed but not too long that it gets in the way.

Measure The Drag Chain Length

Remove the spare links so that it’s the correct length and then add the end support.

Mark off the two holes for the end supports so that you can drill the required holes.

Drill Holes To Support Drag Chain

I used a 4mm drill bit to drill two holes for some M4 x 15mm screws which I then secured through the sidewall.

You might also want to add a thin screw or rod onto the head to stop the drag chain from being able to move into the path of the laser. This will interrupt the laser’s path, causing your cut to fail and potentially damage the drag chain or cause it to catch on fire.

Drag Chain End Stop

Next, I added some pushbutton to the control panel. I added four buttons, one for the pointer and one for the fan assist and then another two which I plan on using for a height-adjustable print bed in the future. I wasn’t too worried about keeping them neat as I’m planning on replacing the front panel in the near future as the LCD display is not very useful and the more basic ammeter panel is actually a better and more accurate option.

Add Pushbuttons To The Laser

I removed the control panel to drill the holes and install the pushbuttons.

I then got to work on the wiring. I needed three wires to the head, one for 24V for the fan, one for 5V for the pointer, and one common/ground. If you’re not using the fan or not using then pointer then you’ll only need two.

Add The Wiring

Feed then wires through the side of your machine and into the electronics compartment. I ran them in the existing cable bundles so that the wiring is kept neat. I ran the wires up to the pushbuttons and then down to the power supply for power.

Add The Pushbuttons

You’ll need to hook your wires up to these three terminals on the power supply, depending on what you’re supplying. Keep in mind that this power supply is not really designed with much extra capacity, so don’t add anything which will draw a lot of power or you may burn it out.

K40 Power Supply 24V and 5V Connections

Once all of the wiring is done, check the connections and then turn it on to try it out.

Test The Radial Fan Air Assist On Your K40 Laser Cutter

Now that all the wiring is done, let’s turn on the fan and test it by doing an engraving and a cut.

There’s actually an impressive amount of airflow from such a small fan.

Testing The Airflow

I designed a small logo engraving and a rectangular cutout around it to test on a piece of 3mm MDF. I engraved and cut the two side by side so that you can see the difference.

Tests With And Without Air Assist

I did the engraving on 15% power and 100mm/s and the cutting at 35% power at 20mm/s. I didn’t want it to cut all the way through the MDF as I wanted to see how deep the cut was with each test.

This is the result, which wasn’t what I was expecting.

With And Without Air Assist

The engraving is actually more dirty with the fan assist on. It seems like instead of allowing the smoke to rise up and away from the wood, it was being blown back down onto the wood, causing more significant marking. The cutting performance was improved with the fan assist on. The cut was just under halfway through the MDF without the air assist and was a little more than 2/3 of the way through with the air assist on.

I’ll probably land up removing the fan air assist as I tend to engrave with masking tape in any case as it produces much cleaner results and since I still need to do 2 passes to cut through the MDF with or without the air assist, there isn’t much benefit to it. I might look at trying out an air assist solution using a workshop compressor in the future and see if more airflow leads to a better quality engraving or even more improved cutting performance.

Have you tried doing any modifications to your K40 laser cutter? Let me know in the comments section below.

How To Add A Red Dot Pointer To A K40 Laser Cutter

If you’ve used a stock k40 laser cutter, then you’ll know that positioning the laser for a cut is a bit of a guessing game. So in this guide, I’ll show you how to add a small red dot laser pointer to the laser cutter head to indicate exactly where the laser is aiming. This way you can accurately position your cuts along the edges of your material without wasting material or starting a cut off the edge.

Here’s a video of the modification, read on for the step by step instructions, and print files.

Make sure that you turn off and unplug your K40 laser cutter before working on it and allow the machine to stand for 10 minutes before working on it. While this addition is made to the low voltage DC side of the supply, there is always a risk in working in the open electrical compartment with the power still on.

What You Need For This Addition

How To Install The Red Dot Laser Pointer On Your K40

Mount The Red Dot Laser Pointer

I started out by measuring the head of the laser cutter in order to design a 3D printed bracket to hold the pointer.

Measuring The Laser Cutter Head

I wanted the red dot laser pointer to be adjustable so that you can make changes to the dot position for different thickness materials and different focal points on a range of lenses.

This is the design that I came up with. I designed a bracket and duct to support a small radial fan at the same time to try out a fan air-assist modification and see how well it works. I’ve included print files for the model with and without the fan bracket, so you can decide which works best for you. Here is the other guide if you’re interested in adding a radial fan air assist system to your K40 as well.

K40 Laser Pointer 3D Model

Download 3D Print Files – Fan & Laser Pointer Files

I printed out the bracket using black PLA with a 50% infill.

There are three included models in the download, one for the pointer only, one for the fan assist only and one for the pointer and fan assist.

3 Options For Printed Brackets

For the red dot pointer, I chose to use one of these focusable 5mW 5V laser pointers which are available from a range of online stores. They’re low power and have an adjustable focus ring on the end to accurately focus the pointer.

5mW Laser Pointer

Push the laser pointer into the laser holder, it should be a snug fit.

Push The Laser Pointer Into The Part

Now screw the laser holder onto the main bracket using an M3 x 15 hex head screw.

This screw allows you to adjust the angle of the pointer in order to line it up with the laser at different heights and focal points.

Laser Head Is Able To tilt

Slide the bracket onto the bottom of your head of your laser and then secure it with another M3 x 15 hex head screw.

Laser Pointer Mounted Onto Cutting Head

Now that the pointer is in place, we need to add the power supply and a pushbutton to turn it on. I’m going to be doing this next step in conjunction with the fan assist addition, but the method is exactly the same for either or both done together.

Supply Power To The Pointer

You’ll need to add a drag chain to support the power cables to the head of the laser so that they don’t get caught up when the laser is moving. The one end of the drag chain gets connected to the head of the laser and the other onto the sidewall of the machine.

First, we’ll need to add an anchor screw onto the laser cutter head. I took the head off for this step as its easier to work with. I drilled a 4mm hole on one side of the head and add an M4 x 25mm screw which was long enough to fit through the drag chain and then replaced the head.

Adding Screw For Drag Chain Support

Place the end of the drag chain onto the laser cutter head and then measure out the length that you need. You want it to be long enough to reach all four corners of your bed but not too long that it gets in the way.

Measure The Drag Chain Length

Remove the spare links so that it’s the correct length and then add the end support.

Mark off the two holes for the end supports so that you can drill the required holes.

Drill Holes To Support Drag Chain

I used a 4mm drill bit to drill two holes for some M4 x 15mm screws which I then secured through the sidewall.

You might also want to add a thin screw or rod onto the head to stop the drag chain from being able to move into the path of the laser. This will interrupt the laser’s path, causing your cut to fail and potentially damage the drag chain or cause it to catch on fire.

Drag Chain End Stop

Next, I added some pushbutton to the control panel. I added four buttons, one for the pointer and one for the fan assist and then another two which I plan on using for a height-adjustable print bed in the future. I wasn’t too worried about keeping them neat as I’m planning on replacing the front panel in the near future as the LCD display is not very useful and the more basic ammeter panel is actually a better and more accurate option.

Add Pushbuttons To The Laser

I removed the control panel to drill the holes and install the pushbuttons.

I then got to work on the wiring. I needed three wires to the head, one for 24V for the fan, one for 5V for the pointer, and one common/ground. If you’re not using the fan or not using then pointer then you’ll only need two.

Add The Wiring

Feed then wires through the side of your machine and into the electronics compartment. I ran them in the existing cable bundles so that the wiring is kept neat. I ran the wires up to the pushbuttons and then down to the power supply for power.

Add The Pushbuttons

You’ll need to hook your wires up to these three terminals on the power supply, depending on what you’re supplying. Keep in mind that this power supply is not really designed with much extra capacity, so don’t add anything which will draw a lot of power or you may burn it out.

K40 Power Supply 24V and 5V Connections

Once all of the wiring is done, check the connections and then turn it on to try it out.

Align The Pointer With Your Laser

Put a piece of wood, cardboard or acrylic into the cutting area.

Make sure that the piece is at the correct focal point for your lens. Most stock k40s come with a 50.8mm focal point lens. This means that your workpiece should be 50.8mm from the bottom side of the lens for best engraving results.

Add Material & Check The Focal Point

Now turn the pointer on using your pushbutton and adjust the focus ring until a small focused dot is made.

Briefly turn your laser on using a low power setting (15% / 5mA)  in order to make a mark to adjust the pointer onto.

Adjust The Pointer Onto The Laser Mark

Now tilt the pointer so that it is pointing at the mark and then tighten the screw to lock it into position

Check the laser again, the pointer and the laser should be in exactly the same spot on your material. Remember that this is now set up at this specific distance from the lens. If you use a different thickness material or work at a different bed height then you’ll need to adjust the pointer again, which is quite quick and easy to do.

Pointer & Laser Once Aligned

You now have an easy way to see exactly where your laser is going to cut, allowing you to position it accurately and avoid wasting material or overrunning the edges of your material.

Let me know if you’ve built a laser pointer onto your laser cutter in the comments section below. What other additions have you made to your k40?

Easy Hot Glue Tree Canvas

In this project, we’re going to be making a really easy tree canvas using hot glue and some basic craft supplies. They’re really cheap and easy to make and they look great. Each one costs around $2 to $6 depending on the size of the canvas and where you get the supplies from and it takes about an hour to make. You can pick up most of the supplies from your local dollar store, packs of two or three canvases are usually cheaper.

It’s worth making a couple at a time, they’re quite effective as an arrangement of four together or as three or four in a line down a passage or hallway.

What You Need To Make Them

To make one canvas you’ll need:

  • A blank craft canvas, 40cm x 40cm (16″ x 16″) or larger – Buy Here
  • A glue gun and glue sticks – Buy Here
  • A flat paintbrush – Buy Here
  • A metallic ink stamp pad, silver, gold or copper works well – Buy Here
  • Black spray paint (you can use craft paint too, it just takes longer to apply) – Buy Here

Note: The purchase links above are affiliate links, provided as a guide to the type of product to buy. The products are suitable for the project, but you’re likely to be able to get the products at much better prices from a local craft or dollar store.

Supplies Needed

How To Make The Hot Glue Tree Canvas

To start with, we’re going to make a rough sketch of the tree.

You don’t have to be an artist for this step and you can make as many mistakes as you need, you’re going to cover it up with paint anyway.

Mark Out The Positions

I started by dividing the canvas up with some basic marks for the roots, trunk, and branches in order to get the proportions correct. Mostly because I’m pretty bad at drawing.

Sketch The Rough Trunk And Branches

Use your marks as a guide to sketch your trunk, then add the roots and then the branches.

Sketch The Rough Trunk And Bracnhes 2

You can sketch over areas that don’t come out well and add branches as you need. Try not to make the branches too thin and get them relatively evenly spaced out so that they fill most of the upper half of the canvas.

Once you’re happy with your tree sketch, its time to add the glue.

Add Glue Over The Sketch

Add stripes of glue along your trunk, root, and branch lines. You want them to be thick and rounded. It’s ok if there are gaps between the stripes of glue, you don’t want to put them too close together and have them join up.

Glue Texture

Fill in all of the lines you’ve drawn until you’ve completed the tree.

Complete The Glue Tree

Once the glue has hardened, pull off any stringy ends and make sure that there aren’t any drops or sharp ends.

Now you’re going to cover up your canvas and glue with the spray paint.

You don’t have to use black paint, you can use any paint that’ll match your theme, just try to use a colour which contrasts well with your stamp colour. So use a light paint with a dark stamp or a dark paint with a light stamp.

Spray The Tree Black

I used spray paint because it’s quick and easy to apply and it dries quickly too.

Spray The Tree

Spray the whole canvas and the edges. Make sure that you get in between the glue stripes as well, there shouldn’t be any white showing when you’re done.

Spray Painting The Tree

Allow the canvas to dry properly before moving on to the next step. This usually takes half an hour to an hour, depending on how thick your paint layer is.

Once it is dry, use your paintbrush to highlight the glue.

Highlighting With Stamp Pad

Brush your paintbrush on the stamp pad so that the tip of the paintbrush has some metallic ink on it.

Get Silver Ink On The Brush

Don’t put a lot of ink onto it, you want the brush to still be relatively dry. Next, brush the ink across the glue stripes to highlight them, use quick and light brush strokes perpendicular to the length of the stripes (90 degrees to the direction of the glue).

Highlight The Roots & Trunk

Don’t press down too much and try not to get the ink onto the canvas, you just want to highlight the glue.

Highlight The Branches

Highlight the trunk, roots, and branches.

Highlighting The Tree

Once the ink is dry, your tree canvas is ready to hang. Your canvas should come with a picture hook on the back or the sides.

Branches On Completed Tree

Enjoy making your own hot glue tree canvas.

Share This Guide

Hot Glue Tree Canvas Social

10 Creative Uses For Your Old iPhone

While you can often sell your old iPhone to help pay for your next one, sometimes you’re left with one which is a bit too old or damaged to be worth trying to sell. Or you may want to keep it as a backup phone just in case. Either way, instead of letting your old iPhone waste away in a drawer, here are some creative ideas to put it to use again.

Combined Dash Navigation & Camera

While built-in GPS navigation and Apple Carplay has become quite common in modern vehicles these days, there are plenty of older cars that don’t have a GPS. Purpose-built dash-mounted GPS systems typically don’t have any internet connectivity and as a result, their maps quickly become outdated and they don’t display traffic information, but your old iPhone does.

Grab a dash phone mount and you can take advantage of your old iPhone’s up to date maps and traffic information as well as use the built-in camera as a dashcam. There are also options to mount your iPhone to your windscreen, from your review mirror, air vents, and even your old CD slot.

Home Automation Controller

Home Automation

Old tablets and mobile phones make excellent home automation controllers. Pair them with your smart home hub, like the Samsung SmartThing Hub, and then mount them onto the wall or even leave them on your coffee table. They’re perfect for parties and guests, allowing people to control your smart home functions without having to hand your phone over to them.

Baby or Security Monitor

There are a number of baby monitor and home surveillance apps that are perfect for turning your old iPhone into a remotely accessible video camera, some with two way audio communication as well. Dedicated WiFi-enabled cameras can be expensive, especially if you consider that you may have a free one just lying around. All you need is a phone mount and a dedicated charger cable and you’re good to go.

Weather Station Dashboard

How To Turn An Old Smartphone Into A Smart Mirror
https://www.popsci.com/how-to-turn-your-smartphone-into-smart-mirror

Download a barometer or weather app and you’ve got yourself an interactive weather station dashboard. You can even mount your old iPhone behind some two-way glass and make your own mobile phone smart mirror, you can then display notifications and reminders as well.

Wireless Music Hub

If you’ve got Apply TV or an Apple Device playing music through your home entertainment system, you can use another iPhone and the iTunes remote app to control the music, playlists, and even access your library and add and remove songs to the current playlists. Pair this with a home automation app as mentioned earlier and you’ve got a really powerful smart universal remote.

Turn It Into A Handheld Gaming Console

iPhone Game Control Adaptor

You can buy a few different gaming grips and control adaptors for iPhones which turn them into functional handheld gaming consoles. Rather than using your new iPhone, which would require you to add and remove the grips all the time and rapidly degrades your battery life, use your old iPhone as a permanent handheld gaming console.

What have you used your old iPhone or mobile phone for? Let us know in the comments section below.