Motoruino and Motors – Workshop @ ALTLAB

Last Wednesday Artica lectured a Motoruino workshop at AltLab.
Beside all the participants there were more than a hundred watching a live stream on Ustream, people from Viseu, Guimarães, Porto, Évora, Madrid and many more places I believe.

The central theme was Motoruino and motors such as Servos, DC motors, Steppers and Linear actuators.

In the end we had Farrusco working in Obstacle Avoidance and Following Light mode.

Video streaming by Ustream

ICU . 1.01

ICU has been sleeping for a while but was awaken suddenly because I was invited to an exhibition at Flausina, a new born association in Lisbon.

ICU v1.01

Complexity is always a welcome thing around here and the bot was presented with two more servo motors and all the software has been re-written. And because I needed to simulate its movements I coded an application in Processing in a way that I could test all the non-dangerous angles. Inverse kinematics is way to advanced for my taste and I think I can call this a “forward kinematics simulator”. This simulator gives also the possibility to generate individual sine waves for each motor, minimum and maximum range of motion, an interpolator for smoothness and frequency for speed.

ICU v1.01

Unfortunately I don’t have any decent video of photos of the Flausina exhibition, I leave you with a video of the bot in the office with the processing application.

TODO list:

– capability to save presets
– timeline with keyframes, play and stop buttons
– upgrade this servos to more powerful and digital servos
– upgrade all the structure to enhance weight distribution
– create a mask in silicon/rubber and give this bot a crazy new look
– everytime a face is detected it will say something on Twitter and upload the picture in an online gallery

Source code can be downloaded here.

All for now.. Roger, over and out.

ICU v1.01

Photo at Flausina.

Driving Farrusco @ CoworkLX @ LX Factory ‘open day’

Since the first SWARS experience, I knew this could go A LOT further, but having Farrusco on a remote terrace where you could only have access by climbing an outside ladder.. I must confess, I never thought of such a thing, until… my friend Fernando Mendes (Cowork_LX) came to me with this crazy idea!

Driving Farrusco

I loved the challenge, and wanted since the first moment to create a cool and easy to use physical interface and it came out a nice piece IMHO.

Driving Farrusco

Then Farrusco with the wireless cam already built in for the first “Driving Farrusco” experience, I used two packs of batteries to enhance the play time (one battery pack is missing in the photo). This small wireless camera needs a lot of juice, and a little 9v batteries doesn’t feed it for to long, besides that it gives a very weak transmission with lots of interference, but with this 9.6v racing pack, it worked out really good!

Driving Farrusco

And finally the video:

Some bits around the controller:

At the beginning I wanted to have four joysticks, one for each motor, one for pan and the other for tilt the camera.

Driving Farrusco

Driving Farrusco

Driving Farrusco

Driving Farrusco\

Driving Farrusco

It ended a bit complicated to operate and a learning curve was needed to get used to it, because this was going to manipulated by many people it needed to be simple and fast to learn.

Driving Farrusco

[ FOTO MISSING showing the end result with two joysticks, a motoruino only with the necessary components and the xbee mount ]

Driving Farrusco

Driving Farrusco

F4WD + ball link

Four wheel drive vehicles have always excited my imagination, and this time I joined two Farrusco’s chassis in front to front as you can see in the picture below:


