The right tool for the job: designing schematics

Word in advance: I have made a few mistakes in the designs you are about to see. Some are intentional, some are not. Always check the datasheet before wiring up something and use some common sense.

If you develop prototypes from time to time, you may have designed schematics. A lot of people start with Fritzing, because it’s very easy to start with Fritzing.

My opinion about Fritzing’s earnings model is known thanks to my previous post, but also the technique of Fritzing is not ideal. This is not so much because Fritzing doesn’t work well, because it does, but because it doesn’t teach you the right techniques.

Getting started with our prototype in Fritzing

This is how the default starts in breadboard mode. This allows you to design with visual elements, schematics, as if you were looking at your prototype. That looks like this, for example:

Image: Our original design in Fritzing on a breadboard

This is still relatively easy to use. It doesn’t look very neat, but it’s easy to build on this drawing. However, the problem is already becoming visible. Imagine if we were to add five more motors to our robot:

Image: Version 2 of our schematics

This way of drawing clearly doesn’t work. The large parts take up far too much space and the connections have to be drawn far too close to each other. As a result, the whole thing becomes very messy and unreadable. The result is that you quickly make mistakes when reproducing these schematics.

This is still a very simple prototype: an Arduino that controls six engines via Bluetooth. There are no sensors, resistors, capacitors, LEDs, buzzers, converters, et cetera.

Designing schematics based on breadboard design

Therefore we stop with the “breadboard view” and switch to the second option within Fritzing, namely “schematics”. This of course sounds much more like what we want to make.

Image: Schematics view of our current project

This also looks disastrous. That is logical, as we have not yet started to connect and clean up parts. Fortunately, Fritzing has a tool for us! Before we can use it, we place the parts the way we want them.

Image: Schematics view after replacing the parts

Now we can use Fritzing’s famous tool: autoroute. This tries to automatically make the connections of the components (based on our breadboard design), so that we have a good schematics view. The result is as follows:

Autorouting our schematics

Image: Useless autorouting

As you can see, only five of the twelve connections are actually connected. The other connections were not made, because Fritzing didn’t succeed in doing so within a hundred attempts.

Originally I thought this was the case because Fritzing doesn’t want to draw lines through other lines, but this scheme is also proof that this is not the case.

I also noticed that in the breadboard view I accidentally connected the GND directly to the VCC. Such a mistake was relatively easy to make in the breadboard view, while in the schematics this would not happen very quickly. Of course I solved this immediately, after which I ran the autoroute again. At that moment everything is done again, and this work of art is created:

Image: A horrible result of autorouting

Excuse my words, but: What the fuck is going on here? I clicked on the autoroute a thousand more times out of amazement and it never happened again, so I assume this was a bug.

I was actually secretly pleased to see that there were more connections now than before, but every autoroute after this bug gave the same disappointing result:

Image: The result after autorouting again

Unfortunately. We haven’t made any progress yet. If we try to solve this neatly by hand, we end up with something like this:

Image: The result after routing by hand

After I first had to remove dozens of ratsnest lines, because there was such a line between each VCC and GND, I drew the lines myself. Of course this doesn’t work very well, because a lot of lines have to be drawn over each other and this makes it very difficult to get a clear overview.

It is clear that we need another solution. It doesn’t seem like it’s possible to make everything clear in one drawing. Maybe we should split it up into several drawings.

PCB design

Unfortunately, Fritzing doesn’t have the support to do that in a good way. Before I switch to KiCad to show how to do it, I want to show what Fritzing does with PCB’s: the most important part. In the end, you want to be able to convert any good prototype into a PCB.

Image: The PCB of our project

After I open the PCB view and manually place everything in a convenient place on my board, I click on autoroute. I expect Fritzing to try to use as few layers as possible and make sure a working PCB comes out.

Unfortunately, only the latter turns out to be true. Fritzing knows how to successfully connect everything, but that’s all there is to it. It doesn’t matter if it doesn’t work, but don’t offer it then.

A better alternative

Let’s move on to a solution that will hopefully work better. We’re going to split our design into several parts, each of which will be explained separately. This will keep the whole thing clear to work with.

We’ll get on with KiCad. This is an open source EDA that actually does work well. (KiCad, if you are reading this: your SSL certificate is not set correctly)

Create your first schematics

Let’s start all over again. Let’s learn from what we did wrong with the design in Fritzing. There, we tried to map out the whole system at once, and we saw that it didn’t even work with these small applications. We start by bringing our parts all into our project.

Image: All of our parts in one schematics

For some reason, this is already looking better, even though we haven’t done anything yet. In my opinion, KiCad feels much more professional than Fritzing.

Please note that I replaced the HC-05 here with a more serious Bluetooth module. The HC-05 is very nice when you are experimenting, but you don’t want to use it in your final product. So, in the prototyping process, start working with the module you want to use, so that you know if it works with your application.

