Weight sensing longboard build

Thanks alot for the input! We also have a 9DOF IMU (I don’t think we"ll need the magnetic part, but we got it just in case we got some new ideas). Yesterday, we kind of got all the parts we needed to assemble the board and make it run. So until now we didn’t really think about the algorithms involved, since we were busy with mechanical design. We will ask our robotics professor for advice on the speedwobble problem, since he has got years of experience in control theory. He will probably get us in the general direction of how to identify it / derive a transfer function etc…

3 Likes

Justin at ebikes.ca has been working on that type of system for a while… hopefully coming to market soon.

A weight sensing longboard, or one with active wobble suppression ? As far as the weight sensing part goes, if you already have a vesc, you could build it pretty cheap. And it was actually pretty easy to do. The only thing that might be a little hard for the average hobbyist is the math involved: linearizing the in/output using a linear regression.

Wobble suppression seems like cool tech but completely unnecessary. If you have the right hardware and tuning, you won’t get wobbles.

Justin I think is working on conversion kit parts as the rest of his site is geared towards DIY

That is not completely true. Yes, you can minimize the risk of wobble with the perfect setup, but you cant prevent them completely. But maybe it is possible in the low speed range Esk8ters normally reach.

I talked to a pro and he said we should be running different rake in the rear

All parts (including gears) were drawn in CAD and manufactured in the university workshop by professional machinists.

mounted to the board: For safety reasons, we have to write code that checks the validity of each signal we have to process. That way the board will not go skating off on its own when a connector/cable breaks or gets loose.

5 Likes

I haven’t updated this page in quite a while, since the hardware part was kind of over. And i didn’t think anyone would be interested in software updates and bug fixes (they take quite some time). So here are some quick demos of how it all works together:

Switching from controller mode to weight sensing mode:

Safety in remote controller mode, when the user falls of the longboard, it gently comes to a stop:

Braking in weight sensing mode:

All the safety gear i’m wearing is for liability issues since it’s a university project :smiley:

3 Likes

Hi,

Really cool project! I was wondering what kind of strain gauges you are using?

The strain gauges we used were regular onedirectional, ± 5% , 350ohm strain gauges made for aluminium. These specific ones are manufactured by HBM, but there are lots of alternatives. Just make sure you use ones made for aluminium when possible, since these strain gauges have the same coefficient of expansion as aluminium, which makes sure you don’t end up with skewed readings when your trucks expand differently than your strain gauges.

How’s this going? Interested to see an update.

1 Like

The project is on hold right now, and we have been assigned different projects. Next year another team of students will continue our work. I think we accomplished quite a lot in only 4 months. We currently have a working weight sensing E-skateboard, with a working android app to switch modes. We were not able to work on other goals like wobble suppression since we only had about 1 month to complete all software which included communication between Arduino, 2VESCS, Strain gauge amplifiers, bluetooth module, remote control. As well as making the app and signal conditioning etc.

I’m sorry if this is not exactly what you expected, but we had about 8 hours a week to work on this since this certainly isn’t the only thing we have to deal with in school. If you would like any more info about how we did certain things you can always ask!

1 Like

Understood. Remarkable work in the time you had!

Any chance that you could post your code? I am really onterested in trying it out on my personal board. Really cool tech you have here…

Which part of the code are you interested in ? We didn’t have much time to code left so it really is a mess :smiley:

1 Like

Cool to see you connected ! I’m sending you a PM! I learn to make a similar thing with 4x wheatstone bridge cells and mpu6050 combo with each VESC.

If you’re willing to share your code I’d be very grateful as it will allow me to get to ride my skates sooner than I hoped.

Do you have the following parts available by chance ?

I’ll figure out how to adapt it !

Ok, i can’t seem to find the code but i can tell you how the algorithms worked. But they weren’t perfect by any means!

Weight sensing: we used proportional current control based on the weight distribution: weight distribution: weight_front/(weight_front+weight_rear) Every rider has a different riding position, some stand 55%, some 50%. So we added a calibration using the android app. You got into your “neutral” position and then this was saved as a calibrated value. let’s say you neutral value was 60% (so in neutral position 60% of your total weight was in the front), full forward was 70% and fully leaning backwards was 40%. You then have a range from 60-70 pct which was mapped from 0 to max_current. You then also have a range from 40-60 which was mapped from max_braking_current to 0.

We then still had the following problem: When the board accelerates you lean backwards, which makes the board think it should brake. once it started braking, your weight shift to the front again and it started speeding up. Cycle repeats :smile: We just added a low pass filter to the current signal to the motor so smoothen things out a bit. This of course also added some delay, so had to find some tradeoff.

Now the maxiumum acceleration based on weight distibution: Our goal here was to use the RC remote, but make the board accelerate in such a way you couldn’t fall off. So at for example 50% throttle, you want 40% of the riders weight in the front, and at 100% throttle you want 30% of the riders weight in the front. This was done using a PID controller, so once you leaned back too far (falling off), it slowed down a bit. And when you leaned too much to the front (you still have room to accelerate), it sped up. Same thing for the maximum deceleration.

We didn’t use out 9DOF module or torque vectoring of any kind. We bit of more than we could chew :wink:

3 Likes

Ok thanks for the tips, that’s already a good base for me :wink: if you find some code back hit me up ! I’ll upload what I’ve done once I get something working.

Ok, will be interesting to see how others tackle the same problems! :wink: I know the low pass filtering of the current signal isn’t really the real solution to our problem, and you could probably somehow compensate for the rider falling backwards a bit. But we couldn’t really come up with a simple algorithm to model the human balance (and again, every rider has a different COG etc.)

1 Like

If I manage to get a simple “calibration step” to adapt the sensitivity of the strains to each rider it could do the trick with the low pass filter ! Now main issue is I’d like to get an input reactivity of under 20ms max with total calculs… that’s asking a lot compared to simple Rf transmitters but it could do the trick. 15ms timing would make the delay virtually undetectable but then signals need to be very relaible.

Back on the desk !