Inductores Posted March 27, 2019 Author Share Posted March 27, 2019 I've been busy during last two weeks, so I made almost no progress... but I added some additional components. Every day is a day less to get the board finished. 2 1 Quote Link to comment Share on other sites More sharing options...
h3X Posted March 28, 2019 Share Posted March 28, 2019 I just registered to tell you I'd like to contribute to this project. I program in C and am interested in embedded development. I'm enrolled in a an OS class using C right now. I've previously built an electric longboard so I'm familiar with similar hardware. 1 2 Quote Link to comment Share on other sites More sharing options...
h3X Posted March 29, 2019 Share Posted March 29, 2019 I found this forum when doing research for building my own EUC. The reason I want to do that is mainly budget, but also because I like learning by doing. My approach to the project is more modular than many posts in this thread; why reinvent the wheel? I would use a ready made motor controller such as the VESC and focus my efforts on a PID controller to basically solve the cart pole problem in a loop. If you really want to build a BLDC controller, of course, go right ahead and do that, but I think the first priority should be a microcontroller doing the balancing algorithm. If you want to use Arduino, there is a nice PID library available. Quote Link to comment Share on other sites More sharing options...
Chriull Posted March 29, 2019 Share Posted March 29, 2019 1 hour ago, h3X said: VESC Afair this VESC was designed for e-bikes and cannot handle the voltages of the common EUC motors and battery packs. But imho that's the right way - to use available BLDC controlers... 1 1 Quote Link to comment Share on other sites More sharing options...
h3X Posted March 29, 2019 Share Posted March 29, 2019 (edited) The VESC 4.12 certainly handles my 4.4kW esk8 motor well enough at 44v (12s). I have the current limited to 60A continous and 130A peak. The VESC 6 is designed for higher power. How much current does an EUC draw and what voltages are common? Edited March 29, 2019 by h3X Quote Link to comment Share on other sites More sharing options...
esaj Posted March 29, 2019 Share Posted March 29, 2019 (edited) 2 hours ago, Chriull said: Afair this VESC was designed for e-bikes and cannot handle the voltages of the common EUC motors and battery packs. But imho that's the right way - to use available BLDC controlers... 32 minutes ago, h3X said: The VESC 4.12 certainly handles my 4.4kW esk8 motor well enough at 44v (12s). I have the current limited to 60A continous and 130A peak. The VESC 6 is designed for higher power. How much current does an EUC draw? Nothing wrong with using ready-made controllers. On a quick glance, VESC features says: Voltage: 8V – 60V (Safe for 3S to 12S LiPo). Current: Up to 240A for a couple of seconds or about 50A continuous depending on the temperature and air circulation around the PCB. Typical commercial wheels use 16S (67.2V fully charged) or 20S (84V fully charged) batteries (plus the 100V Gotways that use 24S? But that's an outlier of sorts ). 12S batteries themselves should have maximum voltage of about 4.2V/cell * 12 cells = 50.4V, but I guess the VESC designer wants to leave headroom for voltage spikes (during braking/slowing down, the motor can "kick back" higher voltages). Usually the commercial wheels use 75V Vdsbreakdown mosfets or higher for 16S and probably 100V or higher for 20S (no idea of the 100V Gotways, 120V or more?). Assuming all the power could be transferred to the motor (it cannot, but just looking at maximums), the VESC should be able to put out 50.4V * 240A spikes (~12kW) and 50.4V * 50A continuous (around 2.5kW). During "normal" riding, the wheels don't use anywhere near these amounts of power (I'd claim a few hundred watts), but at the maximum stress situations (think getting going from standstill on an uphill), the momentary values can get quite huge. I'd have to crack open my maths and physics books, but just on a quick googling to look at the "range" of values: so 90kg x 9.8ms x 4.4ms x 0.17 (sin10deg) = 659.7 joule sec which = 659.7 watts.Reference https://www.physicsforums.com/threads/power-needed-to-climb-constant-slope-at-constant-speed.558552/ Not that bad, but the keyword here is constant. When it comes to accelerating to 4.4 meters per second (about 16kmh = 10mph) from standstill on a an uphill, it's a different ballgame. Still, we used to ride generic wheels with 350W nominal motors and that had single 130Wh or 174Wh (16S) battery packs, and they could take lighter riders up hill, so it's not impossible. If you look at nowadays commercial wheels, they're sporting 1000+W nominal motors (well, the motor power numbers should certainly be taken with a pinch of salt) and multiple parallel battery packs (like 16S4P or, on the far end, 20S9P) that can spew out kilowatts of power (theoretically, 20S9P with 10A max per cell should give out about 7.5kW max continuously, way over 10kW in spikes, maybe several tens). I'd claim that the issue is not at the average powers we use. Going down a very slight slope downwards, ie. a few degrees, the average power can be near zero (regenerative braking negates out the power needed to balance) and going straight on a totally level ground with slower speed (thus not much wind resistance) we can get by with a couple of hundred watts. It's the extremes, like high wind, climbing and fast acceleration where things get stressed. I'm not going to start crunching numbers right now, but the momentary values can get quite high... Don't know how trustworthy the old Gotways were, but I could see 2.5kW continuous power climbing a very steep off-road hill slowly on EUC Extreme's old 14" Gotway (forgot the model name, MCM2s+ or something like that from around 2014) and the mainboard temp went up fast. In the end, it's not impossible to make something that works with relatively (compared to current commercial wheels) low power, after all, the small powered generics did work back in the day. It's about what your aim is, do you just want to make "something that (kind of) works" or something that can get close to current wheels? Probably everyone in this thread is more interested in some more specific part of the entire thing, rather than "everything". I "get" to code as much as I want (and then some ) in my work nowadays, but electronics design is my hobby, so naturally I'm more interested in the mainboard design. Then again, I don't have a professional level of knowledge on designing such circuitry, and wouldn't risk my own neck on my own design (well, not without very serious testing first), so why should anyone else? Edited March 29, 2019 by esaj 2 Quote Link to comment Share on other sites More sharing options...
h3X Posted March 29, 2019 Share Posted March 29, 2019 Thanks for the insightful post esaj; I did not expect 20s to be a thing. Nearly all the hub motors I've looked at on banggood and alibaba are below 70v. As for "just making something that works", I believe in iterative development. Instead of making a monolithic plan and executing everything at once, to end up at a high performance monster (which of course is what we all want in the end...) - I think the better approach is to make something that works okay, and then replace stuff to improve it over time as you see what needs to be done more clearly with testing along the way. Basically agile development. Please keep designing electronics! I know I would too, if I knew how... 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted March 29, 2019 Share Posted March 29, 2019 (edited) 30 minutes ago, h3X said: Thanks for the insightful post esaj; I did not expect 20s to be a thing. Nearly all the hub motors I've looked at on banggood and alibaba are below 70v. As for "just making something that works", I believe in iterative development. Instead of making a monolithic plan and executing everything at once, to end up at a high performance monster (which of course is what we all want in the end...) - I think the better approach is to make something that works okay, and then replace stuff to improve it over time as you see what needs to be done more clearly with testing along the way. Basically agile development. It's certainly not a bad approach. But, earlier youd said "The reason I want to do that is mainly budget, but also because I like learning by doing.". Unfortunately, in EUCs, I doubt that you can make your own wheel cheaper than you'd pay for a commercial one. Especially if you look at the second-hand wheels, you can get your hands on a decent starter-wheel for a few hundred. I have a used KS16B/680Wh (16S4P with 2600mAh cells, don't remember the model, probably LG, 30km/h max tiltback setting) with less than 1000km on it, willing to sell it for 500€ + shipping (problem is, shipping from Finland to foreign countries is very expensive for large/heavy packages). Buying parts for a project, with shipping, you can probably expect to get a motor for 100-200€ (do take into account that you likely need to pay VAT + import duties on everything). 16S1P battery pack with 174Wh (2600mAh cells) is probably ~100€ with shipping (with good cells), I paid closer to 250€ for 192Wh (3000mAh cells ) per pack (4 packs in total, project went down the drain in the end, 1000€ ), custom-made and spot-welded with BMSs, but that's Finnish prices . Boards can be anything from 30-200€, of course the cheap ones are for something like 350W nominal motors. If you can find a used shell or make your own, it can be cheap, a commercial shell can be probably something like 100-200€ (I don't really know, never looked up shell prices, but think about this: making the mold for injection molding for the size of an EUC shell can cost from 40k€ upwards, and it's not like they make a million of the shells in the end). Bought separately and with shipping, "low-end wheel" parts can be got maybe for about 300€ (give or take, probably more with all the shipping costs, VATs, import duties). To make something that's more or less on par with KS16B ("baseline", modern wheels are more powerful/bigger batteries/etc => more expensive), you're likely looking at something more like closer to 1000€ (well, let's say 500-700€?). EDIT: Btw, I'm not trying to sell you my 2nd wheel, just saying that the idea that you could make one for cheaper than you'd pay for a decent 2nd hand wheel is likely not reality. Quote Please keep designing electronics! I know I would too, if I knew how... Well, it's not that difficult, the issue is more that there's just so much to learn that it simply can't be done fast (maybe if you have strong maths, I don't). But it certainly takes patience. Edited March 29, 2019 by esaj 1 Quote Link to comment Share on other sites More sharing options...
Inductores Posted March 29, 2019 Author Share Posted March 29, 2019 Bad news about extracting the .bin from the uC, it's protected against Read Out 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted March 29, 2019 Share Posted March 29, 2019 (edited) 13 minutes ago, Inductores said: Bad news about extracting the .bin from the uC, it's protected against Read Out Not surprised, probably all of the wheels have read-out protections to cover their firmware. Likely there are ways to bypass those (just looking at all the clones of products coming from China, or the Ninebot -tool that can change the max speeds ), but I don't know of any. Edited March 29, 2019 by esaj Quote Link to comment Share on other sites More sharing options...
Inductores Posted March 30, 2019 Author Share Posted March 30, 2019 16 hours ago, esaj said: Not surprised, probably all of the wheels have read-out protections to cover their firmware. Likely there are ways to bypass those (just looking at all the clones of products coming from China, or the Ninebot -tool that can change the max speeds ), but I don't know of any. Ninebot (at least with the E+ model) doesn't protect the uC against readout. There are some ways to unlock the protection, but I don't know if I can do it... 1 Quote Link to comment Share on other sites More sharing options...
h3X Posted March 30, 2019 Share Posted March 30, 2019 20 hours ago, esaj said: budget It's not that the final cost is low, but that I can divide it into smaller, justifiable purchases in the name of gaining XP... I could probably just save up the money and buy a commercial wheel, but where's the adventure in that? 1 Quote Link to comment Share on other sites More sharing options...
h3X Posted March 30, 2019 Share Posted March 30, 2019 19 hours ago, Inductores said: protected against Read Out A couple of suggestions: https://www.aisec.fraunhofer.de/content/dam/aisec/ResearchExcellence/woot17-paper-obermaier.pdf https://medium.com/@LargeCardinal/how-to-bypass-debug-disabling-and-crp-on-stm32f103-7116e7abb546 Quote Link to comment Share on other sites More sharing options...
Inductores Posted March 30, 2019 Author Share Posted March 30, 2019 1 hour ago, h3X said: A couple of suggestions: https://www.aisec.fraunhofer.de/content/dam/aisec/ResearchExcellence/woot17-paper-obermaier.pdf https://medium.com/@LargeCardinal/how-to-bypass-debug-disabling-and-crp-on-stm32f103-7116e7abb546 Thanks for the info. I already checked the first link, but it doesn't work with the STM32F1XX... I also checked the second link, I even installed the original IC replacing the original IC from one of those boards, but got nothing... Quote Link to comment Share on other sites More sharing options...
h3X Posted March 30, 2019 Share Posted March 30, 2019 I found some more info. https://russiansemiresearch.com/en/docs/stm32f1.html Quote Link to comment Share on other sites More sharing options...
h3X Posted March 31, 2019 Share Posted March 31, 2019 (edited) Alternative motor controllers: 96v, 80a 22s, 400a vesc 75v, 300a Edited March 31, 2019 by h3X 1 Quote Link to comment Share on other sites More sharing options...
Heyzeus Posted March 31, 2019 Share Posted March 31, 2019 This is a really cool project you are working on. Props Quote Link to comment Share on other sites More sharing options...
h3X Posted April 1, 2019 Share Posted April 1, 2019 I don't know whether you are aware of this, but there has been a similar thread on this board a year ago. It seems lizardmech has already made some motor controllers that would be applicable to the project. Unfortunately that thread seems to have died off. I tried messaging the participants in case they are interested in this one. 1 Quote Link to comment Share on other sites More sharing options...
jmt30897 Posted April 2, 2019 Share Posted April 2, 2019 On 3/30/2019 at 8:22 PM, Inductores said: There are some ways to unlock the protection, but I don't know if I can do it... I know a company in China who is working professionally into cloning the PCBs and cracking the programmed microcontrollers, so that the code becomes visible to read. Here's their website: www.chinapcbcopy.com I guess they might help you with something... 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted April 2, 2019 Share Posted April 2, 2019 On 3/31/2019 at 11:10 PM, h3X said: Alternative motor controllers: 96v, 80a 22s, 400a vesc 75v, 300a Nice ones, although a bit expensive. Making one from components would be probably much cheaper (say, <$50 with a PCB made in China and components bought from normal dealers), but might take a few tries to "get it right". 22 hours ago, h3X said: I don't know whether you are aware of this, but there has been a similar thread on this board a year ago. It seems lizardmech has already made some motor controllers that would be applicable to the project. Unfortunately that thread seems to have died off. I tried messaging the participants in case they are interested in this one. I think @lizardmech made a few reiterations of his motor controllers, and is probably among the most knowledgeable people around the forums when it comes to controller design. Unfortunately he might not visit the forums anymore that often, and I don't know if he's willing to give his designs away for free. I think he did put some/one of them in the github repo for the earlier firmware project, the link's probably buried somewhere in the old thread. Quote Link to comment Share on other sites More sharing options...
h3X Posted April 3, 2019 Share Posted April 3, 2019 I have been looking around the university library and found some books on control theory that are interesting, and some even use the inverted pendulum as an example. While I'm busy with exams right now, I want to build an inverted pendulum to get more familiar with the practical solutions and all the little niggles that aren't mentioned in the theory books. I've also decided to get a commercial wheel (looking at ks16s). That way I can get sensor data from an imu that certainly would help tuning a controller later. 2 Quote Link to comment Share on other sites More sharing options...
jmt30897 Posted April 3, 2019 Share Posted April 3, 2019 6 hours ago, h3X said: I have been looking around the university library and found some books on control theory that are interesting, and some even use the inverted pendulum as an example. Can you name those books please? Quote Link to comment Share on other sites More sharing options...
h3X Posted April 3, 2019 Share Posted April 3, 2019 (edited) 1 hour ago, jmt30897 said: Can you name those books please? I'll visit the library tomorrow and look them up for you. They have pretty generic names like "introductory control theory" or somesuch... Edit: Here's a book I own on the topic, but it only covers electronics and not control systems engineering as in algorithms and mathematics. Edited April 3, 2019 by h3X 1 Quote Link to comment Share on other sites More sharing options...
h3X Posted April 4, 2019 Share Posted April 4, 2019 Here are two books from the library (with ISBN page) 1 1 Quote Link to comment Share on other sites More sharing options...
Inductores Posted April 5, 2019 Author Share Posted April 5, 2019 Yes, I know the layout is not finished yet... but I built a small setup in which I can test a new firmware (if I can get some help from you...) If you want to try, this is my setup: Instead of using a physical wheel, the Hall sensor from the wheel could be simulated using an Arduino Mega and so to get some simulated values (like speed or distance). This setup is quite cheap to build using modules and boards from AliExpress and eBay, so if you have some knowledge I would be glad to receive help from you. ...and yes, I'm still working on the layout. 1 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.