Grin's weight sensing electric longboards #4 and 5, and kit!

Lightweight / Folding / Portable EVs - seats optional

Grin's weight sensing electric longboards #4 and 5, and kit!

Postby justin_le » Wed Jun 14, 2017 12:41 pm

I thought I'd start a new thread for this. For those who aren't familiar I've been a big fan of hands free control of electric longboards where you just shift your weight forwards or backwards to either accelerate or brake the motors. First alpha prototype was completed in 2007, and the plan was always to build an electric board conversion kit around this concept, you know, when all the details were sorted out! The full thread detailing prototypes#0 (alpha), #1,#2and #3 is here and should be read as background:
viewtopic.php?f=35&t=49557

Anyways a lot has changed in the world of eboards in the last decade. We always wanted inline wheel hub motors on the boards and had to fabricate them from rotors and stators pulled from ebike and RC motor components, a rather tedious process. Now you can buy a huge range of electric skateboard hubs right off the shelf straight from china. Electric skateboards used to be quite a fringe component of the personal EV scene and now they are all over the news and the startup scene, and in some places all over the streets too. This is all great stuff, and it seems the stars are aligning such that we can finally come through with our 10 year-old plan and encourage a shift towards no-throttle control!

That involves weight sensing trucks suited for hub motors, a dual potted field oriented motor controller, a rugged modular battery pack, and a display/control interface, all of which I will detail in the next few posts.
Last edited by justin_le on Wed Jun 14, 2017 1:02 pm, edited 1 time in total. View post history.
Reason: trim
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby MrDude_1 » Wed Jun 14, 2017 12:49 pm

So on this kit I just bolt the trucks, battery, and controller on any longboard? How much? If its cheap enough I can go for it... but I already have a Raptor2 on the way.
Warning:This post is being read via light, a substance known to the state of California to cause cancer.
User avatar
MrDude_1
10 kW
10 kW
 
Posts: 998
Joined: Fri Aug 17, 2012 3:07 pm
Location: Charleston, SC

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby grindz145 » Wed Jun 14, 2017 1:01 pm

I love the integrated CA on proto 3! Can't wait :mrgreen: :mrgreen:
User avatar
grindz145
1 GW
1 GW
 
Posts: 3313
Joined: Tue Apr 07, 2009 12:10 pm
Location: Rochester NY

The Avenue Suspension Trucks, Strain on Base Plate not Hange

Postby justin_le » Wed Jun 14, 2017 1:01 pm

In most of our prototypes we were installing strain gauge sensors on the truck's hanger in order to do the weight detection, as shown here:
Image

This worked reasonably well, but for production it meant that we'd have to be be in the business of CNC fabricating our own hangers with internal cable routing channels and special flats for the strain sensing etc. Plus the strain gauges on the bottom surface could be prone to damage from impacts, the amount of flex on the hanger is quite low so a high gain amplifier was needed which increased the amount of signal drift and sensitivity, and with inline wheel motors the truck hanger gets really quite hot as it is linked thermally to the motor stator and is actually part of the motor heat dissipation path. This heat would in turn cause thermal drift in the weight signal unless extra special attention was paid to low temp-co electronics throughout.

Then last year we heard about Avenue Suspension trucks and a lightbulb went off. The inside of the curved spring steel suspension provided a protected and smooth surface for the strain sensor, being on the base plate rather than the hanger it was not subject to the heating issues, no special cable routing was needed, and best of all the trucks had suspension! Since the skateboard hub motors have only a thin layer of urethane to absorb impact as most of their diameter is the metal motor shell, they are especially harsh when riding on rough ground compared to normal skateboard wheels.

This shows what it looks like with the strain gauge bonded and connected to the amplifier circuitry, which then folds overtop of the sensor and all gets potted in a silicone rubber:
AvenueTruckStrainExample.jpg
AvenueTruckStrainExample.jpg (73.73 KiB) Viewed 917 times


Now finally we had a
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby Vanarian » Wed Jun 14, 2017 5:06 pm

Hi Justin huge job done here ! Are the strain gauges responsive enough ? Keep going! :D
I needed to turn Air Gear stuff into reality so I am making this!
-+Electric inline skates - no remote control - weight / angle sensor - hub motors - one frame for all wheels sizes between 80/125mm - from 3.2 to 12 KW :mrgreen:

Rollo Ergo Sum!
User avatar
Vanarian
10 kW
10 kW
 
Posts: 582
Joined: Wed Nov 26, 2014 12:24 pm
Location: France!

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby Ohbse » Wed Jun 14, 2017 7:49 pm

Super keen for this! Please post as much gritty detail as possible :)
Ohbse
10 kW
10 kW
 
Posts: 733
Joined: Thu Dec 26, 2013 5:15 pm
Location: Auckland, New Zealand

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby justin_le » Fri Jun 16, 2017 5:22 am

