Beam Robotics

I recently decided to get into BEAM robotics as a fun way to do electronics that was different from my daily job of embedded programming. Solarbotics used to be the main site for BEAM robotics from what I can tell, and they still have an old website up that contains many useful resources on circuits, designs, and just general ideas. Hackaday also recently posted about a Dragonfly beam robot project that someone made. One of the fun parts about BEAM robotics is that the heyday appears to have been in the late 90’s to mid 2000’s, so resources about it are like walking into a time machine. Plus, for those of us who grew up in that era there is a sense of nostalgia when viewing pages someone clearly wrote themselves.

This is going to be the first of my posts on BEAM robotics as I explore these designs. Mainly my focus lately has been to create a more efficient charging circuit, with the goal of being able to (very slowly) charge a beam robot in regular indoor lighting. Not sure it’s possible, but it would be amazing if it was.

This is my first robot, which I’ve called Iky. The circuit is based off Ken Huntington’s Micropower circuit. I’ve simplified the circuit by removing the need to have a second 2n3904+2×3904 stage for driving the motor and instead am using a single 2n7000 to drive both motor and to provide hysteresis. This works well since the 2n3906 is a current controlled device while the 2n7000 is voltage controlled, which reduces interference that I think was the reason for the extra complication in Ken’s circuit. It’s probably also possible to make the circuit completely with FETs, but I’m going to leave that for later.

Iky the frightful

To test the performance I used the circuit shown below:

Improved Micropower circuit
Supply Voltage (V)Current (nA)
3.07292.0
3.28230.7
3.38317
3.485423.1
3.586538
3.687785
3.741380
trippedtripped
Current vs Applied Voltage

The table above shows that we have a relatively sharp transition point right around 3.7-3.8 V. The granularity here isn’t great as I do not have the ability easily change my power supply voltage, so I’m using large steps. Future testing will include automating this measurement so that I can see how “sharp” the trigger is.

I was also able to monitor the trigger point and lowest discharge level of the circuit:

Which shows that the circuit triggered at around 3.75V and would discharge until around 2V. With a 0.01F capacitor storing energy, this means that we store E=1/2CV^2 J or 0.0703J at full charge (3.75V) and have only 0.02J left when discharging stops. This works out to a rather good %72 energy extraction from the circuit.

The main problem I’m left with in this circuit is that when close to the trigger point the consumption increases to >1 uA, which can cause the solar cell voltage to droop when not in direct sunlight, thereby stopping the trigger from activating. I believe this is because the diodes used as a voltage reference / trigger doesn’t have a sharp enough “knee” when going from low conduction to high conduction as the capacitor voltage reaches the combined Vf of the diodes. This transition means that the 2n3906’s base current isn’t sufficient to pull the gate of the 2n7000 high and start the circuit. One thing that could help is having “sharper” transition than the current 1N4148 I’m using in the circuit.

1n4148 Forward Voltage vs Forward Current

I’ve also attempted to use a darlington pair of PNP transistors (just using two 2n3906’s) to improve the gain, but this actually made the transition worse and appeared to consume more current than the previous circuit.

Likely there is also some current lost in the capacitor itself as a parasitic resistance, so further investigation will be required to determine what factors affect the minimum usable current for a BEAM robot. Some other improvements could be in using FETs with lower Vgs requirements, so that the “on-time” of the circuit is better.

That all said I’m very happy with how well it performs for how simple the circuit is.

Winter Caving

A friend and I decided to see how big of a cave network we could make in the snow drifts near us. These drifts were made from snow blowing over the prairies and dropping off the edge of a small “cliff” that descended into a slough. This ended up accumulating a large quantity of snow, in some places 2-3 meters deep and about as high.

The first day we made a pretty decent network of tunnels, you can see the three entrances below. The left and center entrances go into smaller tunnels while the one of the right is actually quite spacious as the snow drift was quite a lot deeper.

View of Three Entrances

This took about 3 hr and and the end we were absolutely drenched, as it had been a warm enough day that the snow didn’t stay solid long, so even through winter coats it would melt.

Main Cave Entrance

