Flying Fire Hose blog #2 IO Hawk Hoverboard Teardown

January 20, 2021

Unfortunately, my H1 board quit speaking to my ST-link programmer after I made a lot of progress. I was able to get the motors running as servos using the built in Hall sensors. The servos work fine but the resolution is coarse …90 counts per revolution. This may still be useable to control the water jets . More on that later.

I found a great buy for a new hoverboard to hack…$35 for an IO hawk which are high quality boards. Unfortunately after tearing it apart I found out that is has an older piggy back motherboard that has the stm32 processor on a separate board that plugs into the driver board, I am reluctant to hack into this board since the circuit looks much different that the standard single board. I may just keep the firmware as is so I can restore it to a hoverboard. On the plus side I have another good battery and two more motors.

Here are pictures:


Flying Fire Hose blog #1. Hover-1 H1 Hoverboard tear down

December 23, 2020

New project underway….to robotically fly a fire hose with dual water jets attached using a hoverboard hack.

Hover-1 H1 specs.

Here is a look inside with a few dimensions. Bought used..smell of burnt electronics but handles nicely. Around the house uses about 1% to 2 % of battery per minute according to Bluetooth app.

RC bouy ….saves lives and would be great for other ocean research that requires a robust platform.

February 15, 2017

Steamworks 2017 FRC touchpad mockup using vex parts.   

February 9, 2017

Nice to have a lot of vex parts around to use in FRC field element or robot element mock ups.   This is a testing mockup of the touchpad which activates a light if any of the three posts holding the bottom plate are deflected at least 1/2 inch.    The vex green rubber links provide the flexibility for any aluminum beam to be pushed without jamming in the holes of the top plate.   

Computer with a heart??

August 25, 2016

One of the teams I mentor has done something scarrrryyyy😎

please vote for Robodox by liking blog post at http//


thanks….it can mean $5000 prize.

Dynamics of the centrifugal governor : Lagrange method with Vex simulation example

June 18, 2015

This post derives the equations of motion for a motor driving a variable centrifugal load similar to what one would see on the classical steam engine centrifugal speed governor first invented by James Watt. (Fig 1) Source(

Non-Feedback Dynamics

We are only concerned here with the response of the engine/centrifugal load without any feedback to the engine from the governor.   The analytical diagram for the governor without feedback is:

centrifugal governor analysis diagram3

Typically a motor with a large inertial load has a first order exponential  response with a time constant

tau = w_free*I_load/torq_max*gr^2

where w_free is the motor free speed , torq_max is the stall torque of the motor and gr = gear ratio of output shaft speed / motor speed.

The centrifugal weights  change the moment of inertia I_load with output shaft speed hence giving the motor a variable time constant.    One can bound the motor response between two exponential responses… one with a tau_min and the other with tau_max where min and max tau are respectively associated with the min and max inertial load which are generally set by the mechanical limits of the governor.   The motor current response is nonlinear and  more gradual than if operating with the full inertia load.   This in turn can keep the motor protection PTC fuses from tripping without explicitly controlling the current through the motor controller.

I will post a simulated response later for a Vex system but first we need the equations of motion.

To find the equations of motion I decided for my review to use the Method of Lagrange.  For a given system one needs to compute the Lagrangian, L, from the kinetic energy, T and the potential energy V.

L = T – V

We then obtain a system of differential equations from the following computation for each generalized variable q_i.

d(∂L/∂q_i_d)/dt = ∂L/∂q_i + Q_i

where q_i_d  = d(q_i)/dt  and Q_i are the generalized non conservative forces doing work on the system along the q_i direction.     This is a cook book formula that is often times simpler to use than Newtons force equation F = ma.     The resulting equations will be the same with either method.   Many good references on Lagrange method  can be found with a simple Google search.[reference Wikipedia Euler Lagrange Method]

The  generalized variables of interest are :

q1 = psi , the angle that the motor is turning through.

q1_d = w_axel  = dpsi/dt , the speed at which the motor is turning the governor axles.

q2 = alpha, the angle of the arm from vertical.

q2_d = w_arm = dalpha/dt , the speed that the arms are moving up and down relative to the vertical.

The mass of the weight on one arm is m and the length of the arm is l.   Moments of inertia relative the pivots are I_axel and I_arm.    I_arm is constant and I_axle varies due to the movement of the arms.

T = 1/2 * I_axel * (w_axel)^2  +  1/2 * I_arm * (w_arm)^2

V = m*g*l*(1-cos(alpha))

I_axel = m*(l*sin(alpha))^2

I_arm = m*l^2

Substituting for the generalized variables

L = T-V = 1/2*m*(l*sin(q2))^2 *q1_d^2 + 1/2*I_arm*(q2_d)^2 – m*g*l*(1-cos(q2))

∂L/∂q1 = 0;

∂L/∂q1_d = m*l^2*sin(q2)^2*q1_d

∂L/∂q2 =  m*l^2*sin(q2)*cos(q2)*q1_d^2  – m*g*l*sin(q2)

∂L/∂q2_d= I_arm*q2_d

Now compute d( ∂L/∂q_d)/dt and set equal to dL/dq + Q  where Q are the generalized forces that are non conservative associated with each q.

For q1:

d(m*l^2*sin(q2)^2*q1_d)/dt = m*l^2*(2*sin(q2)*cos(q2)*q2_d*q1_dot + sin(q2)^2*q1_dd)  = torq

1) q1_dd = -2*cos(q2)*q2_dot*q1_d/sin(q2) + torq/(m*l^2*sin(q2)^2)

