Ambilamp video!

Yeah, baby, here we go...

More info in ambilamp page.

Ambilamp from Quercus on Vimeo.

Some more Ambilamp pictures

Here we go with a couple of new pictures of the ambilamp project. First one is the box where the arduino resides. It's just a simple box that you can buy in any electronics shop.

I added a switch for being able to turn off the lamp without unplugging it from the mains. Note that every project must use at least a piece of duct tape to be considered a real hardware hacking project :-)

And the second is the same box, opened :-)

You can see the mini-shield that I made to set the transistor bridge and solder the wires that go to the lamp. And the conector I used to connect the switch to the arduino board (you won't be able to do it this way if you are using the newer arduino duemilanuove, as it doesn't have anymore the jumper to switch the power supply):

Ambilamp code v0.1 released

Here we go, it is not probably very useful without the schematics if you plan to build your own ambilamp, but in the meantime you can have a look and start thinking how to improve this :-)

This is the v0.1, it is a simple ambilamp very similar to the hundreds that are all around the internet. It is in fact an adaptated code, with some improvements that I like.

Whatever... Show me the code!

Ambient lamp first pictures

I might be somehow offline, but I'm not off at all :-)

I've been working, among other things, in an arduino controlled ambient lamp. That is, a lamp that changes its color. Cool, isn't it?

What's different between my lamp and the hundreds of ambilamps that are round the internet? Well, not much, at least not right now, but stay tuned... ;-)

Here you have a couple of pictures of the lamp, soon I'll upload some code, schematics, more pictures and hopefully a video :-)

A nice blue:

And the four RGB leds that do the magic stuff :-)

Camera and flash trigger module

Here we go again, here is a picture of the camera and flash trigger module I made for my arduino photographic projects:

It includes three 4N26 optocouplers. One (first one from the left side) to trigger a flash, as I did in the arduino controlled flash trigger project; and two more for triggering my Canon EOS 40D camera.

The trigger mechanism is quite simple in modern EOS cameras, they simply have three pins in the trigger plug, short-circuit one (the common one) with one of the others and the camera will focus, short-circuit the common with the other pin and the camera will take a picture.

My camera has a propietary plug, called N3, so I had to "canibalize" a remote camera trigger I bought somewhere in eBay to take the wire and the plug apart. This is the safest way to check which wire is each one, but you can get the wiring diagram in lots of sites around the Internet. Or you can check the site of Glacial Wanderer, that also this this hack.

This trigger thing can easily be accomplished with other models of Canon cameras (at least with the 350D and sisters, as they use a simple stereo mini-jack plug, easier to get) and may be with other brands too. I made myself a custom remote trigger for my old 350D, even before I knew about arduino :-)

Here is the schematic to control this module:

Flash trigger update

Hi there, I've uploaded the code of the flash trigger project and the schematic (made with gEDA, by the way), in case you feel like making it for yourself (don't forget commenting back if you do so).

Hope it's useful.

Next I'll try to improve the connections to the laser and to the flash, as they are too much in prototype status, and the whole system needs to be robust if I pretend to use it in real life situations... And I do ;-)

Happy hacking again!

Anybody out there?

I guess no. Anyway. I'm back again :-)

The robotic arm project is not dead, I simply changed the design to give it more useful movements, and now I have to find out a way to attach the servos so the joints are strong enough to allow doing some nearly-serious calculations...

Meanwhile, I've been busy, and the next project that sees the light around here is a flash trigger that, hopefully, will allow me taking high-speed photographs without having a high-speed camera :-)

You can get all the details here. Hey! I even have a video of it!!

Robotic arm first pictures!

Yeah baby! The servos finally arrived, so I worked out the first prototype of the robotic arm, that you can see in the following pictures:

As you can see it features three servos (they are quite small and do work reasonably well) that are joined together with small tubes made of aluminium and carbon fiber (they are, in fact, pieces of broken arrows). I thought about using icecream sticks or something like that, but found those little tubes that do the job and look cool :-)

This prototype has a lot (not really a lot but some) duct tape, but all great prototypes use it. I plan replacing it later, but for now it just works.

