Brushless direct drive rover


rover12.jpg

The journey began when the G-buggy which served for 6 months was stepped on, bending a shaft & putting it out of duty.  It was otherwise falling apart on its own, after pacing 110 miles of running.


car51.jpg


car52.jpg


The replacement had to go 7.5mph for 8 miles, using only spare parts.  It focused on a brushless direct drive balancing robot.

balancer01.jpg


Ancient motors were rewound.

motor01.jpg


 A session of pin punching, allen wrench punching, back & forth sliding, & metal removal liberated the shaft.  It was heavily jammed in.

motor03.jpg



The original windings were 4 strands of 0.25mm in a wye.

motor06.jpg


The new winding was 50 turns of 0.2mm, 7ohms end to end.  It got toasty at  0.6A 4.4V but made decent torque.  Mounting on aluminum would probably do the job.  At this power, they would be dramatically more efficient than the RC car, for a lot less money than any gear motors.

motor09.jpg


motor10.jpg


A motor is tested for a winding error by using the right hand rule, a fixed current source, & permanent magnet.  10 & 3 were swapped.
In order to reach 7.5mph, the motors would work in stepper mode when stationary, then at a certain speed, transition to back EMF mode.  Over time, it became clear that balancing robots were not stable enough to reach 7.5mph, at the required size.  Even the mighty segway relies on some passive stability.

A balancing robot could probably do the job with a control moment gyro, but having 3 motors would defeat the purpose of having a balancing robot. 

Focus shifted back to doing it as simply as possible.  A bare minimum 4 wheeled thing appeared.

rover05.jpg

rover06.jpg

rover07.jpg

rover08.jpg

rover09.jpg



A transition between stepper mode & back EMF mode was still required if the same wheels were going to provide steering & high speed.  Thus began the mysterious world of writing a double motor controller which could control 2 motors in stepper & back EMF mode, in 2 directions, using L6234 brushless gimbal drivers.

Reviewing source code of simple ESC's reveals they're not very simple at all. They all depend on hitting a minimum RPM from hard coded delays before sensing back EMF.  Commutation doesn't occur at the zero crossing, but after another delay equal to the time between the last commutation & the zero crossing.

They need a holdoff time to avoid a false crossing from noise.  The holdoff time is 1/2 the lowpass filtering of the previous zero crossing time & initially from the hard coded delays.  To further reduce errors, they require the zero crossing to be a certain direction.  Stalling is detected by a timeout.

NewFile0.bmp


At 660rpm, the real back EMF looked nothing like the textbooks. 

NewFile1.bmp


Oscilloscope plots of the full power voltage are never shown, but they have the clearest view of the 2 powered phases with the back EMF clearly visible in the floating phase.  There's a glitch where it goes from 9V to floating.  Software detects the halfway point to determine the commutation time.

NewFile2.bmp


 The normal oscilloscope plot shows PWM modulated voltages.  The back EMF phase is less visible.

NewFile3.bmp


Back EMF fluctuates from PWM on the other 2 phases.  It must be sampled on only 1 edge of the PWM, which limits the number of samples to the PWM frequency.  PWM didn't work completely.  It had to be done in software to get all 6 pins of the L6234 transitioning.

Sadly, back EMF ended up not working.  The 1st sign was that the waveform didn't obey the textbooks, because the working RPM of a 7.5mph rover was too low.

A workaround was to lowpass filter the commutation time.  This meant it took 10 commutations to respond to a change in load or voltage, while the reference design could respond in 1 commutation.  As soon as it hit a bump, it stalled.

After a period of dejection, self pity, & planning to lose $80 on a Losi micro T, a voice from the distant past appeared.  Maybe a sensored motor would work.

There are no teardowns of a sensored motor, but blurry, shaky videos appear to show home made attempts with 3 hall effect sensors outside the motor casing.

hall01.jpg


A single A1321 sensor is applied to the outside & powered by 3.3V.

NewFile6.bmp


Waveform when turned manually.

NewFile7.bmp


Waveform when powered slowly.  The sensor did indeed work without modifying the motor.  It just needed seriously accurate alignment.  There is a blog post about writing a sensored motor controller.  It's just a lookup table.

Mounting 3 sensors in the perfect arc was a serious wood carving & hot gluing job for just 1 motor. It was finally a task worthy of 3D printing.

