Project showcase

ClearWalker Bluetooth Control

In this project, I'll be outlining how I am able to control my ClearWalker strandbeest-style contraption via Bluetooth.

  • 676 views
  • 0 comments
  • 2 respects

Components and supplies

Apps and online services

About this project

Project

In this project, I'll be outlining how I am able to control my ClearWalker strandbeest-style contraption via Bluetooth. The device uses two motors to control 8 legs, and is steered in a similar manner as a tank, or a robot that steers with two wheels that goes different speeds. These basic instructions should work for many types of vehicles.

This article won't go over how to actually build one of these 'beests, as that would be more of a book. Check out the original Strandbeest here, or my ClearWalker YouTube playlist for more general build info.

Step 1: Get Your Materials

To drive this vehicle, you'll need the following:

  • Buck Voltage Converter: Amazon
  • HC-06 Bluetooth Module: eBay
  • Various Wires
  • Smartphone

Step 2: Wire Your Components

The basic idea is to wire the HC-06 module into your Arduino board as a wireless serial port. From here, the Arduino will output PWM signals, making the H-Bridge relay circuit switch motors to go forward, stop, or backward. Switched power is provided by the battery packs, through a PWM controller to vary the leg speed, then via the relays to directly control the motors. This battery pack is also wired into a buck converter, which converts the voltage powering the motors into usable 5V power for the Arduino.

Step 3: Arduino Program

The Arduino will need to be set up to receive Bluetooth Commands, and in the included program the TX and RX are wired into pins 10 and 11. Motors are controlled as PWM "servo" devices, attached to pins 2 and 3.

Step 4: Smartphone Setup

Bluetooth control is surprisingly simple. To send characters, I first used a Bluetooth terminal program, then moved on to this Arduino Bluetooth Controller. With the second program, you can assign characters for buttons on a gaming-style controller, which your Arduino then translates into the appropriate outputs.

If you need more flexibility, something like the MIT App Inventor system should allow you to create an entirely custom controller, though I have yet to try it.

Step 5: Finish and Expand

Once you've wired everything up and programmed it, you should be able to log onto the Bluetooth module via your smartphone and control your Clearwalker/tank/robot by varying the direction of the motors. Though this could be accomplished via a "traditional" R/C transmitter/receiver, having the Arduino allows for lots of flexibility, perhaps adding a head, tail, or lights, as I did to my robotic device. You can see the whole story of this build via its YouTube series, or check out the video here for the electrical build/walking around at the beach.

Schematics

cci05262017-crop1_NSPLpsWOjU.jpg
Cci05262017 crop1 nsplpswoju

Code

Beest-control.inoArduino
Motor controls via a PWM H-bridge switch. Some LED matrix commands in this version, but most lighting is not yet added.
#include <Servo.h>
#include <SoftwareSerial.h>
#include <LedControl.h>
#include <binary.h>

SoftwareSerial BT(10, 11); //serial on pins 10/11
                           // connect BT module TX to D10
                           // connect BT module RX to D11

Servo rtmotor; //controls RT H-bridge as servo
Servo ltmotor; //controls LT H-bridge as servo

int rtpos = 90; //stores right servo position (init 90 for off)
int ltpos = 90; //stores left servo position (init 90 for off)

void setup() {
  //"servo" motor setup
  rtmotor.attach(2);
  ltmotor.attach(3);
  //Bluetooth setup
  BT.begin(9600); //sets data rate for SoftwareSerial port
  //eye matrix setup
  lc.shutdown(0,false);
  lc.setIntensity(0,8);
  lc.clearDisplay(0);  
  pinMode(13, OUTPUT); //light as needed
}


char a;
void loop() {
  //initial eye setup (eyes small)
  lc.clearDisplay(0);
  lc.setColumn(0,3,B001100);
  lc.setColumn(0,4,B001100);

  //if BT available go into main control loop
  if (BT.available())
  {
    a=(BT.read());
    if (a=='0') //start command to stop motors
    {
      rtmotor.write(90);
      ltmotor.write(90);
      digitalWrite(13, LOW);
    }
    if (a=='1') //forward command
    {
      rtmotor.write(180);
      ltmotor.write(180);
      digitalWrite(13, HIGH);
    }
    if (a=='2') //backward command
    {
      rtmotor.write(0);
      ltmotor.write(0);
    }
    if (a=='3') //right turn command
    {
      rtmotor.write(0); //rt motor goes backward
      ltmotor.write(180); //lt motor goes forward
    }
    if (a=='4') //left turn command
    {
      rtmotor.write(180); //rt motor forward
      ltmotor.write(0); //lt motor goes backward
    }
  }

}

Comments

Similar projects you might like

Direction Indicators for Bikes

Project tutorial by Rosaliew

  • 103 views
  • 0 comments
  • 4 respects

Starry Night Prom

Project showcase by user584870303

  • 643 views
  • 8 comments
  • 6 respects

The Trump Button

Project tutorial by Louis Moreau and Aurelien Lequertier

  • 689 views
  • 1 comment
  • 6 respects

Third Eye for The Blind

Project tutorial by Muhammed Azhar

  • 605 views
  • 0 comments
  • 8 respects

ArduRadio AlarmClock

Project tutorial by Tittiamo

  • 1,312 views
  • 3 comments
  • 1 respect

Protected Switching Power Supply for Development Boards

Project showcase by Akash Kollipara

  • 43 views
  • 0 comments
  • 1 respect
Add projectSign up / Login