To start my electric skateboard project I decided to first build a conventional skateboard and then electrify it. I chose a 32" kicktail cruiser deck, 180mm trucks, and 90mm wheels. This deck is the smallest I could go while still fitting all the electronics and I opted for fairly large wheels to improve the ride.
To sense the rider's balance, I'm using 100kg load cells. These are metal devices with strain gauges attached. When load is applied, a piece of metal flexes, and the gauge mounted on it changes resistance.
The change is a small fraction of an ohm, so I've added two HXT711 analog to digital converter boards to amplify the signal. These send a signal to an ATMEGA328p microcontroller (knockoff arduino UNO). There are several existing libraries for the HXT711, one of which I'm using to dump output on the serial port.
To mount the sensors on the board, I briefly considered having two pads on the top to step on. This, however, violates the design plan-- the skateboard needs to be balance controlled, and that would be no different than stepping on switches.
The current plan is to mount the strain guages inside risers. These are small, 1/8" to 1" pieces of plastic that go between the board and the trucks to add some height. My trucks came with 1/4" risers and hardware for them, so I want to see if I can fit the load cell within a riser of this size.
My first iteration, pictured above, was made of stacked laser-cut birch wood sheets, and amusingly, part of a nail file. There was pocket for the load cell, space for the load-bearing part to deflect down, a hole for the wires, and a lid on top. This test was a great success-- all assembled, the board was able to detect the two load values and output a graph.
Iteration two, shown after laser cutting above, includes six stacked rubber sheets in the same design with some minor refinement. Instead of a lid, the top can now flex inwards to push on the sensor, and I hope the rubber will absorb some shock from the ride.
I've also started work, as seen below, on turning the raw data into usable control for the throttle. Right now, I'm using the formula
(Ffront - Fback) / (Ffront + Fback)
In addition, if Ffront + Fback is below a certain value, the balance score is set to zero. This provides a score between -1 and 1 of the rider's balance on the board (1 is all weight on the front, -1 all weight on the back). I have no idea if an approach this simplistic will be enough to actually control the board. Since acceleration affects the rider's balance, I have a feeling the solution might end up being a model with differential equations.
For now, though, I'm satisfied with the performance of the sensors and I'm moving on to the drive system.