Binary Counter
I have made a binary counter from Arduino Uno R3. I will be using LED's to display numbers. Number 0 will represent Led that is switched off and Number 1 represents Led that is switched on. I have displayed numbers only till 15. If you want, you can do more. So, now, let's begin.
Electric Components Needed
You will need the following electronic components to make this project:-
1) Arduino Uno R3
2) 4 LED's
3) 4 resistors
4) Jumper wires (Male to male) I have used 12 of them.
Learning Binary Conversion
Converting any number to binary is very easy. The two numbers which we use in binary system are 0 and 1. So, we will take four digits to represent any number. The first digit is 0. It will be represented by 0000. Now, the second number is 1. So, we will do 0+1 that means 0000+1 = 0001. Now, the third digit that is number 2. It will be 1+1 that means 0001+1. But, as we know that program can't use digit 2 in binary system. So, we will jump back to the next number which we have in this system, which is 0. Whenever we jump from 1 to 0. 1 is carried over. So digit 2 = 0010. And so on, you can write numbers till 15 or more.
Making the Code
Now, we have converted numbers into binary numbers. Next we have to make the code. As, we are using four digits to display numbers, so, we will use four LED's to display the numbers. Now 0=0000, so we will keep all the LED'Ss switched off. Then 1=0001, so we will switch on last LED and switch off the first three. And so on. The final code is attached here.
Downloads
Making the Circuit
Making the circuit is very easy. You can refer to the image to make your circuit. Just connect the ground and VCC terminals and connect all LED's to resistors and a pin number. Don't forget to connect all LED's negative leg to the Negative terminal.
Finishing Touch
Now, we can upload the code to our Arduino. If you want, you can first make a circuit on Tinker Cad platform and check if the code is running correctly or not. Upload the code. And.... it is running! Hurray! We have just made a binary counter with Arduino Uno! If you want you can just put the circuit in a box and leave spaces for LED's to glow so that it will look a perfect Binary Counter...like I have done. Have fun making this project!