For q2:

I_arm*q2_dd =  m*l^2*sin(q2)*cos(q2)*q1_d^2  – m*g*l*sin(q2)


2) q2_dd = ( cos(q2)*q1_d^2 – g/l)*sin(q2)

Steady State requirements

In the steady state, q1_dd = q2_dd = q2_dot = o.   This then gives the  q2 as a function of q1_d or alfa as a function of the axle speed , w_axle.

From equation 2    cos(alfa) = g/(l*w_axle^2)

Since cos(alfa) < =1     the minimum axle speed  w_axle_min >=sqrt(g/l)    Notice that this requirement is independent of the centrifugal mass very much like a pendulum period is independent of mass and only a function of the pendulum length , l .  w_axle_min is  the minimum speed before the arms move.

Vex Example

In the Vex centrifugal experimental device shown here , the arms are about 2.5 inches in length so we would expect w_axle_min = sqrt(32.3*12/2.5)= 12.4 rad/s or 118.5 rpm.   There appears to be a gearing between the motor and axle of 7 : 1 so the minimum speed of the motor is  118.8/7 =17 rpm   which means that the motor driving  can be a Vex 393 with standard gearing (100 rpm max).      However, there is a mechanical minimum of around 45 degs   which means the minimum speed to move is   17 rpm/sqrt(cos(45 deg)) = 20.2 rpm.   The speed to fully extend the  arms (alpha = 75 deg ?) would be  17 rpm/sqrt(cos(75 deg)) = 33.4 rpm.

System Time constant with alfa = 45 deg and 75 deg. 

tau = w_free*I_load*gr^2/torq_max  

I am guessing that one arm has a mass of about 1 oz  0r .0283 kg

I_45 = m*(l*sin(alfa))^2 = .o25*(2.5in*.707*.0254 m/in)^2 = 5.038 E-05 kg m^2

I_75 = I_45*(sin(75)/sin(45))^2 = I_45*1.866

tau_45 = w_free*I_45*2*gr^2/torq_max   (note: factor of 2 added for two arms)

Since torq_max = 1.67 nm, w_free = 100 rpm*6.28/60 = 10.5 rad/sec , gr = 7

tau_45 = 10.5 * 5.038E-05*2*49/1.67 = .037sec

tau_75 = tau_45*I_75/I/4=  .069 sec 

Simulated response

The differential equations were implemented in a simulation to show the time response to a step speed input.  The data was generated by my excel program.   The red line in the time response shown below is the arm angle starting from 45 deg and quickly moving to 75 deg as the speed increases.    This expansion occurs so quickly that most of the motor response is with the maximum moment of inertia.   In the second figure, the %current error is shown with fixed and varying moments of inertia.

Step Response Centrifugal governor

As you can see after about .o2 seconds, the motion of the governor is limited at its maximum alfa = 75 deg and the variable inertia current response (blue curve) is close to the slower fixed inertia response (yellow curve) for most of the current response.

%current response with centrifugal governor1The o

