Friday, March 28, 2014

Small Steps...

I finally got all the logic power connections tested and done, and got a number for steady state current consumption!

The magic number is….  ~700mA !

This was for several items powered up at once:

  • Beaglebone Black
  • Adafruit GPS
  • Realtime clock
  • Powered USB hub
  • USB memory stick
  • USB WiFi link


The battery I have right now is a 2200 mAh LiPo, so I'm guessing I might get an hour of use out of it… this isn't the only thing it's powering. This is also a measurement of actual battery current, so it includes the not-so-efficient LM1084 voltage regulator losses.

For a quick refresher, the logic battery budget is divided across four 5v/5A LDO voltage regulators… I might add a servo-only battery and swap out the regulators to run them at 6v instead of 5v, but that's an extra cost I didn't plan for this year.

Considering that four regulators at 5A per regulator (max) is 20A, and the battery is basically 2.2Ah, at full consumption I'd have just 6 minutes of run-time!

But that's just crazy-talk. Knowing that the first regulator is going to come in 'around 1A', and given that I did the power budgets across all of them in the same manner, and that two of them drive servos that don't run 100% of the time means I might get a 10x increase in runtime, i.e. 60 minutes. I hope so… let's see...

Here is the list of regulators, and what's connected to them:

Vmcu - All central micro controller power; basically the list above, plus a USB audio stick, and probably a USB video capture stick.

The interesting thing about Vmcu compared to the remaining three regulators is that it's directly switched on/off from the user control panel; if the battery is switched on, then Vmcu is outputting 5v, and the Beaglebone is powered on. The other regulators are switched on with a logic level MOSFET, driven from the Beaglebone (tested and working, BTW!). This means that I can selectively power down the remaining three regulators if needed, i.e. if there is no need for those functions and want to conserve power.

But for now let's take the 700mA measurement and tack on 300mA for the extras, and call it an even 1A.

