I’ve done a lot of work on MorpHex lately, both on hardware and software. The two major updates; 24 Starlite RGB LED’s and a Razor 9DOF IMU made a huge difference when it comes to control and precision while rolling and the LED’s gave a nice effect. Therefore, I’ve decided to name it MKIII.
Mounting the LED’s:
For some years ago, I got a lot of Starlite RGB LED’s from BasicMicro.
They are easy to connect to a mcu using serial communication. They can all be connected to the same bus/port. I’m using an UBEC regulator for powering a total of 24 Starlites @5v. For mounting the Starlites I made some simple brackets of polycarbonate. I’ve also reinforced the supporting ribs on the upper sphere sections. The Starlite brackets are mounted to the ribs.
As you can see, it’s getting pretty crowded with the additional stuff, the wirework is a pain.
Especially when it comes to the lower section. All the wires are pushing some limits.. A couple of months ago I had a rather terrifying experience. During testing of MorpHex I suddenly got the “magic” smoke. One of the servo wires became partly shorted due to friction between the wires and a part of the inner body. It ended up with many hours for fixing, replacing wires and adding more sleeves for protecting the wires.
A picture of the partly melted wires.
I do have a 30 amp main fuse that would blow if the shortcut became complete. Anyway, it is not very fun when things like this happens.
Mounting the IMU:
Several years ago I bought a Razor 9DOF IMU from sparkfun. The version I’m using is retired, but it works fine. The board is a bit larger than the new version. I’ve only done some small modifications to the IMU code (C++ Arduino). My notes from the code: “MorpHex, sort of flip pitch/roll
Normally, MorpHex roll along the Y axis (pitch). I want +/- 180 deg range of the pitch angle
And +/- 90 deg range of the X axis (roll), when rolling along the “equator” the roll angle is about 0 deg”
So, I’m only using two of the angles. If you look closely, you can see the how the IMU is oriented. I made a bracket close to the inner body servo for mounting the IMU board close to the center of MorpHex:
When it comes to the MorpHex code, I’ve done a lot coding for adding new features. Adding the IMU part was relative easy though, and the result was very good. The IMU data are used for stabilizing and controlling the rolling motion. The difference between MKII (no IMU) and the MKIII is like night and day when it comes to the ease of control. You can simply give MorpHex a little push and it starts rolling by itself, lol. On MKII I was not able to roll uphill or roll in the single or triple mode.
To give you an insight of how I control MorpHex, these are my notes for using the remote controller:
; – Left Stick (WalkMode) Body Height / Rotate
; (Translate Mode) Body Height / Rotate body Y
; (Rotate Mode) Body Height / Rotate body Y
; (Sphere Level 2/3) UppDown= Rolling Speed control
; – Left Pot. (All modes) Body height
; – Right Pot. (All modes, not in SphereLevel >0) Direct control of body dimension/angle of inner body servo (morphing body)
; (Sphere Level 1) Control XZPos, transform into a sphere and vice versa
; – Right Stick (WalkMode) LR= Gait rotation, UD direct XZ control or vibrating effect of upper sphere
; (Translate Mode) Translate body X/Z
; (Rotate Mode) Rotate body X/Z
; (Sphere Level 0/1) Control the upper sphere section in stick-mode
; (Sphere Level 2/3) UD= Amount of how much the sections are pushed out (when rolling)
; (Sphere Level 2/3) LR= Steering, how much the upper vs. lower sections are pushed out
; – Left Slider Set main color (default), set compcolor or speed
; – Right Slider Direct control of the upper sphere sections
; – A Walk Mode
; |– 1-5 Switch gaits
; |– 6 Toogle High leg lift height
; |– 7 Toogle Lock the upper XZ pos
; |– 8 Toogle Vibrator effects ON/OFF (default off)
; – B Translate Mode
; – C Rotate Mode
; |– 1 LjoyUDWalk
; |– 2 LjoyUDTranslate
; |– 3 SetRotOffset
; |– 4 Toogle LeftJoyLRmode (walk or translate)
; |– 9 Toogle Lock rotation offset (ref. btn 3)
; – D Toogle upper sphere IK/FK mode
; – E Extra functions, works on all modes, mostly Starlite stuff
; |– 1 Toogle LightEffectModes
; |– 2 Toogle Light Effects to be both on upper and lower, or just upper sphere section (default)
; |– 3 Turn Light Effects ON/OFF (default off)
; |– 4 Toogle SplitLightON
; |– 7 Toogle SetCompColor
; |– 8 Toogle SpeedInput or color control using bPacket(PKT_LSLIDER)
; |– 9 Toogle bSplitSphere
; – F Sphere Mode (Start at SphereLevel 0)
; |– 1 SphereLevel 1, use Rpot to transform into a sphere
; |– 2 SphereLevel 2 , remove this?
; |– 3 SphereLevel 3 IMU
; |– 4 Extended peak ? improve/change this?
; |– 5 Toogle single, dual and triple sphere effect (IMUloopCnt = 0,1 or 2)
; |– 6 Toogle CounterAct
; |– 7 Push and play, autonomous mode
; |– 9 SphereLevel 0, (Hexapod mode)
; – 0 Turn on/off the bot
I believe I’ve mentioned this before, but the code I’m using is based on the Phoenix code written by Jeroen Janssen. Highly modified by Kurt Eckhardt and me.
All in all I’m very satisfied with the result, but there are still some minor stuff I have on my To Do list. Before I move on to my next project.
I’m also planning to participate on the Trondheim Maker Faire 2014 soon.
Meanwhile, I hope you’ll enjoy my latest video:
Still having fun with robots 🙂