Let’s make some standard connections, and indicate the connections between the elements with labels. KiCad natively supports this and this makes working with these schematics much clearer.

Image: All of our parts with connections on one page

Now all our parts are on one page, together with the connections between all the parts. If we now want to expand or clarify parts, it can be done relatively easily. For example, we can add an LED to make it clear when the Bluetooth module is activated and we can make the current in the circuit clear. So I want this to work on a 12V battery and I want to give the motors 6V of that as well.

Image: Schematics with added information

This is still far from enough to make a good PCB, but it gives a good picture of the difference in readability between Fritzing and KiCad. This is still far from enough to make a good PCB, but it gives a good picture of the difference in readability between Fritzing and KiCad.

On making PCBs in KiCad, I’ll go into it later. I do hope that you have gotten a picture of designing in KiCad and I would strongly advise you to take a look at it. Once you’ve started, you’ll never want to go back to Fritzing.

How Fritzing is killing itself

It is logical that Open Source organizations also like to earn money. Free software does not mean that there is no money to be made with it. After all, these developers must also be able to feed their families.

Strange methods of making money from open source software have been seen before. For example, OpenCollective is a collective that tries to support open source. One way is to persuade users to advertise by means of a message in the terminal.

Image: ZDNet

This is an innocent way, of course. Funding had another approach. A developer named Feross Aboukhadijeh said that he had already spent 3,000 unpaid hours developing open source software and he wanted to see something in return. An understandable point of view.

To achieve this, he started with Funding, an experiment in which he placed advertisements in the terminals of the users of his software.

Image: William Hilton

Of course, this caused a lot of commotion in the open source software world. A developer even went so far as to build an adblocker for the terminal. The turmoil was of course exactly what he wanted. He raised an important issue: how can we support the developers of the open source software?

After a few days Feross thought it was enough and he stopped the project. You can read his explanation on his blog.

Donations are still the best accepted way to make money from open source software. Unfortunately, donations are not made just like that, which is why creative ways need to be devised. For example, you can use donations to obtain extra content, “buy someone a coffee”, etc.

Many companies try to encourage you to donate, either by clearly displaying the button or by initiatives such as those of OpenCollective. One of the companies that strongly encourages donations is Fritzing, but they do so very misleadingly.

If you click on “Download”, you will not receive the download file, but will be automatically redirected to Paypal. You could then cancel the payment via Paypal to be sent back to the page, but then the Fritzing download still doesn’t load.

If you dive into the code, you’ll soon find out why. Fritzing has deliberately made sure that users who pay in this confusion, will see a different page than other users. This is the code of this form:

As you can see, the parameters “return” and “cancel_return” have two different values. This nonsense from Fritzing makes it very difficult to download this software in a normal way.

As a result, there will undoubtedly be more people looking at the alternatives to Fritzing. As the alternatives are very good, the number of users will gradually decrease. Furthermore, this will clearly reduce sympathy for the developers, which will undoubtedly reduce the number of donations in the long term.

Are you annoyed about this behaviour, but do you need software to draw your schematics? Take a look at one of the more than 50 alternatives.

Why Arduinos are not suited for professional education

At our university, we teach students the basics of microcontrollers by working with Arduinos. These are extremely easy to use, and therefore offer a simple introduction to the use of microcontrollers. You can start setting up your project and writing code within minutes. This is why working with an Arduino gives you a lot of satisfaction.

However, this advantage has a number of major drawbacks.

The biggest disadvantage is that you don’t learn to work with individual parts. If you don’t work with product development, that’s okay. However, we do this in computer science and engineering, and that’s why it’s important that you learn that.

If we look at the datasheet of the Arduino Uno, we see how complex it works under the hood.

Image: The datasheet of the Arduino UNO. This can be found here.

If you have worked with the Arduino Uno before, then it is recommended to have a detailed look at this datasheet. (Although this one is actually a mess. It might be easier to look at this datasheet of the Arduino Due).

You can use the Arduino without knowing how an AD converter works, or without knowing how the SPI communication to the ADC works. One risk of this, is underestimating how difficult this can be.

When you finally start developing your own product, you’ll notice that it’s usually not that easy to connect these kinds of things yourself.

Image: This is a photo that I made during the debugging of the SPI communication with an AD converter. As you can see, the communication failed due to a wrong timing.

If you’ve only worked with an Arduino, this is a pretty complicated experience. However, this is the truth for all students who have only worked with Arduinos at university. When I started this project, I only had experience with Arduinos. For me this was much more instructive than anything I had ever done with an Arduino.

If you really want to be able to design products on this scale in the end, it’s better to ignore the Arduino and just start developing with real parts. Otherwise, you’ll have to learn to rebuild after your prototype. If you are just a hobbyist and want to develop small prototypes, I would definitely stay with Arduinos.