Vanarian wrote:Hi Justin huge job done here ! Are the strain gauges responsive enough ? Keep going! :D


Indeed, the strain gauges on the avenue trucks work perfect. There's a lot more intrinsic dampening of the signal as a result of the natural springyness of the material so the noise spikes on rough surfaces aren't as high, but it's still way more than responsive for sensing the weight shift. And unlike the previous versions with the strain sensing on the hanger, we've had no problems at all with signal drift. The zero point seems to stay consistent withing +- 1lb everytime the board is turned on.

Ohbse wrote:Super keen for this! Please post as much gritty detail as possible :)


Will do!

The goal for the weight sensing trucks has always been to make them something that anyone could use regardless of whether or not they get the rest of the system from us. They'd be available as a stand alone product for anyone else who wants to experiment with their own weight sensing control scheme, and so for that we have all the signal conditioning done onboard the amplifier PCB so the finished truck has a single 3 conductor cable coming out of it. Gnd, 5V, and Signal.
AvenueTruckOnBoard.jpg
Side view of the installed truck. Single wire coming out
AvenueTruckOnBoard.jpg (81.72 KiB) Viewed 838 times


The signal line sits at ~1V with no weight on the truck and increase to ~4V when there is 200lb of compression. This way electronically it is quite similar to a normal hall effect throttle, and should be pretty easy for people to interface with their own electronics if they don't want to use a Cycle Analyst.

For the motor attachment, we noticed that most of the hub motors from China seem to be standardizing around a 12mm square interface to lock the motor stator against rotation, so we just milled this same shape on the end of the Avenue hanger. The skateboard hub motors are quite a bit wider than the bearing spacing on normal wheels and stick out farther than the truck axle, and to accommodate that we put a threaded hole in the end of the axle so that you can use an M5 bolt to hold the motor on, and use a bolt appropriate for the motor length.

AvenueMachinedHangar.jpg
Details of the truck hanger to facilitate hub motor mounting
AvenueMachinedHangar.jpg (69.44 KiB) Viewed 838 times


Our target is to get the pricing of the completed truck assembly (suspension base plate + integrated weight sensor + machined hanger) on the order of $90-$100.
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Controllers

Postby justin_le » Fri Jun 16, 2017 6:00 am

From the getgo we've been using the field oriented controllers from ASI for our skateboard projects since they are awesome in all regards for doing high finesse control of EVs.
Image
However the wiring process of hooking up two separate controllers to the same battery and signal lines was never very clean so we wanted to properly package two controllers into a single effective housing with a single set of plugs. The result is basically a squashed flat version of the Phaserunner with two controllers side by side, sharing a common battery, shunt, and CA plug.

We tried to make it as narrow as possible by nesting mosfet tabs of one controller under the PCB of the other. The finished size is 92mm x 98mm x 24mm. It's not exactly tiny by RC controller standards but it's small enough to be workable under the deck.

DualControllerCAD.jpg
DualControllerCAD.jpg (43.49 KiB) Viewed 832 times


We have a daughtboard PCB to combine the signal and power inputs of both controllers and then has inboard MT60/XT60 plugs and convenient pads for the signal wires (hall sensors + CA). And then there is an aluminum heatsink for all 12 mosfets to bolt onto. This heatsink has threaded holes in it so that it can be securely screwed to the skateboard deck from above without much fuss.

DualControllerUnpotted.jpg
DualControllerUnpotted.jpg (86.74 KiB) Viewed 832 times

DualControllerOnDeck.jpg
DualControllerOnDeck.jpg (130.06 KiB) Viewed 832 times


And then finally, the whole affair is potted just like the Phaserunner so that there is no concern about exposure to vibration or water ingress. So this is more or less what the finished part will look like. So far we've made one red and one black, and the red definitely looks cooler.

DualControllerRed.jpg
DualControllerRed.jpg (57.2 KiB) Viewed 832 times


The pricing on this dual controller isn't going to be cheap, probably $375-400 range. We're making it mostly as a high-end option for people, but there's no reason in principle that you couldn't run VESC's or some other controller so long as it allows you to modulatel both forwards and braking torque from a single signal (either 1-2mS pulses or an analog voltage).
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Cycle Analyst Controls

Postby justin_le » Fri Jun 16, 2017 6:35 am

The other critical piece to this build design is the control circuit that actually reads the two weight sensor signals and then drives the motor controllers accordingly. We've been using a Cycle Analyst for this since it already has all the signal and sense lines and a mature codebase that is well flushed out for EV's, even if it's not the most modern looking device. What is normally the torque signal input of the CA3 now becomes the signal for the rear weight sensor, while the Aux Potentiometer input line becomes the signal for the front weight sensor.

