You are viewing an older revision! See the latest version

Variable Motor Speed with Force Sensor

Table of Contents

  1. Overview
  2. Code
  3. Wiring

Overview

This project demonstrates the use of Flexible Force Sensor to control speed of a motor linearly with force applied. As force applied increases, the speed of motor increases. In addition to this, an RGB LED is used to depict the speed range of motor. Also, the speed scaled to 0.0-1.0 is displayed on LCD.

Code

include the mbed library with this snippet

#include "mbed.h"

Wiring

MbedFlexiForce SensorRGB LEDMotor SwitchuLCD
VOUT (3.3V)Terminal 1
VU (5V)5V
GNDGNDGND
p20 (Analog In)Terminal 3
p24 (PWM Out)Red
p23 (PWM Out)Green
p22 (PWM Out)Blue
p21 (PWM Out)Base of 2N3904
TX (p28)RX
RX (p27)TX
RX (p30)Reset


All wikipages