Sunday, July 27, 2014

LCD Display and Tail Rig Installed

Its been a while since I updated. This is because progress is slow. I work on new hardware when I can. There have been significant improvements and I will summarize some of them with some progress pictures.

First off, my family has added a new real living dog to the crew. His name is Appa after the sky bison from Avatar: The Last Airbender. Here is a picture...


He is into everything and he is not sure what to make of K9. At least he has not decided to chew on him yet. Now back to what progress I have made.

In my last entry I had started working on the tail servo rig. This is now completed and I have a wagging tail that can be controlled through the web interface. Here is a video of the installed tail rig in operation.


video

The web interface is coming along nicely too. K9 runs a python based web server (Flask) and exposes all of his functions for debugging and testing through it. This has been invaluable as a testing tool, allowing me to debug the tail motor and dorsal lcd display. Here are a few shots of the web interface which is a work in progress, of course.




Moving on, I have finally gotten around to installing the LCD composite monitor on the left side of the shell. This is very handy because I can actually watch the boot-up process and know what is happening when things go wrong.


I still have the trim and an acrylic cover for this display on order which really needs to be installed so it will not look so obviously like a car dvd player. It still comes in really handy. Here is a video which shows off the display and the ability to play sounds from the web interface.

video

So everyone asks me, "That's great but when are you going to build the head?" Well its all about parts and time. I have the wood cut for the head but I don't want to assemble it until I at least get the printer that I am going to install in it delivered. I want to make sure I leave enough room inside the head to mount the printer. The head will have multiple servos inside it to control the ears, telescoping antenna and nose gun and will have to be constructed around these systems. Still, its next on the list and I need to get started on it.

I always like to post other K9 builds I come across. Here is one that I came across at Philadelphia Comicon this year (2014). I don't think it ever moved on its own and it obviously has been around (just look at the scratches and dents) but it is always interesting to see what other people have done.


Its a good reminder of how far I still have to go on this project to complete the hardware. After that, hopefully I will have even more work ahead of me writing software to allow it some autonomy from its own remote control. That's it for now, I will try to post some more design details and pictures as I start construction of the head.



Sunday, June 1, 2014

A Dog's Tail - Pitch and Yaw on the Cheap

I don't have the parts or tools to build rigs out of aluminum or steel but I need to figure out how a set of servos can control K9's tail. Wood and plastic will have to do for now until those parts break or wear out. The tail essentially is a pole that must be able to move horizontally and vertically by motor control. Here is a shot of the actual tail on the prop itself.


Fortunately, there are a few good examples already out there on how to build this motion rig. For example, here is one using only DC motors. Here is another example using Servo motors which is very impressive. This rig is built with multiple aluminum C-brackets and struts which looks very sturdy but I have no idea where to get the parts. So far I have built a test rig consisting of two RC aircraft 180 degree servo motors connected together, one to shaft of the other as seen in this example I found for sale.

Incidentally, if you are looking for the rubber fixture I am going to use, its a CV-Boot from a car. They can be found in almost any auto supply store. Here is a picture of the one I chose.


It is a close enough match to get the job done. I will end up cutting away the lower half when I mount it to the body. Now back to the test rig. Below is a video of the test rig I built just to see if my two server idea would work. The two servos are joined together with rubber bands so you will see a lot of oscillation as the arm moves around and a hanger is standing in for the antenna but other than that, it is performing the required motions.

video

Once I replace the rubber bands with firmer connections, all shaking will go away and I will have the wagging motions I need without having to construct a more complex rig. How long it will last in action will be another matter. Everything is being driven from an Arduino that is not connected to the main robot. This is just for testing purposes.  The next step will be to move everything to a permanent rig that I can attach to the CV-Boot inside the main shell. I will post pictures of that when that is completed.

Wednesday, May 7, 2014

A Dog Without A Head - K9 Assembly Testing

So this is another quick blog entry. Last night I did a test assembly of the main body, the dorsal control panel and the drive base. I just wanted to see how (and if) the parts fit together. This video features the new right side door which I will talk about more below.




For the longest time, I never bothered to manufacture a right, side door. This is where the classic K9 logo will go when the body is finished but up until now it was just a big access hole. The door needed to be custom fitted because even though it is draw out in the BBC plans, the body itself has a unique shape because it is built out of wood and glue as opposed to metal which would be far more rigid. I started with a cardboard test cut out which I roughly cut to fit and made adjustments on that. Then I duplicated this in particle board and spent quite a while sanding the edges until it just fit the hole.