This way both chassis are fixed on each other (is this correct to say in english??) and I thought it would be cool to have them articulated in some way, so I started to design a ball link and this is the first output (oh, did I mention I have a 3D printer in the office? :D



It still need a bit of work because the link needs some kind of lock to prevent the vehicle to bend itself and touch the ground (gosh!! what a crappy english!!)



I used OpenSCAD to design the piece, it is a great tool to use because everything is made with simple commands and you can design pretty much everything!! You can download the OpenSCAD files in Thingiverse.

Screen shot 2011-05-05 at 11.07.32 PM

Screen shot 2011-05-05 at 11.05.23 PM

In the next chapter, the redesign!


BOTtle is a robot like many others but with a particularity, the wheels are made of plastic bottles as you can see in this video:

The components I will be using:

The servos are already attached to one another with double side-tape, I will show you how to attach the wheels to the servo horns

Start by adding wood self-tapping screws to the servo horn just a little in a way they won’t fall

Repeat this process 4 times

Open small holes in the exact place where the screws will be tight. I used a soldering iron.

Tight both screws to the wheels

Now I am placing the bumpers on the front of the bot on a PVC sheet (in this post you can see what I have done for a Sharp sensor)

And now the caster wheel, those screws tips are going to be cutted out

The screw tips are gone and added a bit of super glue because the PVC melted when cutting the screws

To attach the pvc base to the servos I am using double side rubber tape

And this is what I have done so far, more will be added soon (I hope)


Max + Arduino + Industrial Motor

At Artica, we had a request to link MAXMSP to an industrial motor for an artistic installation witch we will speak about at another time.

This motor is a true beast, and since we have never worked with such a thing we decided to ask for help to our electronics guru David Palma.



The motor controller:

David developed an electronic circuit to simulate a PWM analog output from 0 to 10v (originally it gives 0 to 5v), and another circuit to switch motors direction, both circuits were assembled on a shield and connected to the motor controller.

The first circuit is a transducer:


And this is the switch circuit that tell to the motor controller wich direction the motor will spin:


Then he builded an Arduino shield:


And the final part was the Max patch that send the direction states and the PWM values to the Arduino:


And this is the result:


And last but not the least all the source codes can be downloaded here

Arduino HackDay @ altlab

No último sábado, 5 de Fevereiro, o altlab organizou o Arduino Hack Day.
Participaram no evento perto de 40 pessoas, entre entusiastas em electrónica, artistas, programadores, arquitectos, fotógrafos, amigos.

Para muitos, foi o primeiro contacto com o Arduino, a descoberta da simplicidade desta plataforma para o desenvolvimento de projectos de computação física.
Distribuídos por quatro bancadas, os participantes começaram a experimentar assim que chegaram!

Arduino Hack Day Arduino Hack Day

Uma das bancadas, dedicada ao tema Arduino, motores e a robótica, ficou por conta do Guilherme Martins (Guibot). Noutra bancada, alguns principiantes aprendiam a dar os primeiros passos, com a ajuda de membros do altlab.

Arduino Hack Day Arduino Hack Day

Enquanto isso, a impressora 3D (“makerbot”) trazida pelo nosso convidado neozelandês, Tiago, ia imprimindo as primeiras peças.

Arduino Hack Day Arduino Hack Day

O Pedro Ângelo, do LCDLab, veio do Porto para nos ajudar e ressuscitou um projecto antigo do Maurício, que depois de pronto gerou alguma diversão…

Arduino Hack Day

Arduino Hack Day – FIRE! from altlab Lisbon's Hackerspace on Vimeo.

Logo depois do almoço começaram as apresentações. A Mónica Mendes e o Maurício deram a conhecer o colectivo altlab, o seu passado, presente e futuro. A Cheng Xu, também nossa convidada, apresentou-nos o Seeeduino Film. Por fim, o Guibot e o André, da Artica, falaram do Motoruino e do Farrusco.

Arduino Hack Day Arduino Hack Day

Passadas 10 horas de puro hacking e muita cerveja, o Arduino Hack Day chegava ao fim, todos os participantes muito satisfeitos com a experiência. O altlab conseguiu concretizar o principal objectivo desta iniciativa: juntar pessoas interessadas em partilhar conhecimentos sobre o Arduino, ajudar quem nunca tinha desenvolvido nada com a plataforma e conquistar novos interessados em pertencer a este colectivo fantástico!

ArduinoHackDay @altlab from Rita Carvalho on Vimeo.

Por último, fica aqui um agradecimento muito especial aos membros do altlab que contribuíram na organização deste evento:

Andre Almeida, Ferdi Meier, Guilherme Martins, Leonardo Marques, Manuel Alves, Mauricio Martins, Mónica Mendes, Nuno João, Paulo Rodrigues e Pedro Ângelo (LCD).

Some photos by João Nogueira e Rita Carvalho.

Flickr Photo Set:

English version soon!

Post original aqui

RGB Mixer – Processing to Arduino

It has been a long time since I wanted to control the arduino with processing and I tried a lot of libraries, and a lot of processes and I always felt that none of those were suited for what I needed. I needed something simple to implement and easy to understand, and because I am not a programmer, I asked for help and @pauloricca replied to me with a quick, fast and really good solution.

In this example I have connected an RGB LED to the Arduino and on Processing we will have a simple mixer to fade in and out color channels. DON’T DO THIS, LED’s always need to have one resistor in series before. In this case I just wanted to show the serial communication part, and I skipped the resistor part, lazy me! Never do this, otherwise you will kill your leds very fast.

RGB Mixer - Processing to Arduino

On the Arduino side, I defined 3 digital output pins 9, 10, 11, these are PWM capable pins. Than I defined pin 8 as an OUTPUT, and digitallyWrite it to LOW, to be the GROUND pin. On the loop() function we used a switch() function that detects when the sync characters ’R’, ‘G’ and ‘B’ are received. These characters will tell us what value is coming next. The function GetFromSerial() is called everytime we need to read a value from the serial port.

void setup()
  // declare the serial comm at 9600 baud rate

  // output pins
  pinMode(9, OUTPUT); // red
  pinMode(10, OUTPUT); // green
  pinMode(11, OUTPUT); // blue

  // another output pin o be used as GROUND 
  pinMode(8, OUTPUT); // ground
  digitalWrite(8, LOW);

void loop()
  // call the returned value from GetFromSerial() function
  case 'R':
    analogWrite(9, GetFromSerial());
  case 'G':
    analogWrite(11, GetFromSerial());
  case 'B':
    analogWrite(10, GetFromSerial());


// read the serial port
int GetFromSerial()
  while (Serial.available()<=0) {

On the Processing side, I am using a slider class adapted from, and I created 3 instances of this class (I assume you understand the concept of class). The important thing to understand here is the import of the Serial library, and the creation of a Serial object called “port”. On the setup() function I print out the available serial ports and than I defined which one is the Arduino port, on my case is the number 0, note that I am using mac, if you are using PC it should be COM1, COM2 or another COM#. Finally I am passing the values of the slider after I pass the sync character ‘R’, ‘G’, ‘B’.

RGB Mixer - Processing to Arduino

import processing.serial.*;
Serial port;

sliderV sV1, sV2, sV3;

color cor;

void setup() {
  size(500, 500);

  println("Available serial ports:");

  // check on the output monitor wich port is available on your machine
  port = new Serial(this, Serial.list()[0], 9600);

  // create 3 instances of the sliderV class
  sV1 = new sliderV(100, 100, 90, 255, #FF0000);
  sV2 = new sliderV(200, 100, 90, 255, #03FF00);
  sV3 = new sliderV(300, 100, 90, 255, #009BFF);

void draw() {


  // send sync character
  // send the desired value

Slider Class -
based on slider class
class sliderV {
  int x, y, w, h, p;
  color cor;
  boolean slide;

  sliderV (int _x, int _y, int _w, int _h, color _cor) {
    x = _x;
    y = _y;
    w = _w;
    h = _h;
    p = 90;
    cor = _cor;
    slide = true;

  void render() {
    rect(x-1, y-4, w, h+10);
    rect(x, h-p+y-5, w-2, 13);
    text(p, x+2, h-p+y+6);

    if (slide==true && mousePressed==true && mouseX<x+w && mouseX>x){
     if ((mouseY<=y+h+150) && (mouseY>=y-150)) {
        p = h-(mouseY-y);
        if (p<0) {
        else if (p>h) {

RGB Mixer - Processing to Arduino

RGB Mixer - Processing to Arduino

RGB Mixer - Processing to Arduino

ICU . I See You

ICU is a sub-project of the SWARS (see what a robot sees) project.

This time I not just wanted to see what a robot sees, but I also wanted to give the robot the ability to understand that there is a person in the room, and stare at the person.

To detect faces I used the OPENCV library for Processing, wich turns out to be very fun to work with and is very sensitive to human faces.. and sometimes it detect faces where there aren’t any.. maybe it is a ghost face detector algorythm!!

I didn’t have time to work with the four motors, I am only working with the two servo motors on the top. Next step will be to apply inverse kinematics and have a better level of interactivity.

Unfortunately I had to pick the computer that was being used in this installation, I will need it in the next weeks, but this bot will be available to the public very soon I promise!!

This is the code I am using if someone wants to look at it, you will need to have the MegaServo library installed for the Arduino sketch, and the OPENCV lib for the Processing sketch.

3 new paperduinos

This time “txapuzas” presented us with 3 new derivations of the Paperduino, one on a perfboard, other on a pcb, and another on a stripboard pcb. I totally love them all, specially the pcb version ready to be etched.

All versions are very well documented and I totally want to try them all.

Paperduino on a perfurated board:

Paperduino on a stripboard pcb:

And finally on an etched pcb (my favourite):