Monday, September 27, 2021

Traffic Light in NI Multisim using Programmable Logic Devices (PLD)

Traffic Light in Multisim using PLC

Written by Larsha Johnson

Programmable Logic Devices (PLDs) are integrated circuits that contain a relatively small number of functional elements that provide user-configurable logic functions (AND, OR, etc.)
In Multisim a PLD schematic contains specialized components that define the operation of the individual logic blocks of the PLD.

What is PLC and PLD?

The biggest difference between the two is the control logic. PLC is a fixed logic device (the function is realized by changing the software), and PLD is a variable logic device (the function is realized by changing the internal circuit structure). 

The concepts of PLC and PLD can be practiced through this two-way traffic light example. The main implementation of traffic light signals in to avoid traffic jams and serves the purpose of avoiding vehicular collisions.

The ladder diagram in this blog runs two traffic lights. The ladder diagram is contained in a separate hierarchical block called TrafficLightLogic

There are two different traffic light examples available, look in the sample circuit "blue folder icon" in the Educational version of Multisim that implements a traffic light:

  1. National Instruments\Circuit Design Suite 14.2\samples\Educational Sample Circuits\Ladder Diagrams
  2. National Instruments\Circuit Design Suite 14.2\samples\PLD Sample Circuits

The first choice uses programmable ladder logic with an actual traffic light simulation. For choice two, you can export the sample to program the NI Digital Electronics FPGA Board.


Drag n drop these snippets directly into your Multisim workspace :slightly_smiling_face:

*I also attached a short version of the NI Multisim for Education PDF specifically for traffic light designs.

What is an SNIPPET file? Section of programming code saved in XML format; code snippets can be saved from Visual Basic, Visual C#, and Visual J projects; they can be edited using the Code Snippet Editor and managed using the Code Snippets Manager. 

Find the attached files below. Hope this helps!

This topic refers to education-specific features of Multisim.

Saturday, September 25, 2021

MATLAB - Family of Curves (Vectorization)

MATLAB Techniques

Written by Larsha Johnson

Linear Signals and System, matrix operation fundamentals. This example illustrates a techniques called vectorization. Algorithm vectorization uses matrix and vector operations to avoid manual repetition and loop structures. With simultaneous creation of curves one can maximize the use of matrix applications. 
The result here is a 201 x 11 matrix with identical columns. 

%% Matrix Operations - Family of Curves 
r = [1 0 0] 
A = [2 3;4 5;0 6] 
c = r' B = [c A] 
A = [1 -2 3;-sqrt(3) 1 -sqrt(5);3 -sqrt(7) 1]; 
y = [1;pi;exp(1)]; 
x = inv(A)*y x1 = det([y,A(:,2:3)])/det(A) alpha = (0:10); 
t = (0:0.001:0.2)'; 
T = t*ones(1,11); 
H = exp(-T*diag(alpha)).*sin(2*pi*10*T+pi/6); 
plot(t,H); xlabel('t'); ylabel('h(t)'); 
[R,P,K] = residue(B,A) 
[R,P,K] = residue([1 0 0 0 0 pi],[1 -sqrt(8) 0 sqrt(32) -4]); 
R.', P.', K title('Family of Curves - Vectorization')

Try this code out to graph this figure! Modify freely and comment on this post if it helps. Thanks for reading.

Saturday, September 18, 2021

Create a Logic Circuit in NI Multisim - Snippet

Ladder Logic in Multisim

Written by Larsha Johnson


  • Multisim

In Linear Control Systems Lab the topic of programmable logic controllers was introduced. There is a variety of software available on the web to try PLC yourself, in this blog I used NI Multisim 14.2 

🙋Before arriving to this blog you may have asked do I implement a logic circuit using ladders within the Multisim environment? Is there any way to learn about ladder logic using a simulated circuit environment such as Multisim?

The answer:

The Education edition of Multisim lets you capture and simulate Ladder Diagrams. These diagrams are electrically based, as opposed to the binary/digital representations employed by ladder logic. Diagrams of this type are used extensively for industrial motor control circuits.

Ladder Diagrams are able to drive output devices or take input data from regular schematics and embed the instructions on how input states affect output states in either the same schematic or separate hierarchical blocks or subcircuits that contain the Ladder Diagram.

Note: Refer to the Multisim User Guide for a complete description of hierarchical blocks and subcircuits.

📌An example of how to create this ladder logic in Multisim is as follows:

1. Select Place/Ladder Rungs.
The cursor appears with the rung’s left and right terminators attached.

2. Click to place the first rung and continue clicking and placing until you have placed four rungs as shown below. Right-click to stop placing rungs. 