Vlog - The two I2C buses share a single 5v regulator to power just the logic (not servo) sections:
  • Bus 1:


  1. ATtiny 84 for user interface
  2. ATtiny 85 for left middle wheel sensors
  3. ATtiny 85 for right middle wheel sensors
  4. ATtiny 85 for the high mounted mast LED
  5. ATtiny 84 for the sun angle sensor
  6. AT-328 (or Arduino Leo) for the Pan-Tilt sensor head.
  7. ATtiny 85 for the forward low mount IR sensor
  8. ATtiny 85 for the rear low mount IR sensor
  9. Realtime Clock (it's actually not powered by Vlog, but Vmcu so time is available at boot)


  • Bus 2
  1. ATtiny 84 Left-Front wheel steering & sensors
  2. ATtiny 84 Left-Rear wheel steering & sensors
  3. ATtiny 84 Right-Front wheel steering & sensors
  4. ATtiny 84 Right-Rear wheel steering & sensors
  5. Magnetometer/Accelerometer
  6. ATtiny 84 & 16 Channel ADC Mux breakout
  7. 16 channel PWM breakout
  8. Arm/Grapple (planned)
I have no idea what that amounts to in current consumption; there are a quite a few sensors, LED's and a few longer wiring runs involved… but it's probably 'a lot' of the 5A budget, like 3A.

Vservo1 - The regulator feeding the 7 servos on I2C Bus 1

  1. Pan Tilt Head (5 total)
    1. Pan
    2. Tilt (2)
    3. Shade
    4. Filter
  2. Low Mount IR sensors (2 total)

Vservo2 - The regulator feeding the 4 servos on I2C Bus 2

  1. Haz sweeper servos on steering controllers (4)
  2. Arm/grapple servos - planned, just not this year…

'Total Guess' 
'Total Guess' might actually make a good name for the rover…. anyway….

For a guess at runtime while roaming around, and operating 'everything' on a normal drive:

1.0A Vmcu
3.0A Vlog
2.5A Vservo1 (2x P/T servos and 2x IR Pan servos @ 500mA = 2000mA + 3x500mA @ 25% ~= 500mA)
1.0A Vservo2 (during drives the servos don't always move, especially when moving faster… so this is just holding position)

That's 7.5A at a guess, which might mean 20 minutes of runtime… which means I might be a little more thoughtful about power while I'm putting together the remaining code, and drive the servos less if I can.

This also assumes 20 minutes of actual driving… although my target is to make the higher level logic quick enough to avoid the 'stop and think' syndrome I see so often with autonomous robots, and that may be true for race-day with a few shortcuts, in normal operations I'd think there would be plenty of times when I power down a lot of accessories and let the Beaglebone stew away on some of the harder math of route planning all by itself.

In the absolute worst case I can add a second battery for the servos and split the power inputs on the carrier PCB… we'll see!

And just for fun… 7.5A @ 5v = 37.5 watts. (edit: the reason this was interesting is the design is for 15A, so I hit my 50% margin target :)

Because watts!

Monday, March 17, 2014

Yay! A Successful Steering Test!

As always, this week has bad news, good news, and more good news...

The bad news: My 3D printer bit the dust... well, the PEEK tube that joins & insulates the two halves of the hot end broke, so it's not going to be expensive to fix... just time consuming. I don't expect the parts anytime soon, but I hope they show up in a couple of weeks, since I'm paying $20 in shipping.

So I decided to do a couple of things while I wait:

1. I upgraded my version of SG Project while the upgrade sale was on. I use it to track tasks on the rover build, and it's a decent option for the Mac in terms of project management. I detest MS Project, which I have to use at work, so any alternate is a good. If you didn't know (or guess), MS Project is basically a big bloated joke if you aren't using the advanced features, like MS Project Server. But most clients aren't savvy enough to invest in it, so they basically get a more cumbersome, more expensive version of Excel. Sigh...

SG Project is nice as there is an iPad version as well, and it all syncs up. Considering I can be more effective using the iPad + SG Project than I can with a Windows laptop + MS Project... that's saying something. It's not all roses, however. The Mac version seems to run a bit slow and seems to use advanced graphics... since I can feel my MacBook heat up when it's running.

2. I tested out the voltage regulator PCB that will power the Beaglebone Black and the powered USB hub. It didn't go up in flames, which is good because I just added 4700 uF caps to all the regulator boards (there are four... so far...). When those caps go 'pop' it's loud and smelly... thankfully I haven't popped one in a few years. I was getting a nice 5v (ok, 4.99v) out of it, so that's a win. The four regulator boards are:

  1. Vmcu (for the BBB and USB)
  2. Vservo - distributed on the same I2C bus and used for remote actuators
  3. Vbus1 - half of the i2c slaves
  4. Vbus2 - no surprise, the other half of the i2c slaves.
The last three regulators are actually mosfet switched, so I can power down parts of the rover but leave the brains running. I think that will be handy...


3. I got my Sparkfun order in the mail today! It was actually February 17th that I ordered it, and March 17 that it arrived. So the FAQ says '4 weeks estimated shipping' for the free international economy, and it's 100% accurate. Coolness. In that box were the mounts for the steering motors, so I put the voltage regulators aside.

Now that Sparkfun carries Servocity/Actobotics stuff with free shipping, although with a 4 week delay, I'm happy. I'm not so happy with the $13 in customs fees, which is something I don't usually see/pay for when I order from Adafruit from NYC. I'm not sure why there is a difference...

Anyway... I was really, really interested to prove out that the motors can do the job of pointing the corner wheels, but I couldn't really test it out until those 3/16" clamping hubs arrived from Sparkfun.

These motors have to be fast enough to be responsive, and have enough torque to turn with the load of the rover on the wheels...  The results:

The last win of the day:


I need to get the other three steerable wheels upgraded now, since a reasonable test is to run the rover on the indoor/outdoor carpet in the basement. The nylon of the carpet is very grippy on the rover wheels, more grippy than on grass and gravel in the limited testing I've done outside. So if it can turn the wheels on carpet, it should have no problem in the real world.

The software needs a tiny bit of tuning and dampening, but overall I can see it's going to work. I probably also need to get the bogie bearing supports designed and rush ordered, since I can see that the central screw of the current light duty bearings isn't going to take much abuse. When that screw breaks (not if, but when...), all the ball bearings will fall out, never to be seen again. And the bogie (the two rear wheels on each side) will fall off. That would be a 'Bad Thing'.

Anyway, happy rovering, see y'all soon with another update...








Thursday, March 13, 2014

3D Printing? User Error!

Aside from a few a whole bunch of challenges complete printing failures, I think I have the hang of this...

Really, the printer is terrific, but the calibration I did initially wasn't so hot, so the results were a little erratic.

The secret sauce to consistent printing? A dead-level print bed, and an exactly correct first layer height.

Printing PLA on green painters tape (it's what I had handy) on a cold bed works incredibly well; much better than the mixed results I was getting on glass, although I might give glass another shot now that it's dialed in.

Here are a few other things that went wrong along the way:

  • Slightly loose set screws = strange repeating patterns in the prints
  • Totally loose set screws = loss of pulley / axis = 1.5 dimensional artwork (loss of print)
  • Current set slightly high = hot stepper motors = skipped steps (layer misalignment)
  • Heat creep (heating in the upper extruder barrel) = extruder jams, incomplete prints
  • Whacky temperatures = poor print adhesion to the bed, and gooey extrusions (loss of print)
  • Broken end-stop wires = total meltdown of print
  • Poor calibration = non-square prints
I also did a lot of learning about what makes a 3D object printable, and the secret here is 'simple'. Not because it's hard to print, but it's hard to get the design right in the first place, including matching measurements up to the real world, so it can waste a lot of time and filament.

But when it does work well it turns out pretty good:






These are the steering controllers, which drive the four corner wheels +/- 45 degrees. These are mounted to 3D printed carriers, and the carriers mount to the smaller 3D printed connecting blocks that fit inside Actobotics aluminum channels and brackets.

The carriers have built-in stand-offs and screw holes, and a vent under the L293D, although I don't expect much heating. Although these are the versions I'll use the rest of the year, I could see a half-dozen design tweaks I could make... sometimes good enough is... good enough.

The smaller connecting blocks are more interesting. They hold the carriers down near the corner wheels, and keep the metal walls from deforming (this bit of aluminum isn't 3 sided channel). Because the stresses might be large / dynamic, I decided that with screw holes the object would never be totally solid, and with delamination a possibility I needed a way to keep the metal walls apart... like hex nuts on a screw that runs the width of the channel. Because the nuts are captive they can't move together, and the distance between the walls can't decrease. We'll see if they stand up to rough terrain in about a month from now, weather permitting...