Arduino programming: Advanced Servos

For a while now I wanted to share what I learned in programming Arduino and AVR micro-controllers in general.  Most of the topics I want to discuss are above basics.  There are already plenty of basic tutorials online, so no need to reinvent bicycle.

However don’t be discouraged by “advanced” title. I will attempt to explain it in terms even a very beginner programmer can understand.

Let’s start with servos. I only started to play with servos about a month ago, and found how fun controlling them can be. But also challenging.

I won’t go into details about servo types, specs, uses, etc. but I do want to mention a few things about ways to control them.

There are essentially 3 ways to have full control of a servo.

You can do it directly with Arduino or similar AVR microprocessor using PWM pins or a Servo library that allows you to use even non-PWM pins.
An external PWM expansion board like Adafruit’s 16 channel servo controller
A dedicated “smart” 32 channel servo controller board (i.e. RTRobot)

In this topic I will talk about first option, however let me talk just a little bit about options 2 and 3.

An external PWM controller is just an extension of Arduino’s own PWM ports.  These are usually controlled via I2C bus and can be chained together to control a huge number of servos.  These are great but a little more difficult to control and will rely on your micro-controller’s CPU.

A dedicated servo controller board usually have it’s own microprocessor (ARM), in many cases more powerful than Arduino.  These are fantastic boards, that can store servo movement macros that can be initiated by Arduino serial commands. If you are building a robot like hexapod, you can pretty much program movement sequences into controller’s memory and offload your Arduino to do other tasks.  Some even come with PS2 wireless controller capabilities!

But if you only have a handful of servos to control, doing it directly from AVR is probably the best choice.

[…]

December 19th, 2016|How To, Programming Tutorials, tips|0 Comments

3D Printing with support

I have a Prusa i3 Rework 3D printer. Had it for a while, and still learning how to use it. Recently I learned about printing with “support”, so I wanted to share this information.

Almost any shape object can be 3d printed, however there are still plenty situation which will test limits of your printer. For example if you try to print something like this.

[…]

March 31st, 2015|How To, tips|0 Comments

New Project: Small Solar off-grid system

About this article.
In this blog post I’m attempting to distill weeks of online research and my own experience of building small off-grid solar system into short and sweet blocks of information. I’m not going to go into excruciating details about how technology works (i.e. AGM batteries vs. flooded).  Instead I will provide links to very useful articles. If you don’t care about how and why parts, feel free to skip summary paragraph where I provide all the components I got to do build the system.

[…]

October 30th, 2014|diy, tips|0 Comments