Posted
by
Soulskill
on Saturday December 11, 2010 @06:54PM
from the take-out-some-cliff-insurance-buddy dept.

An anonymous reader writes "One of the zany hacker-makers here at MIT just finished this DIY Segway project (video). Difference from the others: it's all analog. The controller is built without a microprocessor or even digital logic. It does use a gyroscope like the real Segway. The functionality looks fairly basic, but the fact that the controller works at all is amazing. The guy has a ton of other projects on his site too. Definitely worth a read for people who enjoy building things."

There wasn't any defect in the design or manufacture of the Segway. He had a dangerous location on his own property, an area where one could have just as easily had an accident on a bike or a skateboard. It wasn't a place for any company officer. It's sad that he died, but at least he was doing something he enjoyed. If it were me, I'd rather have gone that way than in a car wreck or hospital or from a heart attack while too fat in front of a television set.

Actually, they are pretty awesome even at a small scale. I took a small engines class once, where we each where given a lawn mower engine to tear down and rebuild. Lawn mowers have governors in them (dinky little plastic ones usually) butI swear, we spent several hours playing with them once we got down that far into the engines.

Mr. F. Flintstone of Bedrock writes: "When I was a kid, all we had to make PID controllers with were rocks, mud, and sticks, and we LIKED it! (Although the op amp bandwidth was bad. I mean, really bad.)"

Not only price of the device, but also price of rethinking the infrastructure that the Segway operates in - too fast for sidewalks, too vulnerable for car lanes, and too damn annoying to integrate into bike path traffic.

I built an analog PID temperature controller for my espresso machine (as every coffee geek knows, grouphead temperature variation over about a degree C during the ~25 s extraction noticeably affects the taste). It's one of the rare cases I use opamps. The analog part of all my audio projects always uses transistors or tubes, as chip amps have the problem of thermal variation in the latter stages affecting the input stages which are in the same thermal package. This doesn't show up in a steady signal harmon

Note where I wrote "blind listening tests". That is what placebo is there to account for. That THD does not in general correlate with perception of distortion has been published in papers in the Journal of the Audio Engineering Society, which is the audio engineering equivalent of the IEEE.

It's not amazing but it's certainly harder. Probably higher part count, more electrical noise to deal with, harder to debug, harder to implement delays and state machines, more wiring etc. It's just impractical for most purposes.

And I have mod points, but don't give you any. 'Troll' is awfully harsh, I agree. I'd rather give you some 'un-informed'.The higher part count is surely on the side of the digital controller. Just look at the diagrams offered: analog means direct processing of signals, no A/D. Just some op-amps, pwm, done.Harder to debug? Nonsense. You debug with a voltmeter instead of a logic analyzer.You are right with respect to advanced controlling, though, like counting, timing, delays. But none is needed here, some filters are just enough, and filters are implemented easier with some RCs around an op-amp. Also, you need a bridge. A bridge is much more simple if build in an analog manner. So your 'just impractical' is a good reason to not give you any mod points. It might be your opinion, and you sure may have one, but to me, an EE with some experience in developing controllers, it doesn't hold water in the case of a gyroscope.

It may look so, until you realize that all the parts in the digital controller are in a single chip.

When I got my EE degree one of the most widely used analog chips was the 555. With an eight-pin chip plus a few capacitors and resistors one could perform a wide range of timing tasks.

Well, it has been several years now since I last touched a 555. Today I use a 12F675 PIC instead. The same eight-pin count, but it can do anything a 555 does, plus a lot more, without any external components. A/D conversion, PWM

I was speaking to professionally designed products as opposed to just a demonstration of the gyroscope principle. You sound like you have some EE experience but I wonder if you are seriously suggesting that someone would attempt an all-analog control system for such a thing. Even little remote controlled toy helicopters now use DSP for that purpose, and their part count is extremely low.

