Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Hardware Hacking Transportation Build Hardware

All-Analog DIY Segway Project 141

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."

This discussion has been archived. No new comments can be posted.

All-Analog DIY Segway Project

Comments Filter:
  • by chronoss2010 ( 1825454 ) on Saturday December 11, 2010 @06:57PM (#34526300)
    a real one that invents and makes stuff...imagine that , quick arrest the terrorist(/sarcasm)
  • SEGFAULT (Score:5, Funny)

    by PatPending ( 953482 ) on Saturday December 11, 2010 @07:01PM (#34526314)
    Best. Name. Ever. for this
  • by RoverDaddy ( 869116 ) on Saturday December 11, 2010 @07:02PM (#34526316) Homepage
    Digital controllers -emulate- analog behavior (at least many of them do). There's a pantload of research and science behind analog control.
    • by betterunixthanunix ( 980855 ) on Saturday December 11, 2010 @07:22PM (#34526404)
      Why is it amazing that an analog control system works?
      • by 0100010001010011 ( 652467 ) on Saturday December 11, 2010 @07:51PM (#34526524)

        Kids these days couldn't imagine trying to implement a PID controller without a microprocessor. It does make it easy to watch what is going on.

        Watching large governors [wikipedia.org] work is pretty cool. No electronics to speak of. Just a properly tuned set of weights and some geometry.

        • by Jarik C-Bol ( 894741 ) on Saturday December 11, 2010 @09:50PM (#34527026)
          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.)"
        • Yes, but ultimately this particular project is still probably pointless. He won't do better than the Segway already does. The best he could hope for would be to do the same, cheaper.

          THAT is a worthwhile goal. Price is the only thing that has kept the Segway back.
          • by Khyber ( 864651 )

            I wonder which would last longer? The one with microprocessors or the analog one?

            Price might not be the ultimate deciding factor if it could be demonstrated to last significantly longer than the Segway, which would make an equivalent price point seem more attractive.

            • Passive components have always been shown to last longer than active ones, therefore the analog controller will last longer. There's nothing much to break unless you burn it out.
              • by Arlet ( 29997 )

                Passive components have always been shown to last longer than active ones

                A lot of PC motherboards fail because the electrolytic caps wear out, not because the CPU dies.

              • You mean analog/digital, not passive/active. An op-amp is just as much an active component as a microcontroller.

                • Yes sorry. More correctly I was thinking programmable / fixed, but analog digital is ok for this discussion too.
          • Price is the only thing that has kept the Segway back.

            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.

        • by Prune ( 557140 )
          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
          • by hitmark ( 640295 )

            sounds a bit to much like a placebo effect for my taste...

            • by Prune ( 557140 )
              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.
      • Re: (Score:3, Insightful)

        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.
        • Troll? Wow. I was just explaining for the benefit of non-EEs why it isn't usually done this way since the advent of inexpensive microcontrollers. This is hardly controversial.
          • I think I would've given you modpoints if I had any. I was thinking along the same lines you were, though I don't know if I'd agree that it would necessarily be impractical.
        • by udippel ( 562132 ) on Sunday December 12, 2010 @02:34AM (#34527660)

          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.

          • by Arlet ( 29997 )

            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.

            How does adding some op-amps and discrete PWM reduce part count ? Have you counted all the resistors and capacitors for the filtering ?

            With a digital controller, you can implement the A/D, filtering, control loops, and the motor PWM all inside the same device. You can even avoid some of the A/D stuff by using a accelerometer

            • by tibit ( 1762298 )

              Not a realistic one, though. IOW: tell that to people who code Spice-like modelling software :)

              • by Arlet ( 29997 )

                True, you can't model a realistic RC filter in one line of code, but you can model a perfect one, which is exactly what you'd want in this case.

          • The higher part count is surely on the side of the digital controller

            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

          • it doesn't hold water in the case of a gyroscope.

            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.

            Sure you _can_ do a gyroscope with a few op amps, but if you're actu

            • by udippel ( 562132 )

              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.
          • by Arlet ( 29997 )

            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

            Obviously, for someone experienced in electronics, a PID op amp circuits is easy, and needs no debugging.

            For someone experienced in microcontroller based digital control, a firmware PID control is easy too, and has no need for debugging either.

            Also, this project isn't just a simple PID controller. They also have filters, mixing of accelerometer and gyroscope data, steering, and PWM motor

            • 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.

      • by prefec2 ( 875483 )

        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).

        • by robot256 ( 1635039 ) on Saturday December 11, 2010 @09:57PM (#34527044)

          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.

          • Yes, but the problem is: this ain't it.

            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
        • by Anonymous Coward

          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.

          You'll notice that devices containing miniature accelerometers all started appearing around the same time: HD drop sensors (2003), Wii controllers (2006), iPhones (2007),

      • by kanto ( 1851816 )

        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.

        • by udippel ( 562132 )

          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?

          • by Arlet ( 29997 )

            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.

      • by drolli ( 522659 )

        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."

          Exactly. As opposed to living misinformed 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.
      • Why is it amazing that an analog control system works?

        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...
    • by pz ( 113803 )

      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.
        • by pz ( 113803 )

          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.

          Designing one of those from scrat

          • 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
            • by pz ( 113803 )

              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

              • "Ever designed a feedback network around an op-amp with a capacitor?"

                That is an example of an ANALOG solution. So what's your beef?

              • 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.
    • How hard do you think it would be to create an analog version of the part that makes you drive off a cliff?
  • by Glendale2x ( 210533 ) <[su.yeknomajnin] [ta] [todhsals]> on Saturday December 11, 2010 @07:08PM (#34526340) Homepage

    Why is this amazing "that the controller works at all"? There was a time before microprocessors, you know, and they did fun things like travel in space without them.

    • Sure, but name one moon mission that had and XBox aboard.

      • 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...

        • by Burdell ( 228580 ) on Saturday December 11, 2010 @08:32PM (#34526728)

          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.

        • by Anonymous Coward
          "the Apollo missions used extraordinary advanced integrated circuit computers, right?"

          No, they didn't. They were obsolete by the time they flew.

    • Re: (Score:3, Informative)

      Talking about spaceflight, the Russians only recently [wikipedia.org] replaced the analogue Soyuz control system with a fully digital one.
    • No kidding. It's not as if a PID controller is hard to do in analog circuitry.

  • Females?! (Score:5, Funny)

    by lul_wat ( 1623489 ) on Saturday December 11, 2010 @07:08PM (#34526344)
    They are all at MIT?! I'd have studied harder in highschool if they'd only told us.
    • by Colonel Korn ( 1258968 ) on Saturday December 11, 2010 @08:14PM (#34526654)

      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.

    • by prefec2 ( 875483 )

      No no they are just robots and avatars of the media lab. Females in CS and engineering? Come on do you believe in Santa Clause? Do you?

    • At least one of those was a man.

      And the project an excuse to impress women with their apparent skill in awkwardly balancing, slowly scooting, and... badly jousting.

  • by noidentity ( 188756 ) on Saturday December 11, 2010 @07:14PM (#34526364)
    I guess the webserver also is running on an all-analog server, which is now in a "halt and catch fire" state.
  • I think slashdot needs to apply for a new http error code at w3, something like:

        601 slashdotted fault, no server response
        602 slashdotted slow, some server response
        603 slashdotted dead, fallen over

    • Maybe the server could handle the traffic, but 403 is their host's way of dealing with going over a periodic bandwidth limit.

      As to your proposal, it seems like they are out of order. Shouldn't it be: some response, no response, slashdotters let out the magic smoke?

  • Asking how it is "remarkable" that an analog device works as intended. Digital, applied to physical systems, is just emulated analog (necessarily so because, of course, the world is analog).
  • by farnsaw ( 252018 ) on Saturday December 11, 2010 @08:57PM (#34526864) Homepage
    The best part is the shopping cart in the lab holding a jumble of electronics.
  • 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.
  • If you don't have to worry about lawsuits, then you can simplify much of the mechanism: no exhaustive testing, no redundant backup circuits, no fault logging, no record keeping, etc.

    However, there's nobody to sue when you inadvertently kiss the front of a moving bus.

    Next Up: DIY Apollo Landings and Darwin Awards merge.

  • Instead of spaghetti code, we now have spaghetti hardware :)

    http://www.etotheipiplusone.net/pics/seg/seg_102.jpg [etotheipiplusone.net]

  • Hate to point this out, but I'd imagine this project probably infringes on multiple patents on the Segway. The fact that they use different technology isn't a solid defense.

"All the people are so happy now, their heads are caving in. I'm glad they are a snowman with protective rubber skin" -- They Might Be Giants

Working...