Welcome to the DIY Pedometer.

Please, first check that you have in your box all the elements shown below.

Each DIY Pedometer will be different. A Polymorph Plastic will be used to shape just by using the hands. Thus, you can be driven by your limitless imagination.

The Arduino Board is pre programmed by Toky Labs, but I am giving you all the required info here so you can edit the code and make it yours! If so, please leave us a comment on how did you do it. 🙂

  • Difficulty 30%
  • Science 30%
  • Technology 50%
  • Engineery 70%
  • Art 60%
  • Mechanics 10%

Introduction to Pedometer

Hey, just some lines about what we are building, right?

Pedometers can be a motivation tool for people wanting to increase their physical activity. Various websites exist to allow people to track their progress; however, many will also find entering their daily step count and a heart-beat count onto a calendar to be motivational as well. Pedometers have been shown in clinical studies to increase physical activity, and reduce blood pressure levels and Body Mass Index

Invention

Leonardo da Vinci envisioned a mechanical pedometer as a device with military applications.[7][8] In 1780 Abraham-Louis Perrelet of Switzerland created the first pedometer, measuring the steps and distance while walking; it was based on a 1770 mechanism of his to power a self-winding watch.[

Technology

Pedometers can be a motivation tool for people wanting to increase their physical activity. Various websites exist to allow people to track their progress; however, many will also find entering their daily step count and a heart-beat count onto a calendar to be motivational as well. Pedometers have been shown in clinical studies to increase physical activity, and reduce blood pressure levels and Body Mass Index

Accuracy

The accuracy of step counters varies widely between devices. Typically, step counters are reasonably accurate at a walking pace on a flat surface if the device is placed in its optimal position (usually vertically on the belt clip). Although traditional step counters get affected dramatically when placed at different angles and locations, recent advances have made them more robust to those non-ideal placements.

Introduction to Breadboards

Just as a flash lesson, remember by checking these images how the connections of a breadboard works.

This is a Red LED and a Breadboard. You can create multiple combinations by inserting the components in the holes of the breadboard. The bigger the breadboard is, the more complex connections you can make.

As you can see, the rows are interconnected (here is positioned in sideways) and the collumns are not. Check out the geen dots that indicates which holes are connected. Once your project is tested, you can take the components out  and start a new project again on it. Neat!

This is the simplest circuit you can do. Please spend a minute deeply understanding how to make it. If you master it you will save yourself from a lot of wrong connections and future problems.

Let’s have some fun.

A Pedometer is a portable device that counts your steps and shows you how far you have walked based on an estimation of your heigh and some calculations. This simple pedometer has three lights that tells at a glance how are you doing with your daily objective. To make it cooler, we have added an super crispy OLED SPI Screen to show constantly your progression.

First, assemble the pedometer following this image.

Now include the Screen and the battery.

Alright! The Electronics are done!

Now let’s move to the programing. Please open up your laptop and copy-paste this C code in a new arduino file.

Oh! you will need an Adafruit library to run the Screen. Please refer to this link and download it.

https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino/archive/master.zip

This is the equivalent schematics of the circuit.

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// If using software SPI (the default case):
#define OLED_MOSI 6
#define OLED_CLK 7
#define OLED_DC 5
#define OLED_CS 16
#define OLED_RESET 14
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
//male 0.79m
//female 0.66m
float distance = 0;

int total = 0;
int Rsteps = 5;
int Gsteps = 10;
int Bsteps = 15;
bool stepped = false;

int Rpin = 4;
int Gpin = 3;
int Bpin = 2;
int sensePin = 10;

void setup() {
pinMode(9,OUTPUT);
digitalWrite(9, LOW);
pinMode(8,OUTPUT);
digitalWrite(8, LOW);
//digitalWrite(7, LOW);

// put your setup code here, to run once:
Serial.begin(9600);
pinMode(Rpin,OUTPUT);
pinMode(Gpin,OUTPUT);
pinMode(Bpin, OUTPUT);
pinMode(sensePin, INPUT);
// by default, we’ll generate the high voltage from the 3.3v line internally! (neat!)
display.begin(SSD1306_SWITCHCAPVCC);
// init done
// display.clearDisplay();
// display.setTextColor(WHITE);
// display.setTextSize(2);
// display.setCursor(30,0);
// display.print(“Come on!”);
//display.display();

}

void loop() {

display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(30,0);
display.print(“Come on!”);
//display.display();
//display.clearDisplay();
display.setTextSize(2);
display.setCursor(30,30);
display.print(distance);
display.display();

if (digitalRead(sensePin) == HIGH && stepped == false) {
total++;
distance= total*0.79;
stepped = true;
delay(1500);
}
else if (digitalRead(sensePin) == LOW) {
stepped = false;
}

if (total > Rsteps) {
digitalWrite(Rpin, HIGH);
}
if (total > Gsteps) {
digitalWrite(Gpin, HIGH);
}
if (total > Bsteps) {
digitalWrite(Bpin, HIGH);
}
}

And this is the code! All for you.

If you like the project but you don’t have our box yet, go ahead and check our shop. You may find your wonder gadget there!