SkateCAWires.jpg
Showing how the weight sensor signals are connected to the V3 CA PCB
SkateCAWires.jpg (158.38 KiB) Viewed 823 times



One issue with the CA is that it's not exactly a compact piece of electronics, and even when we switch over to the original small LCD module it's 84mm x 40mm x 20mm and requires some consideration for mounting. While it looks really nice embedded in the deck with a flush mount of the display as we did in the previous couple builds, not everyone has the means to machine their deck this way so we thought it should be possible to make a rugged CNC'd enclosure that would fit on top of the deck.

Here's our first prototype of that. We made it so that it uses the same bolts that hold the truck in place, and the advantage of locating it under the trucks is that it's easy to have a cable feed through and cavity in the deck here for all the connectors. A cavity that is then hidden by the CA on the top and by the truck on the bottom.
SkateCAonBoard4.jpg
Machined mount for small CA device.
SkateCAonBoard4.jpg (136.34 KiB) Viewed 823 times

SkateCAOnDeck.jpg
SkateCAOnDeck.jpg (104.83 KiB) Viewed 823 times


This worked pretty well, but definitely doesn't look as slick as the flush mount, and we found that the snug fitting aluminum enclosure was a prone to accidentally shorting out traces on the edge of the CA's circuitboard giving us some troubleshooting grief, so we later switched that over to clear plastic.

This whole skateboard project could give us some extra incentive to redo the Cycle Analyst board layout to be much more compact, but for now it's what we have and we'll roll with it as is in the initial release. Anyone with an arduino board or similar could also make their own interface circuit to read the weight sensors on both trucks and command the motor controllers accordingly.
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Cycle Analyst Firmware

Postby justin_le » Fri Jun 16, 2017 7:11 am

The custom skateboard firmware is attached here in the CA3_Skate_FirstBeta.hex file.
SkateCASplash.jpg
SkateCASplash.jpg (147.66 KiB) Viewed 819 times

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.

In the setup menu, you'll see that the aux and torque menus are now changed to rear and front weight sensor menus.
SkateCARearSetup.jpg
SkateCARearSetup.jpg (81.66 KiB) Viewed 819 times


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)
SkateCARearScale.jpg
SkateCARearScale.jpg (80.17 KiB) Viewed 819 times

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.
SkateCAMinFault.jpg
SkateCAMinFault.jpg (92.03 KiB) Viewed 819 times


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
SkateCAMinOut.jpg
SkateCAMinOut.jpg (75.16 KiB) Viewed 819 times


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.
SkateCABrakeOut.jpg
SkateCABrakeOut.jpg (74.44 KiB) Viewed 819 times


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.
SkateCAAssistFactor.jpg
SkateCAAssistFactor.jpg (87.89 KiB) Viewed 819 times

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.
SkateCAMinWeight.jpg
SkateCAMinWeight.jpg (85.44 KiB) Viewed 819 times


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.
SkateCAVout.jpg
SkateCAVout.jpg (93.78 KiB) Viewed 819 times


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.
SkateCAWeightsScreenjpg.jpg
SkateCAWeightsScreenjpg.jpg (97.96 KiB) Viewed 819 times
Attachments
CA3_Skate_FirstBeta.hex
Firmware File for the Skateboard CA3 Code
(91.45 KiB) Downloaded 11 times
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby rowbiker » Fri Jun 16, 2017 8:58 am

Justin, thanks for the skateboard firmware upload! I have downloaded it for use on the prototype e-assist Rowbike as discussed over on the CAv3 thread.

May I assume I have your permission to become a 'half' beta tester for this project?

I will be using only half of the torque signals (the forward/throttle portion), since I'll be using the traditional regen/brakes system of an ebike for the vehicle stopping duties. We got to this point because a PAS-less CAv3 firmware apparently is the best candidate for meeting my project's needs.

I assume it will become obvious to me to hook my (forward/throttle) torque input to either the CA's standard torque wire, or to go the AUX input route.

My prototype strain gauge amplifier is right at home with the ~ 1-4V signal range, and the "pounds" of torque should also be a realistic unit to use. I'd love to see a schematic of the amp you're using on this version, since it's obviously different than the earlier "Strain4" board you developed -- and which I've also been using for development over the past three years.
rowbiker
10 W
10 W
 
Posts: 69
Joined: Tue Jul 16, 2013 1:36 pm
Location: Saint Paul, Minnesota USA

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby wineboyrider » Fri Jun 16, 2017 9:03 am

sbsd
ES IS SAVED! THANK YOU JUSTIN.
User avatar
wineboyrider
100 MW
100 MW
 
Posts: 2863
Joined: Wed Sep 30, 2009 9:08 am
Location: Tularosa, New Mexico

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby justin_le » Fri Jun 16, 2017 2:48 pm