In this particular experiment, the objective was to keep the current response below the response with the maximum inertia to keep the stress of the motor.  In this case the objective was not met.    The mass movement was too fast with speed so the governor limited shortly after the initial speed increase.    Increasing the length of the arms expands the time scale but doesn’t change the early saturation.   One solution would be to add spring tension to the expanding weights so that a higher speed would be required to saturate.    This will be addressed later by adding a spring potential energy to the Lagrangian and deriving a new set of equations.

Energy ratio method for quantifying effect of ball mass variations on range error of a flywheel ball shooter

May 30, 2015

The new Vex game “Nothing but Net” requires a ball to be shot across the field into a goal.   The ball has a mass specification that allows up to 10% variation.    I derived equations that related the range error to mass error for a single flywheel shooter here and wanted to generalize the analysis to any flywheel system that uses the energy of the flywheel to impart energy to the ball.    It turns out that the error in range due to mass is a simple function of the ratio of flywheel energy to the energy of the ball.

i.e. %range error = %mass of ball error /(1+ ratio)

where ratio = flywheel energy/ ball energy.

Following is a derivation of this formula.  To simplify the work I will define a term called equivalent mass, Meq,  for the flywheel which is a mass that would give the same kinetic energy of the flywheel if it were traveling linearly at the ball speed, V.

I. e.   we can write the flywheel energy , Ew = 1/2*Meq*V^2

We know that Ew =1/2* I_wheel*w_wheel^2 so

So  Meq = I_wheel*w_wheel^2/V^2 

For a single wheel shooter, w_wheel = 2*V/r_wheel so

Meq_1 = 4*n*I_wheel/r_wheel^2

where n = number of wheels.

For a two wheel shooter, w_wheel = V/r_wheel  so

Meq_2 = n*I_wheel/r_wheel^2

If we write I_wheel in terms of its radius and mass then

I_wheel = c*m_wheel*r_wheel^2.     Substituting in the equivalent mass equations gives

Meq_1 = 4*n*c*m_wheel

Meq_2 = n*c*m_wheel

.Ball Energy, Eb

Eb_1 = 1/2 *m_b*V^2*(1.4)   (1.4 factor is for added spin energy)

Eb_2 = 1/2*m_b*V^2

Conservation of Energy

The initial energy of the flywheel is equal to the final energy of the wheel plus the ball energy.

Ew_initial = Ew_final + Eb

Ew_initial = Ew_final*(1+ Eb/Ew_final)  = Ew_final*(1 + 1/ratio)


ratio = Ew_final/Eb

Lets look at Eb/Ew_final

single wheel shooter

Eb_1/Ew_final_1 = 1/2*m_b*V^2*1.4/(1/2*Meq_1*V^2)  = 1.4*m_b/Meq_1


ratio_1 = 5/7*Meq_1/m_b

two wheel shooter

Eb_2/Ew_final_2 =  1/2*m_b*V^2/(1/2*Meq_2*V^2)= m_b/Meq_2 so

ratio_2 = Meq_2/m_b

So it looks like  ratio is only a function of m_b and not a function of V.

Rewriting the energy equation to isolate Ew_final

we get

Ew_final= Ew_initial/(1 + 1/ratio)

Since Ew_final is proportional to V^2 which is proportional to range R

we can say that

R/R_0 = (1+1/ratio_0)/(1+ 1/ratio)

and introducing % changes   R=R0 *( 1 + %e _r), m_b = m_b_0*(1 + %e_m_b)

we can after some manipulation show that