halls03.jpg


halls09.jpg


The alignment had to be on the inner edges of the magnets & spot on. Any errors would make it randomly stall.


halls05.jpg

halls06.jpg


It was such a complicated nest of wiring & precision wood carving, it was 1 of those classic, simple, cheap internet solutions to an expensive problem which ends up requiring an enormous amount of skill to fabricate, in reality.

halls01.jpg


  The alignment errors showed up in the waveforms, but the rotor position was clearly sensed outside the casing.  The sensors & phase voltages had to be in exactly the right order.  It required trying out all 6 possible sensor orders.  It didn't completely stop when in the wrong order, but it wasn't as smooth & tended to stall.

Once configured, it worked perfectly.  It handled much higher torque.  No load current was 0.25A at 15V.  It was just like physical brushes.  Instead of stalling below a minimum speed, it kept going, with speed responding to load.  For precision movement, it still supported stepper mode.  It was a surprising payback for an external sensor sensing the unmodified motor through the motor casing.

rover10.jpg

rover11.jpg


The 1st road test with motor sensors worked perfectly.  It definitely needed breaks & slightly faster startup.  The stalls were gone.  7.4V got it to the 7.5mph range, without getting hot.  It was virtually silent.  Radio range was only 10ft.

It easily rolled over rough terrain.  The rolling distance without breaks was surprisingly long.  Even with no power, it rolled into curbs hard enough to flip over.  The sensors seemed to withstand it. 

Startup was a hard coded stepper acceleration, transitioning to commutating mode, to keep the wheels from slipping.  That failed miserably.  It slipped when rotating to the 1st step.  It was a long way from transitioning into commutating mode seamlessly.

The only practical way to get straight driving was to go straight into full power.  It didn't slip as much as feared.  It used less current.

After implementing heading hold steering & all the manual controls, it worked perfectly.  All the issues with bang bang steering were gone.  Manual steering was effective.  Steering by unbalancing the motor PWM was indistinguishable from the fully articulated suspension.  The difference was it was utterly dependent on software to drive straight.

As soon as it hit a puddle, it was dead.  The surface mounted boards need a conformal coating.  Radio range was another issue, being nowhere close to what it was on the g-buggy.  Finally, the gyro is extremely temperature sensitive.   It reused the IMU from the balancer, but being back to 4 wheels means it could use the more temperature resistant gyro.

It's probably the fastest a 60mm Pololu wheel has ever gone, certainly the fastest a brushless direct drive rover ever went.  Another $80 purchase was averted.

The 1st run with the brushless direct drive rover went way beyond predicted range, yet again. Range on 2S 900mAh was over 8 miles. Maximum downhill speed was 8 min/mile. Uphill speed sagged to 8m50s/mile. It was hopeless on rough terrain. It needed D feedback & shorter battery cables.

It was finally documented with the latest improvements.



The camera made it top heavy enough to flip over from the smallest obstacle. 

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Very cool! Congratulations

  • T3

    Wow! This is definitely DIY stuff and excellent!

  • Brilliant!  Wish more of us would share their experiences.

  • HI Jack,

    That's brilliant work. Thanks for sharing.

    Let me see if I have this right - you ran 8miles on a 7.4V 900mAh battery.

    Assuming this, would I be right in saying that a 4x4 with this motor configuration would run 4miles and at least 2 miles if scaled up double?

    Great work,

    Antonie

  • T3

    I've read a little about flashing firmware to ESC's to support reverse for 3d mini quads. That could be useful to someone wishing to backup their robot, but wheel position is still a conundrum.....

  • My complete respect as usual Jack,

    Brilliant work on the motors, the hybrid stepper - brushless mode and how well you got it to work is really excellent.

    As your story progressed, I started thinking Hall devices and then you put them in.

    As usual you did the hard way what I am trying to do the simple way.

    My giant hanging pendulum robot uses two 26" brushless bicycle wheels, so of course all the hard stuff is already done, but at least the built in Hall devices (+1) will let me have the capability of detecting actual wheel rotation position. 

    Really wish we could actually get motors designed like yours with appropriate reversible dual mode ESCs that would work with them.

    It would seriously speed up the evolution of robotics.

    Best Regards,

    Gary

  • T3

    Wow! Super cool, I love seeing these kind of projects on here. I bet hack a day picks this up

This reply was deleted.