Braille machine using arduino mega

Hi, Currently I am doing a braille machine project. I am using LED display first then I implement it on braille tactile sensor. I used Arduino mega since it have 51 output then I can display to many leds. SInce it is braille, so I arrange the leds in matrix 3x2 for 4 cells. The problem now is my leds did not display correctly which the information is all implemented in sd card. Attached is my coding for interfacing sd card with arduino and led display and picture of my circuit.Thanks a lot for your help. :slight_smile:

sd_card_last.ino (4.55 KB)

interesting project and not that hard i think.

but i see on your skecth your trying to put everything thats inside the “.txt” file into the memory of the arduino.
can you add the txt file to see how much there is inside it.

as i think its better to just Read(); 4 chars and use a counter to get the next 4 chars when the delay is finished.

and there is something strange about the for(int dot) loop you use.
you compaire a ASCII letter with your Braille table which seems oke.
but you do this 24 times. which seems odd. because the 6 leds only shows 1 char.
you need to do something like this.

byte ledpins[][] = {{2, 3, 4, 5, 6, 7},
  {8, 9, 10, 11, 12, 13},
  {14, 15, 16, 17, 18, 19},
  {20, 21, 22, 23, 24, 25}
void loop() {
  for (byte character = 0; character < 4; character++) {
    int x = 0;
    while (alphabet[x] != input.charAt(letter)) {
      x++;  //Go through input and compare with alphabet to look for same characters
    for (byte leds = 0; leds < 6; leds++) {
      digitalWrite(ledpins[character][leds], pattern[x][leds]);
    //Increase letter for each character
    if (letter == input.length() - 1) { //if position is at end of input text the reset position
      letter = 0;
    } else {
      letter++; //Otherwise keep incrementing position

and you can do this easly with a UNO. you only need 3x 74hc595 and you can add 24 leds. and it only uses 3 wires from the uno.

Drivers will be required for the solenoids, or whatever shall replace the LEDs later. TPIC6B595 may be sufficient, and are compatible with the 74HC595.

The pattern table can be made directly addressable by the character code (128 or less entries for ASCII character set).

hi spirit, thanks a lot for your reply. your coding seems easy to understand. I am really thankful for your help. Yup, at first I've used arduino UNO but since I need to apply 74hc595,it seems complicated to me therefore i prefer mega than uno. thanks again for your help :)

hi DrDiettrich, I plan to apply P20 metec braille as to replace LEDs. Is it okay if I want to apply directly arduino mega without using shift register?

Where is the P20 data sheet? Bottom of the page.

The braille cells seem to plug into a backplate (also on that pdf). The back plate seems to have serial in/out, so nothing else than an Arduino is needed. Cell actuators are piezo driven, and they need a 200volt supply. Leo..

I couldn't find any useful information about the logic, in detail nothing about a serial interface :-(

P20.pdf shows a backplate for 8 braille cells.

The pinout shows Din (Data in), STRB (Strobe), CLK (Clock), 5volt, ground and +200volt for the actuators. A max clock speed of 500kHz and a data sequence is mentioned. I assume this all adds up to a serial data interface. Leo..

Hi Leo,thanks for giving the P20 datasheet and pointing out P20 specs regarding on 200V DC to DC converter and else. Actually, i've already knew on how to control P20 braille cells. But the problem now is how to interface sd card data onto P20 braille cells? is it just the same way as interfacing sd card data to arduino to LED or is it difference when I applied it to P20?

P/s: actually,i still do not get the P20 braille cells yet, for now I just tried to figure out on how to apply it to P20 braille cells

Try entering "Braille" in the search box on top of this page. Leo..

I’m trying to find out more about the data transmission. In general the project consists of two parts, reading text from the SD card, and sending the text to the braille cells. The latter most probably requires to break the text into lines, map ASCII to Braille code, and shift out the text line by line. How does the user specify the file to show, and signal a move to the next line?

hi can you post it use-ing the “</>”

while(alphabet◾ != input.charAt(letter)) { x++; } //Go through input and compare with alphabet to look for same characters

digitalWrite(dot, pattern◾[dot-2]); //Use position of the character in alphabet to determine the position of Braille pattern


otherwise we get some strange sqaure blocks on the code.

and before you post it press crtl+t (on de IDE) to make it look better.