The custom skateboard firmware is attached here in the CA3_Skate_FirstBeta.hex file.
In the setup menu, you'll see that the aux and torque menus are now changed to rear and front weight sensor menus.
The preview shows the voltage on the sensor and the currently scaled weight in pounds. Inside you set the weight offset and scaling factor (which you can easily calibrate by standing on the truck)
There is additional a fault voltage threshold, so if something severs a wire on the weight sensing circuitry it will either get pegged at 0V or 4.5V, while a properly operating sensor will always be in the 1-4V range. This way if there is a sensor fault the skateboard will effectively turn off rather than going into either full throttle or full braking mode.
The control algorithm is quite simple, the code measures the front and rear weighs, subtracts them, and then this difference is added to the throttle output signal. We set things up in the dual controllers so that a 2V signal results in no torque on the motors. More than 2.1V and they have increasing forwards torque, less than 1.9V and they have increasing regen braking torque. The Min Throttle Output voltage is the resting voltage of the CA when either the front and rear sensors have equal weight on them, or whenever there is any kind of fault
The brake output voltage is the lowest output signal the CA will put out, while the max throttle output would be the higher voltage output that the CA will send to the controller for max forwards power.
In the control mode setup menu, you set the assist factor in terms of mV / lb. So with 30mV / lb as shown here, and a MinOutput of 1.94V, if the rider has 20lb more weight on the front truck than the rear truck, then the CA's output signal to the controller will be 1.94 + 20lb * 0.03V/lb = 2.54V. Similarly, if they lean back so that there is 35lb more weight on the rear truck than the front, the output to the controller will be 1.94 - 35lb*0.03 V/lb = 0.89V.
We've also included a minimum weight term, so that the skateboard requires the sum of the front and rear weight sensors to be higher than this value for the output to do anything. This then acts as a simple safety to detect if a rider is actually present on the deck or not.
If the weight is less than the Min Weight setting, there's an option with the Vout Min Weight term to have the skateboard apply a small amount of regen braking force on the wheels. That way if you bail at high speeds, instead of the board coasting down the street until it crashes it will effectively have the brakes on and come to a pretty quick stop.
One of the display screens on the CA shows in real time the weights and voltages on the front and rear trucks and it's pretty handy to look at this while testing and experimenting with values.
Anyone with a V3 Cycle Analyst can load it on their device using the normal software tools. This is still very much beta and based on the earlier 3.0 CA codebase. But with Teklektik doing a ton of great work on the V3.1 CA firmware, I'm hopeful that we can have a more modern variant of the skateboard code in the works pretty soon.
[The extension hex has been deactivated and can no longer be displayed.]
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike
. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.
Now back in Vancouver with my Big Dummy Frame (yes This One
, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, email@example.com
, rather than PMs, which are disabled