Onewheel Build Guide

Also Arduino is way easier to work with having to reprogram your vesc and all that crazy stuff

Damn its super cool to see someone working on this. Do you have any sort of build process or parts list so people could start building their own?

Do you have that code available with the footpad sensors? I would like to try it and see if i can get it to work.

Have the footpad sensors been specified? A BOM would be great!

Hello all who have commented,

The code with the foot sensors is still a work in progress (the code works, but adding the foot sensors has broke other parts in the code) I have also added a Kalman filter to the gyro (so that there is minimal drift). The new code should be up soon. If you want to contact me about this project, or have any questions contact me at [email protected], leave a comment on this form, or you can google hangout me ([email protected]) at 3-4pm (PST may 9th) To discuss.(this will be the best way, because I can share the most updated code along with answer most questions (as best I can). Good luck! And feel free to contact, -Max

ALSO, If any of you are experienced in C++ then feel free to contact me (best via hangouts or email) To help me finish the code faster.

1 Like

If you want to discuss about this contact me on google hangouts from 3-4pm (PST may 9) today, and I can give you the work-in-progress code, and explain it.

UPDATED CODE:

This code has compatibility with PID and Kalman filter built in along with foot sensors to turn it on. The hook-up guide is a follows

Arduino-MPU6050

A4-SCL A5-SDA 5V-VCC GND-GND

Arduino-footsencors
GND-ONESIDE A0-OTHERSIDE

GND_ONESIDE A1-OTHERSIDE you will also need a 10k ohm pull up resistor from 3.3 to A0 and A1.

Arduino-VESC

PIN3-DATA GND-GND 5V-5V

If you have any questions please comment on this form or contact me at [email protected].

Links;

VESC

https:///products/torque-esc-bldc-electronic-speed-controller

Foot Sensor (FSR)

https://www.amazon.com/Adafruit-Round-Force-Sensitive-Resistor-FSR/dp/B00XW2MIRQ/ref=asc_df_B00XW2MIRQ/?tag=hyprod-20&linkCode=df0&hvadid=312727440900&hvpos=1o3&hvnetw=g&hvrand=10104964395484814044&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=1013581&hvtargid=pla-571396511975&psc=1

Arduino

. https://www.amazon.com/Teensy-3-2-with-pins/dp/B015QUPO5Y/ref=sr_1_3?gclid=CjwKCAjwiN_mBRBBEiwA9N-e_lwzqPukBJAB7jffS6Xo3iaYqIrGLus2Pp_4HR84tU6UIPkwBmX-MxoCzqYQAvD_BwE&hvadid=176320835894&hvdev=c&hvlocphy=1013581&hvnetw=g&hvpos=1t1&hvqmt=b&hvrand=13756269608124661101&hvtargid=kwd-35744547392&hydadcr=3016_9782497&keywords=teensy+arduino&qid=1557721656&s=gateway&sr=8-3

CODE

4 Likes

Thanks man! Anything else? Is there a motor in US?

I’m not super experienced with c++ but I’m still an engineer :slight_smile: so I’ll try to help out

I’m interesting in building one of these too. I can program in C and ASM if you still need help.

What do you plan to use for motor mounts? I imagine the wood is much weaker compared to the aluminum rails the OneWheel uses. Do you think it would be possible to use OneWheel rails (OEM or aftermarket)? Speaking of compatibility. What about tire options. Would this motor be compatible with Hoosier tires?

Also, what do you think about adding “LIDAR” (most likely ultrasonic or IR) sensors to the bottom front of the board? Like this board: https://www.hoverboard.com/ Might help prevent nose dives due to terrain. Maybe an Ultrasonic sensor like: https://www.amazon.com/WYPH-Ultrasonic-HC-SR04-Distance-Measuring/dp/B00P5W1JLM/ref=sr_1_6?keywords=Hc-sr04+Ultrasonic&qid=1558330264&s=electronics&sr=1-6

Anyways, just wanted to say again how great a project this is. Hope it inspires many more builds to disrupt the OneWheel monopoly.

the ultrasonic thing is interesting.

@Remieknaapen did you try @MaxGoldenson code? Im gonna try it this week.

I think it would be interesting to use 3 of them in the front (that way you have redundancy in case one fails). It would also be interesting to use 3 IMUs as well (as we are kind of developing a safety critical system) lol

Regarding my question about using OEM or aftermarket OneWheel aluminum rails I found a couple of listings on ebay.

Stock XR rails for $175: https://www.ebay.com/itm/Onewheel-XR-NEW-Stock-Rails-PREORDER/173899174029?hash=item287d32d08d:g:~tIAAOSwxL1cZLeR

Aftermarket extended XR rails for $200:

For a battery pack, has anyone considered using 21700 for extended range? https://www.imrbatteries.com/samsung-40t-21700-4000mah-30a-battery/

2 Likes

No, because not only will be an accurate but when you till the ultrasonic sensor will be at a different angle and therefore providing you a different link that it senses. The problem is is that the sensor can’t tell you how far from the ground you are but simply how far the sensor is from it’s reference.

1 Like

@Sindre Regenerative breaking wont be a issue when motor is 48V and battery pack is 12s…? Also what Vesc setting are you using?

Reg braking works fine and no issues with the 12s. I am running 30A on it, and its running fine!

you do realize that 12s is 50.4v, that will kill a 48v motor.

The motor is rated at about 15amps, 30 amps is not good

That shouldn’t be a problem since we can calculate the gyroscopes distance relative to the ground (on a flat surface) if we use a little bit of trigonometry. We can then calculate the actual distance to the ground using the ultrasonic sensor (which is relative to the position of the gyroscope which is relative to the ground).

Even if we don’t want to use the ultrasonic sensor, I think this equation is important as we could use it to implement a “pushback” feature (although instead of doing all the math you could just measure the gyroscope angle while positioning the tip of the board against the ground to calibrate it, but this would only work on flat surfaces).

However, if you do all the math I think you could interpolate the ultrasonic sensor readings to get the angle of the ground (measured from the tip of the board to the center). You could give a warning if the angle of the ground approaches a certain value (as you can now measure the exact distance of the nose of the board to the ground) or even allow the board to tilt back within a certain range to avoid nose dive.

I’m not sure how FM implements there version of pushback, but I think it may also be possible to calculate the angle of the ground by observing the amount of power delivered to the motor vs the current acceleration measured: http://trutechmotors.com/white-paper/wp-1-title/

Now that I think about it, we should probably start there and think about Ultrasonic sensors after we explore that method.

What version do you suggest 600W / 50v ?

12S(50V max, 43V average) seems a bit high for that motor and there is a high risk of wrecking the FOCBOX at 12S when relying on regenerative braking. A 10S battery system should be safe for both.

1 Like