rowbiker wrote:May I assume I have your permission to become a 'half' beta tester for this project?


Actually, I think you're gonna become a full tester here! You'll hook up the load cell of the rowbike to the front weight sensor (the aux input), and for the rear weight sensor you'll hook up any kind of throttle or potentiometer device to control braking and regen. You can still have the ebrake input line on the brake levers, but you could also just have a thumb or twist throttle and when you turn that it simulates weight on the rear sensor causing the CA's output to go into increasing regen territory for variable braking control.

For the scaling factor, you'll be able to calibrate it so that more or less the lb. display on the front sensor is the same pounds as you are pulling on the handles of the rowbike, so it will be meaningful units. And the data output rate of the CAskate code is 11Hz, so if you log the data with an analogger or laptop you can see the force curve of each rowing stroke with OK resolution, kinda like what they have on the rowing machines at the gym.

I'd love to see a schematic of the amp you're using on this version, since it's obviously different than the earlier "Strain4" board you developed


Oh it's just the same circuitboard but stripped of the PAS pass thru signals and wiring pads to make it more compact. This way it folds over and sits right over the strain gauge and is then potted in a silicone protection
StrainAmpCircuit.jpg
StrainAmpCircuit.jpg (70.64 KiB) Viewed 768 times
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Batteries

Postby justin_le » Sat Jun 17, 2017 4:16 am

The process of getting this skateboard kit project worked out has involved 5 key components; 1) the hub motors, 2) the weight sensing trucks, 3) the motor controllers, 4) the control/display, and 5) the batteries

China took care of the skateboard hub motors so we no longer need to do that. The avenue suspension baseplate has made it straightforward for us to produce the weight sensing trucks. Our experience developing the Phaserunner controller for ebikes gave confidence in making a dual version for skateboards that is fully potted for the rigors of being on a skateboard deck. The Cycle Analyst has been something of a given for the control and display device. And then finally, for the batteries, we have the LiGo packs.

These are 36V 98 Wh battery modules detailed here:
viewtopic.php?p=1264382#p1264382


Our reason for choosing a flat 10s x 1p layout was in part driven by the desire to have a convenient battery option for powered skateboards. It also does allow them to stack well for building up into larger conventional ebike batteries which is a much more familiar market for us, but the skateboard application was always in mind in the design. You can fit 2 end to end down the middle of the deck easily, or 4 packs by having them side by side as well if you wanted a lot more capacity.

Board4LiGos.jpg
Board4LiGos.jpg (153.26 KiB) Viewed 741 times


Since the batteries are each individually under 100 Wh, this means that when you unplug them it now becomes a device with sub-100 Wh batteries allowing you to take it on a plane. This is one big advantage of the smaller modules compared to having a single 200 Wh or 300 Wh battery. 100 Wh by itself is really not nearly enough capacity to be truly useful, while 200-300 wh is about right (Still light enough to carry easily but sufficient range for 15-25km trips.) Here you see a closeup of the andersons that make the parallel pack connection, and the extra anderson that becomes the charging port.
SkateboardAndersons.jpg
SkateboardAndersons.jpg (141.81 KiB) Viewed 741 times


The LiGo batteries have 4 bolt holes in the corners allowing them to be bolted or screwed to the deck, though some consideration needs to be given if it's a flexible deck to put spacers under ends of the pack so that the deck can bend while the batteries stay mostly flat.
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled
User avatar
justin_le
1 MW
1 MW
 
Posts: 1985
Joined: Mon May 28, 2007 3:27 am
Location: Vancouver

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby flathill » Sat Jun 17, 2017 6:18 pm

lets see the new setup in action with agressive accel and braking on a rough roads (flat, uphill, downhill)

vid please & tanks
Last edited by flathill on Sat Jun 17, 2017 6:20 pm, edited 1 time in total. View post history.
flathill
100 kW
100 kW
 
Posts: 1397
Joined: Tue Jul 06, 2010 9:26 pm

Re: Grin's weight sensing electric longboards #4 and 5, and

Postby melodious » Sun Jun 18, 2017 7:55 am

As they say on Route 66, Nice trucks! :mrgreen:
Last edited by melodious on Sun Jun 18, 2017 8:30 am, edited 1 time in total. View post history.
Surly Ogre rigid 29er, rear 10T MAC @ 50V 25AH & 40A: 30mph road/gravel/hill machine
42" dual diagonal Eskateboard @6s & 90mm wheels
Next: eMTB @10-12s & 8"-12" pneumatic wheels; Got Strapped? d-(',')z
melodious
100 kW
100 kW
 
Posts: 1274
Joined: Fri Aug 26, 2011 8:57 am
Location: East Coast, U.S.A.


Return to Stand-up E-scooters and E-skateboards

Who is online

Users browsing this forum: No registered users and 4 guests