🔍To add components to the rungs:
1. Select Place/Component, navigate to the Normally Open Relay Contact

Note: This device is found in the Ladder Diagrams Group - Ladder Contacts Family.

2. Drop the relay contact directly onto the first rung.

3. Continue in this manner until all relay contacts have been placed. (X4 must be placed and
then wired separately). 

4. Place the lamps (Group - Indicators; Family - Lamp).

5. Place relay coils M1 and M2 on the third and fourth rungs (Group - Ladder Diagrams;
Family - Ladder Relay Coils). 

6. Place switches J1 and J2.
7. Double-click on each switch, select the Value tab, and change the key for J1 to 1 and the
key for J2 to 2. 

🔍To change the controlling device reference for X2 and X4:
1. Double-click on X2 and click the Value tab.
2. Enter M2 in the Controlling Device Reference field and click OK. Repeat for X4. The completed Ladder Diagram appears as shown below.

Embed the circuit file within a PNG image file using a Multisim Snippet and let your peers drag and drop the circuit into Multisim instead. This tutorial explores the new technology and ways to take advantage of it.

👌 Please try our snippet out for yourself and practice designing logic gates own your own.

Sharing Multisim circuit files has never been easier. You can now see a graphical preview of the circuit design before opening, and you no longer need to attach and save files on supported web browsers. This saves you valuable time and increases your productivity.

I sell on Tindie

Wednesday, June 23, 2021

555 Timer - LED Flasher with conductive 3D Filament - Astable Mode

555 Timer - LED Flasher with conductive 3D Filament

Written by Larsha Johnson

Bits4Bots, LLC

 Rapid circuit prototype with a 3D printer and conductive filament. This project features a simple circuit designed to explain the working and use of a 555 timer IC. The connection used is credited to this blog LED Flasher Circuit 
 The 555 timer was one of the first IC chips I learned to use in a project back when I attended community college. I learned to read the datasheet and create my first flashing LED! This is a good place to start for those new to electronics. *I recommend reading the 555 timer datasheet to learn more!


3D printer
Proto-Pasta filament
eSun PLA filament
555 timer IC
5mm LED or similar i.e 3mm, 10mm
1uF capacitor - C1 * Can be SAT (selected at testing)
x2 resistors (1K) - R1 & R3
1 resistor (100K) - R2 *Can be SAT (selected at testing)
9V battery
9V snap connector

Download and print the 3D file(s) here or from Thingiverse I designed the assembly for one single print

(1hr 30min) or in two parts 45min each:

Base 30mm x 30mm
Traces for testing purposes (different Z-axis height layers for various conductivity)
For TinkerCad users see link: Tinkercad

Note: When the print is 7% to 8% complete, the conductive filament should follow. Here is a great Instructable for welding 3D filament Filament Fuser.

*I simply snipped off the colored PLA with a wire cutter, then guided the conductive filament into the 3D printer until the extruder accepted (grabbed) it.

After the print is complete the top layers of the board should have 3mm+ conductive filament.

Pin 2 and 6 are connected. All other pin connections will need to be made manually.

Place 555 timer onto 3D printed board and press firmly to make a strong connection. Careful not to bend the legs!

1. Connect pin 4 and 8 together with a male to male jumper or wire. *tinned wire for optimization
2. Connect LED ground leg to pin one.
3. Connect R3 (1K ohm) to +itive lead of LED, and then to pin 3.
4. Connect R1 between pin 6 and 7
5. Connect R2 between pin 7 and 8
6. Place C1 between pin 1 and 2 *-itive lead to pin 1 (for polarized capacitors)
7. Note: Pin 5 will not be connected (this is also called floating)

The last step is to power the circuit. 5V-9V is a good value to use for the power supply. Here I used a 9V battery and snap connector.

Connect negative lead to pin 1. Connect positive lead to pin 8

Please like, share, or comment. Find us on all social media! Check us out on Tindie

**Did we make a mistake? Let us know :)

Before we designed our 555 timer circuit we conducted a search for conductive 3D filament. There are several companies that you can choose from. We decided to go with Proto Pasta. The details for conductivity are below:

Volume resistivity of molded resin (not 3D Printed): 15 ohm-cm
Volume resistivity of 3D printed parts perpendicular to layers: 30 ohm-cm
Volume resistivity of 3D printed parts through layers (along Z axis): 115 ohm-cm
Resistance of a 10cm length of 1.75mm filament: 2-3kohm
Resistance of a 10cm length of 2.85mm filament: 800-1200ohm


Now that the resistivity is known the next challenge is to calculate the resistance in each trace used.

I measured 2k Ohms in the curved traces on pin 1 and on pin 8. These are the traces that connect the power supply.