I know, on Slashdot one is supposed to not agree, ever.;)What you write makes a lot of sense to me, now.Actually, if I wanted to build a prototype to demonstrate the feasibility, I would probably still do an analogue one. I still gobble together parts from my shelf and solder, faster than gobbling stuff together and solder and program.The very moment even a small series needs to be done, the use of uPs becomes a must.My comment was motivated by some remarks of some people in here, who seemed to imply that

It's not harder if you know electronics. A PID op amp needs only 4 op amps, 9 resistors and 2 capacitors. No need to debug, no electrical noise to worry about no need for state machines and no need for a delay (why would you even want a delay in a PID controller?) Building a microcontroller based PID with A/D in and D/A out is actually a lot harder than that, plus you then have to program it.

Yes and for those the digital solution is better. Just pointing out that it isn't so 'amazing' to have an analog controller. All of the Mercury, Apollo and Gemini controllers were analog. The guidance computer was digital on Apollo but it was pretty state of the art and had only 4k ram.

Filters are actually far easier to design as an analog circuit than a digital one (a low pass is just one resistor and one capacitor). And there is no lag that you would get with a digital filter either.

Because such scooters have been developed or to be more precise people tried to invent them before the all digital segway. And they failed. So it is amazing that they were able to do it. It is a little bit an anachronism, because today you try to do all controlling digital. Analog is not precise enough (people think).

Speaking as a controls engineer, they have obviously not done much digital controls. You have to worry about things like sampling rate, aliasing, round-off error, and digital noise introduced into the (inescapably) analog parts of the circuit. For a simple system, a properly-designed analog controller is much easier to implement, and has advantages like "infinite" sampling rate, graceful failure modes, white (gaussian) noise as opposed to odd frequencies introduced by sampling and clock frequencies, and no programming bugs or crashes.

Analog controllers for simple linear systems (like telescope mirrors) are in virtually every spacecraft ever launched for precisely those reasons. Only recently has the push for miniaturization driven some simple systems into digital FPGA controllers.

His motor driver chips for example (International Rectifier IRS21184), take standard CMOS digital input signals. Digital input, or digital-compatible input, makes no difference. Somewhere along the line you still need to do what amounts to A-D Conversion. Which brings back most of the problems you mentioned.

Unless I misunderstood, and from the spec sheet I don't think so (the schematic shows Schmitt-trigger inputs, which convert analog input to square wave with h

What makes the Segway possible isn't its digital control system (that's fairly trivial), it's the sensors. The reason that such scooters didn't exist before is that the consumer-grade accelerometers were not available. Of course inertial guidance systems have existed since WWII, but they were way too expensive and bulky to put in a scooter.

He probably "cheated" and designed the whole damn thing on a computer. Anyway, the reason you can't really do stuff like this on an analog system is imo that you'd had to hit a sweet spot with all you're calculations and all the hardware would actually have to do what it was supposed to do; even then the system wouldn't have been able to do proper error checking and recovery if some component went haywire. Yes, he did it with an analog system, but alas it's really of no consequence.

Have you looked at the circuit diagrams?What do you mean with proper error checking and recovery in this context? You think a digital controller would not make the thing fall over when the gyroscope fails? Are you sure you know what you are talking about here, or just reproducing what you heard in 101 of digital controllers?

I'd add a second (or even third) gyroscope and accelerometer, and have the controller compare the inputs. If they are too far apart, the controller goes into "failure mode" where it will cut power to the motor. When they are consistent, you can average the values for lower noise.

Even on the existing design, you can compare the gyroscope and accelerometer.

Because people are arrogant. They always believe that every generation before them was in the dark ages. Soon they will believe that having no internet was equivalent to living uninformed in a dictatorship.

"Because people are arrogant. They always believe that every generation before them was in the dark ages. Soon they will believe that having no internet was equivalent to living uninformed in a dictatorship."

That's partly true... I mean, we aren't really seeing limits where analog loses points. Like, they need to filter that noise out, which will require more than just reprogramming the DSP. What kind of safety limits does it have built-in? Does it change behavior when it heats up or cools down? Do you have to use trim pots every time you go to use it?

