Page MenuHomePhabricator

Build a portable motorized vehicle for a 3 year old
Closed, ResolvedPublic

Description

These motorized toddler cars are Very Cool:

71vZubqnBUL._AC_SL1500_.jpg (1×1 px, 146 KB)

...but they are large (won't easily fit in an Audi Q3) and heavy (roughly 40 pounds). We live in the city on a steep hill, and I don't have a practical way to get one of these somewhere where they'd be safe and fun to drive. For now, we spend two hours in the car to pay $30 to stand in line for 10 minutes to drive one in a circle for 5 minutes.

I looked for one that's built more like a dune buggy or Go Kart, imagining it might have a frame that could be folded (or made foldable) and/or taken apart quickly, but didn't have much luck finding anything that looked promising.

I did find these "Hover Karts", where you strap a simple frame to a hoverboard:

71T1ZpzNiRL._AC_SL1500_.jpg (1×1 px, 125 KB)

These are relatively portable: the hoverboard is ~12 pounds, the frame is ~12 pounds, and the pieces come apart and can fit in a large backpack and reassemble in a couple of minutes.

However, there are some safety issues for a small child. In particular:

  • it's difficult to get in and out, because the hoverboard will drive forward as long as there's weight in the seat, so it's easy to run over your legs and have a bad time; and
  • it instantly accelerates to one million miles an hour.

In theory, these problems can be fixed in software.

Event Timeline

epriestley triaged this task as Normal priority.Dec 1 2022, 4:02 PM
epriestley created this task.

Motor Drivers

Hoverboards usually have two brushless DC motors. To drive brushless motors, you need a motor driver / electronic speed control (ESC). The hoverboard I bought has hall sensors on the wheels that give an ESC which supports them better control of the wheels (and you can read wheel speed, etc.) so I want an ESC that supports hall sensors.

There don't seem to be a huge range of options for these at higher voltages. They're fairly available at drone / rc-car voltages (but usually sensorless), but hobby drones usually top out around 6S (~25V) and these are 36V motors.

Cheap Boards (Red)

I did find some. I started with these RioRand Controllers that cost $17 on Amazon. (These are widely available on Amazon / AliExpress under a hundred different brand names, but they all look like the same board.) I've had some success with these:

  • Nothing has blown up yet.
  • The wheel motors turn in both directions, and speed control works. The motors go much, much faster than I need them to go at maximum speed, so there are no issues with power.
  • I got some sensible-seeming pulses off the Ha hall wire.
  • This is my first real use of XT60 connectors, and they've been easy to solder and work with.

However, they also have some issues:

  • The boards are mostly intended for direct wiring to physical switches and are a pain to configure for PWM input. You have to solder a jumper that's buried in the middle of the board, and then solder something to two holes on the board that arrive full of solder, right next to tiny SMD components, and not 2.54mm apart. I don't stock any connector that's good for this.
  • There's a motor speed output, but it's just a header pin, so you have to desolder that if you want a locking connector (but good luck, these aren't 2.54mm either) or a through-hole jumper wire. Since I expect the vehicle to experience oofs, I'd like to make all the connections more oof-resistant than "dupont on header pin". These headers are also right next to SMD components. I ripped the through-hole plating out of one of the boards during my desoldering attempt and effectively killed it.
  • The motors go way faster forward than backwards (???). Since the vehicle doesn't need to go fast backwards, this isn't necessarily a fatal issue, since I can just swap the hall sensors and power leads on one of the motors. But they also should go the same speed forward and backwards, I'm pretty sure.
  • The capacitors on both boards arrived pretty banged up. I haven't desoldered them to test them yet (I don't think I can test capacitors in situ? I get nonsense readings when I do), and they aren't obviously leaking any of the magic out, but they look pretty bad. This might be related to other issues.
  • Since the board is intended for physical switches, a bunch of inputs function as "low/float" or "high/float", not "low/high". This hasn't caused any real problems yet, but isn't great.
  • Mostly at lower speeds, the board sometimes fails to start the motor (i.e., it stalls when trying to start turning and never recovers). This is fixable by nudging the wheel. This probably isn't fatal, since software could increase power or you could just wiggle the kart a bit to get it moving.
  • The board sometimes decides to go to sleep?
  • The brake doesn't seem to work very consistently?
  • I'm not getting sensible-seeming pulses off the speed sense wire and I'm not sure what's going on. I bit the bullet and ordered an oscilloscope since this problem seems impossible to debug without one, but it won't show up for a few days and then I'll have to figure out how to use it.

Here's a YouTube video of someone getting useful behavior and speed readings from these ESCs: Mad-EE RioRand Motor Controller.

  • He gets sensible behavior from the board and doesn't mention any of the issues I ran into.
  • His board has nice-looking capacitors and no headers on the speed output.

I assume this difference in outcomes is entirely me not knowing what I'm doing, but I have so much weird behavior that it seems possible that I just got bad boards that a forklift sat on in the warehouse or something.

I ordered a replacement red board from "another" "different" manufacturer and this one looks better -- no smushed capacitors, and no solder fill or headers in the through-holes for PWM. So I'm going to try to find a 2mm pitch 5-pin locking connector, wire up the new board, and see if I can make sense of the speed signal once the oscilloscope shows up.

Cheap Boards (Other Colors)

There are also some other similar low-cost boards on AliExpress:

I ordered some of these but they won't arrive for about a month.

ODrive / VESC

A couple tiers up, there are ODrive and VESC boards. I think the VESC stuff, particularly, is aimed more at drone hobbyists who want a more plug-and-play component for a vehicle with a generally well-understood control scheme and mostly-off-the-shelf components.

These boards are substantially more expensive -- the ODrive S1 doesn't seem to be available (but would be $150 for both motors), and the ODrive Pro is $230+ per motor. The cheapest VESC-compatible board I can find immediately is the FSESC4.20 at $175 for both motors.

NearZero2

I also found this project somewhere in the middle: NearZero2. This looks pretty much ideal for my needs, but isn't available for purchase until early 2023 because of the chip shortage. Specifically, it seems like the L6234PD isn't available (0 in stock at time of writing, expected delivery in 2040).

Build Your Own

The NearZero2 and VESC are fully open source, so it's possible I could build a "NotQuiteZero2" using a chip that's available. This is exciting in theory but feels like an impractical project given my current skill level and available time.

  • Here's a video of GreatScott Failing to Assemble a VESC. I do own a lot more flux than he does, but I have very little SMD experience and I'm not confident I can solder better than he can. He also spent $86 in components to build a $95 board, and VESC boards are readily available.

The NearZero2 seems slightly more realistic to build, and is generally a more attractive driver to me, but I suspect completing a working board before humanity begins producing microchips again is far outside the realm of possibility.

The capacitors on both boards arrived pretty banged up.

Screen Shot 2022-12-05 at 12.03.34 PM.png (609×805 px, 763 KB)

It's a little squished, but still tests at 315 µF. A poor craftsman blames his tools.

I bought an oscilloscope and tested the speed signal of one of the new red boards once it arrived. The scope showed the perfectly sensible signal I expected, and the signal came off the board fine once I hooked it up. So maybe the first couple boards were legitimately bad?

iiam

But the new red boards still have at least two significant problems:

  • They can't consistently start the motor, i.e. it stalls, even at relatively high power, until you nudge the wheel.
  • The motor runs much better in one direction ("forwards") than the other ("backwards").

I also broke the body of the hoverboard while clamping it, so I'll have to figure out how to build a new frame.

The yellow and green boards came in. The green boards arrived blue, and on closer inspection the two types of boards are mostly the same board with some minor component and connection differences. The red boards are marked "ZS-X11H" while the yellow boards are marked "ZS-X11B" (but the board layout is significantly different); the blue boards are unmarked. The blue boards are somewhat similar to the "ZS-X11A" board photograph found in this thread.

The yellow boards have a "CW / CCW" 3-pin jumper that presumably sets motor direction, and come with a small potentiometer attached. They have an optional PWM input, but don't appear to have a way to get hall sensor signals off the board.

The green/blue boards have more microcontroller-friendly pins, helpfully labelled "EL", "Signal", "Z/F", and "VR". I suspect that:

  • Signal: Speed signal.
  • Z/F: Direction.
  • VR: PWM speed.
  • EL: ?

If this is an earlier revision of the red board it's hard to imagine it will work better, but who knows. I'm waiting for some 3.96mm pitch connectors now (see also T13694).

No great surprise, but the blue boards seem about the same as the red boards and have the same problems:

  • Can't consistently start the motor.
  • Run much better in one direction (~700RPM) than the other (~500RPM).

These numbers were at 18V. As soon as I connected the 36V source, something on the board turned into magic smoke and a fuse blew. The VCC-to-ground resistance is now 1 Ω. The listing explicitly says "36V" but it seems that is perhaps optimistic.

The red board can hit ~1K RPM forward on 18V, although it also tops out around 500 RPM running backward. At 36V it can do about 2400 RPM forward (still just 500 backward), which is 45MPH so we won't definitely won't be doing that.

500 RPM is ~10 MPH, so definitely fast enough, although I'm sure it will behave differently under load.

I'm not hopeful about the yellow boards -- they look nearly the same as the blue boards and their pinout is a bit of a pain to work with -- but I can at least get one connected and see what happens. If that's no good, I'll try to fix the forward/backward issue by swapping the A/B/C windings for one motor, and try to fix the starting issue in software (e.g., by "wiggling" the motor if it doesn't start, or something in that vein).

...NearZero2...

These are still stuck in a manufacturing backlog.

...blue boards, yellow boards, red boards...

I eventually found and ordered BLD-510S drivers (identified as "DBLS-01S" at the time I ordered them) from StepperOnline. They are slightly more expensive, but they work properly and didn't turn into magic smoke at their rated voltage. My considered review of the BLD-510S: excellent.

I also broke the body of the hoverboard while clamping it, so I'll have to figure out how to build a new frame.

I used a piece of scrap wood. Somehow, this seemed like a much more difficult problem a year ago.


This isn't complete, but everything has been reduced to software. If I continue doing "build notes" I'll probably set up a non-Phacility personal web log on OnlyFans or something.