Meet Frank 1.5

I’m happy to present a new video showing off some changes to Frank, my Arduino robot:

Here are the changes to him since the first video:

  • The LED is almost never off. The songs may do its own thing with it, but it transitions between red, green, and blue as he roams about.
  • A couple of switches were added so I didn’t have to plug wires into the breadboard to power things on. Unfortunately, I only have two switches so I couldn’t add one for power to the Arduino board.
  • More tape everywhere to keep things on him better.
  • He can now sing the Canadian national anthem. I thought that made sense since he now wears a Canada flag pin.
  • I replaced a lot of the prototyping breadboard wires with my own hand-cut wires. It reduces the amount of extra wire piled up on him.
  • The biggest improvement is that Frank now checks both of his sides while he’s roaming. Before, if he was heading toward a wall on an angle, he wouldn’t pick it up and would roll right into it. Now, he’s a bit more cautious and I haven’t had any similar problems.

So there you have it. I think the only thing to do now is replace everything cardboard on him (except his head for some character) with a more durable material. Only then would I bring him up to 2.0.

Thanks for reading!

Advertisements

Frank’s shaving

Just thought I’d quickly mention… The PLC elevator simulation has been stressing me out. I’ve had to redo portions of the code over and over and it’s just bleh right now. I’m rusty with my ladder logic so I’ve been sidetracking myself with Frank and Cities in Motion 2. Anyways…

Watching Adafruit’s Ask an Engineer streams every week (well, I only started watching them a couple weeks ago) always get me in the building mood. I figure it was a good time to give Frank a little love because I always feel awkward just sitting there watching an hour long stream.

Most of the clean up was just cutting down wires and replacing some of the tape. Some additional tape on the undercarriage components have done him well. The speaker was almost always hanging off but now it’s much more secure. I replaced a lot of the prototyping jumper wires with my own cut wire. It still looks like a mess, and probably always will given his small size, but it’s better than before.
IMG_20130810_231718

Personal touches are what make Frank so lovable! Frank was involved in a nasty collision with a door, and it wasn’t pretty. He almost lost his original smile because of the rough shape of his head, but I kept that layer of the cardboard and reinforced it with new pieces behind it. Frank is also proud to be Canadian.

IMG_20130810_232054

There were a few other things I wanted to clean up but would require a soldering iron, and I don’t have one that I really want to use… I have two cheap irons that don’t have power adjustment or even a proper stand so…

The next thing to do is to work on the code. There are a couple of things I want to do to make Frank a little more smarter and efficient, along with adding some extra songs to his repertoire.

Thanks for reading!

A look at Cities in Motion 2

I posted an image from Cities in Motion 2 earlier on this blog, but now I have a video for you!

I’m not a full fledged transit geek. I don’t go out of my way to ride buses or subways, nor do I go out to take videos of them. I know some model names here and there, but not many of them, and I don’t care for vehicle numbers. I do, however, really enjoy riding transit vehicles when I can, and just watching them. There’s something about them that interests me.

Anyways, enjoy this quick look at the terminals of my newest sandbox map. I covered about 1/3 of the relatively small map with bus routes and one above ground subway connecting three of the four terminals. I was surprised there wasn’t a lot of lag yet because the lag starts to set in quickly as I add more routes.

Labels! My hands hurt!

I got my labels taped onto the panel. Unfortunately the only clear tape I had in the house was wide tape you use to close boxes. After failed attempts of trying to cut it straight to fit in between the buttons and lights, I gave up and just started tearing random pieces to stick the labels on. Not my neatest work, but at least they won’t blow away when I mindlessly blow away the dust that accumulates on this thing.

IMG_20130809_110416Also, programming has barely started. BRB.

An elevator to heaven?

Yeah… I messed up.

panel