Yeah, I did software systems at a company for a decade, then we had a problem come along that just didn't want any software in it's controller, it was much better suited to analog control - 2 variables, inherently stable mechanics, the marketing guys still wanted a flat screen display on the controller to make it "look like a $30K device."

When you've only got one or two control loops, a microprocessor based solution is a lot more complex, costly and failure prone.

It's not surprising that an analog system works well, but it does seem to be getting less and less common to find engineers or hobbyists that are skilled at cooking them up. Now days many young people get hooked on computers and games with fewer taking an interest in things more analog like ham radio or building their own audio amps and speaker systems.

Arguably, it goes a lot further back than that: all that research and science on analog control was done by organisms who would be dead before they hit the ground were it not for evolved analog control/feedback systems by the thousand...

Digital controllers -emulate- analog behavior (at least many of them do). There's a pantload of research and science behind analog control.

At MIT, if you take 18.03 (differential equations), you see an example of a PID controller to balance a broomstick (inverted pendulum) --- in analog -- which, with not too much generalization, becomes a Segway. It doesn't surprise me in the least that this guy is at MIT.

MIT?? This is kid's stuff. The only difference between your broomstick controller and a $20 DIY backyard sun-tracking sundial is that the broom balancer is 2-axis, and has to be faster. Big deal.

Um, no. Clearly you have not studied this problem which is a (perhaps *the*) classic PID exercise. A simple P term (proportional) will fail very, very quickly. Add the D term (differential) and you get stability, but drift. Finally, add the I term (integral) and you eliminate the drift and turn the meta-stable system into a stable one. If you want stability to external perturbation, or generalization to a broad range of loads, then you need more analysis and more terms.

On the contrary: as long as you have sufficient negative feedback, you can have a stable system without all your glorified analysis. The trick is to have sufficient and accurate negative feedback.

Systems have been made this way successfully for decades, and still are.

Guidance systems, for example, and even control systems for heat-seeking missiles (which have to be accurate and fast). These have been made successfully for many years without your precious PID. While your example might be one of an idea

Wow. All I can say is, please do not design any airplanes, power distribution, or life-critical systems. You clearly are far from qualified with that level of understanding of system stability and how it is affected with feedback. Seriously, don't.

PID systems are used everywhere. Even in guidance systems (if you recall, the first cruise missiles had a problem with long-term error accumulation because they didn't have an integral term in the control system). Now not every system needs all three P, I, D

More specifically: I erred in saying that it could be done "without all the analysis". What I actually meant, and my only real point, was that it could be done with analog circuitry; digital is not a requirement.

I'm not really sure what to make of this comment. You are aware that the Apollo missions used extraordinary advanced integrated circuit computers, right? The Apollo Guidance Computer was no analog computer...

The computers that flew were digital, but the computers that tested them were analog. My father worked on the Saturn V guidance system, and they built one of the earliest "hardware in the loop" simulation setups to test the software and flight-certify the computers that flew. Digital computers of the day were not fast enough to simulate the inputs and monitor the outputs in real time, so the simulation was built with analog computers.

They are all at MIT?! I'd have studied harder in highschool if they'd only told us.

The MIT recruiting video sent to my high school might have convinced you.

A pair of serious undergrads, one male and one female, are working in a lab. The glassware is very impressive and filled with bubbling food coloring or whatnot. The lights are low to draw attention to the Science. Then the two look at each other knowingly, sweep the contents of a benchtop onto the floor and start making out atop it to the wail of an electric guitar.

The holographic principle and the Bekenstein bound show the opposite is the case and the world, including any analog quantity or signal, does not have arbitrary precision. The Planck scale means that spacetime itself is not infinitely differentiable. Your satatement has been knowably wrong since QM was discovered.

Cool, good to know people still do stuff in analog once in a while. Makes you learn those pesky things called differential equations. Of course, all the equations have already been published in about a zillion masters thesis papers... Recreating them in analog circuits just gives you EE street cred.

As an audiophile I proclaim this as proof that analog is better than digital, but only when ordered with the audiophile version 48 kHz motor controllers to avoid the piercing 6 kHz whine, along with fancy hookup wire.