On the second day, at this same location we were able to extend it to around 12m in length. We closed up skylight with blocks and filled in the centre entrance. This left us with a “hatch” where you can climb out onto the plateau above, two entrances, and areas where you can sit upright without issue. If you weren’t overly attached to being comfortable, you could fit a small family in here!

Final cave network viewed from the left
Center view, showing the second entrance (behind the shovel)
Caves viewed from the right. Notice the wonderfully carved initials by my friend
Inside view. Tunnel extends for about 12m.
Interior lighting

We also then made a small cave a little ways away, just to see how deep the snow was. It turns out in this section it was very deep indeed. The bank appears to be more steep here, possibly due to the trees.

Cavern on the White

This last one we did in about 45 minutes of rapid shovelling. The amazing part is that we could have continued, we still hadn’t reached the bank and we got about 1.5-2m in with an interior over 1m tall. Easily tall enough to sit up straight in.

One thing that was really surprising was how quiet it was even inside the last cave. Once you sat down in there you could hardly hear the outside world. Inside the cave network you had to shout just to be heard by someone only a few meters away. The sound deadening inside a snow cave is very reminiscent of anechoic chambers.

Sleeping inside a snow cave sounds like an absolute dream.

HP System Supply Fan Replacement

I have an Agilent 6612C system DC power supply that has been very useful, but unfortunately the bearings in the fan have started to make noise. HP installed Papst Typ 612 fans in thes units, a 2.5W 60x60x25 mm fan.

Papst 612 Fan

New, these seem to be around $50 part each. So instead I ended up replacing them with CUI CFM-6025V-152-312, which have similar specifications but possibly lower quality.

Fans in larger system supply

Machining

I’ve recently started to teach myself machining, specifically how to safely use a lathe and mill to create tools. A really great resource has been Machining Fundamentals by John R. Walker. This book goes through the fundamentals through to more advanced usage and also teaches important safety tips for each piece of equipment.

My first project was boring out this old piston from a diesel engine to make a cup holder. The finish is terrible if I’m honest, I think the combination of long extension on a relatively thing boring bar and interrupted cuts really didn’t make for happy machining. Unfortunately carbide was all I had at the time, if I ever try to clean it up I’ll have to get a HSS boring tool.

Engine Piston after boring
Completed Pen Holder!

My first “real” project was making this metal scribe out of old bolts that I found in the river near the CPR bridge. These bolts are definitely not made of a good machining alloy, it’s actually really difficult to get a good surface finish. But the end result turned out pretty well. I ended up using a vertical shear tool I ground in order to get the finish where I wanted. There’s also a lid for it to protect people from getting injured that’s no in the picture below.

Scribe (right, without pointy end installed) next to vertical shear tool

All this was to learn the basics to I could make myself a fire piston as designed by Clickspring. I think this turned out pretty good, although I have some modifications to make since it doesn’t quite start the char cloth on fire yet. After chatting with a machinist at work he suggested making the piston stroke a bit longer and to use double or triple o-rings on the piston. Once I make these changes and hopefully get it working I’ll post the results.

Completed Fire Piston

OpenSCAD

I found openSCAD a little while ago and started to play around with it. At first it seemed rather rudimentary when compared to SolidWorks, AutoCAD and others but it really grew on me. The power of scripted cad really becomes apparent after using it for awhile: with enough forethought you can design scripts that are able to be easily modified to fit other applications, allowing universal designs. To that end I designed a lens mount that should be universal to almost any camera lens.

https://www.thingiverse.com/thing:3343000

Point Grey Chameleon Camera with C-Mount Zoom lens and Grey camera mount

I’ve also designed a number of other simple tools:

Oil Cups for Watchmaking
Watch Mainspring Winders

Agricultural Robotics

For the last two years I’ve been working on an agricultural robotic project, specifically for the purpose of performing phenotyping research at the University of Saskatchewan.

PAMM, an acronym for Plant Phenotyping and Measurement Machine, is a RC controllable robotic platform that combines a mobile platform with data aquisition systems such as Cameras, Laser Scanners, and others to aid plant breeders in their research.