It is interesting to point out that the lower portion of this door is angled down about 6 degrees to conform with the way the body itself is angled. Rather than cut and join two pieces of wood, I routed a horizontal line through the particle board along where the angle change occurs just thick enough to make the wood bendable. I then bent it into shape and filled the routed channel with plastic wood.


This turned out to work really well. The resulting door was a perfect fit and once it was sanded and sealed, looked like a natural bend in a single piece of metal.


This door will be held in place with four magnetic cabinet door catches so it will be secure but come off easily. You are also looking at the primed finish, not the final finish which I am waiting to apply until the entire body is complete. I will probably go with the dark blue metallic finish of the K9 Mk III as shown here when done.



Tuesday, May 6, 2014

Raspberry Hal

I wanted to keep a Raspberry PI running at my desk at work full time here at PTC but I wanted to have it out of the way. It would be available if I needed a system that remained at work while I was away with my laptop. I also wanted it as a test platform for some work I have just started doing on the ThingWorxs  platform and the "Internet of Things". Now you know me, I like to build electronics into science fiction replicas so I thought, why not build a Raspberry PI case into the polyurethane Hal replica I have hanging on my cube wall. Here is a shot of him from the day I put an Apple sticker on him before any modifications.

Unfortunately, he was made almost entirely out of solid, cast polyurethane. I tried to hollow him out with a Dremel tool but it was going to take a long time and be very messy because of the excessive dust it was generating. Because of this, I decided to recreate a hollow version of him in wood. I already had some experience creating control panels out of wood for my K9 project so I knew I could do a pretty convincing job. I had already installed a battery to light his eye and a light sensor on the polyurethane prop to turn the eye light off when the office was dark to conserve on battery power. I could reuse these in the new Hal.

For those of you who don't know much about Hal, he was the shipboard computer on the spacecraft Discovery One that tried to murder his entire crew when he felt they would interfere with his carrying out his mission in the movie 2001, A Space Odyssey. Here is a clip of him in action.


I wanted my new Hal to hold a Raspberry PI, some environmental sensors, an amplifier and his own speakers, all powered off of a single cell phone wall charger. He would be capable of playing appropriate Hal clips from the movie as well as responding to simple spoken commands. He should also serve as a Thingworx test platform for reporting metrics based off of the sensors I planed to install.

Here is a sentimental moment with Hal on my workbench saying his first words.

video

It was kind of creepy to hear him speak for the first time.

Here is the completed project now hanging on my cube wall. The prop has now been entirely rebuilt out of wood. He is fastened to the wall cloth with two pins that come out of the back of the unit at a 45 degree angle like a picture frame nail. This allows him to be easily removed for service.


One thing I did not expect was that when he is mounted flush to the wall, his temperature rises until he goes into thermal shutdown. It turns out that the PI generates so much heat that adequate ventilation is required. If there is no way for this heat to escape, the inside of the case can reach temperatures in excess of 50 degrees Celsius (122 degrees fahrenheit)! I had to bring him home and install four small legs that make him stand 1/4" back from the wall to allow for proper convection cooling. Now he stays at a cool 44 degrees C (111 degrees F).

Here is a shot of the back and side of the case with callouts for the parts inside. The only sensor I have installed so far was the original light sensor I took from the original polyurethane model I started with. I am adding a sound card (for speech recognition), external temperature sensor and an infra-red proximity sensor next. I will also replace the wire wrapping (the thin red wire nest) with a real cable.



I am planning on publishing the details of how to re-produce this project on Instructables soon along with the software running on the PI.


Tuesday, April 22, 2014

K9's Outer Shell - Building with Wood

Just ask my old shop teacher, I was never really gifted in the wood working department. Wood is the only material I am really at all familiar with, however, so that is what I will use to construct cosmetic parts for this robot. As I move forward with this project I am learning about other materials such as Vinyl, Aluminum and Acrylic but I basically have to stick with materials I can work with at home - so wood it is.

I mentioned in a previous blog entry that by first attempt a building the dorsal control panel was too small and I would have to build a new one. That gave me an opportunity to document the very an example of rudimentary techniques I used to construct the outer shell as I build this much smaller piece.

The first step usually is a cardboard model. In this case I was pretty sure what I wanted so I skipped this. Next step is drawing out the pieces onto a piece of wood. In this case, I am using very thin wood at only 1/8 of an inch. Here are the parts drawn into the wood.


You can see off to the right, the paper templates I printed out to transfer the lines onto the wood. Since this wood is only 1/8" thick, I then start to score the lines with an X-acto knife and then move to a box cutter. It helps to coat both side of the surface with clear packing tape before you do this to prevent the wood from splintering. Soon the wood will be cut through and you can remove the packing tape. If I were using 1/4 wood or particle board as I used in the frame I have show in past blogs, I would have to use a scroll saw or a bayonet saw to do the same thing. I then bored out the button holes by again covering the wood in clear packing tape and then using a 3/4" spade drill bit.

