Jack Crossfire's blog View Details
Archive for February, 2017
Posted by Jack Crossfire | Feb 25, 2017 @ 03:59 PM | 6,613 Views
Managed to get the ESC up to 16khz without resorting to assembly language, while keeping the software UART functional enough for testing. The trick was making a longer table of events with simpler operations to perform in the interrupt handler. Each event contains a value to copy to the timer & a value to write to the PORT. The long term plan is a 2 wire SPI with the ESC as a master.

At 16khz, the motor was super inefficient. It had to be reduced to 8khz to get any movement. At 8khz, it was still taking a lot more current for a lot less power than before, but it was much quieter than the previous 6khz routine. The only difference was the ability to have multiple FETs in the deadband between P & N, simultaneously. The table still goes from N to P without a deadband.

Discovered the MOSFETs were getting extremely hot, even below 3A. It was a Supersimple 18A but it overheated under 3A. Somewhere during the 16khz upgrade, all of the MOSFETs got fried & were intermittently short circuiting, despite the power supply being limited to 10A. We all know about current spiking when a motor is stalled, but whether stalled or short circuited, these were limited by the power supply to much less current than when they hovered a quad copter.

So for motor testing, the power supply needs to limit time more than current. Besides burning up a bag of ESC's, the next step would be a smarter power supply which shut down if the current limit LED stayed on too long. Even better would be not relying on the LED but a table of times vs current. Unfortunately, it's not clear if the LED was on when the MOSFETs blew.
Posted by Jack Crossfire | Feb 24, 2017 @ 02:57 AM | 6,131 Views
So when is spaceflight going to be like the movies, with multiple spaceships docking & undocking simultaneously & fast enough to discern motion with the naked eye?
Posted by Jack Crossfire | Feb 20, 2017 @ 01:08 AM | 6,312 Views
Spacex crs10 landing (6 min 12 sec)

The complete landing.

Spacex crs10 vs iridium1 landing (6 min 3 sec)
...Continue Reading
Posted by Jack Crossfire | Feb 18, 2017 @ 11:48 PM | 6,269 Views
Hobbyking 18A driving Hextronic DT700 as a stepper (1 min 25 sec)

It turned out just enough of the ancient DT700's were acquired over the years to make exactly 8 legs. 1 would have to be rewound & the exact number of turns is unknown. It seemed to be 19 turns in a delta. The ESC department has 5 Hobbyking 35A's, 1 Hobbyking 18A, 1 Castle creation 35A, 1 Align 35A. The last 2 are based on the 8051, so quite hard to reprogram.

They're amazingly still sold. They performed much better than the smaller motors. They could jump the load with only 12V. With active cooling, encoder feedback, reducing the lever size, they could probably just manage a slow bounding movement.

Active cooling has been deemed essential for any application. Even with active cooling, overheating still makes it impossible for them to hold the torque longer than a second. The mane problem with continuing is finding encoders for feedback.
Posted by Jack Crossfire | Feb 16, 2017 @ 01:37 PM | 5,934 Views
Hobbyking 18A driving 9 turn stepper motor (1 min 37 sec)

Call it ignorance about magnetic theory, but for jumping movement, 9 turns ended up better than 50 turns. Where the 50 turn couldn't jump at all, the 9 turn jumped the 140g load quite efficiently with very little heating, at 20V. Surprised the maximum starting torque as well as the maximum speed increased, since one would think the 2 would trade places. Holding movement suffered, since it could no longer hold the load without instantly overheating.

The power supply showed 8A being used for jumping & 3A used for holding. The holding current couldn't be fine tuned below that. Software PWM isn't precise enough. There's a way to theoretically determine the optimum turns count, but prototyping has proven faster.

Decided to use active cooling to reduce the risk of a burnout. A scaled down version of the Minotaur's bounding movement is certainly possible. It would start as a single leg with 2 wheels, to predict performance. It wouldn't stand up when not jumping.
Posted by Jack Crossfire | Feb 15, 2017 @ 07:58 PM | 6,109 Views
Hobbyking 18A driving a stepper motor (2 min 28 sec)

There was 1 rewound motor left from 2014. Even though the requirements were never met, it was worth documenting what it did. Drove it at 16.8V to simulate a 4S battery. Set the load to 140g. Hard coded a jumping movement which powered it for 250ms at full power & a holding movement which powered it at 50% power for 1700ms. This managed to keep it from burning out, but it heated up quickly. Care had to be taken to let it cool down & it could never hold the load continuously.

It never got the load to a parabolic trajectory, but it was an open loop programmed as close as possible to the ideal acceleration. A closed loop with encoder feedback might have gotten more acceleration to it. The bare motor was 70g, so the load simulated the motor lifting itself + any required accessories.

Rewinding the motor may have made it more optimal for holding loads at the expense of jumping movements. It might be better off with a higher KV.

It was around this time the lion kingdom finally read more of kaloucheThesis.pdf & discovered the Ghost Robotics Minotaur. That thesis is valuable reading for anyone interested in robot legs. It was exactly the envisioned vehicle, showing the limit of what brushless motor driven legs could do. With an unlimited budget, it could only go 4.47mph & it only lasted 20 minutes, so it would only go 1.4 miles. A reduced cost version would be even worse. It did show a robot with legs that only moved in 2 axes could still turn 360' in 6 seconds.

They provided some documentation on how the Minotaur worked: a 5.3Ah 4S battery, an STM32 realtime board, a blurry photo of motors which looked like t-motor U-10's. Unfortunately, you have to buy the robot to get the source code.
Posted by Jack Crossfire | Feb 15, 2017 @ 01:09 AM | 5,998 Views
So a simple dummy mass with lever was built. The plan was to gradually increase power until the motor held it in 1 position. A human would trigger a fixed motion & manually turn it off. Hold a dummy mass in an equilibrium position was required before ever considering jumping movements.

