I designed a cube that balances itself on a corner


2460 points | by dutchkiwifruit 13 days ago


  • cmehdy 13 days ago
    > Like any experienced controls engineer, I spent a few days flipping the signs of various signals before I got them right.

    As somebody with a M.Sc. in controls & signal processing (who ended up doing way more boring things), I always figured that I was doing that because I wasn't experienced enough. Turns out I also had the sign wrong on that one all along!

    • ryandrake 13 days ago
      A lot of engineering is ensuring you're making an even number of sign errors.
      • hamandcheese 13 days ago
        This reminds me of how one time in an interview, I realized I had an off-by-one error. Instead of actually trying to understand the source of the error, I just sped-run tweaking different values +/- 1 until I got the expected result.

        In the moment I felt quite clever, but the interviewer apparently did not appreciate that technique.

        • notatoad 13 days ago
          >I just sped-run tweaking different values +/- 1 until I got the expected result

          we call this "ML" now, and it pays extra

        • AceJohnny2 13 days ago
          Love to hear it. Interviewing sucks from all perspectives, so as an interviewer I try to give leeway for the stress and time pressure the interviewee is under. But the key thing is they must express their reasoning for their approach, and "I don't have time to dig into this" will get you a long way, at least under me.

          (Obviously there are nuances, but there is not enough space in this comment to elaborate)

          • hackernewds 13 days ago
            which makes interviewing all the more annoying because then your success applies to which interviewer you get
            • eitland 12 days ago
              If you fail an interview because the interviewer was unreasonable, sometimes you should be thankful and think of it as a bullet dodged.

              Yes, an otherwise good company might have a bad interviewer, but if they don't have some feedback loop to catch it, chances are there are other things they also don't catch.

              • insertchatbot 12 days ago
                Had an interview once over Zoom. Dude has me do a coding test: normal String manipulation algorithmic problem solving stuff. So I’m screen sharing and try to google something and he’s like “STOP! What are you doing?” I’m like “well I don’t remember the exact name of the function” and he’s like “You can’t do that, this is a Test!!”

                So I flunked his “test” and then immediately contacted the recruiter and said “no thanks” before he could muahahaha

            • Mtinie 12 days ago
              Such is every aspect of life, fortunately or unfortunately.
            • bee_rider 12 days ago
              I mean, in this case… it is nice to get an interviewer that lets stuff slip, but brute-forcing bugs in an interview problem doesn’t seem very good, right?
          • MarcelOlsz 12 days ago
            Are your hiring? :)
        • pmontra 12 days ago
          Many years ago before a demo we discovered that a program failed to run properly but it did run successfully the next time. We couldn't figure why and the clock was ticking. We made a script to run it twice, fail then success, and the demo was good. Then we debugged the issue, which was something trivial (I can't remember the details) but proper debugging and fixing under time pressure is never trivial.

          So, an interviewer might appreciate that balancing of signs if told that it is the fastest way make it work (and pass your demo,) only to fix it later. Once proven that the hacked code gives the right solution maybe you could have offered to send them the correct code on the next day or keep working on it if they wished so.

          • Elte 12 days ago
            Long ago in high school, I entered a LEGO robot competition with some friends. Tests were line following, collision detection, etc. One of the tests involved the bot being sent on a collision course with a wall. It had to detect running into it and turn around. This was one of the easiest ones to complete, but shortly before the test started we realized that our pressure sensor was malfunctioning and didn't send any more signals. There was no more time to swap it out, I don't even think we had a spare to be honest.

            Not wanting to give up points on an easy test, we gauged the distance the bot had to cover in the test, and quickly uploaded some new software. At the start of the test, our bot moved forward for 4 seconds, stopped, then turned around. Full points on that one!

            Some times things just need to work and we can worry about them working _correctly_ later...

            • salawat 10 days ago
              You... Literally made a test defeat device.

              In other words, you pulled a Dieselgate, in LEGO form.

              Were I to judge your implementation, not only would you sacrifice those points, I'd have disqualified you from the competition on ethical grounds.

              There is never an excuse for smoke and mirrors. Never.

        • actionfromafar 13 days ago
          Well, the three hardest things in computer science are after all naming things and off-by-one errors.
          • biomcgary 13 days ago
            I thought the two hardest things in CS was naming things, off-by-by one errors, and cache invalidation, but I must be remembering that incorrectly.
            • spenczar5 12 days ago
              synchronization, too
              • Sduic 12 days ago
                OK, the two hardest things in CS are naming things, off-by-one errors, cache invalidation, and synchronisation...and consensus...

                I'll come in again.

                • bostik 12 days ago
                  Consensus is a distributed systems problem. And in that space there are only two hard problems:

                      2. Exactly-once delivery
                      1. Guaranteed order of messages
                      2. Exactly-once delivery
                • hnburnsy 12 days ago
                  Damn you beat me to it, I knew this felt like a Monty Python skit...

                  >“Nobody expects the Spanish Inquisition! Our chief weapon is surprise... surprise and fear... fear and surprise... Our two weapons are fear and surprise... and ruthless efficiency.... Our three weapons are fear, and surprise, and ruthless efficiency... and an almost fanatical devotion to the Pope... Our four... no... Amongst our weapons... Amongst our weaponry... are such elements as fear, surprise... I'll come in again.”

            • klabb3 13 days ago
              synchronization. Don’t forget
              • sdenton4 12 days ago
                The whole reason for the off by one error in the standard joke is that we forgot to use a mutex.
              • actionfromafar 12 days ago
                Don’t forget synchronisation.
        • sen 12 days ago
          Wrap up that speed-run up in an automation and refer to it as “fuzzing” and you can sell it for millions these days.
        • lloeki 12 days ago
          > Instead of actually trying to understand the source of the error, I just sped-run tweaking different values +/- 1 until I got the expected result.

          That's perfectly valid, when one knows a specific step or result must be positive or negative.

          Not that much different from dimensional analysis, which speedruns you to get/fix to proper formula (at the cost of skimming on dimensionless constants).

          Similarly, interviewer was not impressed when they cut me short and started walking me through some step and I pointed to them that their result was obviously wrong as it was dimensionally inconsistent and if they didn't cut me out the formula must have been something like baz*foo/bar^2 or something and now we just have to figure out the constants.

        • edflsafoiewq 12 days ago
          Can often be justified by the fact you know the correct form is aX+b, so you only need to get it right at two points to make it right everywhere.
      • idiotsecant 13 days ago
        I just want you to know how hard I'm going to steal this and pretend I invented it when people think its clever.
        • ryandrake 13 days ago
          I'm doing the same thing. I didn't[1] invent it either.

          1: https://twitter.com/id_aa_carmack/status/419313776463077377

          • littlestymaar 13 days ago
            Carmack didn't invent it either, my physics teacher was saying that a lot 17 years ago so it's clearly a common thing.
            • gattilorenz 13 days ago
              a possible source is in the replies to that tweet: https://twitter.com/RobbieBC/status/419324772754132992
              • littlestymaar 13 days ago
                Honestly it wouldn't surprise me if it had been invented multiple times independently, it's just too obvious to anyone that has had to deal with calculation.

                (But thanks for sharing what us without a Twitter account cannot see otherwise anymore…)

            • taneq 13 days ago
              Clearly we must now start referring to it as ‘Carmack’s sign error joke’ ;)
            • beebeepka 13 days ago
              had you not mentioned that, we might have gotten another fast inverse square root origin investigation
              • lupire 13 days ago
                fast (multiplicative) inverse square root.
                • beebeepka 13 days ago
                  autocorrect or dyslexia. whoever wins, i lose
          • ReptileMan 13 days ago
            It was common saying 30 years ago when we were preparing for IT Olympiads in Eastern Europe - if you do even number of errors chances are your program will work ok.
        • mensetmanusman 13 days ago
          We would joke in physics class that you either need to memorize the right-hand rule; or if you were right handed while doing the test, the negative left-hand rule.

          (because students would often make the mistake while holding their pencil during the exam of how to calculate the curl)

      • taneq 13 days ago
        This joke is used at the start of Abrash’s Graphics Programming Black Book, followed by “If you laughed, you’re a graphics nerd.” :D
      • onionisafruit 12 days ago
        Reminds me of one of my favorite lines of code:

          i = i - 2 // because I'm bad at this
      • rcxdude 12 days ago
        The tricky bit is when you have multiple interacting systems which see different combinations of those sign errors: it makes it a lot more important to know where all the sign flips should actually be. For example, it's quite easy to make a PID controller where the D term is actually the opposite sign to the others.
      • _moof 13 days ago
        The rest of engineering is doing very careful math and then multiplying everything by two just to be sure.
      • dekhn 13 days ago
        also known as "a fortuitous cancellation of errors"
      • hackernewds 13 days ago
        "Now let's assume our chicken is a sphere.."
      • malux85 13 days ago
        Same in finance!
      • m463 12 days ago
        that is so not not !false
    • AnarchismIsCool 12 days ago
      There are satellites in orbit right now that have their reaction wheels harnessed backwards and have a x *= -1.0; //DO NOT TOUCH in the codebase.

      Everyone does it, though usually you do the test before you duct tape it to the top of a few thousand kg of explosives and push the red button :)

    • xtagon 13 days ago
      See also the phenomenon of it always taking 3 tries to plug in USB the correct way
      • datameta 13 days ago
        This is especially common with a fresh USB port. I learned why recently from the book Open Circuits: The Inner Beauty of Electronic Components. There is a mechanical component that is more stiff before being used, which can lead one to think that they simply had the USB connector the wrong way around.

        I highly highly recommend the book by the way, to anyone on HN. Goes all the way from mechanical components to resistors, nixie tubes, CMOS sensors, processors etc. Excellent photography that reveals the internals, along with operation explanations and history for each component.

        • herbcso 13 days ago
          That looks amazing! I immediately bought it, thanks for the recommendation!
      • JoeCortopassi 13 days ago
        Fun fact: part of the licensing agreement to use USB, is to have the usb symbol on top of the connector. So unless you're using a cheap unlicensed cable, look for the symbol facing up and you'll always be correct
        • quectophoton 12 days ago
          After all this time I'm not going to trust a decoration.

          When I'm connecting an USB cable horizontally I always think "hol up". So I always remember to plug it with the hole up.

          When I'm connecting it vertically I think "hold right". So I know that if I want to hold it right, I have to put the hole right.

          Has worked for me so far.

          EDIT: Though "left" and "right" are more vague compared to "up" and "down", so connecting vertically assumes a specific "mental point of view". I'm just using one that's intuitive for me, but it might not work for everyone.

        • j5155 13 days ago
          …unless, of course, the port is upside down/sideways ;)
      • lozf 12 days ago
        Or 4 when it turns out you're trying the HDMI port instead.
        • jamiek88 12 days ago
          Or the fricken e-Sata port back in the day.
      • CamperBob2 13 days ago
        I mean, any physics teacher will tell you that all fermions have spin 1/2, so I don't know why people are so confused by USB.
        • GianFabien 13 days ago
          I've never tried to plug a fermion into a USB port.
      • mewpmewp2 13 days ago
        Just 3? I wonder now if I'm inexperienced.
        • idiotsecant 13 days ago
          Or in the bad days of micro usb on the third try you just force it in the wrong way and destroy the port.
      • signalToNose 12 days ago
        The holes in the contact on the cable should be up when plugging into the laptop
      • brianpan 11 days ago
        People think the USB-A port looks symmetrical. The way I do it is I look inside the connector and note which side the pins are before trying to plug it in 3 times.
    • MadnessASAP 13 days ago
      As somebody who has practically no post-secondary and just likes to tinker in the garage. I thought it might be nice to get an education of some sorts so I could stop wasting time doing stuff like flipping signs till it works.
      • nativeit 12 days ago
        I went through an EE associates program at my local community college after I’d graduated with a BA, purely because I wanted to know how to fix/modify/tinker with audio equipment. I went at night, part time, and it was easily one of the best experiences of my life. Like yourself, I had some amateur experience already, and as the gaps were filled I had at least 4-5 truly paradigm shifting moments where multiple concepts finally clicked together and whole swaths of the world suddenly made sense. I found elegant connections in the physics, familiar logic applications, and gained a lot of insight that I hadn’t expected, which helped reinforce my sense of just how little I will ever really know.

        Even though the purpose for taking those classes was largely personal, it’s materially contributed to my career in a lot of indirect ways (I’m an IT consultant and Linux sysadmin) by giving me a unique perspective for how things function on a much lower level than my colleagues who just have CS educations. I can troubleshoot Wi-Fi and signal transmission issues using spectrum and vector network analysis which makes everyone look at me as if I were a witch. I am comfortable disassembling and repairing equipment like scanners and commercial printers, with lots of moving parts and mains electricity that other techs won’t touch.

        All that said, I highly recommend attending an EE program, and even though you’ll feel like a big, wrinkled brain smart person—you will never stop turning it off and on again, bit-bashing, or sign flipping—all quite valid techniques for when the years of diligent study and experience loses out to fat fingers and poor eyesight.

      • angra_mainyu 12 days ago
        EE is very rewarding. I think it is only second to physics and nuclear eng in terms of how deep they go into physics.

        You also cover a wide array of topics, from hardware and how it works to a lot of systems programming (e.g: real-time operating systems, kernels, device drivers) some computer science theory (mainly automata theory and concurrency like petri nets) to signal processing which includes audio to heavy yet extremely beautiful math topics such as control theory.

    • bchasknga 13 days ago
      You are not alone. I've come to terms with the reality that every controller I've designed and implemented will always need a good amount of unit test coverage to ensure proper behavior (like signs and directions)...
    • kloch 12 days ago
      Quaternions are hard to get right, and impossible to get right the first time.


    • dfee 13 days ago
      Is there a term for this systematic approach? I do it too, in software, and hone in on the right behavior using unit tests - especially to account for idiosyncratic off by one errors.

      Basically: get the structure right and then re-align the implementation to meet the expected behavior.

    • Matumio 12 days ago
      When studying electrical engineering (during all the advanced control theory math and stuff) we were told that this is the official way to do it. If your PID controller doesn't work at first, second or third attempt, you don't run for your math books, you tweak it and try again until it works.
    • noiv 13 days ago
      Interesting. Whenever I meet something with a boolean behaviour I already decide upfront it will be easier and less time consuming to test accordingly instead of building a mental model. However I have no problem to model tree searching or a-star stuff. It just seems I never developed neurons with just two outcomes.
    • pavelstoev 12 days ago
      This is precisely how I passed the lab portion of my Control Systems course in undergrad engineering.
    • ilayn 13 days ago
      Multimeter and basic input output testing is your underappreciated friend.
    • LorenPechtel 13 days ago
      I spent many days trying to troubleshoot some HP/GL2 plotter code in the distant past. I eventually concluded that the real problem was with the implementation--I was working with code that was written by others and went a little crazy with coordinate transforms. Oops--worked as expected on one non-HP plotter. Drew the image inverted on a HP plotter. The HP implementation appeared to break if you flipped the world too many times. That was a *long* time ago, my memory is fuzzy by now.

      (And in later days I saw a firmware update for a laser printer cause it to spew gibberish when fed embedded HP/GL2 code. This was in the era where there were still DOS programs running under Windows and somebody didn't check that it still worked right.)

    • corethree 13 days ago
      Is there a way to model this theoretically? Or is it always trial and error?

      I mean I realize you have to test the thing for "bugs" just wondering if a theory to perfectly model it is even possible.

      • dutchkiwifruit 13 days ago
        Some things certainly can be modelled, but for others it is easier to simply try. For example, will applying a positive current to the motor make it spin in the clockwise or counterclockwise direction? It really depends on the behaviour and configuration of the motor controller, and in this case it was easier for me to just try.

        The trick is to do these tests at a sufficiently low level, because that’s usually where these issues are, in my experience.

      • dgoldstein0 13 days ago
        I think it's possible. But you'd have to be really careful with your equations, then have to be really careful to know which direction is positive in each signal and make sure to make the wiring and/or math match that. I can see why some trial and error would be easier than completely rechecking things when they don't work.
        • corethree 13 days ago
          Does anyone know what I have to learn to "know" about this theory? Is it control theory and classical mechanics?
          • YZF 13 days ago
            Pretty much yes. I expect the heavy lifting is just math.
      • lupire 13 days ago
        Of course. The OP was modeling it theoretically, but making mistakes.
  • crazygringo 13 days ago
    Wow, watching that video is wild. It's the closest I've ever found myself to thinking, well that's just magic. The way it responds to being pushed around, it's almost like experiencing magnetism for the first time, only now it's as if it's a whole new force. It almost seems like it's alive, actively maintaining its equilibrium and resisting changes from its environment. Throw a literal tomato on it and it just adapts, not unlike the way our bodies do to changing loads.

    I can't wait until smaller mass-produced versions are sold on Amazon for $50, however many years from now that is! I would just love to play with something like this.

    • jrussino 12 days ago
      In the old Cubli videos they go further, chaining together "jumping up", balancing, and controlled falling to demonstrate locomotion!


      • ryanjshaw 12 days ago
        OP is planning on implementing braking next, which will make the same capabilities available in this open source design.
    • fisian 13 days ago
      I really agree that some control engineering applications can feel like magic.

      When I learned programming, I thought "Wow, I can tell a computer anything I want, as long as I take the time to program it."

      I have a similar feeling about control theory, just that it feels like you're "programming" the laws of physic, modifying how reality works.

    • dutchkiwifruit 13 days ago
      Your comment makes me smile. Thank you! :)
      • neom 13 days ago
        I think you've got a startup on your hands young man. ;)
        • hackernewds 13 days ago
          not every joy needs to be commercialized. less so is the joy that remains
          • neom 12 days ago
            Personally, I'd find a lot of joy in commercializing it. Seems like it will sell extremely well and people would love it. I find a lot of joy in that.
    • ijhuygft776 12 days ago
      > I can't wait until smaller mass-produced versions are sold on Amazon for $50, however many years from now that is!

      This is old as fuck btw..... checkout youtube for 10year+ examples...

      • ryanjshaw 12 days ago
        But in 10 years nobody has built a low-cost design right? Since OP has open sourced the build and software, that may change now.
        • terom 12 days ago
          It will take a bit more engineering than some optimistic sign-flipping to bring it down to $50 retail (~$10 BOM).

          > In my case, the BOM was close to €2500, so be prepared for that.

          EDIT: someone pointed out that there are actually some designs available on AliExpress, e.g. https://a.aliexpress.com/_EzMRNIv €250 for one axis (edge) and €500 for a 3-axis (single point).

          • scotty79 12 days ago
            I think what it needs is simple direct neural network controller quickly trained and tested for cheap motors and high tolerances so it can sort of work if done cheaply.

            Recently there was a post here about researchers training NN to fly a chepish very small drone. No messing with PID adjustment.

          • padolsey 12 days ago
            On TaoBao here in Beijing I can get one for around 95USD…. No strong indication whether it’ll work tho! https://m.tb.cn/h.5Hbc2x0sHhXTXZG?tk=nl7YW9gh6MR
        • PennRobotics 12 days ago
          A similar design (although it balances on the reaction wheel rather than corner after the initial startup jump) has been made for less than 1000 euros and open-sourced:


  • beoberha 13 days ago
    I very much enjoy my career as a software engineer, but man there’s a side of me that wishes I had studied something where I could even begin to build something like this. Super super cool!
    • cuu508 13 days ago
      You can learn all of this on your own! Like most of us learned programming ;-)

      Probably don't start with a self-balancing cube as the first project though. Get an Arduino or ESP board, make some leds blink and go from there.

      • dylan604 13 days ago
        Arduino + LED = Hello World for electronics.

        Find a project online that tickles your fancy, and then recreate that. If your thing doesn't work, you know it is something you did incorrectly as the project has been built successfully by others. During the course of that project, you will pick up on so many little things.

        As an example, I had a project with more buttons than pins. Just something as simple as adding a few resistors to each button allows multiple buttons to be connected to the same pin. You just have test the voltage to know which button. Sounds simple, but I learned it from someone else's build.

        Nobody likes walking through tutorials for tutorials sake, but it's still useful and rewarding if you can build something functional as a tutorial.

        • matheusmoreira 12 days ago
          > If your thing doesn't work

          One of the things I find paralyzing about electronics is the fact energy is involved. Software just outputs garbage to the terminal if I screw it up. Circuits though? Isn't it possible for components to be literally destroyed, fires started?

          • aaronmdjones 12 days ago
            Yes, you can start fires with uncontrolled currents. This is what fuses are for. Also what my sibling comment said; start small, blow up small things by making mistakes (like putting a transistor in the wrong way around and pushing several amps through its inherent body diode; we've all been there), and then you'll be confident enough to start playing with actual power electronics (if you want to).

            What you'll find though is that, as a result of everyone before you making the same kinds of mistakes, there exists protection circuitry for almost everything you would want to do. For example, Lithium-Ion batteries are quite unsafe if you treat them without the respect they deserve, but that's what e.g. the DW01-P IC is for, and many Li-Ion charging ICs feature NTC thermistor inputs (e.g. the LTC4053) to stop charging if the cell is outside of some safe temperature range.

            If you're really worried, a CO2 extinguisher and a bucket of sand go a long way.

          • rcbdev 12 days ago
            As someone who has managed to accidentally and completely fry a Windows install with an unchecked C programme when I started to learn programming - there's still you can screw up using just code.
          • electroly 12 days ago
            It would be really hard to start a fire with an Arduino with 5V USB power. You might fry some components, but even then, they usually just stop working (with a little magic smoke if you're lucky, but typically not) and you lose a dollar or two. Don't let a genuine fear of safety issues stop you from tinkering with low-voltage hobby electronics. Stay away from 120/240VAC mains power of course, but an Arduino and the 5VDC from a USB charger is a pretty forgiving environment.
            • foobarian 12 days ago
              You call it frying some components, I call it finding which of the little black cubes on the Arduino circuit board is the voltage regulator. It gave off such a pretty orange glow :-D
          • dylan604 12 days ago
            um, what do you think is powering the CPU/GPU combo you are writing software for uses? I guess you missed the period of "releasing the magic smoke" of software. But if you are designing a project that uses enough power to start fires, you've chosen poorly for your starter projects. Most electronics are using 3.3v or 5v while sipping miliamps. Sure, you can smoke a chip that wants 3.3 from feeding it 5v, but if you're designing a project near flammable substances, you're doing it wrong.
        • skybrian 12 days ago
          Just in case someone gets the wrong idea, doing "hello world" first is a good habit for everyone when starting to use a new device or a new lab setup, not just beginners.

          It's to make sure that the environment is set up right. Is the device getting flashed? Does it start up at all? If you make a change (blink at a different rate), do you see your change?

      • moffkalast 13 days ago
        • caymanjim 13 days ago
          Hah! This is me. I bought an Arduino and a ton of components and I pretty much stalled out at blinking LED. I also watched all of Ben Eater's YouTube videos on building an 8-bit computer from simple ICs and then bought all the parts to do it and never put it together. I realized that I'd already learned how it worked from the videos, and putting it together would just be rote work that I already knew the outcome of. I tried to think of some practical reason to do it, or some modifications I might make, but then I moved and never unpacked the stuff.
          • bombcar 12 days ago
            The most powerful thing for me was making sure that I had the relays/etc necessary to safely control 120v circuits.

            Then you can make something that can turn off or on "real things" and work from there.

            If it can do 120v, it can usually to 12v, and that's the next step - directly controlling components.

          • zackbloom 12 days ago
            What you're forgetting is it absolutely would not work when you first put it together. You would then begin a journey of debugging which would teach you a lot more than any YouTube video ever could.
        • A4ET8a8uTh0 13 days ago
          Hah. That hit home. But now I have a kid and we are slowly starting to delve into things. It is oddly fun to explore this realm together.
      • stavros 13 days ago
        Yep! A self-balancing cube can definitely be your sixth project, though.
        • YZF 13 days ago
          Sometimes taking a big challenge can accelerate learning. As long as you're not giving up ;)
      • szundi 13 days ago
        Completely true and good advice
    • devsda 13 days ago
      As a fellow developer I feel the same but then when I realize that the cost of building something cool like this as a hobby is very high(for me at-least), I feel like we are lucky enough to have picked a field where the cost of experimenting is close to zero.

      As a middle ground, I've settled on home automation & hobby electronic projects with some micro controllers like esp32, rpi pico etc. It's worth a try for anybody itching to build something tangible.

      PS: the total BOM cost for this cube project was around 2500 Euros.

      • weaksauce 13 days ago
        yeah just the motors alone were 471 euros and the controller boards were about 300 euros... this is a spendy project
      • dylan604 13 days ago
        > PS: the total BOM cost for this cube project was around 2500 Euros.

        Somethings are purchased in packs of 10 even when needing 1 type of things happen too, so sometimes you have to divide the price by numbers used. Your comment also suggest you consider that nothing was necessary to repurchase or that the final BOM wasn't the 3rd iteration of which items were actually used in previous attempts. Pure R&D type hobby projects can be oh so much more expensive, but oh so much fun.

    • thimp 13 days ago
      It was always cool. Until you find the only jobs on the market were ones that involve making machines that kill people. That’s what happened to me. YMMV.
      • GianFabien 13 days ago
        The word "engineer" origin (from Oxford Dictionary):

        Middle English (denoting a designer and constructor of fortifications and weapons; formerly also as ingineer ): in early use from Old French engigneor, from medieval Latin ingeniator, from ingeniare ‘contrive, devise’, from Latin ingenium (see engine); in later use from French ingénieur or Italian ingegnere, also based on Latin ingenium

        Would be great if we had a less war-like derived word for our profession.

        • elchangri 12 days ago
          By your own share, it only held a "war-like" definition in Middle English. Its original latin etymology and current definition describes the skill of devising/designing/inventing/producing solutions.

          "Genius" shares the same root.

        • aitchnyu 12 days ago
          Heard the platitude that in today's French engineer is "ingenious man"
      • noman-land 13 days ago
        I know this is easy for me to say but I really want to encourage you and other hardware people to innovate on extremely cheap consumer facing commodity p2p/mesh communication devices. I've been teaching myself electronics and RF to try to be able to meaningfully contribute.

        It's dumb that we have these super computers in our pockets with long range antennas and in order to talk to each other they have to go through central intermediaries and paid access.

        I want ad-hoc geographically local connectivity without service providers.

        • thimp 13 days ago
          That's a pipedream. Our current intermediary run cellular networks pretty much replaced all our previous infrastructure in that space because there are far fewer compromises to end user experience. Secondly, your phone doesn't have any long range antennas in it.

          Do some research on VHF/UHF amateur radio. That'll give you a primer on why this is hard. Think line of sight, repeaters, traffic management.

          Our current infra, even if it is paid, is cheap and miraculous.

          Edit: I had a ham license once (probably still do), built VHF transceiver, only had asshats to talk to on it (locality related not technical).

          • jacquesm 13 days ago
            Around here a HAM license is an excellent way to stay current on various cancer treatments.
            • thimp 13 days ago
              Gout in my area.
          • ianburrell 13 days ago
            The asymmetry between mobile and cell tower is important. The tower has lots of good antennas and more power.

            I'm interested in LTE Direct but no one has implemented that in a phone. LTE Direct has range of 1mi which is the range of most low-power systems.

            Ham radio gets longer range with higher power and better antennas. But only to the horizon with most people. Ham radio still depends on repeaters on high points.

        • jameshart 12 days ago
          Does the supercomputer in your pocket not have wi-fi? Who is centrally intermediating or making you pay to use wi-fi to connect to nearby peers?
          • durumu 12 days ago
            I'm not sure what you mean -- I would think the ISP is analogous here, so Comcast, AT&T, Verizon et al?
            • jameshart 12 days ago
              You don't need an ISP to set up a wi-fi network.
        • RF_Savage 12 days ago
          The hardware is not the hard part. Routing and the software stack for meshing is.
        • esafak 13 days ago
          Wireless ad hoc networks came and went two decades ago. Perhaps they'll rise again but I wouldn't bank my career on it.
        • Consultant32452 13 days ago
          The closest I've heard of to something like this is some autist creates a low cost mesh internet connection for his neighborhood, then you could use VOIP on top of that.
          • api_or_ipa 12 days ago
            I don’t think it’s fair to conflate autism (a specific medical condition) with passionate (a personality trait) Where would we be without these kinds of people?
          • noman-land 12 days ago
            Autist is not a cool term to use. Keep that sort of stuff on Reddit please.
      • jwr 12 days ago
        One sometimes gets to a second take on that: you don't want to make machines that kill people, until invaders from another country ride into your country (or a country of your friends/neighbors) and start killing, raping and torturing. And suddenly, as you feel frustrated and powerless, you realize that even though you don't want to make machines that kill people, you pretty much have to, otherwise those people will come for you, your family and your friends.

        I thought humanity would grow out of senseless aggression in 2024, but here we are. And yes, I am basing this on a specific real-world example of a country invading another country right next to mine, and my specific thoughts and beliefs.

        • thimp 12 days ago
          I don't disagree with you for ref. I don't mind working on defensive capability for sure and that's what I was involved in but the discussions moving to first strike capability were not where I wanted to be.
      • paganel 13 days ago
        Unfortunately most of today's software is also going down that route, if not necessarily killing people then most likely making their lives a lot more nightmare-ish. AI is a very good example of that.
        • thimp 13 days ago
          That is exactly why I am heading out of the industry. I have little faith in the direction and want nothing to do with it any longer.
        • Consultant32452 13 days ago
          I was amused by the fact that in the same week that AI generated fake nudes of Taylor Swift was hitting news headlines another AI tool which puts clothes on e-girls pics also popped up on my radar.

          The internet is amazing and stupid.

      • amelius 13 days ago
        You could instead work on a robot performing surgery ... Just one example.
      • rangestransform 13 days ago
        You could work in autonomous driving!
      • CamperBob2 13 days ago
    • noman-land 13 days ago
      https://www.adafruit.com/ is an amazing resource. The tutorials are excellent and the products and video presentations of them are really great. Basically every single product has accompanying videos. It's very easy to spend some $$$ there.
    • matthewtse 13 days ago
      I felt the same yearning. I found a creative outlet in hardware, that still furthers my software engineering career, by building a custom mechanical keyboard to improve coding speed, accuracy, and efficiency.


    • shellfishgene 12 days ago
      You totally can. This video [1] someone linked below comes with a github repo [2], it seems pretty straight forward to build this with access to a 3d printer and some basic electronics/soldering skills. Probably a <100$ for parts project? You also need a soldering iron and learn how to use it, but nothing of this is too hard for anyone technically inclined, especially if you have a hackerspace nearby where you can get a bit of help.

      [1] https://www.youtube.com/watch?v=AJQZFHJzwt4 [2] https://github.com/remrc/Self-Balancing-Cube

    • s0rce 13 days ago
      A big portion of this is software and the rest you could certainly learn. Although I suspect if this was you day job you might not want to come home and build the same stuff...
      • mseepgood 13 days ago
        In which day job does one build cubes balancing on the corner?
        • s0rce 13 days ago
          Satellites mostly. Possibly missile guidance and then more general applications of controls.
    • geor9e 13 days ago
      There is something a lot more healthy-feeling about tinkering in the shop using your hands, versus staring down a panel of colorful monospaced ascii. But the individual contributor MechE career plateaus in pay around $170k. There's no L7 or whatever pay scale. Seeing total compensation in the $300k+ range is unheard of. In software you find them all over. I'm sure there's rare exceptions but you get the gist.
  • lh7777 13 days ago
    > I plan to add mechanical brakes to the reaction wheels...This enables jump-up manoeuvers which in turn enable the cube to get to its equilibrium position on its own.

    Looking forward to this -- I always thought that was the coolest part of the Cubli project. Here's a video: https://youtu.be/n_6p-1J551Y?t=92

    • __MatrixMan__ 13 days ago
      It makes me wonder if there's a better shape than a cube for this. You'd want to be non-circular to walk up things, but you'd want a circular edge for rolling down them. I'm imagining something like two hoops forming a sphere: rotate 90 degrees to switch between roll mode and walk mode.
      • dutchkiwifruit 13 days ago
        That’s an interesting idea. I have no good answer to your question, but something like a dodecahedron comes to mind, as a ‘trade-off’ between a cube and a sphere.
        • mtsr 12 days ago
          If the edges were all made as small arcs with extra actuators to rotate them either flat along the surface or outwards to form something that can roll. Might need to do the same for diagonals to get it to roll smoothly?
          • __MatrixMan__ 12 days ago
            I like the actuated edges idea. I'm imagining it using an edge to hook the top of a step, pull itself half way up with edge actuation, and then building up momentum and slamming a brake to kick itself onto the stair.
      • javajosh 13 days ago
        In middle school I imagined a toy that would be a top with a similar mechanism as this cube. It could spin it's outer shell and then tilt and engage a "wheel" hoop, just a bit above the the tops tip, exchange some of of it's angular momentum for linear, right itself and build up angular momentum again. This would enable a fully enclosed, no external moving parts RC vehicle.

        It seems such a thing is possible now.

    • tgsovlerkhgsel 12 days ago
      Knowing and seeing how it works takes away a lot of the magic, but imagine finding a completely featureless whirring metal cube... that then jumps up onto an edge, then onto a corner, and starts spinning. And is capable of doing this on any random surface.

      I bet that would puzzle even most people who consider themselves familiar with physics and when the cube suddenly jumps back from a corner onto a face, clearly showing that the jumping isn't just some hidden mechanism that extends, make some seriously consider the possibility of magic.

    • darzu 13 days ago
      Amazing. Now it just needs a nice wood enclosure and matching induction charging pedestal. Kickstarter please take my money!
  • maelito 13 days ago
    Makes me think to the Brennan monorail train.

    Very interesting video https://www.youtube.com/watch?v=kUYzuAJeg3M.

  • neom 13 days ago
    Great art. This other thing he built is totally different, but just as fun to look at: https://www.youtube.com/watch?v=P9jyNIWsRvI

    I love engineers who make art so much.

    • uint8_t 13 days ago
      If you like this, you are sure to love Jacob Tonski's "Balance from Within," a 170-year-old couch outfitted with reaction wheels so that it stands up improbably on one leg.

      Eventually, the reaction wheels max out and the couch falls over, exploding like... well, an interpersonal relationship if you ask the artist; but lately, it's hard not to see politics.

      It was recognized by Prix Ars Electronica, a very high honor for this genre of art.

      Video: https://www.youtube.com/watch?v=uQRP-b68fnE Article: https://ars.electronica.art/aeblog/en/2014/07/02/auf-der-suc...

      • dutchkiwifruit 13 days ago
        I didn’t know about this, but it’s great! It makes me wonder whether I should come up with some kind of funny enclosure for my cube now, haha.
      • drBonkers 13 days ago
        Wow, I deeply want the cube and this couch. How much do you think it would cost to make the couch? How dangerous are these objects if one of the reactive wheels fails? I imagine if one was to fail, the object could be violently launched across the room.
        • s0rce 13 days ago
          Do you mean a piece of the reaction wheel getting thrown across the room? You could shield that with something like they do on jet engines to avoid turbine blades being launched through the fuselage. I think the object itself is heavy enough compared to the energy in the reaction wheels that it would just fall over.
        • toss1 13 days ago
          The cube? Not severe but enough to definitely wear safety glasses when things are activated in development. The couch? That's a fair amount of mass at a good height above floor level; definitely don't want to drop it on your body parts. Tje reaction wheels failing, Calc the max velocity & mass of the ring, and that'll give you an idea of the energy levels you're dealing with. I see nothing that would prevent me from doing either project, just enough to take good ordinary safety measures. Start on much smaller projects, enjoy the builds, and by the time you get to the cube & couch, you'll be able to estimate all that you need.

          Also, when you have a question in development, remember: One test is worth a thousand opinions (especially re. your own opinions).

    • sorenjan 13 days ago
      I remember seeing his M&M sorting machine several years ago: https://www.youtube.com/watch?v=ceGlMV4sHnk
    • amelius 13 days ago
      I wouldn't say this other project is totally different. In fact, he can probably easily combine the two!
      • dutchkiwifruit 13 days ago
        This is definitely something I’m thinking about doing! I would ideally like to keep the reaction wheels visible though. Putting LEDs inside the wheels for a persistence of vision effect might be cool.
      • neom 13 days ago
        It would be fun if the LEDs changed or did something special based on the rotation.. :o
    • layer8 13 days ago
      Now make it operate silently so that I can actually put it in my living room. ;)
  • hirako2000 13 days ago
    On sundays I usually get hyped reaching new heights with code. Gratified by pushing perseverance and crearivity. then I come across posts like this one and feel totally powerless, having very short patience span, and too scared to even try such things.
    • ASalazarMX 13 days ago
      Why are you on Hacker News instead of practicing your software engineering skills? -50 points for Griffindor!
    • pavel_lishin 13 days ago
      Yeah, but this is kind of orthogonal to what you and I do.

      I felt pretty good over the past few weeks after finally starting to learn React on the side, and building something that some of my friends are going to use. Sure, it doesn't have the "whoa" factor, but it also didn't cost $2500 to build (not including the years [decades?]) spent learning.

      • rvnx 13 days ago
        If you feel bad about yourself because of that, think of it not like something personal, it's a lot connected to the environment you are from, and some factors cannot be controlled.

        It's actually the ultimate sign of luxury when you have time to study, AND resources to go to a good school, AND enough free time and money to spend on gadgets, AND you can afford to throw thousands on something useless, etc.

        (All that said, the creation is cool and very nice work from Willem specifically)

    • cortesoft 13 days ago
      If someone else being better at something discourages you, you are going to have a bad time in life. Very few people are going to be the best at the world at anything, but that doesn’t matter. It doesn’t change what you can do.
      • hirako2000 12 days ago
        It isn't so much discouragement. And it's a lot more like a great painter who would listen to a pianist masterpiece, and know very well achieving that level of skill in that totally different art field would be almost impossible = time is limited, would involve giving up the mastery or continue to improve in the visual artistry.

        It isn't someone much better at something. It's someone much better at something entirely different yet quite related.

        It doesn't change what one can do that's true. Comparison with oneself is mentally healthier for sure. But humans compare themselves with who they can see, the internet gives us a view of what virtually everyone is capable of.

    • dr_kiszonka 13 days ago
      You could start by following basic tutorials and getting kits from places like adafruit. Many of them don't even require soldering. For me, starting from scratch is (too) hard because you need to figure out what components would work together, how much power you need, etc.
    • KaiserPro 13 days ago
      The thing to do here would be to remove two dimensions first, it makes things _lot_ easier, and you can use off the self/hand made parts.
  • sema4hacker 13 days ago
    I'm actually more enamored with the cool look of the thing rather than the fact that it can balance.
    • ayhanfuat 13 days ago
      Same. Immediately checked if it is for sale (apparently it costs $2500 if you do it yourself).
      • JKCalhoun 13 days ago
        Would be fun to try and low-cost it. I can already imagine replacing the aluminum face parts with laser-cut acrylic. It also sounds like the motors are another expensive part that likely can be low-costed.

        The stainless steel flywheels though..... No ideas.

        • pavel_lishin 13 days ago
          I wonder if it would be possible to balance this thing by sloshing fluid around, or with linear actuators moving weights around.

          Or maybe a pair of motors, moving two circles with weights on their rims around, to shift the center of gravity around until it's stable enough to park them on opposite sides?

          • duskwuff 13 days ago
            > I wonder if it would be possible to balance this thing by sloshing fluid around, or with linear actuators moving weights around.

            No. The reaction wheels are generating torque to change the orientation of the cube, not just shifting its center of gravity.

            • s0rce 13 days ago
              Not really sloshing but you can pump fluid in tubes to mimic a reaction wheel https://ntrs.nasa.gov/citations/19910016066 Can also probably provide some thermal advantages as well. Oh neat, you can use a direct current electromagnetic pump to implement this with liquid metal as the fluid 10.1016/j.actaastro.2013.11.030
              • duskwuff 13 days ago
                > Not really sloshing but you can pump fluid in tubes to mimic a reaction wheel https://ntrs.nasa.gov/citations/19910016066

                I think that's a little different -- it's pumping liquid around to change attitude (i.e. to point the satellite in a different direction), not to affect its rotational velocity. To get a sustained rotation, you'd have to keep pumping the liquid around continuously, which isn't terribly practical.

                Neat idea, though! I wonder if it's being used anywhere, or if reaction wheels won out.

                • jdiez17 12 days ago
                  That’s exactly the same principle as reaction wheels. Indeed they have to keep spinning to maintain a certain angular rate.
            • pavel_lishin 13 days ago
              Right, that's how this cube - and how satellites - work. But would other approaches be feasible for a desk toy or an art object?
        • YZF 13 days ago
          Just brainstorming here but I don't think they need to be particularly precise or strong. You can likely use many materials as long as you can get enough weight (lead weights?) on the circumference. E.g. 3d print the flywheel structure (can be made thicker for rigidity if that's an issue) and glue some lead weights on. Looks like you can have slightly larger wheels too.
          • dutchkiwifruit 13 days ago
            I spent quite some time (almost) perfectly aligning my reaction wheels. Vibrations at multiple thousands of RPMs are no joke. Then again, such speeds are typically unnecessary once the cube has settled into its equilibrium position. ReM-RC on YouTube has built a similar cube which uses 3D-printed wheels with steel bolts in the circumference [1].

            My wheels are oversized when you just consider the balancing application, but I want to add jump-up functionality later, and the wheels need significant inertia (and also need to run at significant speeds) to accomplish that.

            [1] https://youtu.be/AJQZFHJzwt4

            • YZF 13 days ago
              Cool. The 3d printed wheels presumably would have some dampening properties vs. the steel ones. You can also attempt to balance them at speed (moving/adding/removing the weights) to try and minimize vibrations like you do with motorcycle or car wheels (I guess there's multiple modes though).

              Fun project!

        • newaccount74 13 days ago
          If you can make the flywheels flat, you could cut them with a waterjet, which would be cheaper and faster than milling. And I assume that you can use normal steel instead of stainless steel.
        • johndough 13 days ago
          What are cheap alternatives for motors/drivers? I imagine there are cheap brushless RC motors which might work, but not sure about the electronic speed controller.
          • YZF 13 days ago
            I suspect motors and drivers used for drones/quadcopters will work in this application as well. Those should be pretty cheap. You can do all the controls in software, you just need the right (I guess sensorless) driver.
      • pavel_lishin 13 days ago
        I wonder what the cheapest possible build for something like this is, if you loosen enough constraints - let's say, if we allow it to be externally powered, and agree that size doesn't matter.

        Would it be cheaper (and/or safer) to build a larger one, allowing for larger-but-slower flywheels? Could you make one out of a couple of scrap bicycles?

  • __MatrixMan__ 13 days ago
    Call me reckless, but I'd totally pay to climb a bigger one, with holds along the edges. I just wanna feel how it responds to my movements.
    • swyx 12 days ago
      gonna be like climbing a wall of jello, or a mountain during an earthquake. fun thought experiment.
      • __MatrixMan__ 11 days ago
        It can be hard to commit to certain moves that you think you can do even when the wall is staying still. I think having to commit to them even when you know it's going to move would help with one's head game when they went back to stable rock.
  • extraduder_ire 12 days ago
    Any thoughts about making it lay itself back down on a qi charger (or pogo pins) when its battery is getting low, or its reaction control wheels get saturated? I assume that would wait until after it has brakes to pick itself up.
    • wmf 12 days ago
      I wonder if you could put a coil in the corner and power it continuously. The distance might be a problem.
  • pradn 13 days ago
    This is exactly the sort of artifact you expect a wizard to have floating above their hand on a fantasy pulp's cover, circa 1955.
  • syntaxing 13 days ago
    As a former MechE, those parts look like it cost a pretty penny but damn, the results are worth it. Naively, you should be able to plug figure 21 into simulink to get the tuned constants. Though to be honest, getting the system constants will probably take just as much time and for a one off piece that’s for fun, hand tuning is more than fine.
    • dutchkiwifruit 13 days ago
      Fusion 360 calculates things like moments of inertia and weight, and this was very helpful since the controller requires these parameters to convert control inputs to torques, for example. I still had to tune the controller gains, of course. (Which I did by hand.)
      • syntaxing 13 days ago
        Is there anyway to tune the controller gains beforehand? Also if you don’t mind me asking, how much did everything cost you? This looks super fun and I’m debating to build one.
        • dutchkiwifruit 12 days ago
          Bobrow’s research mentions a set of equations that can be used to derive the controller gains based on a set of dynamics-related parameters of the cube (like inertia, mass), but the results were unsatisfactory, so I tuned the gains by hand. But in theory, yes.
        • FabHK 12 days ago
          The article lists a BOM of EUR 2500.
  • anonymouskimmer 13 days ago
    I pictured one of three things:

    1) A "cube" that isn't really a cube in that the corners aren't points.

    2) A cube designed to balance on the corner of a wall.

    3) A cube with varying densities such that it will balance on a corner.

    I did not picture a mechanical device.

    • rtpg 13 days ago
      I had a McDonald’s toy that was a self balancing Superman on a point. Obviously this cube is something else in that it can move around but I wonder if it’s even possible to build a non mechanical cube that could balance on its point
      • jacquesm 12 days ago
        Anything that balances is mechanical, you will always end up moving something to compensate for being off center. For instance, you could have two fans spinning to pump air from one side of the device to the other but that would still be mechanical. You could do the same with fluid and so on. But all of it would eventually require a mechanical component to output the reaction force.

        Ion drives or selectively colored surfaces don't have enough impulse to do the job, those are the only non-mechanical reaction devices that I know of, but maybe there are others that could work?

        • mnw21cam 12 days ago
          Not necessarily. It can also be done with buoyancy. A hot air balloon just before it takes off is effectively "balanced" on its basket and does so because the bit at the top is positively buoyant. You can also get toys that stand up on the bottom of a swimming pool using the same principle.
          • jacquesm 10 days ago
            The challenge was:

            > I wonder if it’s even possible to build a non mechanical cube that could balance on its point

            I don't think a hot air balloon fits the bill there, nor does submerging it in a convenient body of water.

            • mnw21cam 9 days ago
              You could certainly build an ultralight cube with a very small weight in one corner and a helium balloon in the opposite corner, and get it to stand up on its point, at least until the helium leaks out.
        • rtpg 12 days ago
          There are plenty of things that self center despite not having active mechanics in the sense we are talking about. Bobbleheads, an egg that you shake to have the yolk hold it in place, a lot of springy stuff in general.

          Obviously there’s a mechanical force at play, but there’s a huge difference between “some springs make this work” and “these motors make it work”

        • quickthrower2 12 days ago
          Simplest might be a classic spin top toy with a paper cube shell.
          • jacquesm 12 days ago
            Spin top is definitely mechanical though.
  • Animats 13 days ago

    That stainless steel work is very nice. I didn't know PCBway did CNC machining. eMachineShop has been around for two decades, but now more companies are offering online CNC, which may bring prices down.

    He wants to add brakes, so he can spin up a wheel, apply the brake hard, and get enough of a change in angular momentum to bring the thing upright. I wonder if eddy current brakes would work for that. More elegant and quieter than friction brakes. Actually, just shorting the motor might work.

    • dutchkiwifruit 13 days ago
      I've considered various concepts for the brake design and think the way forward is to use friction brakes. The original Cubli uses bicycle brake pads, but this has its disadvantages. I'm thinking about using a (possibly bidrectional) band brake for my cube, similar to the one used in the "M-Blocks" [1]. Based on this video and the associated research paper, I'm quite optimistic about this kind of brake.

      [1] https://www.youtube.com/watch?v=hI5UDKaWJOo.

      • Panzer04 13 days ago
        I suppose there are limits to the size and power of the motors and controllers you want to use, but those inrunners are probably not ideal either, right? I wonder if you could use an oversized hobby outrunner and achieve the same effect (probably with a large controller as well)

        Also, even if most hobby motors do not specify Nm/A, they usually give KV, which is actually the same value but shown in a different form :).

      • jacquesm 13 days ago
        I wonder if shorting out the windings or even more extreme, reversing polarity on the running motor would have enough of an effect to cause the jump.
        • Animats 12 days ago
          I would expect so, but the integrated motor controller might not let you do that. The power MOSFETs and motor windings should be able to handle it. It's all heat dissipation, and this only lasts a fraction of a second.
          • jacquesm 12 days ago
            Those M-Blocks are really clever, the way they move the reaction wheel around to allow it to simulate having three wheels when it has only one. But that limits the 'balancing' capability, though that's - for a cube - mostly a gimmick as far as I can tell, the locomotion capabilities are far more useful and they seem to do that just fine.

            There was a popular mechanics article a many years ago about a box that moved without any outward visible means of locomotion. Inside it were a slide with a little tin can and some metal balls, going one way up the slide was easy and nearly friction free, the other way it released and fell, then bumped into a stop at the bottom which was enough to cause the box to slide a bit. That was mighty impressive when I was a kid, this is like an SF version of that.

  • SeanAnderson 13 days ago
    I've got a floating planter (not this model, but similar: https://www.amazon.com/BandD-Floating-Plant-Pot-Levitating/d...).

    It would be cool to combine these techs. Maybe have a floating floor that the cube then balances on or something to that effect.

    • dutchkiwifruit 13 days ago
      That would be cool. I thought about balancing one cube on top of another balancing cube, but sadly I’ve only got one.
  • sixhobbits 12 days ago
    Would love if HN had a section like 'show hn' specifically for long-form, lone-hacker, impressive stuff like this. Not sure exactly what the metrics would be that qualify an article to belong there but every few months I see something like this that has that 'wow' factor, and wish there was an easy way to collect all of them.
    • swyx 12 days ago
      i mean this sort of thing usually gets like >1k votes so thats an easy enough filter?
  • rq1 13 days ago
    Probability courses would be funny with that thing.

    Roll the dice.

  • omoikane 13 days ago
    My first reaction when I see one of these is "where can I buy one?" And then I realize that it's not unlike having an open-face blender with those flywheels spinning at 6000 rpm. I am not sure I would feel comfortable with something like that near my hands.
    • dutchkiwifruit 13 days ago
      My envisioned solution to this - very real! - danger is to attach some very thin round sheets of steel to the wheels such that you can’t stick your fingers in them.
      • mrb 13 days ago
        How about just plexiglass sheets mounted on the 6 faces of the cube? With screws so they can be removed easily.
        • dutchkiwifruit 12 days ago
          That would be fine too but I dislike the idea for aesthetic reasons.
    • binarymax 13 days ago
      Maybe some thin plexiglass around it would be fine - not sure if it would compromise the mechanism though.
  • tamimio 13 days ago
    Not to downplay software engineering, but any project that mixes hardware and software together is always better and cooler in my opinion, great work!
  • jedilance 13 days ago
    I was hoping for a DIY kit available until I saw BOM costs around 2.5k
    • moffkalast 13 days ago
      Well this is such an old project idea that they are already being sold on aliexpress both in complete form for $500 and $50 per torque axis if you want to make one from scratch. Just search up cubli.
      • terom 12 days ago
        https://a.aliexpress.com/_EzMRNIv €250 for one axis (edge) and €500 for a 3-axis (single point). There are a couple sellers / designs.
        • moffkalast 12 days ago
          Yeah there are also these separate torque wheels without the housing: https://www.aliexpress.com/item/1005002491212698.html

          The brushless type looks interesting, since you get the flywheel, the motor, an integrated driver, and encoder board all in one piece. A bit pricey still, and the encoder documentation is lacking, otherwise I might've ordered one or two already.

          Would be really cool to make a satelite model that hangs from the ceiling by hanging it at its center of mass on a ball joint, so it can rotate in all directions, then using these to orient it in specific ways, solar panels for charging, radio comms to give it commands, sonic humidifier as the rocket engine, etc. Maybe one day lol.

  • phkahler 12 days ago
    Regarding brakes... I don't know if it's good enough for this project but a 3-phase motor will produce a braking torque when shorting all three phases together. Some gate drivers even have an input or way to trigger this function by turning on all low-side FETs or all high-side. The amount of torque depends a lot on the specific motor design and the speed when applied. Not sure if this technique would be good enough for the project.
  • Invictus0 13 days ago
    It's a shame that cubli wasn't open sourced in the first place. Academics need to do better than just publish papers
    • dutchkiwifruit 13 days ago
      Agreed. If only to enable others to reproduce and improve on the work.
  • geor9e 13 days ago
    Now put some of those reaction wheels in one of these, to give them lateral self balancing https://alienrides.com/collections/electric-unicycles
  • m463 12 days ago
    You should put a solar panel or two on it. Put it in a window, stay charged. Even track the sun. maybe a kickstand for nighttime.

    Could also magnetically levitate to "get up" if there was a coil underneath it.

  • egberts1 10 days ago
    You might enjoy this whitepaper on how to dispel a high-spinning wheel.


    Also, there are other papers on using single-axis pivotal (flip 180 degree) to bleed off wheel speed without braking.

  • mastersummoner 12 days ago
    You know, once you implement the braking system, it seems like you could make it walk across your desk, corner over corner. Might be hell on the wood surface though.
    • jacquesm 12 days ago
      Cover the sides in something soft? Also it might be possible to control the fall so that the reaction wheel spins up just before estimated impact.
  • kibwen 13 days ago
    Very cool! I'd like to see one of these made into a permanent sculpture, where the battery is removed and energy is provided via the contact plate itself.
    • neom 13 days ago
      We need to get the guy who made this one and Tony Rosenthal together, unfortunately, however, Tony is dead.


      • crazygringo 13 days ago
        That Alamo sculpture was the first thing I thought of! Fun fact: it spins, even though that was never intended. [1]

        Making a public sculpture size version seems really cool on the one hand. On the other hand, it seems incredibly dangerous if it could crush someone to death if the power or electronics failed...

        [1] https://en.wikipedia.org/wiki/Alamo_(sculpture)

    • crazygringo 13 days ago
      I'm sure this is a dumb question because I never studied electrical engineering, but can you supply power with just a single point of contact? Rather than the two contacts/wires that wall plugs and batteries have? (And is a contact plate even safe?)

      Or would wireless power be the way to go, the same way we charge our phones these days? Could you fit a large enough coil close enough in the tip?

  • webdoodle 12 days ago

    Absolutely not. Gyroscopic systems have been used to keep ships floating (and moving) for many years. I also wonder if it could be used in buildings for earthquake mitigation...


  • otto2 13 days ago
    Cool functionality aside, it looks beautiful.
  • sim7c00 12 days ago
    this is such a crazy awesome thing. i can only imagine the magic it would seem if you put an enclosure around it to hide the mechanism... :'). - me with no mechanical background would definitely not guess how this works. respect and thanks for making this wonderful thing!
  • matthewtse 13 days ago
    Just subscribed to your YouTube channel, hope to see more Mechanical Marvels from you! It's rare to feel an unstoppable childlike smile creep onto my face, the smile of experiencing joy+wonder, and I felt that today.

    Also super impressed by the build quality and the welds you made for this hobby project.

  • dkarras 13 days ago
    I remember seeing this exact thing a couple years ago. Or is my brain bugging out? very cool nonetheless.
    • KTibow 12 days ago
      Yeah it says it was inspired by the Cubli
  • fortran77 13 days ago
    Put this in a sealed wooden box and you'd have the basis for a magic routine that would fool many people. Especially when the box and what it's standing on can be inspected. When the motors aren't spinning, if this were enclosed, it would feel normal.
  • soheil 12 days ago
    Gyros were also used to balance a massive passenger monorail in 1962 without a Raspberry-pi https://en.wikipedia.org/wiki/Gyro_monorail
  • tremarley 13 days ago
    This looks excellent. How could someone make this more silent though?

    How does one quieten fan sounds?

    • xxs 12 days ago
      6000rpm cannot be silent, it causes the air to move and it's perceived as noise.
  • andrewp123 13 days ago
    This is really cool. Would love to see a basic analysis of the physics - I know it's just basic angular momentum and torque. Are reaction wheels somehow intuitive and don't require you to think about these things?
  • bcherny 12 days ago
    I wonder why cars and trains don’t use tech like this to keep passengers stable, even when the road/track has bumps. Something like this, built into shock absorbers, could be revolutionary for transport.
    • altairTF 12 days ago
      I would say cost, imagine the R&D of the part itselft, but the cost of it in maintenance to the final user. I believe citroen had electromagnetic shocks in the 90's and it didn't catch much momentum but if you see the videos of it working, its exactly like you said, smooth as heck drive throwgh bumps.
  • altspace 13 days ago
    Reminded me of the red cube in NYC https://publicdelivery.org/isamu-noguchi-red-cube/
  • jwr 12 days ago
    This is such an impressive engineering achievement. As someone who designs electronics and builds mechanical devices, I find this project spectacularly impressive!
  • jurgenaut23 11 days ago
    Wow, it would be real fun to work on a ML-driven approach to learn the controller... and maybe do more exciting stuff than just attitude control.
  • navane 13 days ago
    Reminds me of the self balancing train that rode on a single, small rail track. Project got cancelled because the double rail system was already well established.
    • nealabq 13 days ago
      Note that reaction wheels do not make use of gyroscopic torque (which balances these monorails). They are different control mechanisms. Altho both use spinning wheels.

      More info: https://en.wikipedia.org/wiki/Control_moment_gyroscope

      • dtgriscom 13 days ago
        The gyroscopic action of the cube's momentum wheels must make the control algorithms quite entertaining.
    • progval 13 days ago
    • ravenstine 13 days ago
      Isn't it more likely that idea got abandoned because a failure of the balancing system would be catastrophic?
      • rvnx 13 days ago
        + intensive in terms of energy usage + needed a second gyro to feel like you are standing in a flat environment.
        • navane 13 days ago
          As a sibling of yours pointed out above, the train worked with CMGs, their energy usage seems not too much:

          "CMGs are also far more power efficient. For a few hundred watts and about 100 kg of mass, large CMGs have produced thousands of newton meters of torque. A reaction wheel of similar capability would require megawatts of power."

        • IggleSniggle 13 days ago
          Iirc the second gyro is necessary to ensure the train doesn't course correct itself right off the rail in the case of a curve? Coupled together to make the "correct" side more responsive for any given direction? Dunno.
          • FinnKuhn 13 days ago
            you would also need a gyro in each train car, so that doesn't help
  • amelius 13 days ago
    Next I want to see a pencil that balances itself on its tip.
  • lovegrenoble 13 days ago
    You have to make fundraising to produce it on https://www.kickstarter.com
  • johnea 13 days ago
    Really Interesting! I had never seen it before.

    I would suggest v2 have photovoltaic panels on all sides so it could run indefinitely on a sunlit windowsill...

  • leros 13 days ago
    Very cool project. I'm curious, was the bulk of that £2500 cost tied up in any one part of the build? I'm suspecting the CNC work.
  • iamsanteri 12 days ago
    Coooool!! Well done! Now do it in JavaScript :’D
  • mcapodici 13 days ago
    The title undersells it. It balances itself on a corner, can be knocked about and rotates itself to. And can balance on an edge.
  • litoE 13 days ago
    Just out of curiosity: do the flywheels actually stop and rotate slowly in either direction or is it just an artifact of the video?
    • ElectricalUnion 13 days ago
      One of the optimizations that is employed to make the whole thing possible is reducing flywheel rotational speed whenever possible. Otherwise, as the video says, the reaction wheels get saturated and you lose control over that saturated axis rotation.
    • dutchkiwifruit 13 days ago
      Yes, the reaction wheels normally rotate very slowly.
  • gniv 13 days ago
    This is cool. Is this how robots normally balance themselves, or are there implementations that don't require spinning wheels?
    • mrjet 13 days ago
      Most robots are passively balanced by having multiple wheels on the ground. Walking robots balance actively without active gyros by moving their limbs.

      Spacecraft (which most roboticists would call robots) typically orient themselves using a combination of reaction wheels, magnetic torquers and thrusters. The reaction wheels spin rotate the aircraft by “taking” angular momentum into their own rotation. They don’t require a local magnetic field or the expenditure of fuel, so are a nice choice.

    • CaptainOfCoit 13 days ago
      > or are there implementations that don't require spinning wheels

      Tons of different implementations out there for balancing. Maybe the most common one is the one we humans use, which requires zero wheels :)

      • gniv 13 days ago
        Speaking of which, any good videos on how we balance ourselves when standing?

        And beyond the muscle mechanics, do we understand what the brain is doing? For example, I find it fascinating that I cannot balance myself on one foot if I close my eyes. So obviously we use some visual cues to balance.

        • febusravenga 13 days ago
          > I cannot balance myself on one foot if I close my eyes.

          Skill issue. I'm good at balance sports and can say that balancing on one foot with closed eyes is hard but doable. Just train it :)

        • an_aparallel 12 days ago
          "the vestibular system"
      • noman-land 13 days ago
        How does ours work?
        • CaptainOfCoit 13 days ago
          Input, processing, output.

          Sensors, brain, muscle movement.

        • WJW 13 days ago
          • ponector 13 days ago
            Some people can balance without legs.
            • CaptainOfCoit 13 days ago
              I hope most healthy people are able to sit up without falling forward or backwards.
    • phkahler 13 days ago
      If you've got 2 wheels side by side like a Segway, all you need is the IMU and those 2 wheels.
  • retrolumi 12 days ago
    The second I clicked on the video I instantly recognized those synths as being Kevin Macleod's music. Very iconic
  • Uptrenda 12 days ago
    If you showed this to someone in the stone age they would literally think you were a god and probably worship the cube.
  • pests 13 days ago
    James Burton on YouTube makes a lot of self balancing robots with different configurations and balancing techniques.
  • neoberg 12 days ago
    I am not very familiar with controls engineering. Can this machine tilt or balance in a tilted position?
  • soheil 12 days ago
    Should make the frame out of wood or some soft material so no one thinks you welded it to the table.
  • drakenot 12 days ago
    How effective would it be to build a neural network that controls the reaction wheel motors?
  • scotty79 12 days ago
    Are mechanical breaks necessary for cube jumping up?

    What are the limits of electronic breaking of those motors?

  • yazzku 13 days ago
    Damn, I have been living a lie. Now I won't be able to sleep until I can build one for myself.
  • wwarner 13 days ago
    really so beautiful. the writeup really revved up my imagination, thinking about how the wheels slow and reverse direction to change and then maintain equilibrium, and thinking about how wheels like this control the orientation of the hubble and jwst.
  • tremarley 13 days ago
    It would be cool if a gigantic one of this were made.

    People would love to see this in a museum.

  • julianeon 12 days ago
    Ha, this project does seem extremely Dutch! Whimsical yet practical(ish).
  • DrNosferatu 12 days ago

    Now make it walk using two vertices (close to each other) as the two feet ;)

  • po__studio 13 days ago
    I want to buy your stuff!
  • Ostatnigrosh 12 days ago
    I have been obsessed with this balancing cube for years now
  • pfdietz 12 days ago
    I like how it automatically unloads the momentum wheels.
  • renewiltord 13 days ago
    Haha this is great, dude. Man it looks so well machined too.
  • Ostatnigrosh 12 days ago
    I have been obsessed with this balancing cube forever now
  • pkphilip 12 days ago
    This is actually such a cool project! Great job!
  • a-dub 12 days ago
    very cool. reminds me of the alamo sculpture in astor place in front of the site of the old cooper union engineering building.
  • pravint 13 days ago
    This is so beautiful work ! Loved it !
  • stephen_g 12 days ago
    Very cool, and I love how amazing it looks with decently machined metal parts - 3D printing is cool and all, but I do get a little tired of the characteristic messy look of those projects so this is a very nice change! I really think more people should try modelling parts to have machined, now that cheap manufacturing has become more accessible in recent years.

    You can tell the designer likely has some proper engineering experience not just by the nice designs of each part and how well the thing works, but also by the use of Torx screws!

  • wojtczyk 13 days ago
    Thanks for sharing! Awesome project
  • staplung 12 days ago
    In William Gibson's The Peripheral (the book, haven't seen the show myself) there's something like a weaponized version of this:

    ``` “What were you in, up there? Mason says you’re training.” “Kind of like a washing machine, inertial propulsion. Big-ass fly-wheels inside.” “Washing machine?” “About three hundred pounds. Big red cube. I’d just learned to balance it on one corner, then rotate, when they made me come back.” “What’s it for?” “Fuck if I know. Wouldn’t want to meet one in a dark alley.” ```

  • deadbabe 13 days ago
    How large could these cubes scale?
    • dutchkiwifruit 13 days ago
      I’m not sure! You could probably at least double the rib length if the wheels are scaled accordingly. I can however answer the opposite “how small” question to some extent by linking to this really cool project: https://youtu.be/hI5UDKaWJOo
  • tharakam 13 days ago
    It's so beautiful! Love it!
  • stuaxo 13 days ago
    What a pleasing object.
  • CodeWriter23 13 days ago
    My kind of crazy mf.
    • yazzku 13 days ago
      It deserves to be said fully spelled out: this guy is one hell of a crazy motherfucker. Respect.
  • Borzadaran 12 days ago
    Very cool project.
  • Shinchy 12 days ago
    That is so cool!
  • stuart73547373 13 days ago
    strong plug for onshape instead of fusion360
  • c-smile 13 days ago
    What if to keep it standing for the whole day?
  • kristianpaul 13 days ago
    2500 BOM
  • johanneskanybal 13 days ago
    Well I need one.
  • EGreg 13 days ago
    We've reached a point where machines can do pretty much everything better than humans and animals too, even without AI. Because people add solutions to problems and if they're better than previous ones, then it's downloaded to all the machines which perfectly run the software. Self-driving card etc.

    No animal can compete with the accuracy, reaction speed, etc. Racing Drones will be able to fly better than 99% of human operators. Cars will be able to drive better than 99% of human operators. And consistently.

    Google already gives direction better. Trading bots trade better. They are preferred by people and corporations, respectively.

    I wouldn't be surprised if computers can brute-force better scientific theories just by being fed motions of stars or other data. Like deducing Kepler's laws in 2 minutes and then going much much further, into laws that use 19283-dimensional vectors and are 99.9% of the time predictive.

    Monte Carlo Tree Search has done very well with chess, with AlphaZero beating all human-designed programs like Rybka, and playing much more elegant chess too.

    Where we need AI models is training on human-produced data (art, text on the internet, etc.) And there, it can be trained to maximize various metrics, including human satisfaction, or actual investment into an enterprise, and soon -- laughing at jokes, or agreeing to go out with someone romantically, etc. Just pick the stuff that works the best, and show it to humans as a superstimulus.

    In addition, the models are developing "understanding" of the latent space, the way a student in a classroom would develop this from listening to the professors explain stuff (rather than do experiments themselves). The latent space, thanks to humans, models the real world quite well, from a human perspective, and the computers can become polyglots and polymaths... ALL of them. Just download some compressed model weights onto a small computer, and it becomes more knowledgeable about topics than any human. And just like other software, the weights can be improved.

    But the next level is Swarms. Swarms of bots in online accounts at online platforms and communities will be able to optimize "reputation" points that they accumulate from existing humans in the communities (social capital). By doing this 24/7, and mimicking timing of humans etc. they can eventually (in aggregate) command far more reputation than any set of humans. They can also coordinate over long periods of time, as sleeper accounts, and eventually undertake any reputational attacks, including and up to having a person's own friends turn on them, ruining a famous person's reputation, having them convicted of a crime, or even foment a war etc.

    Whether or not humans are behind these directives at that point will be irrelevant. It's a bit like giving everyone atomic bombs or the ability to create novel viruses, except online. Someone's bound to misuse it. And because the swarms are so destructive and able to blend in, the internet will become a Dark Forest and people will try to retreat into real-life communities, where they will try to eliminate bots by having people show up periodically at events, but never completely succeed (because these same people will run bots on their own accounts).

    Already for years, corporations have been deploying algorithms to optimize people's addiction to TikTok, Instagram etc. with predictable effects of depression in teens, anger in adults arguing politics, etc. And that was before AI.

    I wrote about this here in LA Weekly: https://www.laweekly.com/restoring-healthy-communities/

    • ponector 13 days ago
      That is not true. Machines can do things better only in strict environment.

      Self driving car in Las Vegas is relatively easy. How about tight curvy streets of Rome?

      And what about medical machines or sex machines. I doubt they are better then human.

      • EGreg 13 days ago
        That's what people say right before the exponential function (or rather, X^n) elipses them

        "Sure, the machines can do X really well, but what about Y"

        Y is just X with more variables. The machines will be able to do better than 95% of humans in a couple years, and then eventually better than all humans. But doing better than 95% already means they will be preferred everywhere.

        And the swarms is the key!

  • markdog12 13 days ago
    Imagine showing Archimedes this device.
  • ijhuygft776 13 days ago
    Here is one from 10 years ago that can jump up, balance, and 'walk': https://www.youtube.com/watch?v=n_6p-1J551Y
    • r-spaghetti 12 days ago
      Try to read line 3 in the article again.
  • Snawoot 12 days ago
    The trick is just to hang it and film upside down /s
  • ijhuygft776 12 days ago
    a guy designed a drone controlled with the same idea.....
  • devilsAdv0cate 12 days ago
  • Jakesbeb 12 days ago
  • Williams77 13 days ago
  • enjoyitasus 13 days ago
    The OA
  • philipwhiuk 13 days ago
    Can someone explain the reason for the massive font-size on the website?
    • vdaea 13 days ago
      It's the "twentytwentyone" theme for wordpress, which was the default during... twenty twenty-one. Maybe he installed wordpress then and didn't bother changing the theme or liked it as it is.
    • hanspeter 13 days ago
      Preemptively saving your Cmd+plus fingers from unneeded exercise.
  • dave333 13 days ago
    So cool! Wondering if this technology can be used to control spacecraft attitude or does it require a fixed support? How heavy do the flywheels need to be in relation to the total weight?
    • auxym 13 days ago
      As mentioned in the article, reaction wheels are the standard method used to control satellite attitude.
    • CaptainOfCoit 13 days ago
      > Wondering if this technology can be used to control spacecraft attitude

      It can indeed, and is already used in the wild today!


      • jessriedel 13 days ago
        That list has three examples, but to be clear for others: Nearly every satellite has reaction wheels. There are literally tens of thousands of reaction wheels in orbit.
        • dave333 13 days ago
          I guess I have watched Apollo 13 too many times and was under the mistaken impression spacecraft still used propellant thrusters for attitude control.
          • eternauta3k 13 days ago
            They still do!
            • progman32 13 days ago
              To add, reaction control is used in conjunction with reaction wheels. When the wheels saturate, the rockets are used to desaturate them.
    • dutchkiwifruit 13 days ago
      Thank you! The weight of each wheel is approximately 220 g, whereas the total weight of the cube including wheels is 1700 g.
    • glfharris 13 days ago
      Totally does work, lots of spacecraft use reaction wheels to control attitude.
  • mavili 13 days ago
    Impressive work! Some people have all the time in the world it seems!

    That said, it's not really "designing" if you're "building" something that already exists, is it?

    • smolder 13 days ago
      Shirts and pants have existed a long time, but clothing designers still design new ones. This isn't an exact copy of someone else's, it just uses the same principles, so yes, it is "designed".
      • mavili 13 days ago
        You would say "I designed a t-shirt" not "I designed a clothing that has short sleeves".

        It could just be a casual title, guy probably didn't even mean to title it that way but he probably didnt think about it too much. But to downvote because I point out something factually incorrect is just absurd.

    • jacquesm 13 days ago
      He didn't invent it and doesn't claim he did but he did design each and every part that could not be bought off the shelf as well as the final assembly. I'd say 'design' is more than appropriate.
    • sardon 13 days ago
      I agree that "design" in the title is misleading. The main novelty of this cube is that it balances itself etc, and that was thought of and designed 12 years ago at ETH.

      Nonetheless, incredible work by the OP - "I built a cube that balances itself" is already extremely impressive

    • mavili 13 days ago
      Haha lol. Downvotes for saying "building" is not "designing". Why? Seriously people are so open-minded , very tolerant, just as long as you don't upset their feelings. Hahah
      • samatman 12 days ago
        You're confusing design with invention. People design new instances of existing classes of object all the time, from shoes, to cars, to shirts. We call this profession "design", in fact. It's what the OP did with the cube: designed one.