Archive for Relapse

Here is the motor that I’ll be using. I don’t know if I mentioned this already, but I’ve got a big bag of these things. I don’t know where they originally come from, and I can’t find any sort of datasheet or description on the internet.

But that’s okay. I can work around that. I didn’t even know what kind of motors they were until I poked around with a multimeter. Turns out they’re brushless DC motors, which is pretty cool for both accurate positioning and speed, but relatively difficult to control.

Here’s the pinout, from left to right:

Winding A

Hall Effect sensor A

Winding B

Hall Effect sensor ground

Winding C

Hall Effect sensor B

Hall Effect sensor power

Hall Effect sensor C

Finding the windings was easy, I just checked the resistance between pins. My highly sophisticated method for finding the sensor pins, though, was putting a voltage across them and watching for smoke. I guessed wrong the first time, so, uh, make that three motors I’ve sacrificed, all told.

The output on the Hall sensors(powered by 3v) are very low, so they need to be hooked up with a differential amp to a potentiometer. The motors draw about 800mA at full load.

Because I have a whole bunch of these motors, I’ve been doing research for the absolute cheapest way of controlling these. Most of the controllers chips I’ve found are right around the $15, which is ridiculous.

So I built a quick test protoboard because it was cleaner than a breadboard, but it ended up getting a little complicated.

How I’ve got it right now:

Closed loop BLDC motor control

While building this, I finally found an affordable solution, the MC33035. It was about $2. But hey, at least I’m intimately familiar with these motors in a way that a one-chip solution wouldn’t give me, right?

Here’s the test-code for PIC that I wrote. I still have maybe 30 of these motors, so they definitely could come into play in future projects. So, one-chip solution aside, I’d add forward/reverse control, PWM speed, and potentially speed/position feedback so I could include a PID loop. That would be pretty cool.

In case those links disappear (likely), it’s billed as: AIYIMA 2pcs Micro DC Brushless Motor 22MM Planetary Gear Motors External Rotor With Hall. The markings on the visible label read 4086013, 172336, and XF08F4901147. On the product page itself, the motor claims to be a AIYIMA-A4F321. The markings on the version I have, however, read 15246014, 172289, and XF04B4000507. Hopefully that helps someone.

The first link is a plastic shaft version I haven’t seen before, while the second link is the metal version that looks identical to my own.

I’ve opened up two sacrificial motors, and they definitely seem to have some sort of on-board Hall effect sensors. I haven’t looked for the pinout yet, but chips were all labelled 1036 for one of the motors, and J588m for the other one. Google turns up nothing about these (that I can find).

The motor connector has eight pins, three of which are used up by the motor windings A, B, and C. That means two of the remaining pins are probably VCC and GND. The last three pins must be the Hall sensor outputs.

Currently, I’ve only got the motor running in open loop. That results in a working, but pretty crappy rotation. When I have some time, I’ll grab the feedback, and close the motor loop. Here’s the PIC code I have right now:

At this stage in the game, this project is on a clear path to completion, with no major revisions in sight. What I’d like to do is identify some issues that have made themselves apparent during the build and tweaking processes. Some are things that I would fix in the version 2, if one were to exist. Some I need to fix right now.

This also marks the end of the “let’s build something cool!” phase and into the “ugh. WHY isn’t this working?” phase. It’s a lot harder to stay interested in finishing, but I’m going to power through.

Here’s where I’m at:

Limited rotation: any rotational movement that goes too far would tangle up cables that are driving the pitch gear motor. Everything in this system is designed to be battery-powered, so the obvious solution would be to mount the yaw motor on the rotating platform. That could mesh with an inside gear that’s been fixed to the base.

