Binary Converter

965

12

13

Introduction: Binary Converter

Hello there.

The idea to do such converter came to my buddy. He does come electronic classes, and sometimes students need to convert some numbers from BINARY to HEX and DEC. This is exactly what this converter does. Device has 8 toggles togglesand two screens. By turning toogles you set 1 or 0, first screen (with two seven-segment displays) shows you input number in HEX numeral system, second screen (with three seven-segment displays) shows you the same number in DEC numeral system.

Step 1: Drawing

As usual, everything starts with sketches and drawings.

There was an idea to make such a device in Shild format for Arduino. But the goal was to make the circuitry as simple as possible, that is, by Arduino to use not any additional chips.

Was first made a sketch of the case of the future device and paper.

This form factor was chosen based on restrictions on the production of printed circuit Board - A4 size.

There was no task of making the device mobile, as it will be used in the classroom during classes on electronics.

Step 2: PCB

The popular Toner Transfer Method was used to manufacture the PCB, which imposed a limitation on the maximum card size - in the A4 sheet format.

For layout of the board was used the program Sprint Layout, in which was drawn the layout of all the tracks of the board.

Next was a printed file with the layout on a laser printer. To print you must use special paper. After that, the pattern of the tracks is transferred from the printing on the sheet of the PCB using a hot iron, in our case used hot press - which in normal times is used for applying appliques on t-shirts.

One sheet of A4 contained 3 pieces of boards. The boards were cut by Dremel manually. Transition holes were drilled on the machine.

Step 3:

Step 4: Soldering

List of components:

arduino uno x1

seven-segment indicator, dual (common anode) х1 - https://www.chipdip.ru/product/bl-d56b-21ur

seven-segment indicator, single (common anode) х3 - https://www.chipdip.ru/product/bl-s56a-11ur

led х8 - https://www.chipdip.ru/product/bl-l513lrd

toggle switch х8 - https://www.chipdip.ru/product1/8237196151

resistor 220Ом х15 - https://www.chipdip.ru/product0/11057

comb 6pin х2 - https://www.chipdip.ru/product/tyco-826629-3

comb 8pin х2 - https://www.chipdip.ru/product/tyco-826629-4

Soldering accessories

During soldering, it is necessary to pay attention to the order of connection of toggle switches to the Arduino 0-7 terminals, in order to ensure correct display of bits.

Step 5: Coding

The sketch was written in the Arduino IDE.

To manage the 7-segment indicators, the dynamic indication algorithm was adopted, which allowed to connect all the necessary components without using additional microcircuits, shift registers, etc.

See the sketch in the attachment.

Attachments

Step 6: Case Modeling

After board was finished, came the stage of modeling of the body.

3D model was drawn in Fusion 360.

Next, using add-on DXF for the Laser to make patterns of the parts for subsequent fabrication.

Live preview - http://a360.co/2pup2tH

Step 7: Fabrication

The body parts were cut on a laser cutter.

Since there have been a number of printed circuit boards, for each device, we decided to use different material for manufacturing body parts.

Thickness of material 3 mm.

Used: plywood, acrylic.

Step 8: Assembling

After all parts were ready, it was time to assemble the device.

Because the devices used by different clones of the Arduino Uno (the boards are slightly different in size), a few details had to modify a file, as power ports and USB soldered on different boards at different tension - a difference of about 1-2 mm.

The rest all without problems, thanks to the finger joints connections they seem fine without glue.

Step 9: Result

The result is a 3 device.

When choosing colors for the plastic case we were inspired by the design of vintage computer Altair 8800. In our humble opinion - we managed to create a device similar in spirit to that time.

P.S.

If someone wants to talk about retro computers, there is HAM radio callsign - R2DGO, of my buddy Prokhor, together with whom I did this project.

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

