Introduction: Binary Converter

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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.

Step 6: Case Modeling

Picture of 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

Picture of 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

Picture of 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.

Comments

bansheescreech (author)2017-08-15

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

DIY-crabs (author)bansheescreech2017-08-18

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!

bansheescreech (author)2017-08-14

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

OwenG20 (author)2017-08-02

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.

bansheescreech (author)2017-06-13

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

I have updated files. Check it plz.

OwenG20 (author)2017-05-25

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

CopyPasteStd (author)OwenG202017-05-27

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

OwenG20 (author)CopyPasteStd2017-06-07

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!

CopyPasteStd (author)OwenG202017-06-08

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

OwenG20 (author)OwenG202017-06-07

6 pin**

Tominaz (author)2017-05-01

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

CopyPasteStd (author)Tominaz2017-05-01

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

About This Instructable

531views

12favorites

License:

More by CopyPasteStd:Binary ConverterModular Shelving Plywood Boxes
Add instructable to: