5,050

73

7

Circuit simulation is a technique where computer software simulates the behavior of an electronic circuit or system. New designs can be tested, evaluated and diagnosed without actually constructing the circuit or system. Circuit simulation may be a useful tool in troubleshooting a system to gather data before circuit level troubleshooting actually takes place. This allows the designer to determine the correctness and efficiency of a design before the system is actually constructed. Consequently, the user may explore the merits of alternative designs without actually physically building the systems. By investigating the effects of specific design decisions during the design phase rather than the construction phase, the overall cost of building the system diminishes significantly.

So, software simulation is a good way to try before making the circuit physically. Tinkercad is a web-based simulation tool which will help you to test your hardware as well as software without making any physical connection or even without buying any hardware.

Have you ever felt the shortage of input-output pins on Arduino? If you thought to drive tons of LED or want to make LED Cube I think you definitely felt the want of I/O pins. Do you know you can drive an unlimited number of LEDs using only 3 pins of Arduino? Yes, shift registers will help you to make this magic. In this instructable, I will show you how we can implement unlimited input and output using 74HC595 shift registers. As an example, I will make a digital clock with a thermometer and a lux meter using six 7 segment display. Before finally making the hardware circuit I simulated the circuit in Tinkercadbecause lots of connection are involved with these. A simulation can make you more confident and you can test finalize your circuit without any physical trial and error. Obviously, it will help you to save your costly hardware and valuable time.

You can access the simulation from here: https://www.tinkercad.com/things/0sXp9ZMzjqL

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Save Your Hardware From Burning

Like other electronic circuits, LED circuits are very sensitive to current. LED burns if more current flows than rated current (e.g. 20mA). Selection of an appropriate resistor is very important for proper brightness without burning the circuits or LEDs.

Tinkercad circuits have an excellent feature. It shows you if more than the rated current flows through the circuit elements. In the following circuit, I connected a seven segment display directly to a shift register without any resistor. It is not safe for the register even for the seven segment display and both can be burned by this connection. Tinkercad shows the fact by the red stars.

In the following circuit, I added one 180 ohm resistor to each segment of the LED. About 14.5mA current flows through each segment of the display which is save for the display. But from the simulation, it can be seen that this resistance value is not safe for the IC. The maximum current capacity of the shift register is 50mA. So, the IC is safe up to three on segment of the display (14.5 x 3 = 43.5mA). If more than three segments become on the IC can be burned (e.g. 14.5 x 4 = 58mA). Most of the maker doesn't give attention to this fact. They calculate the resistor value considering the display only.

But if they simulate the circuit in the Tinkercad the chance of making this mistake goes to zero. Because Tinkercad will alert you by showing the red star.

You can observe the situation on hovering the mouse cursor on the star like the figure shown below.

The following design is perfect where I choose 470 ohm resistor for each segment of the display. The attache Arduino sketch was used when simulating the circuit.

## Step 2: Measure the Voltage, Current, Resistance & Wave Shape

Measuring current and voltage is a big hassle for electronic circuit especially multiple parallel measurements are required. Tinkercad simulation can solve this problem very easily. You can measure current voltage and resistance very easily. You can do this for multiple branches at a time. The following setup shows the total current and the voltage of the circuit.

You can also use an oscilloscope for observing wave shape and measuring the frequency.

In the above setup oscilloscope showing the clock signal from the Arduino. You can also measure the current and voltage of multiple branches at a time which is very effective. If you want to measure multiple branches current at a time using multimeter from a practical circuit it will be very hard. But in Tinkercad you can do it very easily. In the following circuit, I used multiple ammeters to measure current from different branches.

## Step 3: Writing Program & Using Serial Monitor

One of the interesting and useful features of Tinkercad circuit is that it has a code editor and you can write a program for Arduino and ESP8266 directly from its environment. You can also develop a program using graphical environment by selecting Block mode. It is very helpful for the maker & hobbyist who have no programming experience.

It has also a built-in Debugger from where you can debug your code. The debugger will help you to identify the bug (error) in your code and correct (debug) it.

Tinkercad circuit also has the serial monitor and you can monitor the sensor value and debug you circuit very easily. The following circuit was used to test PIR & ultrasonic sensor and on=bserve the data in serial monitor.

## Step 4: Simulation of Big and Complex Circuit (Clock With Thermometer & Lux Meter)

In Tinkercad you can simulate any complex circuit before making it practically. It can save you valuable time. The chance of making mistake in a complex circuit is very big. If you test it in Tinkercad first it can be very effective because you are knowing either your circuit and program will work or not. From the result, you can also modify and update your circuit according to your requirement.

I have simulated a complex circuit in Tinkercad and it is a clock circuit with thermometer and lux meter. The circuit is powered from a 9V battery with a 5V regulator. Six, seven segment display is used to display the time with hour, minute and second. Four buttons using single analog input is used to adjust the time. A buzzer is connected to set the alarm. LM35 IC is used to display sense the temperature of the environment. An ambient light sensor is used to measure the lux.

A digital button switch is used to Arduino pin #7. This button switch is used to change the option. By default, it shows the time or works in clock mode. For the first press, it shows temperature and shows lux level for the second press.

## Step 5: Implementing With Hardware

After simulating the circuit and adjusting the program and resistance value it the perfect time to implement the circuit practically. A practical circuit can be implemented on the breadboard if you want to make a prototype for display somewhere. Breadboard circuit has some advantages and disadvantages. The main advantage of the breadboard circuit is that it can be easily modified and no soldering is required for that. On the other side, the breadboard circuit's connection can be loose very easily and it is very hard to identify for a complex circuit.

If you want to make it for practical use soldered PCB circuit is best. You can make your own PCB circuit at home very easily. No special tools are required for that. If you want to know about the DIY PCB you can follow these nice Instructables.

2. PCB-making-guide by pinomelean

You can also order online for a professional PCB. Several manufacturers provide PCB printing service at a very low price. SeeedStudio Fusion PCB and JLCPCB are two most prominent service provider. You can try one of these.

[Note: Some images are collected from the internet.]

## Recommendations

• ### Internet of Things Class

22,207 Enrolled

## 7 Discussions

TinkerCAD just recently came to my attention, and I tried it out. Your well presented article thoroughly showcases the extensive features and practical usefulness of that powerful tool.

If only schoolteachers could bring up a project like this when kids ask, "when will I need MATH?"