Next, thanks to the miracle that is Heavy Duty Liquid Nails I assembled and clamped the parts together. This piece has a curved section that will have to be clamped in place while the liquid nails drys.


Don't put on liquid nails to heavily as this severely increases the time required for it to dry. A light coat between the pieces will hold this thing together if you give it at least 24 hours to dry and set. I originally did not know how I was going to do the wood assembly this project would require but this stuff really holds things together.

After 24 hours has passed, I removed the clamps and Dremeled down the rough edges. Then I filled all the holes and remaining imperfections with Plastic Wood and sanded everything down smooth. Now it looks something like this.


Next, I had to cover up the wood grain. This is done by priming the wood and the standing down the primer coat until it fills the the wood grain.

Here is the near finished product. You can still see some wood grain but I am leaving it at this stage and moving on. I will do a final sanding and priming right before I do the final paint job once the entire body is finished.

I am going to postpone the final coat because until everything is finished, I am not sure what additional modifications I may need to do to the body before it is complete and I don't want to worry about marring the finish while work continues.

Here is the near finished product, sitting in the main body shell (Which, unfortunately, has some plastic wood filler on it at the moment) on the left compared to an actual shot of the detailed (hero) prop on the right. This time I have the correct scale.





Next, hooking the lights and switches back into the Arduino.

Friday, April 18, 2014

K9 Detects an Obstacle and Talks About It

This is very pre-mature but I have been working on generating events for the Raspberry PI which come from the Arduino as I have mentioned previously. Tonight was the first time I used one of these events. I have hooked up a temporary speaker and amplifier to the PI to allow it to play sounds. When the platform detects an obstacle using the Ping))) ultrasonic range finder, it stops the forward motor and sends an event to the PI. It responds by playing a sound. I thought the video was worth sharing.

video


The source for this interaction is available on my GitHub project but it has a long way to go.

Sunday, April 13, 2014

K9 Drive Base Demonstration

Things are progressing pretty well on the drive base. I have it configured to accept commands from both the on board Raspberry PI and an RC remote control. The remote control takes priority over any PI issued commands. This is useful if it should decide to do anything unexpected. When I first started testing it, I would put it up on blocks in case it decided to run away. Now I can flit the B switch on the remote control to stop it dead if this happens. Below is a picture of the current drive base with call outs that show what each component is.



It still looks like a bit of a rat's nest of wires but it is now capable of moving on its own and I can ssh over to the PI and give it commands like move forward or rotate around. Below is a video of my first tests. Excuse my weak voice, I have a bit of a cold.


As you can see it moves pretty fast. I have gone out of my way to restrict how fast it can go because when it is not carrying it external shell, it is far lighter than it will be when it is done. I already had one accident when my son was testing it out and he drove it hard into his own ankle and managed to hurt himself.

If you listen carefully you can also hear a high pitch noise whenever it moves. This is probably because the pulse width modulation frequency is too low and the motor itself is resonating in response to it. I will have to investigate changing that frequency to one outside the range of human hearing. Maybe, when I am done it will just annoy dogs.

Below is a head on shot. Here you can see the Parallax Ping))) sensor mounted on the front.


The speaker and microphone pair kind of look like eyes. If you look to the left you can see the RC receiver antenna which is being held on with a cable tie that looks a little like a sweat band. The ping sensor uses sound based radar to report obstacles up to 10 feet in front of it. These measurements are then passed on to the PI for further decision making.

At one point, I put the shell on and then got worried when the base refused to move forward. It would only go backward. Then I realized that when I had covered the Ping sensor, it was reporting that the shell was an obstruction in front of it and refused to move forward until the shell was removed.

Below is a shot of the two Razor scooters mounted to the bottom of the drive base. 



These scooter motors and rear wheels have been sawed off from the rest of the scooter. All that remains is the back 8 inches of the scooter. The rest was discarded. The frames are held to the mounting board with a U-bolt around the inner sides of the axels and three machine bolts that fit into the pre-drilled holes on the top of the frame and are very securely attached. There are also two wheels that spin freely and prevent the platform from tipping over.

You can also see that they are mounted in opposite directions. This is because the steel frames rapidly become wider than the base itself. If mounted in the same direction, they would be two wide to fit inside the shell. Having them face in opposite directions is not a problem because the DC motors can be rotated in either direction. If you look at the wiring diagram present in one of my previous posts, you will see that the left and right motors have their terminals reversed so as far as the controllers are concerned, they both move forward and backwards in unison.