Be the First to Share

    Recommendations

    • For the Home Contest

      For the Home Contest
    • Make It Bridge

      Make It Bridge
    • Big and Small Contest

      Big and Small Contest

    13 Comments

    0
    bansheescreech
    bansheescreech

    5 years ago

    Hey OP, can you explain how the coding works at all?

    0
    DIY-crabs
    DIY-crabs

    Reply 5 years ago

    Hi.

    The main idea is: we load data in register via switches, and then read this register, convert data from binary to hexadecimal and decimal forms. We use register D for this operations. After setup function there is print digit function (for printing symbols on 7-segment LED-indicators). And then in main - magic with reading and converting data in register D:

    void loop()

    {

    char buffer_hex[2]; // we create a buffer of bytes to store the symbols, which we will print after conversion to HEX form

    char buffer_dec[3]; // we create a buffer of bytes to store the symbols, which we will print after conversion to DEC form

    BYTE = PIND; // we put the data from register D to BYTE variable

    sprintf(buffer_hex,"%02X",BYTE); // we put our BYTE to our buffer_hex (the "%02X" is converts it to hexadecimal form (X) and put Insignificant zero (if it's present) to the right side (02)) - eventually in our buffer we have converted data with insignificant zeros

    printDigit(A5, buffer_hex[0]); // we print on LED A5 first symbol from buffer_hex

    delay(1); // delays - for best brightness of indication

    printDigit(A4, buffer_hex[1]); // we print on LED A4 second symbol from buffer_hex

    delay(1);

    sprintf(buffer_dec,"%03u",BYTE); // we are doing the same for decimal conversion - put our BYTE to our buffer_dec (the "%03u" is converts it to decimal form (u - unsigned) and put Insignificant zeros (if it's present) to the right side (03))

    printDigit(A3, buffer_dec[0]); // we print on LED A3 first symbol from buffer_dec

    delay(1);

    printDigit(A2, buffer_dec[1]); // we print on LED A2 second symbol from buffer_dec

    delay(1);

    printDigit(A1, buffer_dec[2]); // we print on LED A3 third symbol from buffer_dec

    delay(1);

    }

    That's all!

    0
    bansheescreech
    bansheescreech

    5 years ago

    Hello OP,

    Could you please explain how the code in Arduino IDE works?

    Very unclear about certain parts mainly: sprintf(buffer_hex,"%02X",BYTE) etc.

    If you can that would be much appreciated and I can help you too! :D

    0
    OwenG20
    OwenG20

    5 years ago

    For the "seven-segment indicator, single (common anode) х3", you posted the wrong link. You posted the link to buy the common cathode indicator. It should be BL-S56B-11, not BL-S56A-11.

    0
    bansheescreech
    bansheescreech

    5 years ago

    When I download the PCB layout the whole right side was missing.

    0
    CopyPasteStd
    CopyPasteStd

    Reply 5 years ago

    I have updated files. Check it plz.

    0
    OwenG20
    OwenG20

    5 years ago

    Can this be made without the use of a PCB? They are impossible to make here.

    0
    CopyPasteStd
    CopyPasteStd

    Reply 5 years ago

    You could do everything just by using wires without PCB. But it takes more time to connect everything together. And there are more chances to mix something up

    0
    OwenG20
    OwenG20

    Reply 5 years ago

    One more question. Where can I find a comb 8 pin? The comb 4 pin has the same direct link as the comb 8 pin. Thanks!

    0
    CopyPasteStd
    CopyPasteStd

    Reply 5 years ago

    Tnx that you told about mistakes in links - I fixed them.

    comb 8 pin - it just pair of comb 4 pin

    same for comb 6 pin - it just pair of comb 3 pin.

    or you could buy something like that https://ru.aliexpress.com/item/20pcs-2-54-1X40-pin-breakaway-Straight-female-header-40-pins-Single-Row-2-54-mm/32648493200.html?spm=2114.03020208.8.13.IpsTE6

    0
    OwenG20
    OwenG20

    Reply 5 years ago

    6 pin**

    0
    Tominaz
    Tominaz

    5 years ago

    cool project. if I'm not mistaken your schematic is missing. all attention on mechanics not enough on the electronics. I have used the Altair and computers like it. I cut my teeth on flipping switches, to enter programs and iniating run. that would have been a handy device back then. probably a neat train device

    0
    CopyPasteStd
    CopyPasteStd

    Reply 5 years ago

    Tnx for your comment, - yes, you are right I forgot to add some files about PCB (already updated).