Archive for May, 2010
MANOI’s Antennas and Tidying Up
One of the annoying things about MANOI is that there are many things that can break very often. The antennas broke very often, mainly at the plug part, where the wires plug into the Arduino, and thankfully not the difficult part, the leads to the LEDs. The wires connecting the LEDs to the Arduino were way too long and throwing off the center of gravity for the balance. Also, the leads for the LEDs were uncovered. This is not aesthetically pleasing, and it is unsafe.
First step was to remove the wires currently attached to the LED (these were red white green black wires), cut the new wires (red orange yellow brown) to a shorter length. Solder on the new wires, and use green shrink wrap. The green is important, since this colour matches MANOI’s colour scheme

When all four are done:

The terminals were where a lot of breaks occurred, so these had to be improved. The previous way this was handled was that I soldered the wires to pins on a 3 pin male header, then placed hot glue around the solder joints. This time, I used shrink wrap instead of the glue.

It makes sure that it is nice and sturdy. People can actually touch it now, and it won’t break!

The ground bus was also very messy the first time around. This was now fixed, and cannot be seen since it will be within MANOI’s head unit.

After positioning and hot gluing, it looks great!

The new antennas really go with the colour theme

Here you can see that the wires are much tidier.



And voila! MANOI looks much happier now.

As for the rest of tidying up… I made a quick battery caddy out of a watch tin to keep my batteries organized into charged or needs to be charged!

On MANOI’s other hand with the hockey stick is this adapter that sort of extends the hand from the servo a bit. I figured I might as well add it to the other hand as well. I also fixed the bows with the jingle bells and reattached them to MANOI’s wrists- that’s what the velcro is for in the below picture

Fixed MANOI’s hockey stick plug in adapter wires:

The next improvement was to the power switch that powers the servos. The switch keeps on breaking, so I wanted to redo it. Since I was redoing it, I figured I might as well use one of the switches that lights up! Since there’s three prongs, and one of them is a Ground, I wanted to be overly careful and make sure I test it first…



The switch works, lights up, and doesn’t blow up!
It’s rated for 12V, and the battery is 11.1V. Hopefully there is enough wiggle room there. I’m pretty pleased with the way it looks and works in comparison to the broken switch.

That’s about all that has been accomplished this far. There’s still a lot more to do! On my workdesk now I have two ultrasonic sensors, a gyro and accelerometer, and many photoresistors (LDR). I want to somehow hook up the LDRs to MANOI and make a program where I can shine a light at them, and MANOI would move accordingly. Taking it a step further, I’d attach the light to a Wii Nunchuck where MANOI could number crunch and analyze the accelerations from the nunchuck to do something — maybe make a prediction about where the light will be going. It would sort of be like a game of Simon, only the “Simon” would be MANOI, and would be actively trying to outsmart you.
Arduino SSC32 Library

When you google “Arduino SSC32″ my tutorial on Nuvvo is the first to show up, I figured I might as well make a library for the Arduino to help the other users out there get started with their SSC32.
There are three main parts to using this library:
- Initial positions
- Frames
- Set the frame
The initial positions are going to be your home position of all of your servos. For a humanoid, this is usually a standing position that is balanced. Setting the initial positions looks like this (in general):
-
int HOME0 = 1800;
-
int HOME1 = 1500;
-
int HOME2 = 1050; // 1000 for normal, 1050 for gyro
-
int HOME3 = 1300;
-
int HOME4 = 800; // 1300 for hockey, 800 for normal
-
int HOME5 = 1600;
-
int HOME6 = 1900;
-
int HOME16 = 1550;
-
int HOME17 = 1250;
-
int HOME18 = 1000;
-
int HOME19 = 1600;
-
int HOME20 = 1600;
-
int HOME21 = 1500;
-
int HOME22 = 1250;
-
int HOME23 = 1000;
-
int HOME24 = 1580;
-
int HOME25 = 1600;
In animation, the still pictures that make up a movie are called frames. Moving a bunch of servos or a robot according to frames would make sense. Here is an example of a home frame:
-
int homeFrame[17] = {
-
HOME0,
-
HOME1,
-
HOME2,
-
HOME3,
-
HOME4,
-
HOME5,
-
HOME6,
-
HOME16,
-
HOME17,
-
HOME18,
-
HOME19,
-
HOME20,
-
HOME21,
-
HOME22,
-
HOME23,
-
HOME24,
-
HOME25
-
};
Initialize the SSC32 library by setting up the object like this:
-
SSC32 ssc(true);
The true/false parameter does not effect anything. It has to be there because, for some reason, the library doesn’t compile with no parameters.
In the setup() function, the servos have to be enabled. For MANOI, the arms are plugged in to ports 0-6, and the legs from 16-24 and the bad knee is on port 31.
-
for(int i=0; i<7; i++) {
-
ssc.servoMode(i, true);
-
}
-
-
for(int i=16; i<25; i++) {
-
ssc.servoMode(i, true);
-
}
-
-
ssc.servoMode(31, true);
The last step is pretty simple- just set the frame using this function:
-
setFrame(int theFrame[], int moveTime, int delayTime);
Example:
-
ssc.setFrame(homeFrame, 1000, 100);
Delay time is the amount of time you want to delay after the movement. Move time is how long the servos take to go from their current position to the positions in the frame.
Things that you must do in order for the library to work (mainly common sense):
- The frame references the position of the servos in sequential order. Meaning, it’s servo #0, #1, #2, #3 … #31. You can’t mix the order around, it won’t work.
- If the servo is in the frame, it has to be enabled.
If it is not enabled, then everything will be confused.
- Have the SSC32 connected to the Serial port. If you need it to be Serial1, then you can change it in the library’s cpp file (just do a find+replace) ^_^
The SSC32 library uses the Arduiniana Streaming library. Be sure to download and install it into your sketches/libraries/ folder!
Download the SSC32 library here!
There is an example included.
Let me know of any bugs that you find, or how anything can be optimized!
Boggled Blogged Bogg (with Photography!)

There’s been no recent blog posts because first there were projects to finish and exams to study for… then I was in a car accident… and now I have to restudy everything again.
In the meantime, here’s some of my recent photography to look at! =)







Have a great day! ^_^