The shortest traces measure 1k Ohms. Pin 4 and pin 5.

The trace from pin 2 to pin 6 is 1.5k Ohms.

The T-shaped trace, pin 3 (trigger) and pin 7 around 1.5k Ohms.

***Increased layers on the Z-axis = increase the resistance. Less layers can be used to best resemble standard wires such a copper or other metals presented in general printed circuit boards. This portion of the 3D PCB is a work in progress.

In addition, advanced users can accurately determine exact wire (3D trace) resistance via circuit simulation software that can perform line calculations i.e. NI Multisim, ADS (Keysight), and others.

Calculate LED Flash Time

For the 555 Timer IC you, the designer, will calculate on/off flash time. The link below is a great way to calculate your design or check your math work. 555 Astable Circuit Calculator


Increasing C will increase the cycle time (and hence, reduce the frequency).
Increasing R1 will increase Time High (T1), but will leave Time Low (T0) unaffected.
Increasing R2 will increase Time High (T1), increase Time Low (T0) and decrease the duty cycle (down to a minimum of 50%)
By hand you can use these formulas to calculate the LED time on/off in seconds.

Time high (on) = 0.7 * (R1 + R2) * C1

Time low (off) = 0.7 * R2 * C1

Monday, May 17, 2021

Thingiverse page

Hello Makers,

We are now adding 3D makes to our new Thingiverse page. See you there!


Friday, May 29, 2020

Paper Circuits - Blaster Rocket

Written by Larsha Johnson

Experimental solderless LED kit for kids

Designed for kids who want to start building electronic circuits, with real components, without soldering.

In stock on Tindie

Paper circuits are low-power electronics that are created on paper utilizing conductive tape, LEDs and a power source such as a 2032 coin-cell battery.

There are small items used in this project such as LEDs and can be a choking hazard for children under 3 years.

  • Coin-cell battery (3V) CR2032
  • Copper tape (1/4″) with conductive adhesive
  • LED – 3mm, surface mount or similar 
  • Blank canvas card stock


  • Step 1: Insert the conductive tape through the canvas.

  • Step 2: Peel and remove the adhesive tape.


  • Step 3: Mount the 3mm RGB flashing led in the pin hole.


  • Cont' tape down the lead of the LED

  • Step 4: Glue the outline of your paper circuit to the canvas.

  • Step 5: Decorate the paper circuit. Add glitter, color, and any extra bells and whistles.

  • Step 6: Add the coin cell battery. Use tape to secure it as needed.

  • Step 7: Tape the rocket flame to the circuit to finish the project.

Enjoy the project and share with friends. 

For help please read the Troubleshooting section in the following link: Makerspace 

I sell on Tindie

Thursday, April 30, 2020

Doodle Doggie Badge - PCB

Badge Life - DIY Doggy Blink Badge

Written by: Larsha Johnson

DIY led puppy badge. White PCB in a puppy shape. DIY to wear. Try adding color. Customize it! Ruff ruff enjoy.

Wednesday, April 29, 2020

Turtle Proto Solder Board - STEM (Tindie)

Turtle Proto Solderable Boards

Written by Larsha Johnson

A solderable prototype board. 180 tie points. Ideal for electronic projects with micro controllers like
Adafruit, Arduino, Micro:Bits, Raspberry Pi and others. 

Buy now on Tindie Maker Marketplace

BREADBOARD General Purpose. Fun and unique turtle shaped tie-point prototype solder board. 8 SMD practice pads. 59mm x 79mm diameter.
I sell on Tindie

Friday, July 5, 2019

Crabbie : Interactive Development Board for Kids K-5th

Work in progress. Updates soon...

Saturday, June 1, 2019


Written by Larsha Johnson

After a previous post we wrote about creating custom shields using the NI Multisim and NI Ultiboard, we have decided to try it again. Here is our version of a customized compatible MKR 1010 wifi. The dimensions are 61.5mm x 25mm. 28 header pins options and 4 mounting holes. This lightweight bare bones can take your project to the next level. Since the MKR 1010 provides wifi, bluetooth, li-po battery connection with charging & many I/O pins you will want to get your hands on our cool shields. Release date summer 2019. Contact us for pre-purchase.

Now about the Nano 33 Iot. Did you know Arduino is releasing four new boards this summer? We did and we are already planning to test them out with our new shields. Our engineering team is hard at work to provide you a custom bare bones boards to get your next gadget going.

Traffic Light in NI Multisim using Programmable Logic Devices (PLD)

Traffic Light in Multisim using PLC Written by Larsha Johnson 9/27/2021 Programmable Logic Devices (PLDs) are integrated circuits that conta...