Here are a few pictures of the platform from our booth at Spectrum 2019:

Basically PAMM is a large remote controlled platform, with 4kW of electrical power going to a 4 wheel steer and drive system. It’s capable of around 3m/s top speed although that’s terrifying on rough ground when there’s no suspension.

Reverse Engineering 7 Segment Display

I recently came across an old five digit seven segment display and decided to see if I could give it a second live.  It appears to have been from a  weighing device of some kind, judging by the company name: Weigh Right Inc.

5 Digit 7 Segment Display

It’s a gorgeous piece of hand drawn circuitry with lovely smooth lines.  There are also very few jumpers on the board so clearly the designer had put in some effort into this single sided design.

Circuit of the 7 segment display

The display is essentially a serial to parallel converter, with 5 8bit 74C164 chips driving each digit.  Each 74C164 has the 8th bit connected to the following chip to create a single serial interface for the entire display.  To understand the design and how to interface to it I traced out the circuitry and drew up the schematic.  You can find it on the github page for this project.

After figuring out the binary codes for each segment and building a simple 5V to 12V logic translator with 2N3904 transistors, I wrote up a simple script for an Arduino that would light up all the segments, which was when I found the reason that it was in the scrap pile:

The display functioning, sort of…

Oh dear.

Rather than throw this away I figured I’d see if there was a way to fix it.  First step was to figure out if it was the 74C164’s.  They seemed really hot so I quickly figured out the current for each segment by turning one on at a time and watching the power draw on my bench supply.  18mA.  Which if you’ve read the data sheet for the 74C164 is a tad over the 8mA absolute maximum current of the device.  Since I didn’t have the original machine that this came from I can’t say for sure that the display wasn’t being flashed using PWM to reduce the drive current.  I can only hope that the original designer didn’t miss that.  I just reduced the drive voltage from 12V to 8V to get the current down to below 8mA per segment.

After further inspection that all the LEDs were okay on the dead segments I tested the voltage output from the 74C164: 7V, even higher than the lit segments.  A bit odd considering the LEDs themselves are fine.  Turns out whoever assembled the board decided to save power by putting the LEDs in backwards on a few of the segments!  An easy enough fix and now I have a fully functioning 5 digit 7 segment display!

All segments working now

You may notice one LED is brighter than the others.  One LED was actually dead and my replacement LED is much newer.  Not sure if that’s due to technological progress on LED efficacy or just wear (better on the former), but it’s quite a big difference!  There’s another dead LED but somehow it’s still conducting current so I might leave it in for now rather than having another strangely bright LED.  If I can scavenge a period correct LED (not something I thought I’d ever want) then I might drop it in.

Side note: 1970’s Solder smells weird.  Not sure if it’s the solder formulation, PCB materials, or flux residue.

Next step is just to figure out what to make with it!

Glider Performance

So I started wondering the other day just how each of our gliders at the club stack up against each other on OLC. Thankfully, the Online Contest website has a large amount of data available.  After grabbing a bunch of data and writing a python script to analyze it we have the following result:

The DG808/15m is the most successful aircraft for collecting Points.  This is not taking into account any bias on the pilot.  It could be that all 16 flights recorded were done by the best pilot on earth and are skewing the data (what a jerk!).  There is also the possibility of a bias based on how OLC rates the aircraft, since they have a “handicap” number for each aircraft.

What is interesting is that our oldest aircraft, the 1-26, rates at 230 on the chart, where other more advanced planes like the L-23 and L-33 are at 339 and 414 respectively.  Our best aircraft, the Cirrus, rates at 220, just barely above the 1-26.  So the handicap levels are working to level the playing field at least to some extent.

Something else that might be interesting is comparing the cost vs average number of points collected to see what is the most cost effective aircraft for collecting points.

The finished dataset can be downloaded here: aircraftStats

The python script used is below.

import csv
data = list()
canadaFiles = ['OLC_Daily Score_Canada_2016.csv',
                 'OLC_Daily Score_Canada_2015.csv',
                 'OLC_Daily Score_Canada_2014.csv',
                 'OLC_Daily Score_Canada_2013.csv']

