After many requests and years of waiting, Fritzing finally got a simulator!
The primary purpose of the simulator is to teach electronics to beginners, and its current capabilities are very limited (only analysis of DC circuits). However, it is fully functional, easy to use, and works on the breadboard and schematic view. In addition, it performs some checks to see if any parts are working outside their specifications.
In this blog post, we will teach how to use the simulator step by step.
Installation and enabling the simulator
The simulator is only available in Fritzing 0.9.10 or later versions.
It is disabled by default.
To enable it, go to Edit->Preferences (or ⌘+, File->Preferences in macOS), select the “Beta Features” tab, and check the “enable simulator” checkbox.
Fritzing will save this option, and you will only need to activate the simulator once.
Of course, you can still disable it anytime in the preferences dialog.
After the simulator is enabled, you will see a simulate button next to the share button at the bottom bar.
Let’s start by opening the LED example. Go to File->Open Example->Simulator->Basic Circuits->LED.
This is a very simple circuit with an LED, a resistor, and a battery. Once the example is loaded, press the simulate button. The LED switches off as the resistance is too high, and very little current flows through the LED. Try to reduce the value of the resistor. For example, set the resistance to 30Ω. To do that, select the resistor and change the resistance property in the Inspector pane. As soon as the resistance is changed, the simulator will simulate the circuit again, and you will be able to see the light coming out of the LED. Now try changing the 3V battery to a 9V one (in the Inspector pane). The simulator recalculates the current that flows, and now this current is too high, so it breaks the LED and the resistor. This is indicated by a smoke symbol on top of the LED and the resistor. You can fix it by setting a higher resistance or changing the resistor’s power and the LED’s maximum current.
Measuring voltages and currents
The simulator tries to recreate what you would experience when working with real hardware.
Thus, you can use a multimeter to measure voltages, currents, and resistances.
The best way of experiencing this is to start with the examples contained in File->Open Example->Simulator->Multimeter.
Let’s open the example called “How to measure DC voltages”.
In this example, a multimeter is connected to measure the voltage of a battery.
When you press the simulate button, the multimeter will show the battery’s voltage.
Change the battery voltage, and you will observe how the multimeter’s display updates the voltage.
Now, open the “How to measure DC currents” example.
Change the value of the resistor to change the current that flows through the multimeter.
Notice that the multimeter displays the numbers in engineering notation (e.g., 17.5 mA means 0.0175 A).
Breadboard view or schematics view
While the previous examples are shown in the breadboard view, the simulator can work in any view.
You only need to wire one view, but of course, you can also wire all of them.
For example, below, you can find a NAND gate being simulated in the schematics view and where the input signals are controlled with switches.
As we have seen in the LED example, the simulator checks that the simulated devices are within their specifications.
A smoke symbol is added on top of a device if it’s working outside its specifications.
Currently, we have implemented these tests:
Three probes connected to a multimeter or wrong probes connected (Err message on the screen appears)
Short circuit in batteries
Max current (diodes and LEDs, TODO: inductors)
Max power (resistors)
Reverse voltage (tantalum and electrolytic capacitors, IR sensors)
Max voltage (capacitors, motor, IR sensors)
Using the simulator from scratch
You are encouraged to simulate your own circuits, but be aware that currently, only a few Fritzing parts contain simulation models. Thus, several parts cannot be simulated. The best solution to avoid problems is to use the “Sim Parts” (SIM) bin. In the bin selector, scroll down with the arrows until you find the SIM bin. All the parts included in this bin can be simulated.
If a circuit contains parts that do not have a simulation model, they will automatically be ignored in the simulation. In addition, they will be greyed out to indicate that they are not taken into account in the simulation. Notice that parts can also be grayed out even if they have a simulation model.
This happens if the part is not connected to the rest of the circuit.
In the example below, the resistor and the capacitor are not part of the circuit, and the temperature sensor does not have a simulation (SPICE) model.
The simulation model of a part is shown in the Inspector pane.
So, if you are in doubt, check the SPICE field in the Inspector pane.
If it cannot be simulated, it will be clearly indicated there.
We can observe that if we select the temperature sensor in the previous example, as shown in the next figure.
Currently, only a few types of devices are supported:
Transistors (Bipolar Junction and FET)
The status of the switches and potentiometers can be changed through a menu in the inspector pane. The switches change their images based on their status (pressed/released) in the breadboard view and the schematics view. Currently, the position of the knob in the potentiometers is not updated. The only output devices which the simulator handles are the LED and DC motors. LEDs change their color based on the current that flows through them. RGB LEDs are currently not supported. DC motors show an arrow if they are rotating (indicating their direction of rotation).
Notice that currently, the simulator can only simulate one circuit per file. If you have several independent circuits, you can merge them by connecting their grounds together.
Power symbols in the schematic view do not provide voltage. Add a DC power supply and connect it to a ground symbol and a power symbol.
Finally, you can stop the simulator by pressing the stop button. This is very handy when you are wiring your circuit. Of course, you can activate it later by pressing the simulate button.
Citing the simulator and academic paper
If you are interested in more specific details of the simulator and its use for teaching electronics online, please take a look at the paper:
Andres Faiña, “Learning Hands-On Electronics from Home: A Simulator for Fritzing”, Accepted in the proceedings of the 25th International Conference Series on Climbing and Walking Robots (CLAWAR 2022). Available at https://arxiv.org/abs/2206.07146.
The simulator is still in beta status and could have bugs that let Fritzing crash. Please help us improve it by reporting them at the issue tracker. And of course, if you think you can help us with the development, you can contact us or send us a pull request. There are several parts that need SPICE models!
Simulation is one of the most requested features of Fritzing.
For more than a decade, people have asked for Fritzing to simulate circuits.
There can be very different expectations about the scope of the simulation.
The simulator is limited to the parts available in the simulation bin.
If a part can not be simulated, it will be greyed out during the simulation.
The simulation was tested by several groups of students, and is now available
as a beta feature.
If you want to give it a try, you can enable it in Fritzings preferences.
#3868 , #3820
#3738, #3602, #1869
#3632, #3627, #3109
Several voltage regulators added
SeeedStudio Grove Beginner Kit
TDK Ultrasonic sensor module
About 90 parts received minor fixes
The release is available in our downloads section.
We’d love to hear what you think! Write us via our contact form or check out our forum.
We added Sony’s Spresense modules for Fritzing.
Altogether, there are four new parts: the mainboard, the Arduino extension, the LTE extension, and the camera.
In this post, we will have a closer look at the Spresense board. We will deploy a Hello World and a Camera example application.
The Spresense parts
The parts are included with recent versions of Fritzing. We highly
recommend using Fritzing with a version >= 0.9.7 .
What are the Spresense modules?
First, there is the main module: Sony’s CXD5602 microcontroller runs a Cortex-M4F CPU with 6 cores, GPS.
The low power consumption makes it suitable for battery-dependent use cases.
There is a great choice of libraries supported, including Python, TensorFlow,
Together with GPS, LTE, Wifi, BLE extensions, this makes them suitable for IoT and AI applications.
Then, there is the extension board. It adds Audio input for up to 8 channels, 3.5mm headphone output, an SD-Card slot,
an extra USB connector, and the well-known Arduino shield headers.
The third module is the 5MP camera board. With 24mm x 25mm, it is very compact. It connects to the Spresense
main module with a flat cable.
And then there is the CXD5602PWBLM1 board, the LTE extension.
It adds LTE capabilities to the main module. Also, it has a 3.5mm headphone output, up to four
digital microphone inputs, an extra USB connector, and general IO headers.
For testing, we have set up Ubuntu 21.04 VM and prepared the Software Development Kit with the
setup guide from Spresense.
If you are also using a VM, make sure that both, host and guest machine have the “dialout” group
for your user account, so you can access the Spresense board when connected to USB.
The board should be visible as “Silicon Labs CP210x” with lsusb when the board is connected.
If all looks good, we should be able to connect with minicom.
[email protected]:~$ lsusb Bus 001 Device 027: ID 10c4:ea60 Silicon Labs CP210x UART Bridge Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub [email protected]:~$ minicom -D /dev/ttyUSB0 -b 115200
The connection with minicom will open a NuttShell on our Spresense board.
No, this is not yet the ‘Hello World’ we are looking for.
NuttShell (NSH) NuttX-10.1.0
nsh> echo "Hello World"
Running Hello World on a console is a bit lame. How about using an actual LCD for that?
For this, we use an ILI9341 from Adafruit (about $10). We connect it as shown in the Fritzing project below:
To address the ILI9341 display, the Spresense board needs to know how it is connected.
Add the following configuration to the Nuttx kernel, by storing it at ‘spresense/sdk/configs/devices/ili9341_on_spi5/defconfig’
# The display can run at much higher speeds. But signal quality on the breadboard and the wires can
# vary a lot, so we limit it to 2MHz. Still fast enough for our purpose at 320x200x16
With the config file in place, we can now build the kernel and flash the Spresense board. We
configure it to build the nxhello example and our custom ili9341 setup. Then we run make. If
all was successful, we flash the board. Using the default speed of 115600 did not work reliable,
but with a higher speed of 460800 (or other high values), flashing works quite reliable.
Don’t forget to source ~/spresenseenv/setup, as described in the Spresense getting started documentation.
196432 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# Restarting the board ...
After the nuttx.spk file has been flashed to the Spresense board,
connect to it via minicom again, and run ‘nxhello’.
In the previous section, we have wired up a display and verified it works. Now the fun part,
just connect the camera. Instead of ‘nxdemo’, we now build the camera example.
tools/config.py examples/camera device/lcd_ili9341_on_sp5
tools/flash.sh -c /dev/ttyUSB0 -b 460800 nuttx.spk
Connect to the board with minicom, and call ‘camera 0’.
This will show images from the camera on our display. Even though we have reduced the
video signal to 2MHz, we get quite a fluent update rate.
Since we are filming a 320x240 display, the video can not represent the capabilities of the camera. Here is a picture directly recorded with the board:
There are many more example applications.
With the zmodem driver and minicom, it is easy to transfer files from the board to your PC.
Show your coordinates. The GPS demo needs a few minutes for the first fix. This is normal.
To shorten the time, you need assisted GPS or you have to load ephemeral data. Maybe
the GPS chip can already cache that data? We didn’t try.
TensorFlow lite should allow some cool projects in connection with the camera.
We didn’t get to try this one yet.
Do you have any ideas for the board? Have you already build any projects? We are looking
forward to your comments in the forum.
Fritzing 0.9.9 was released on Sunday, 24th of September 2021.
We tested it for Windows 10, Windows 11 (preview), macOS BigSur, macOS High Sierra, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 21.04, Fedora 34.
Fritzing can now remember uploads to our Fab. There will be a clickable symbol next
to the file name in the “Recent files” list.
Some keyboard shortcuts where added: Ctrl+F for search, and [, and ] for rotation.
A regression for Power labels in the schematic view was fixed.
Some old bugs when resizing strip- and perfboards have been fixed.
Several of the core parts have have been fixed, including lots of SVG exports.