HKU ITT - Braille Machine
by CamelliavandenHeuvel in Circuits > Arduino
149 Views, 0 Favorites, 0 Comments
HKU ITT - Braille Machine
Hello my name is Camellia van den Heuvel. For this school project called If this then that I have decided to make a Braille reading device with Arduino and some solenoids.
Supplies
Step 1: List of items you will need:
- Arduino UNO r3
- Breadboard
- Wires 30x - 40x
- JF-0530B 5N Solenoids 6x
- Transistors 6x
- 9V Battery
- USB cable
for the box:
- Wood
- Wood glue or screws
- A saw
- Ruler
- A pen
- The code provided down below
Setting Up Your Wires
As shown in the above image you want to lay your wires and transistors out and it should be fine. As a general tip I recommend sorting your wires by color. As this will make it easy to distinquish the different kabels.
The current will flow from the battery to the solenoid. From the solenoid it will flow to the top of the transistor. the collector. The transistor will allow a max of 5v to the Arduino while the excess current will go back to the battery.
Be careful as to not connect the plus side of your battery to your Arduino. The Arduino cannot handle the 9v from the battery.
The Code
This is the code for the Solenoids. However when you want to test the code with LED's I recommend you switch the HIGH's for LOW's and vice versa. I put in the excel sheet of the alphabet for the LED's.
int TussenLetter = 1000;int Pauze = 200;void setup() { Serial.begin(9600); pinMode(11, OUTPUT); pinMode(10, OUTPUT); pinMode(9, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); pinMode(6, OUTPUT);// pins outlets}// 11 = 1, 10 = 2, 9 = 3, 8 = 4, 7 = 5, 6 = 6.void loop() { String input; //maak een string lees hoeveel letters, herhaal de volgende code, plus 1 stuur naar de vertaler if (Serial.available() > 0) { input = Serial.readString(); //wat er gelezen wordt Serial.println("working with: " + input); //om te testen of iets wordt geschreven int nummer = 0; int nr1 = 0; for (int i = 0; i < input.length(); i++) { nr1 = nummer + 1; String test = input.substring(nummer, nr1); //bij welk letter zijn we ToBraille(test); nummer++; } }}void ToBraille(String rx_byte) { delay(TussenLetter); //reset digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, LOW); delay(Pauze);//alfabet if (rx_byte == "a") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, HIGH); digitalWrite(8, HIGH); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "b") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "c") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, HIGH); digitalWrite(8, HIGH); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "d") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, HIGH); digitalWrite(8, LOW); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "e") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, HIGH); digitalWrite(8, LOW); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "f") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "g") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "h") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "i") { digitalWrite(11, HIGH); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "j") { digitalWrite(11, HIGH); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, HIGH); digitalWrite(6, HIGH); } if (rx_byte == "k") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, HIGH); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "l") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "m") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, HIGH); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "n") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, HIGH); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "o") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, HIGH); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "p") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "q") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "r") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "s") { digitalWrite(11, HIGH); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "t") { digitalWrite(11, HIGH); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, HIGH); } if (rx_byte == "u") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, HIGH); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, LOW); } if (rx_byte == "v") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, LOW); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, LOW); } if (rx_byte == "w") { digitalWrite(11, HIGH); digitalWrite(10, LOW); digitalWrite(9, LOW); digitalWrite(8, LOW); digitalWrite(7, HIGH); digitalWrite(6, LOW); } if (rx_byte == "x") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, HIGH); digitalWrite(8, HIGH); digitalWrite(7, LOW); digitalWrite(6, LOW); } if (rx_byte == "y") { digitalWrite(11, LOW); digitalWrite(10, LOW); digitalWrite(9, HIGH); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, LOW); } if (rx_byte == "z") { digitalWrite(11, LOW); digitalWrite(10, HIGH); digitalWrite(9, HIGH); digitalWrite(8, LOW); digitalWrite(7, LOW); digitalWrite(6, LOW); }}<br>
nhwgedhg
Downloads
Designing the Case
You will need to measure out the length, the width and the height of your solenoids to get a perfect fit. A very important thing to note is that you will want to have a place for your solenoids kabels to go through.
Making the Case
I used wood to create my box. In hindsight I probably should have used a thicker wood. Make sure the holes for the wires are in the right place as shown in the drawing. The wires to the Arduino should have no issue poking through the small hole. While the solenoids should go through the gap created
Final Product
In the end the circuit did not end up working due to complications in the soldering and complications with the lack of power. I have tried to make the case for the solenoids themselves but ran out of time.