worldFiles = ['OLC_Daily Score_Worldwide_2016.csv',
              'OLC_Daily Score_Worldwide_2015.csv',
              'OLC_Daily Score_Worldwide_2014.csv',
              'OLC_Daily Score_Worldwide_2013.csv',
              'OLC_Daily Score_Worldwide_2012.csv',
              'OLC_Daily Score_Worldwide_2011.csv',
              'OLC_Daily Score_Worldwide_2010.csv',
              'OLC_Daily Score_Worldwide_2009.csv',
              'OLC_Daily Score_Worldwide_2008.csv',
              'OLC_Daily Score_Worldwide_2007.csv']

for filename in worldFiles:
    with open(filename, 'rb') as file:
        csvreader = csv.reader(file)
        for line in csvreader:
            if line[0] is not '#':
                data.append(line)
print "Num Flights Examined: %d"%len(data)
# Sort by Aircraft type
aircraftSortedNames = list()
aircraftPoints = list()
aircraftDistance = list()
for row in data:
    if row[7] not in aircraftSortedNames:
        aircraftSortedNames.append(row[7])
        aircraftPoints.append(list())
        aircraftDistance.append(list())
    aircraftPoints[aircraftSortedNames.index(row[7])].append(float(row[1]))
    aircraftDistance[aircraftSortedNames.index(row[7])].append(float(row[3]))

# Aircraft stats formatted as [aircraft name, flightCount, Max Points, Min Points, Average Points per flight, max km, min km, ave km]
aircraftStats = list()
for index in range(len(aircraftSortedNames)):
    flightCount = len(aircraftPoints[index])
    maxPoints = max(aircraftPoints[index])
    minPoints = min(aircraftPoints[index])
    sumPoints = sum(aircraftPoints[index])
    avePoints = float(sumPoints)/float(flightCount)
    maxDist = max(aircraftDistance[index])
    minDist = min(aircraftDistance[index])
    sumDist = sum(aircraftDistance[index])
    aveDist = float(sumDist)/float(flightCount)
    # Remove anything with less than 3 flights, since it's not statistically significant (yes, even three is a stretch)
    if flightCount > 3:
        row = [aircraftSortedNames[index], flightCount, maxPoints, minPoints, avePoints, maxDist, minDist, aveDist]
        aircraftStats.append(row)

print "Num Aircraft: %d"%len(aircraftStats)

sortedList = sorted(aircraftStats, key=lambda l:l[4], reverse=True)

# Create a csv result file
with open('aircraftStats.csv', 'wb') as outfile:
    csvwriter = csv.writer(outfile, delimiter=',')
    csvwriter.writerow(['Aircraft name', 'FlightCount', 'Max Points', 'Min Points', 'Average Points per flight',
                        'Max km Flown', 'Min km Flown', 'Average km Flown'])
    for row in sortedList:
        csvwriter.writerow(row)

Glowing Ball

A simple project that a friend asked me to make for her to fit into her show.  Basically she wanted a glowing ball that would mimic the breathing light that apple computers have.  Going from a dollar store glow ball to a breathing ball was relatively simple, taking an ATiny micro and a LED RGB chip with built in controller and slapping it all together on some perf board.

Here’s what you get for a couple dollars from the Dollar Store:

2014-07-08 19.06.15

What you probably can’t see is the extreme amount of corrosion on the wires or the fact that there is no insulation on anything.  If that LED were to drop down and short across that nut (yes, it is just a nut glued in there) there is a chance for a fire.  Personally, I will never buy anything cheap from china anymore, it’s just too scary what they will do over there.

After modifying the design and adding in my perf board hack we have:

2014-07-10 11.53.32

Not bad.  Coating everything real well with hot glue to ensure nothing can come loose and cause a short the final product is this:2014-07-08 19.06.24

The circuit and code is hosted here on github, feel free to do with it as you please.  One thing that needs to be changed is adding a 5V boost regulator to keep the voltage constant, as the RGB led chip turns more and more red as the voltage droops lower.  As red less generally have lower forward voltage drops, my assumption is that the other LEDs are getting less current and thus the red colouring.