Mini Braille Telegraph

Team

  • Aneri Muni
  • Rachel Clark
  • Harley Deka
  • Kevin Mairena

Project Summary

The goal of the project is to create a device that will be able to receive a string and write the letters in Braille. The string is received via a UART breakout board from an app and sent to the mbed. An arm composed of a Stylus with a ball point attached to a linear actuator. The arm moves back and forth and is able to indent the paper with the help of a solenoid that pushes the paper up to the stylus so that the indent can be punctured. A stepper motor is used to scroll. more paper through the braille slate. Every time a new letter is printed, the letter is displayed on an LCD attached to the device to demonstrate that the correct letter is being printed in Braille.

Components & Materials

Wiring Tables & Diagrams

Linear Actuator

Linear ActuatorMbed
+p19
-p20
PWMp25

Steppenwolf

Stepper MotorMbed
Forward Ap5
Reverse Ap6
Forward Bp7
Reverse Bp12

Soley-boy

SolenoidMbed
DOT_PINp8

Bluetooth

BluetoothMbed
Serial Txp28
Serial Rxp27
VinVU
gndgnd

Least Common Denominator

LCD HeaderLCD CableMbed
5 V5 VVin
Serial RxSerial Txp9
Serial TxSerial Rxp10
ResetResetp11
gndgndgnd

EMIC Girth

MbedEMICSpeaker
VU5 V
gndgnd
p13SIN
p14SOUT
SP++
SP--

Code

main.cpp

#include "mbed.h"
#include "new_chars.h"
#include "uLCD_4DGL.h"
#include "motordriver.h"
#include "StepperMotor_X27168.h"
#include "emic2.h"

// stepper motor
StepperMotor_X27168 smotor(p5, p6, p7, p12);

// linear actuator
Motor lin_act(p25, p19, p20, true);

// pc serial
Serial pc(USBTX,USBRX);

// solenoid
DigitalOut dot_pin(p8); //DOT_PIN, connected to solenoid

// Bluetooth
Serial blue(p28, p27);

// LCD
uLCD_4DGL uLCD(p9, p10, p11); // serial tx, serial rx, reset pin;

// EMIC text-to-speech
emic2 emic(p13, p14); // tx, rx

// constants for movement
const float sol_wait = 0.5;

// Prints out a braille character
void printChar(int c) {
  lin_act.speed(1);
  wait(0.1);
  lin_act.speed(0);
  wait(1);
  if (c >= 97) { c -= (97-65); }
  for (int i = 0; i < 3; i++) {
    if (chars[c-65][i]) {
      dot_pin = 1;
      wait(sol_wait);
      dot_pin = 0;
    }
    if (i == 2) continue;
    wait(0.5);
    lin_act.speed(1);
    wait(0.1);
    lin_act.speed(0);
    wait(1);
  }
  // stepper motor moves paper
  for (int i = 0; i < 10; i++) { smotor.step(0); }
  // move lin act back to start
  lin_act.speed(-1);
  wait(1);
  lin_act.speed(0);
  wait(0.5);
  lin_act.speed(1);
  wait(0.1);
  lin_act.speed(0);
  wait(1);
  for (int i = 3; i < 6; i++) {
    if (chars[c-65][i]) {
      dot_pin = 1;
      wait(sol_wait);
      dot_pin = 0;
    }
    if (i == 2) continue;
    wait(0.5);
    lin_act.speed(1);
    wait(0.1);
    lin_act.speed(0);
    wait(1);
  }
  // stepper
  for (int i = 0; i < 20; i++) { smotor.step(0); }
  lin_act.speed(-1);
  wait(1);
  lin_act.speed(0);
}

int main() {
    lin_act.speed(-0.9f);
    wait(2);
    lin_act.speed(0);
    emic.volume(18);
    uLCD.printf("Welcome to the Mini Braille Telegraph! Waiting for message...");
    emic.speakf("SWelcome to the Mini Braille Telegraph! Waiting for message.\r");
    pc.printf("Starting...\n\r");
    while (true) {
        char c = blue.getc();
        if (c == ' ' || c == '\n') {
            for (int i = 0; i < 40; i++) { smotor.step(0); }
            continue;
        }
        pc.printf("Message: %c\n\r", c); 
        uLCD.cls();
        uLCD.text_width(4); //4X size text
        uLCD.text_height(4);
        uLCD.printf("%c", c);        
        emic.speakf("S%c\r", c);
        printChar(c);
        wait(1500/1000.0);
    }
}

Libraries

Braille Character File

chars.h

const int chars[][8] =
{
{1, 0, 0, 0, 0, 0}, // A - 65
{1, 1, 0, 0, 0, 0},  // B - 66
{1, 0, 0, 1, 0, 0}, 
{1, 0, 0, 1, 1, 0}, 
{1, 0, 0, 0, 1, 0}, 
{1, 1, 0, 1, 0, 0}, 
{1, 1, 0, 1, 1, 0}, 
{1, 1, 0, 0, 1, 0}, 
{0, 1, 0, 1, 0, 0}, 
{0, 1, 0, 1, 1, 0}, 
{1, 0, 1, 0, 0, 0}, 
{1, 1, 1, 0, 0, 0}, 
{1, 0, 1, 1, 0, 0}, 
{1, 0, 1, 1, 1, 0}, 
{1, 0, 1, 0, 1, 0}, 
{1, 1, 1, 1, 0, 0}, 
{1, 1, 1, 1, 1, 0}, 
{1, 1, 1, 0, 1, 0}, 
{0, 1, 1, 1, 0, 0}, 
{0, 1, 1, 1, 1, 0}, 
{1, 0, 1, 0, 0, 1}, 
{1, 1, 1, 0, 0, 1}, 
{0, 1, 0, 1, 1, 1}, 
{1, 0, 1, 1, 0, 1}, 
{1, 0, 1, 1, 1, 1}, 
{1, 0, 1, 0, 1, 1} // Z - 90
};

Stepper Motor Library

Import libraryStepper_Motor_X27168

The API for a Stepper Motor providing position and speed control for an Automotive Gauge Stepper Motor.


Please log in to post comments.