Non-prime gears: this is one of the topics that have come up while doing ongoing research for what constitutes a “good” mechanical design. Generally, teeth shouldn’t continually mesh with exactly the same tooth and the opposing gear. That’s a good way to cause excess wear through dirt or inconsistancies in the the teeth hitting the same spot every time. To make sure that doesn’t happen, you want the gears to be co-prime. Right now, my two gear sizes have 55 teeth, and 280 teeth. That’s no good. Fortunately, 281 is prime, so that neatly solves that problem. The pitch gear doesn’t ever rotate all the way through, so that doesn’t fix the issue for those mates, but there’s nothing I can do about it, so why worry?

Catching: the top gear(I’ve been calling it the pitch gear) catches up between the two gears providing support. When it gets caught, the gear likes to try and shove the rear support struts up and out of the base. This is the only problem(so far) that I haven’t foreseen. Fortunately, I was able to move that top support gear a little closer to the bottom portion using some holes that already existed. Anything less than 90 degrees seems to do the trick.

Squeezed bearings: I used some flat washers on either sides of the bearings, but that still caused too much friction for them to rotate properly. I need to find some smaller nylon washers, or maybe flanged bearings.

Wobbly base: the lower gear(I’ve been calling it the yaw gear) is mostly just sitting on a huge bolt that I had kicking around. I was hoping it would work, but no dice. It doesn’t quite. The gear wobbles around in relation to the base just enough to lose contact with the motor gear. When I can get some more laser cutting in, I’ll build another base with an additional cage around the bolt to provide more support.

In the time since I designed my timelapse camera gimbal, I’ve laid everything out for laser cutting, researched companies that offer cutting services, and very carefully decided not to send it out. As an initial draft, I wasn’t ready to spend $150 on a process that I’ve never used before.

Fortunately, the excellent Laser Cutter Cafe recently started up on a temporary basis. The deal is, you can come in, take a brief training course, and rent time on a laser cutter. Compare to online services, this is relatively inexpensive, and you can cut smaller test pieces and see the results immediately. For rapid prototyping, this is a valuable learning tool.

At the beginning, I was finding that many of my designs had fairly glaring errors that weren’t apparent until I was holding a physical copy. Throughout the process though, I was constantly tweaking and updating the design, and now I’ve got an excellent handle on what works and how everything will fit together.

The tweaking process involved adding, removing, and moving pieces around to fit better. Initially, everything was going to be glued together, but with a combination of finger joints and mortises, most of the individual components slot together and can almost friction fit. Naturally, glue will still be used, but the assembly of the final product is nearly idiot-proof now.

3/8″ Acrylic

3/8″ Acrylic

3/8″ Acrylic

1/8″ Acrylic

3/8″ Plywood

3/8″ Plywood

If I were to print this again, I’d arrange the shapes closer, merging the the coincident lines to save on laser-time, but that wasn’t a priority while printing up the prototype.

While I’ve been waiting for parts to arrive for Elapse, I’ve decided to build a companion rig that can smoothly pan a camera over the course of hours (or days or weeks or whatever). I’ve nicknamed it Relapse because it’s a repeatable camera gimbal, building on the idea of Elapse.

Here’s a quick idea I banged out for Relapse over the course of an evening. This shows the gist of what I’m trying to do, just without any of the structural elements (or gravity).

Those cylinders are stand-ins for some geared motors that I have literally bags full of. That cube in the centre has the same dimensions as my small SLR camera.

After looking around unsuccessfully for cheap gearing that I can source locally, I decided to abandon that and go full-on laser cutter.

To do that, I had to have pretty exact idea of the dimensions of every piece I’ll need, and how it fits together. That’s a good opportunity to dive deep into Solidworks and make an accurate model of how this thing will end up instead of just a rough mock-up.

After a couple nights’ more of work and a trusty pair of digital calipers, I came up with this:

Click to make all your wildest dreams come true

Many of the pieces from this (the rails on the sides of the top gear and the bearings attached to them) are measured based off parts that I already have laying around. Using up excess materials is awesome, so that’s always a bonus.

Now I’ve got to pull it apart and lay all the pieces out for a laser cutting template.