GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsRun a DC motor fan from your phone with four speed settings, driven through the motor driver. A DC motor will not start reliably at very low PWM values, there is not enough torque to overcome friction. That is why the speed levels here start at 120 rather than at 1, and why level 0 means fully off rather than very slow. The levels live in an array, so the command character is converted to a number and used directly as the index: '2' becomes 2, and speeds[2] is the value written to ENA.
Switch the battery holder off before you change any wiring, and lift the wheels off the table for the first test.
Charge 18650 cells only in a proper Li-ion charger and never short the holder's wires.
Every part for this build comes in the Geekobot Explorer Kit box, a Geekobot exclusive, together with the parts for all 61 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
The brain of every Explorer Kit project
Male-to-female and female-to-female leads for the modules
16x2 LCD with I2C backpack: four wires, two lines of text
HC-05 Bluetooth module: a serial link to your phone
1k and 2.2k resistors: drop the Nano's 5V TX signal to the 3.3V the HC-05 RXD pin expects
Nano I/O shield from the kit: every pin has its own S, V, G header, so modules plug in with jumpers
Follow the colours: red is power, dark grey is ground, blue is a signal.
Motors run from the 2 x 18650 pack (7.4V) through the L298N. The USB cable powers the Nano while you test; unplugged, the L298N's 5V output powers it.
explorer_kit_45_bluetooth_fan.inoVerify & upload in Electrolark#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
SoftwareSerial bt(2, 3);
LiquidCrystal_I2C lcd(0x27, 16, 2);
int ENA = 9;
int IN1 = 4;
int IN2 = 5;
int speeds[4] = {0, 120, 190, 255};
String labels[4] = {"OFF ", "LOW ", "MED ", "HIGH"};
int level = 0;
void applyLevel()
{
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
analogWrite(ENA, speeds[level]);
lcd.setCursor(0, 0);
lcd.print("Fan: ");
lcd.print(labels[level]);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print("PWM: ");
lcd.print(speeds[level]);
lcd.print(" ");
bt.print("Fan set to ");
bt.println(labels[level]);
}
void setup()
{
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
bt.begin(9600);
Serial.begin(9600);
lcd.init();
lcd.backlight();
applyLevel();
bt.println("Send 0 1 2 3 to set fan speed");
}
void loop()
{
if (!bt.available())
{
return;
}
char command = bt.read();
Serial.println(command);
if (command >= '0' && command <= '3')
{
level = command - '0';
applyLevel();
}
}
Use the kit's mini-USB cable, install the CH340 driver on Windows if no port appears, pick Tools > Board > Arduino Nano and try Tools > Processor > ATmega328P (Old Bootloader) if the upload times out.
Turn the small contrast pot on the back of the I2C board. If still blank, change 0x27 in the sketch to 0x3F.
Pair with the HC-05 using PIN 1234 (or 0000), then connect in a Bluetooth serial terminal app. Unplug TXD and RXD while uploading.
Switch the battery holder on, check +12V and GND on the L298N, take the ENA and ENB jumper caps off, and make sure battery GND joins Nano GND.
A DC motor will not start reliably at very low PWM values, there is not enough torque to overcome friction. That is why the speed levels here start at 120 rather than at 1, and why level 0 means fully off rather than very slow. The levels live in an array, so the command character is converted to a number and used directly as the index: '2' becomes 2, and speeds[2] is the value written to ENA.
LCD shows Fan: OFF / PWM: 0 at startup. Send 1 and the fan starts slowly: Fan: LOW / PWM: 120. Send 3 for full speed, 0 to stop.
Yes. It is project 45 of 61 in the Geekobot Explorer Kit, in level 8 (Wireless control). Every part on the list comes in the kit box, and you can also buy the parts one by one from the list above.
No. Every Explorer Kit project is wired on the Nano I/O shield and the breadboard with jumper wires.
13 parts: Generic Nano CH340 Development Board (Soldered), USB Cable, Solderless Breadboard, Dupont Jumper Wires (40 pcs), LCD1602 16x2 Character LCD Display, HC-05 6-Pin Bluetooth Serial Module with Button, Carbon Film Resistor 1/4W 5% (Pack of 10), L298N Dual H-Bridge Motor Driver Module, Hobby DC Motor (130 / 180 Size), DC Motor Fan Blade (Toy Propeller), plus 3 more. On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 1 hour. The build on this page has 7 steps.
No. This page has the complete, tested code (explorer_kit_45_bluetooth_fan.ino).
About ₹1,268 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Remote device switching; Why low PWM values will not start a motor; Converting a character digit to a number with − '0'; Using a command as an array index.
Switch the battery holder off before you change any wiring, and lift the wheels off the table for the first test. Charge 18650 cells only in a proper Li-ion charger and never short the holder's wires.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Learning project. Check every circuit and the datasheet of each part before you power it up.