Popular Post dycus Posted August 29, 2023 Popular Post Share Posted August 29, 2023 (edited) What if you took the IMU (motion sensing chip) off an EUC's mainboard and mounted only that on the pedal hangers, leaving everything else in a backpack? I've had this idea for a while and was just waiting for a cheap, beat up MTen to cross my path. It ended up being a lot more work than anticipated, but it was a fun process, and the final result is really cool. If you just want a quick demo, check out the video. In this thread I'm going to describe the build and technical details on how I made this work. I ended up having to hack the microcontroller so I could read the protected firmware and modify the PID values in it! I found a good deal on an MTen3, $300 with a dead mainboard, and I got a replacement green board for $60. Though all the parts and materials ended up being a few hundred more! The first step was to figure out what IMU was on the board and what communication protocol it used. Thankfully it was an older but common part, Invensense MPU-6050, rather than some unobtainium China-only chip. This meant I could just buy more rather than having to desolder it from the mainboard. It talks to the microcontroller via I2C, a two-wire protocol that is only intended to go a few inches on PCBs, certainly not over 5ft of cable. To run these signals over such a long distance, I used a special chip, NXP's PCA9615, which converts the I2C signals to differential and back. Differential signals are noise-immune and this chip can go 10ft or more. I designed a small PCB that has the IMU, I2C extension chip, regulator, and misc other required parts. There's one board at the pedal hangers and one at the mainboard, they just have different parts populated to perform different functions. Checking the I2C signals to see what timings I was dealing with PCB schematic The pedal hanger PCB, the IMU is the large square chip The mainboard side, which needs fewer parts I made a shielded box for the IMU board because it would be in close proximity to the motor phase wires. This was most likely completely unnecessary, but it wasn't much extra work and it looks cool as well. The cable harness I made that goes back to the mainboard is also shielded, that's more important because the signal wires run next to the phase wires for 5ft. I also soft-mounted the IMU box with rubber grommets and shoulder bolts. The connection to the pedal hangers is still super solid and the box doesn't move unless you press on it, but this protects the IMU better than hard-mounting in case of, say, a pedal strike. Had to drill and tap some holes to mount the IMU Because the wheel came with the later small black board and I got a green board replacement without the heatsink, I had to drill and tap new holes for that as well. Had to chop a couple bits off as well to fit around parts I added later, and to avoid one of the phase wires. There ended up not being room for the fan, but I don't think it's too big a deal to leave it out, it only blew on the top of the board in a tiny sealed box, it probably barely did anything. I'm not gonna stress this wheel too much anyway. Hall sensor wires and motor phase wires shortened and connectorized. The hall wires plug into my PCB just to jump to the main shielded cable. PCB mount for the mainboard, again with probably unnecessary shielding I cut the I2C traces between the original IMU and the microcontroller, but otherwise left everything as-is. In case this project didn't work out, I could at least repair the traces and have a working MTen3. I tapped into 5V, 3.3V, ground, and the microcontroller I2C. Board mounted, with I2C/power and hall sensor cables plugged in Wheel side of the shielded cable harness Completed 5ft cable Overview of the entire cable, which includes the 13-wire IMU/hall sensor harness, three phase wires, separate power button wires, and a central steel rope in case the cable ever gets yanked. The other cables are wrapped around the steel rope so they can't ever be pulled taut. Everything gets an outer sleeve for aesthetics and to hold everything together. This photo is of the final cable which used smaller 14 gauge phase wires, the prototype used 12 gauge and was way too big. Stock motor wires are 16 gauge. With the PCBs done at both ends, verified working properly, the cable made, and IMU mounted, it was finally time to test! I threw the mainboard on the battery and taped the wires to it for some quick testing. Sadly, the wheel only shook violently and was completely unrideable! I didn't even try. All three modes jerked the wheel back and forth, soft mode was the least bad but still not functional. (And the IMU orientation and motor phase wires were all correct). I assumed the problem might be that the IMU is so much lower, so it was messing with the PID tune. I stuck it on a pole at its stock height, but it didn't help any. I eventually found out that placing a large mass, my bench vise, on the pedal worked. The wheel balanced just as expected. This obviously wasn't a tenable solution though, I'd have to add like 20lbs of lead plates to the pedals. The problem was that the stock PID parameters are tuned for a large mass - the battery pack - being attached to the IMU. This significantly slows the response of the system, whereas now, with so little mass, every motor movement moves the IMU way too easily and it just oscillates. Original test: Tried raising the IMU to the stock position and attaching some lead weights for damping - still no good! I realized the only way this project was going to work is if I could change the PID parameters to suit the new dynamics of the system. There is a small group of people that have figured out how to modify the firmware of Begode wheels to change the PID parameters. It's related to how Freestyler was able to add PWM tiltback. I got access to this info, but I was unable to dump the firmware off the board because the microcontroller had its readout protection enabled! Thankfully, for this particular microcontroller (STM32F103), there is an exploit that enables you to bypass the protection and read the firmware. It's very cool, it involves loading some code into RAM through a debugger and glitching the power supply to run the code and read the flash. This paper describes the attack in section 7.4 if you want the technical details. https://www.usenix.org/system/files/woot20-paper-obermaier.pdf As it turns out, this is pretty much all it took (along with the pre-compiled code provided by the paper's author https://github.com/JohannesObermaier/f103-analysis/tree/master/h3) Close-up of the PCB modification I had to make, then fix (had to cut the 3.3V to the microcontroller so I could glitch the power), and the debug/programming wires on the left I was able to tune the PIDs so that the wheel was stable and didn't vibrate or jerk at all! So the project could continue, and I started work on the case for the stuff at the pedals, and for the battery/mainboard. I reused the spin kill button as a power switch at the pedals. My board and cable harness do have a connection for a spin kill button which would go at the pedals, but I didn't end up adding one. I stuck an LED on top for power indication. You can see the mounting screw for the steel rope just below the middle of the IMU box I decided it would be fun to use the original MTen3 shell as the backpack itself. It's already got the mounting points for everything and it's a great way to reuse the parts. Marking where to cut the case with a piece of string After the cut, I designed and installed some printed parts to later mount feet to the bottom and cover the holes Mounting points for the backpack straps, took a few tries and test prints to get the curvature right to sit on the shell Clamp for the steel rope, the rope sits in the channel and sticks up slightly so when I tighten the clamp against the case, it squeezes the cable Inside mounting of the backpack strap mounts and steel rope clamp Mounting points for the bottom of the backpack straps, these were much simpler and easier The final board before sticking it in the case Lotta wires crammed in this one half! I ended up keeping the stock power button in parallel so it can be turned on at the backpack or the pedal. The USB port stayed and the charge port is in its stock location as well. The headlight had to go but I kept the LED strip! I wanted a quick battery disconnect in case something went wrong, who knows what this thing might do while I was tuning it. I ran the positive battery wire through an XT60 connector and made a panel mount for it Estop cable and handle! Just yank it if anything goes wrong! Precharge resistor so the connector doesn't spark. Plus a little green LED for fun, so it flashes briefly then dims out as the capacitors charge up. Only spot the buzzer would fit, attached to the left foot Everything all together Reused the spin kill hole to keep the programming port accessible, which I used to do the final PID tuning Final overview shot of the backpack Because there's no longer any way to rest the wheel against your calf to mount it, I made some foot pegs/power pads. They mount to a bit of aluminum extrusion (MakerBeam) and can be adjusted up and down with wing nuts. Final wheel Was definitely a fun project, it took me 114 hours in total and several hundred dollars. About 20 unique custom-designed 3D-printed parts. The engineering challenge alone was worth it though! And now I've got a fun screwaround wheel for playing in the parking lot before group rides. If you're going on Marty's SoCal EUC tour (final year!), you'll probably get a chance to see it! Edited August 29, 2023 by dycus 15 1 3 Quote Link to comment Share on other sites More sharing options...
Planemo Posted August 29, 2023 Share Posted August 29, 2023 This is utterly, staggeringly amazing! Not only the EE skills but the quality of design and production too. Awesome! 2 1 Quote Link to comment Share on other sites More sharing options...
Arbolest Posted August 29, 2023 Share Posted August 29, 2023 (edited) Much impress! Very wow! Edited August 29, 2023 by Arbolest 1 Quote Link to comment Share on other sites More sharing options...
Marty Backe Posted August 29, 2023 Share Posted August 29, 2023 Chris, I'm beyond words as to how impressed I am with this effort. The design, both hardware and electrical, and the mechanical packaging is next level. The reverse engineering. And this documentation. I thoroughly enjoyed reading it and look forward to giving it a test ride. 1 1 Quote Link to comment Share on other sites More sharing options...
Marty Backe Posted August 29, 2023 Share Posted August 29, 2023 Come to the 2023 Southern California EUC Tour (starts Oct 14th) and Chris will have it available to test ride Quote Link to comment Share on other sites More sharing options...
on one Posted August 29, 2023 Share Posted August 29, 2023 Do you have a spare battery pack? Quote Link to comment Share on other sites More sharing options...
on one Posted August 29, 2023 Share Posted August 29, 2023 If you put it up for auction on ebay I bet you could get like $7,000 for your creation. Quote Link to comment Share on other sites More sharing options...
onewheelkoregro Posted August 29, 2023 Share Posted August 29, 2023 That is pretty cool. Quote Link to comment Share on other sites More sharing options...
alcatraz Posted August 29, 2023 Share Posted August 29, 2023 That's one impressive forum post. Wow! 1 Quote Link to comment Share on other sites More sharing options...
on one Posted August 30, 2023 Share Posted August 30, 2023 @dycusAt some point, your wheel belongs in a museum, when all the future owners are done riding it, of course. 1 Quote Link to comment Share on other sites More sharing options...
dycus Posted August 30, 2023 Author Share Posted August 30, 2023 8 hours ago, earthtwin said: Do you have a spare battery pack? No, why? Quote Link to comment Share on other sites More sharing options...
Kayvon Posted August 31, 2023 Share Posted August 31, 2023 Amazing work! The PID settings were the most interesting part to me. It's obvious in retrospect, but it hadn't occurred to me that the PID feedback would be tuned for a heavy lower mass. Great white wires, excellent photos, and true engineering skills. Well done! Quote Link to comment Share on other sites More sharing options...
DavidB Posted August 31, 2023 Share Posted August 31, 2023 (edited) That is an impressive project. But it does seem to need a wheel guard and surely it would be more comfortable if the wheel carried the battery weight and that way you would have the added benefit of having only one item to carry. You know, like an Mten3 Edited August 31, 2023 by DavidB 1 Quote Link to comment Share on other sites More sharing options...
dycus Posted August 31, 2023 Author Share Posted August 31, 2023 But that way you don't get a fun engineering challenge or unique conversation piece, so what's the point? Quote Link to comment Share on other sites More sharing options...
Mono Posted August 31, 2023 Share Posted August 31, 2023 8 hours ago, dycus said: But that way you don't get a fun engineering challenge or unique conversation piece, so what's the point? I guess the point could be wondering why you didn't want to invest your awesome engineering talent into something that (additionally) furthers usability, or at least doesn't downsize it by kinda a lot. Quote Link to comment Share on other sites More sharing options...
dycus Posted August 31, 2023 Author Share Posted August 31, 2023 (edited) 3 hours ago, Mono said: I guess the point could be wondering why you didn't want to invest your awesome engineering talent into something that (additionally) furthers usability, or at least doesn't downsize it by kinda a lot. Sometimes I just want to do something fun just to see if I can. And I learned some cool things while doing it (the firmware hacking and PID tuning). Surely you've done things just for the fun of it, even if it's pointless or dangerous, like climbing a tree or something? Yeah, this mod makes an old EUC less usable. But it makes it a lot more interesting and cool (well, in my opinion) and was a lot of fun to make. And that's entirely reason enough to do it. In the past I made a more practical mod for my S18, which used a magnetic tether and backpack battery to extend the range: The Mten cable isn't detachable, I thought about it, but was concerned about it coming detached accidentally and dumping me. I am planning to make a magnetic leg strap for it to really ensure it stays away from the wheel. It's not like this wheel is meant for commuting or anything. Literally its only purpose is for screwing around and showing off in the parking lot before group rides start. So I think it'll serve that purpose just fine. Edited August 31, 2023 by dycus 1 Quote Link to comment Share on other sites More sharing options...
bpong Posted August 31, 2023 Share Posted August 31, 2023 dycus, i think your device has more merit that you give it. i always wondered about what it would be like to have the power source separate from the wheel. and you demonstrate that it does work. i think that the cable connection between power source (backpack) and wheel is fine and it has a dual purpose in being a tether of sorts for when things go wrong and you have to get off. i hope you make a bigger more powerful version and add some electronic monitoring goodies to it that you can wear on your wrist for monitoring purposes. its a great innovation and who knows what you will be doing with this idea in the next few years !!! Quote Link to comment Share on other sites More sharing options...
Marty Backe Posted October 27, 2023 Share Posted October 27, 2023 3 Quote Link to comment Share on other sites More sharing options...
Cerbera Posted October 27, 2023 Share Posted October 27, 2023 (edited) It's certainly an interesting experiment, nice to see working, and made for an entertaining video. And I suppose the answer to the question 'Yes, but why?' is ultimately 'why not ?', but if I'm honest I don't really see the point of the concept. It's harder to get on and off, there are cables hanging about, and you have to wear half of it as a backpack - none of these things are advantages over a more normal wheel ! Edited October 27, 2023 by Cerbera Quote Link to comment Share on other sites More sharing options...
Funky Posted October 27, 2023 Share Posted October 27, 2023 (edited) 16 minutes ago, Cerbera said: It's certainly an interesting experiment, nice to see working, and made for an entertaining video. And I suppose the answer to the question 'Yes, but why?' is ultimately 'why not ?', but if I'm honest I don't really see the point of the concept. It's harder to get on and off, there are cables hanging about, and you have to wear half of it as a backpack - none of these things are advantages over a more normal wheel ! Also you would need d*ck mud flap. And for ladies.. Emm nevermind. Edited October 27, 2023 by Funky 1 Quote Link to comment Share on other sites More sharing options...
dycus Posted October 27, 2023 Author Share Posted October 27, 2023 Watch the last few minutes of the video of people having fun riding it and watching others ride it! That's why I built it The advantage is that's it's entertaining and fun. 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.