Microcontroller Programming

Microcontroller programming can seem a bit tricky because there are many confusing choices to make. I remember how I felt in the beginning. With all the available compilers, IDE’s, programmers and programming methods – no wonder you get confused!

So, let’s break it down.

Microcontroller Board ATmega32u4 from Sparkfun

I struggled a lot when I was learning the microcontroller basics. I followed different tutorials and ended up with lots of different software on my computer, which made it confusing. And I had to use an external board for programming the chip.

All of this made it hard to understand what I actually needed to make it work.

So to make microcontroller programming as simple as possible for you – here is an overview of what you need to do.

Microcontroller Basics

I loved learning about the microcontroller basics when I was studying. It meant I could start taking advantage of microcontrollers in my electronics projects. It kind of felt like with this knowledge, I was unstoppable. I could build ANYTHING!

And it is actually true. Microcontrollers are powerful components. They let you write programs to control your electronics. Combine this knowledge with how to build your own circuit boards, and you’re gonna make amazing things.

By using a microcontroller in your project you will have access to a vast amount of functionality from the tips of your (programming) fingers.

Microcontroller basics example board

Series and Parallel Circuits

In electronics, we can find both series and parallel circuits.

A series circuit is a circuit where the components are connected in a consecutive chain. This gives the current only one path to take.

A parallel circuit is a circuit where the components are connected parallel to each other. So the current will flow in several paths.

Series and parallel circuits

Often, real circuits have a mix of series and parallel circuits.

Thevenin’s Theorem – A Simple Explanation

Thevenin’s Theorem explains how to simplify a complex circuit. It states that any linear circuit with only voltage sources, current sources, and resistors can be simplified to a voltage source with a series resistor.

But what does this really mean?

Sometimes a picture says more than a thousand words, so here are two pictures to explain what Thevenin’s Theorem is about.

Timer Project with Gong

This is a timer project I recently made.

Timer project with gong

I am really into productivity techniques and I think using the Pomodoro technique is a nice way of working when you need to be productive.

You work hard for 25 minutes, then take a 5 minute break.

Also, I have found that the sound of a gong makes me really relaxed and focused. So I decided to build a timer project with a gong.

I wanted the gong to “gong” at the start to make me focus, then “gong” at the end to make me relax during the break.

Electronics Project: 1937 radio hacked into an iPhone dock

This is an electronics project of mine. It’s a 1937 Philips radio modified into a docking station.

The reason I did it was because I had this old Philips radio laying around. And I couldn’t use it because it only had an AM receiver. So, I thought it would be cool to make it into an iPhone dock =D

How I did it

The first thing I did was to remove old the old parts from it.

 

Arduino Shield Tutorial – Make Your Own Shield

In this Arduino shield tutorial, I will show you how to create a 4×4 LED matrix Arduino shield. You can make any shield you want using this method.

The Arduino shield tutorial circuit
The tutorial consists of three videos:

  • How to plan and create schematics
  • How to design a circuit board
  • How to get prototype circuits made
Arduino Uno - MakerFaire Rome Edition

The Simplest Amplifier Circuit Diagram

I have been looking for a good stereo amplifier circuit diagram for a long time. I am not a HiFi geek, I just wanted to build a simple stereo amplifier that could drive some speakers for my desktop computer.

stereo-amplifier-board-layout

All the schematic diagrams that I could find seemed to involve lots of hard-to-find components or you had to use it together with a pre-amplifier or some other amplifier stage. It was always something that made me hesitate.

But recently I found this awesome little chip called TEA2025! You only need a few capacitors to make a decent stereo amplifier out of it. It is so simple to build that I put it together on a stripboard in just a few hours.

Basic Electronic Components Used in Circuits

Some basic electronic components drawn as cartoons

I learned about the basic electronic components by going to the library and reading books.

I was just starting out.

And I felt like a lot of the books explained everything in a difficult way.

In this article, I will give you a simple overview, with an explanation of the basic electronic components – what they are and what they do.

Eagle Autorouter Tutorial

In this short and simple tutorial I am going to walk you through how to use the Eagle autorouter with net classes.

The net classes feature lets you select different widths for each net. This is useful if you for example want your power traces to be thicker than your signal traces.

In this example we’ll set up a new net class for our ground net. And we’ll set the default width for all the other nets.

Scroll down to the bottom if you prefer a video tutorial instead.

Recyclomat – the Rube Goldberg Recycling Machine

Here is a really cool and huuuge recycling machine we built for a music festival in 2010. It is an interactive recycling station. The idea was to make recycling fun.

When you put garbage in it, the machine detects it and moves the ball on the left side one step up. When the ball has made its way all the way to the top, it is released down a pinball-ish slope while a “Tivoli” kind of tune is playing with lots of blinking lights.

The machine was on display for the first time at Øyafestivalen 2010 in Oslo. It was a real hit! Lots of people came by and recycled their garbage to get the ball to the top. People even picked up trash from the ground to put in it =)

In the following video, you can see it in action at Øyafestivalen. Elias (from thing-printer.com) is pretending he doesn’t know what it is and asks one of the girls who work there how to use it.

Radar Circuit Examples

There are so many cool things you can make with mini radar circuits. I thought I’d share some examples from my time in the radar business. Then end with a few examples of where you can get a hold of a radar circuit.

Just to be clear: A radar is a sensor that uses electromagnetic waves for sensing. This is NOT ultra-sound. This is the real deal.

PCB of our D1 Radar Circuit (With antennas)

Electronic Components Online

Buying electronic components online is an easy way to get the components you need. There are many stores that sell electronic components and many can ship worldwide in just a few days.

If you are a beginner, it might be useful for you to read about the basic electronic components found in circuits.

Electronic components online

Anyone can Build Electronics

The BBC once talked about the maker movement and how building electronics is available for everyone now. And I wanted to follow-up on that, because that is really true. And that is something that I am really passionate about; getting more people to build electronics.

But first, I want to deal with the naysayers.