In the picture above you can see how the servos are placed: Servos 1 and 2 make the shoulder, with servo 1 pointing backwards and servo 2 pointing to the outside of the "body". They allow the arm to be turned up and out. Meanwhile, servo 3 is the elbow, and do what elbows do.

Servo 1 moves all the weight of the arm, so it should be the first one being replaced as the arm grows and takes heavier loads (or any load at all).

In the top view you get the idea of how it is all arranged. You can see that I have used two tubes for the upper section of the arm, while only one for the lower section, only one tube between servos 1 and 2, that I will eventualy cut shorter:

And yes... It moves!! I even wrote a simple program to send commands through the usb port of the computer, and a not so simple program to make all this using a graphical interface...

More to come, stay tuned!

RA Code: Moving servos with potentiometers

Today we are going to move our three servos (yes, they finally arrived!) using three 10K ohm potentiometers.

Reading the voltage in each potentiometer, using analog inputs, we will change the duty cycle of each servo, changing how much time is the PWM in high level and how much in low level. (If you don't know what I am talking about, have a look here).

First of all, set up this circuit in the prototyping board: (click on the image to see a larger version)

Now, read the code below, understand what will happen when it runs in the Arduino, tune it as you like, and transfer it to the board.

Important note: The values for minPulse, maxPulse and refreshTime will be servo dependant, you should find suitable values for your gear.

byte numServos=3; // Number of servos to use
int minPulse[3] = {400, 400, 400}; // Pulse for minimum servo position (microseconds)
int maxPulse[3] = {2050, 2050, 2050}; // Pulse for maximum servo position (microseconds)
byte refreshTime[3] = {20, 20, 20}; // Time needed in between pulses (milliseconds)
byte servoPin[3] = {9, 10, 11}; // Pins where servos are
int analogValue[3] = {0, 0, 0}; // To store potentiometers values
int pulse[3]={0, 0, 0}; // Pulse to be sent to servos
long lastPulse[3] = {0,0,0}; // Time in milliseconds when the last pulse started
byte analogPin[3] = {0, 1, 2}; // Pins where potentiometers are

void setup() {
  byte i=0;
  for(i=0;i<numServos;i++)
  {
    pinMode(servoPin[i], OUTPUT);  // Set servo pin as an output pin
  }
  Serial.begin(9600);
}

void loop() {
  int i=0;
  for(i=0;i<numServos;i++)
  {
    // Read potentiometers values
    analogValue[i] = analogRead(analogPin[i]);
pulse[i]=map(analogValue[i],0,1023,minPulse[i],maxPulse[i]);
    // And send control signal to servos
    if (millis() - lastPulse[i] >= refreshTime[i]) 
    {
      digitalWrite(servoPin[i], HIGH);   // Turn the motor on
      delayMicroseconds(pulse[i]);       // Length of the pulse sets the motor position
      digitalWrite(servoPin[i], LOW);    // Turn the motor off
      lastPulse[i] = millis();           // save the time of the last pulse
    }
  }
  // Send feedback through serial port
  for(i=0;i<numServos;i++)
  {
    Serial.print(" Servo ");
    Serial.print(i);
    Serial.print(" pulse: ");
    Serial.print(pulse[i]);
  }
  Serial.println("");
}

Now, when this runs in the Arduino, you should have three servos, that move each one as you change the corresponding potentiometer value. We will use this to try out our robotic arm, to see the maximum and minimum values of pulse that make each servo reach the lower and upper limits that we want our arm to reach, that will strongly depend of the mechanical design of the arm.

But we'll go deeper into that later, now just play for a while and start thinking what will you use as "bones", how will you join the servos to make all this look like an arm.

I already have my arm, so I'll post some pictures round here soon :-)

RA Part list: Wires and prototyping board.

While we wait for the servos to arrive from Hong Kong, we can do some soldering work and set up some wires for connecting the servos to the Arduino board, using a prototyping board as a bridge for all the connections:

As you can see in next picture I built a connector with three pins together on a side (where the servo will be attached) and three separated ones on the other side, that will go to the protoboard:

We'll need one of those for each servo. The red wire is for power in (5V DC), the black one is ground and the yellow one is for the control signal. Be careful and check that the servos you are going to use have this wiring, and in other case change as necessary your home-made connector, to avoid plugging 5V into the control wire of the servo.

Syndicate content