It was assumed that since the motor previously pulsed 20V without overheating, with no load, any lower voltage could be held on for longer periods of time. At 16V, it held the load in the air, but in less than a second, the magic smoke came out. The multimeter showed no temperature change, but it still burned out. Minutes later, the multimeter rose to 40C. The only clue that it was heating up was it immediately started sagging after lifting the load.

There was probably more heating when it had a load. The test without load pulsed for only 260ms & probably missed the amount it was really heating up. The amount of time it can handle 20V would have been 200ms rather than seconds. Since holding a load like this for extended periods of time was required for any leg application, the use of direct drive motors was busted.

A better test would be to not rely on a human to turn it off, but make a minimum preprogrammed pulse just to observe the load moving at first, then slowly increase the preprogrammed holding duration to observe the load being held. This would allow the multimeter to more easily catch any temperature rise.

If anything, the leg would have to be really stubby. There is a lever diameter at which it could hold the load & jump. It would have to move more like a millepede than a dog & it wouldn't be fast enough or be able to overcome the required obstacles. The lever might have to be shorter than the motor diameter. It would purely be a science project.
Posted by Jack Crossfire | Feb 13, 2017 @ 01:04 PM | 7,557 Views
The answer is yes. You can reprogram an ancient Hobbyking 18A as a stepper motor control. The mane advantage is a lot more current than your crummy L6234. The mane disadvantage is less precision. Unlike the advancement of radios & servos, there seems to be no limit to how long these ancient ESCs are going to be made, with the same ATMega8.

The problem is it requires software PWM. The FETs aren't connected to any hardware PWM pins, even if swapping the ATMega8 for an ATMega328. Your best route for higher precision is replacing the ATMega8 with a daughter board.

The precision was good enough for lion purposes. The Simonk firmware provided a starting point, but couldn't be translated directly from assembly. It uses only the timer 2 overflow interrupt. The output compare doesn't work for some reason if the prescaler is too low. Timer 2 is reloaded after updating every FET pin. It requires making a table of all the transition times in absolute time units, converting the absolute times to differences. An 8uS delay is needed between switching from P to N FETs. It happens in the interrupt handler, creating glitches when 2 transitions happen close together. Set the PWM to 2khz for maximum torque.

The UART pins are connected to FETs, so debugging requires bit banging a UART.
Posted by Jack Crossfire | Feb 10, 2017 @ 12:00 AM | 5,965 Views
After years of searching for robot dogs, putting "robot legs" into the search box turned up more intriguing results. This one was closer to the ultimate goal than any previous ones:



Introducing GOAT: A Legged Robot with 3D Agility & Virtual Compliance (3 min 42 sec)

The key was the use of direct drive, brushless motors with stock windings to achieve high jumping. Jumping is the key to any robot running. It wasn't obvious in his thesis, but after extensively testing $75 gearboxes, he didn't use any gearboxes for the jumping. Pulsing the motors allowed the briefly high torque for jumping. More surprising was the holding torque they could provide.

They were the t-motor U10's at $330. The windings were only 95mOhm. A rewound motor for higher torque would have 14Ohms. The mane question is whether similar motors can be had for less money or if the robot can be scaled down for an after-tax budget. Maybe there could be a cheap motor for directional control & an expensive motor for the thrust. Maybe a servo could provide a degree of freedom.

The other note was how instead of 1 knee & 2 hip motors, he used 3 identical hip motors with freewheeling knee joints to achieve the same degrees of freedom. If it was passively stable in 1 direction, the leg could get by with 2 motors. To be passively stable in 1 direction, the CG has to be closer to the ground. That requires using jumping to overcome obstacles instead of leg clearance.

Unlike the quest for autonomous cars, virtual reality, & 3D TV's, there's going to be a single blog post someday about a commercially viable robot leg & it's instantly going to change the world. We've never had a commercially viable robot leg, so no machine has ever been able to get around terrain with the ease of an animal.
Posted by Jack Crossfire | Feb 05, 2017 @ 08:27 PM | 5,780 Views
It used 250mAh in 87 minutes of driving. It stayed fastened, but took the room for a 2nd battery. Putting it in the back obstructs the sound. Putting the 2nd battery in the back would unbalance it. It might have to fasten to a side. What was convenient was having a removable battery which could be charged without taking out the speaker.
Posted by Jack Crossfire | Feb 05, 2017 @ 02:39 AM | 6,768 Views
Congrats to the guy who got the last of the $10 Vivitars. That made the rest of us losers, even if $18 was equivalent to a single commute. Paying more than someone else for the same thing is still losing. $18 later, the 2nd bluetooth speaker arrived, with the goal of a robot speaker & job interview headset. It has become essential over the years for every vehicle to have sound & for it to be wireless.

It was quite loud & was probably light enough to use intact. The mane interest was hacking it to also take a microphone input. The innards revealed a 350mAh battery. 350mAh batteries have been revealed to last 30 minutes. It would have to be upgraded to support a full drive.

Most of it was a big, heavy speaker brick which can't be opened. It weighs 150g, which is the same as any other speaker. New speaker technology is needed if the same loudness is going to get any lighter.

Connectivity uses a very old BK8000L board. It uses a PN25F04 flash chip to store firmware. Audio amplification comes from an HT6871 3W class D mono amplifier. The positive stereo outputs of the BK8000L go through a pair of R + C's. The outputs of the 2 C's are tied together before feeding the amplifier's positive input.

An overly aggressive standby mode wipes out all transients, so it can't play game sound effects or metronome sounds unless something is always playing in the background.

Volume down is floating. Volume up is pulled to Vbat by a 10k, so the volume is...Continue Reading