%e_r = %e_m_b *( 1/(1+ ratio) = %e_m_b*factor

where the  mass % error reduction factor=1/(1+ ratio)   and  ratio . is defined above for each type of shooter.

factor vs ratio is simple to compute

ratio, factor

.5 , 2/3

1, 1/2

2, 1/3

3, 1/4

4, 1/5

5, 1/6

9, 1/10

Single wheel shooter

ratio_1=  Meq_1/1.4/m_b_0= 4*n*c*m_wheel/m_b_0/1.4

Two wheel shooter

ratio_2 = Meq_2/m_b_0= n*c*m_wheel/m_b_0      

Range performance

Lets put some numbers for the 5″ vex flywheel.

m_wheel = .18 kg, m_b_0 = .05 kg, c = .84^2 = .71

Single wheel shooter factor:

ratio_1 = 4*n*1.79/1.4

ratio_1 = 4*1*1.79/1.4 = 5.1   => factor = .163  (assumes 1 wheel for flywheel)

ratio_1 = 4*2*1.79/1.4 = 10.2   => factor = .089   (assumes 2 wheels for flywheel)

Two wheel shooter factor:

ratio_2 = n*1.79

ratio_2 = 2*1.79 = 3.6    => factor = .217 (assumes 1 wheel on each side)

ratio_2  = 4*1.79 = 7.2   => factor = .12  (assumes 2 wheels on each side)

ratio_2  = 6*1.79 = 10.74  => factor = .085  (assumes 3 wheels on each side)

Observation…. although the two wheel shooter flywheel has 1/4 the energy due to its slower speed, the ball energy is also less because it requires no spin energy. The energy ratio is only different by a factor of 2.85 rather than the full 4.  Still, the single wheel shooter has about 1.3% less range error than the two wheel shooter with the  n=2 configuration.   This is not that big a deal since we are talking 1.4 inches error (compared to a 4 inch ball diameter).

Vex Note: How a single flywheel ball shooter minimizes the effect of ball mass variations

May 28, 2015

Nothing but Net 2015/2016 competition game involves shooting 4 inch balls that can have a 10% variation in mass.    We know that trajectory range ,R = V^2/g*sin(2*theta) so it  is dependent upon the square of the ball release speed , V, and shooter elevation, theta.   Mass does not enter into the equation unless it affects V.

Ball release energy :

Suppose we use a Vex 5″ diameter wheel as a flywheel and rotate it a w_wheel angular speed.      As the ball leaves the shooter, it will have a V = r_wheel*w_wheel/2.  e.g. half of the flywheel tangential speed.    The ball will have a spin rate , w_ball = V/r_ball.    The energy of the ball, E_b , is the sum of the ball translational energy and rotational energy.

E_b = 1/2*m_ball*V^2 + 1/2*I_ball*w_ball^2

where I_ball = 2/5*m_ball*r_ball^2 (solid sphere of uniform density).

so Eb =  1/2*m_ball*V^2( 1+2/5)  .   (corrected 5/29 Was 1/2*m_ball*V^2( 1+4/5)  So the rotational energy adds  40% more to the translational energy.  Rewriting in terms of w_ball gives

E_b = .7*m_ball*w_ball^2*r_ball^2  

Wheel Energy:

E_wheel = .5*I_wheel*w_wheel^2.  where

I_wheel = m_wheel*(r_wheel*.84)^2  (ref blog post

Energy Conservation:

E_wheel_initial = E_wheel_final + E_ball     This assumes that the wheel is not being powered by the motor during launch and that the extra energy needed for the ball comes from the flywheel.   Also, friction and ball compression energy losses are assumed zero to simplify this analysis but can be significant in actual percentages derived.   I am focusing  on how increasing flywheel mass lowers the percentage range errors caused by ball mass variations.

E_wheel_initial/E_wheel_final = (1 + E_ball/E_wheel_final)

Lets expand E_ball/E_wheel_final

E_ball/E_wheel_final = (.7*m_ball*w_ball^2*r_ball^2)/(.5*I_wheel*w_wheel_final^2)

= 1.4*m_ball*w_ball^2*r_ball^2/(m_wheel*r_wheel^2*.84^2*(2*w_ball*r_ball/r_wheel)^2)

= .4954*m_ball/m_wheel

SInce  m_ball = 60 g and m_wheel = 180 g   m

_ball/m_wheel = 1/3

So  E_ball/E_wheel_final = .165    for a single 5″  wheel flywheel     .165/n for n flywheels.    So the ball energy is almost equal to the 1/6 final energy of the wheel

Range Tolerance analysis:

So how does R vary with m_ball from all this.   Well , we know the range is proportional to V^2 which is proportional to w_wheel_final^2 which is proportional to E_wheel_final.

From above E_wheel_final = E_wheel_initial/(1+ .4954*m_ball/m_wheel)

So due to proportionality of R and E_wheel_final we can say

R/R_0 = ((1+ .4954*m_ball_0/m_wheel)/(1+ .4954*m_ball/m_wheel))

where R_0 and m_ball_0 are the nominal values without errors.

We can use R range= R_0(1+ %e_r)   and m_ball = m_ball_0*(1 + %e_m_ball) to work with % changes.

Then with some manipulation we can get %e_r as a function of %e_m_ball

%e_r  = -%e_m_ball/(2.02*m_wheel/m_ball_0 +1 + %e_m_ball)

Now m_wheel = n*.180 kg   and m_ball= .06 kg  so we can write an approx.

%e_r = -%e_m_ball /( n*6.06 +1)     where n is the number of 5″ vex wheels.

Lets put in a few numbers:

Assume %e_m_ball = 10%  then the range error is

n = 1, %e_r =  -1.42%

n = 2, %e_r =  -.76%

n = 3, %e_r =  -.52%

n = 4, %e_r =  -.40%

n = 5, %e_r =  -.32%

So you see the benefits of having a higher  flywheel mass to ball mass ratio.   The use of  two 5″ wheels in a single wheel design can reduce a potential 10% range error from ball mass variations  to  1% ( less than a ball radius).   To keep the spin up time to a reasonable number of seconds requires about 2 393 motors per wheel so 2 wheels costs 4 motors.   So there is a motor tradeoff to get that  higher accuracy with heavier flywheels.

Finding the moment of inertia of a Vex wheel using parallel axis theorem

May 17, 2015

vex 5 in wheel

The new Vex game “nothing but net” might involve rotating shooter wheels.  We know that if all the mass of a wheel was located on its rim then the moment of inertia about its rotating axis  (I_rim) would be

I_rim = r^2 * m   where m is the mass of the wheel and r = radius of wheel.   But we know that the wheels actually  have mass that is unevenly distributed along the radius so the moment of inertia I_wheel will be less than I_rim.

Easy experiment to determine I_wheel if we know its mass.

We can determine I_wheel experimentally using the parallel axis theorem and the dynamics of a pendulum.

Parallel axis theorem says that any object that is rotated about an axis parallel to and a distance , d, from an axis going through the centroid of the object will add an amount =  m*d^2 to the moment of inertia about its centroid.  I.e.

I_parallel = I_centroid + m*d^2 .

Suppose we now swing the mass, m,  about the parallel axis like a pendulum  using just the torque from gravity pulling on the mass.      It is easy to show that the period, T , of the pendulum is related to the distance , d, and the moment of inertial , I_parallel, by the following formula:

T = 2*pi*sqrt(I_parallel/(d*m*g))     .   g is gravitational constant and assumes swing angles smaller than say 10 degs from the lowest point on the pendulum path. 

If we measure the period of the pendulum we can rearrange the equation and find I_parallel

I_parallel = T^2*d*m*g/(2*pi)^2 

Once we have I_parallel, we can now use the parallel axis theorem to determine I_wheel.

I_wheel = I_parallel –  d^2*m  =  d^2*m * (T^2*g/d/(2*pi)^2 -1)

(This assumes  that the string has negligible mass relative to the mass of the wheel)

Vex 5 in Wheel experiment:

Given….r_wheel = 2.5 inches ,

wheel mass,   m = 180 gm (0.180  kg)

The pendulum is created by suspending the wheel with a thread 2.75 inches from its center so

d =. 07 m (approx. 2.75 inches)

The average period  T = .668 sec

I_wheel  = d^2*m*(T^2/d*9.8/(6.28)^2 -1)

     = d^2*m*( .248*T^2/d -1)

     = .07^2*.180*(.248*.668^2/.07 -1) = 0.00051 kg m^2

Equivalent radius with a rim only mass r_e

r_e = sqrt( I_wheel/m) = .0533 m ( 2.1 inches)  

This  means that the wheel behaves as if the mass if located at 84 %  of the radius of the wheel which one could almost guess by looking at it.

Team 2826 ,Wave Robotics, built one of my favorite robots for 2015 FRC Recycle Rush

May 10, 2015

Nice engineering of “Depthcharge” to play this years  FRC Recycle Rush game.  Produced some of the highest scores but got knocked out in the finals of worlds in St. Louis.   The main difference was their team mates inability to snare extra recycling bins from the center step during autonomous.

Congrats guys… loved it.     You built what I sort of dreamed of at the beginning of the game to achieve a high score during autonomous.