This is the new panel layout. Originally, there were buttons to request to go up or down on each floor… even if you were on the third level, you could request to go up. I only realized the problem with this once I started the program. Now, instead of thinking I’m standing outside of the elevator waiting for the cabin to come, I’m thinking I’m standing inside controlling it, which would make more sense. Now I have three extra buttons, which would normally be things like the open and close door buttons, and an alarm and emergency phone. I figure it would be more fun to throw in some errors I can trigger manually (and there will still be the timers that will cause errors). I haven’t fully figured them out, but possibilities include something in the way of the door closing or an overweight cabin.

I’m glad I caught this before I went any further. Also, the flowchart isn’t helping.

Elevator simulation

I haven’t touched PLC programming in months, so let’s go. I’m going with an elevator simulation. I did one before, but I made it out to be a simple elevator that just goes from the ground to one floor. I always thought of it as a loading bay elevator thing with a door.

Anyways, this will be a little more conventional. I’m simulating an elevator that services three floors. It can be controlled manually (maintenance mode) and automatically (public use). I usually try to spice things up by throwing “fault” situations in my programs. This time, the system will force the door and lift to be checked after an operating timer elapses. Since I lost those extra LEDs, I’ll be using blinking lights as additional indicators. For instance, a blinking Lift Motor Status light will mean it’s winching the cabin up, solid means winching it down, and off means it’s not moving. It saves a light by not separating up and down like I did with the first one.

Planning is everything for me. I quickly get lost in rungs of code because I lose track of what I’m doing. Here’s the documentation I have up to this point:

This is the front view of the control panel. Note that the “Clear Fault” is the inductive proximity sensor, so I’ll need proof I used a screwdriver to fix whatever cause the fault. 😉

panel

I haven’t done one of these flowcharts in a while so I thought I’d try making one for this program. There are errors on it right now, but you get the point. Like I said, I get lost in my code at times so hopefully I’ll put this flowchart to some good use. Previously, I used to type out how the process is supposed to go in a Word document (and I still may do that), but hopefully I’ll get used to using flowcharts which, in theory, should be easier to follow.

flowchartSo that’s all I have for you right now. Stay tuned for more!

No one is perfect.

This applies to robots too. Looking at you Frank.

It didn’t take long to realize the design flaws in him. First, let’s take a look at the top.

IMG_20130725_112353

Before even programming him and powering him on, I realized the first flaw. The breadboard where all of the electrical junctions are is right up to his rotating head. While it hasn’t caused too many problems, the path of his head goes over a few pins in the breadboard, wiping out a few connection options. He hasn’t yanked out any wiring just yet, but I always have that fear in mind when he’s roaming about.

The next problem is his head. Cardboard is easy to work with because it’s a material that’s just lying around the house and easy to cut. Unfortunately, it doesn’t make a good head. The connection to the servo was made by tape. It held up great for a while, until he hit a door and beheaded himself. I tried using some pins to give it some more strength and to connect it to the servo horn a little better, but it’s not really working. His head tends to flop around a bit when he’s moving.

Now let’s take a look at the underside:

IMG_20130806_102653

So the first quick problem is the speaker tends to fall loose from the carriage. It takes just a quick squeeze to get it back on. Not a huge problem.

The biggest problem on the underside are the two servos. Originally, there was a cardboard bar going across connected to the underside of each servo to keep them secure and level. Unfortunately, as he was roaming around, the bar was picking up hair and dirt, even ants (not the best idea to test him out in a kitchen in the summer).  He’s an explorer, not a janitor. The bar was removed, but now the servos sort of bend inward with his weight on the two wheels (as expected, that’s where the battery packs are, the heaviest parts on him).

I’ve been wondering what to do next. There are a few options:

  • I can continue playing around with his current build. All that means is toying with the programming, trying to make him a little smarter with what he’s got.
  • I can rebuild him using better materials and planning.
  • I can salvage his parts to create a new project.

In the most likely case, I’ll probably go down the list in that order. Hmm.

This was a great learning experience in planning, building, and troubleshooting. I hope you learned something too. Thanks for reading!