You are currently viewing the United Kingdom version of the site.
Would you like to switch to your local site?
15 MIN READ TIME

Model and simulate your circuit projects

He’s no fake, but Mats Tage Axelsson shows you around the intricacies of simulating your Arduino-based projects for better, error-free results.

OUR EXPERT

Mats Tage Axelsson is keen to show you how using the Linux operating system can benefit your work and home life.

You may have considered creating a project using either the Arduino controller range of boards or any of its compatible systems. If you have, but were put off by having to buy new hardware just to try it out, then why not simulate your idea before splashing out the cash? All the software you need is on Linux and you can see what the different boards are capable of beforehand.

In this tutorial we’re going to learn what you can do with virtual boards and the right software. You can create all the components and connect them to your board, program the controller and see how it handles it. You have several CLI options including simavr, simulavr and a few others, too.

There are many different packages available for designing the circuit. The main software for writing the sketches (what the code is referred to as) is the Arduino IDE. A graphical front-end is Simulide, which also can simulate ordinary circuits. Adding components is straightforward. You can measure voltages and display waves on an oscilloscope in the application.

We’ll be looking at how to set up the software in this tutorial, step by step. To choose the correct board you’ll need to have a vision for what your project needs to do. You’ll use an Arduino type board for your projects, and there are many copies available. The Arduino platform is open source.

Start small

The Arduino Uno board is small and cheap. It makes sense to start learning with this model until you’ve become more experienced. We recommend choosing that one first and move on to larger projects later.

The standard way to compile for the Arduino is to write a sketch in the Arduino IDE, which is a Java application. It enables you to handle all the tasks necessary for getting your project to a board. However, you may want to do this using other solutions. You can also rely on the compiler extensions from that package. The extensions are for the gcc suite of programs. You can do this by installing arduino-mk, which depends on arduino-core. These packages are there for people who use the command line for everything.

For successful simulation you’ll need a few more packages. Here, too, you have options. A good one is Simulide, a package that’s easy to set up and start creating your design. Compiling and upload to the simulator involves just a couple of clicks. You’re also able to use the Arduino core package for compiling.

When you’re planning a new project, it’s good to test your ideas many times. You could either run cables and power your Arduino, or you can simulate your circuit. If you’re uncertain about which components to use, you can buy one of each, or stick to a simulation.

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for 99p
SUBSCRIBE NOW
30 day trial, then just £9.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
August 2020
VIEW IN STORE

Other Articles in this Issue


In This Issue
Generation Linux
We’re all quite old here at Linux Format. Effy’s looking
NEWS
Open source to sweep across Europe
On 14 May the European Parliament moved to endorse a
Penguins in space!
On its second attempt (reboot? - Ed) the SpaceX-built Falcon
More Linux tech
We reported last issue that Fedora was officially being listed
Case closed!
We reported in LXF258 on the patent case brought against
BIFROST BOOST
With only free software, a Mali G31 chip can now
TRYING TOO HARD
Every once in a while, you see a discussion that
Kernel Watch
Linus Torvalds announced the release of Linux 5.7. The new
ONGOING DEVELOPMENT
Sean Kelly has begun to post enablement patches for CXL
REVIEWS
Intel Frost Canyon NUC
Frost Canyon is the latest iteration of the Intel NUC
Purism Librem 5
Announced in 2017 as a crowdfunder that was impressively supported,
DXT2 1.2
The Windows 7 EOL was too good a hook to
Mabox Linux 20.02
Manjaro is one of the best renditions of Arch Linux
Lair of the Clockwork God
Genuinely funny games are still something of a rarity. So
LED Strip HAT Mini
LED Strip HAT Mini is a Swiss Army knife for
ROUNDUP
File managers
His co-workers have only seen him by video link and
INTERVIEW
NEXT-GEN DISTROS
Cast your mind back 15 years, to that pre-credit crunch
OPEN BRITANNIA
Amanda Brock is CEO of OpenUK (https://openuk.uk), a new non-profit
Pi USER
LEVEL UP!
Les Pounder works for Tom’s Hardware UK writing about the
Raspbian we love you, but this is goodbye…
Things are afoot in the world of Raspberry Pi operating
Official Ubuntu
There’s been a spin of Ubuntu that runs on the
Official 64-bit
But wait, there’s more OS news! Since the Pi 2
Create stop-motion animation with your Pi
Les Pounder is an Associate Editor at Tom’s Hardware and
Hack Stadia stream gaming on to the Pi
Christian Cawley got a bit peckish for Pi and spent
CODING ACADEMY
Creating Pac-Man style games in Python
Calvin Robinson is a former assistant principal and computer science
Turn your data plots into visual information
Mihalis Tsoukalos is a DataOps engineer and a technical writer
REGULARS AT A GLANCE
Your free downloads
To replace our regular covermounted DVD we’re offering four top
Mailserver
Write to us at Linux Format, Future Publishing, Quay House,
Answers
Got a burning question about open source or the kernel?
Inkscape
Neil Mohr is in the HotPicks seat which has been
Worker
You give Jonni six entire pages to write up the
Birdfont
While Comic Sans gets a bad rep in graphic design
PeaZip
PeaZip is currently one of the best-know crossplatform GUI frontends
Mermaid
We first took a look at Mermaid over three years
Zeal
Taking inspiration from OS X’s Dash, this is a useful
Mixxx
Certain members of the open source community believe it lacks
Stella
One of the most comprehensive emulators known to man is
BZFlag
Here at self-isolating LXF Towers, virtually blowing stuff up has
TheSSS
Spun off from the main 4MLinux project, TheSSS isn’t some
Eqonomize
We first looked at Eqonomize when it was originally launched
TUTORIALS
Manage your files
Jonni Bidwell uses vim and i3 on an Eee PC,
Design and publish your very own eBooks
Nick Peers dreams of republishing his best work in book
Monitor systems and Docker deployments
Mihalis Tsoukalos is a DataOps engineer and a technical writer
IN-DEPTH
BROWSER WARS 2020
We suspect most readers remember with bitterness and rolling of
Chat
X
Pocketmags Support