Pencil balancer a bit noisy for desk use

Who wouldn’t want to install this little bot as your newest pencil holder? Place a pencil tip-down and it will keep it from falling using two motors. There is a Dynamic Vision Sensor for each axis that provides feedback, but it’s not the same as using a camera. These sensors pick up changes in pixel contrast, outputting a positive or negative number based on the direction the pencil is beginning to fall. An NXP2103 running at 64 MHz reads in the values and drives the pair of servo motors accordingly.

If you’re interested in the nitty-gritty the full paper is available from the page linked above. It goes into great detail about the algorithm used, and includes plots and histograms showing the data capture during a balancing session. Or you can skip the eggheaded exercises and watch the video after the break.

[via ycombinator]

Comments

  1. WutanG says:

    I was just thinking of the possibilities if you could scale this thing up! This would be fun if you could scale it all the way up for a person. Then sell it to the Tomato juice company V8 for a witty commercial. :)

  2. Masta Squidge says:

    Scaling this up is easy, try balancing a pencil on a fingertip, then try balancing a broom on your nose.

    The broom is easier to do.

    Balancing larger objects is somewhat easy by comparison.

  3. Masta Squidge says:

    I am just wondering if it is possible to get the accuracy tight enough to stabilize the pencils so that the motion is not as erratic.

    I imagine you would need finer control over the servos? Then again I am not exactly an engineer.

    If you could manage to get this thing scaled DOWN and accurate/quiet enough with cheap enough parts this thing would make an amazing desk toy in the future.

  4. ferdi says:

    mmm thats a compecate way to store you pancil richt up more simple way blok off wood dril a holle in it place your pancil in the hole and its balancd to and the noce is zero

  5. RussWill says:

    Masta Squidge, the erratic behavior is because the function is oscillating. It needs a PID algorithm.

  6. Daniel N. says:

    RussWill, this is using a PD loop at 500Hz, the I component isn’t necessary for a system like this. Its probably oscillating because of the limited speed of the cameras and servos relative to the rapid movement of the pencil.

  7. DarkFader says:

    hmm.. inverted pendulum in 2 axes.

  8. Nathan says:

    @Masta Squidge – That’s what I was thinking.

    Its a great device but it would be good to try and reduce the erratic movement.

  9. svofski says:

    If the system is tuned well, the pen would appear standing straight up, almost without visible movement.

  10. Jimmy says:

    This is much more impressive than the inverted pendulum demonstration many of us did in school. You’d have a fighting change at trying to balance those long rods on your finger — with a pencil it’s hopeless (at least for me).

    The PID controller is a great “first cut” controller because there’s easy physical intuition to how it works, and indeed it works well for many, many systems. For some systems it doesn’t work very well, however, especially if you have sensor or process noise you’d like to attenuate.

  11. -HMav says:

    If it was driven with voice coils like the head in a HDD it would be quiet and quick enough to seem motionless, maybe the lens positioners from a couple old cdrom drives could be hacked?

  12. Erik Johnson says:

    @svofski, it looks like the feedback for this balancer is a pair of cameras – would be very difficult to do unless its a very high dpi camera

  13. Not two “ordinary” cameras… The “cameras” described in the linked web page are analog “retinas” that detect and report contrast changes of changed pixels only, at up to hundreds of “frames” per second, giving a small enough quantity of output data to be processed with only a small processing load. That is what allows detection speed fast enough to balance a pencil, which is too small for a human to balance.

  14. … and the “cameras” are only 128 pixels wide — re really just analog motion detector arrays…

  15. seanfalloy says:

    I think the erratic movement makes for a neat display of how it works. I dont know if the prosesor is just to slow or if its just bad math or just done on purpose but its much more interesting to watch than something perfectly balanced.
    Nice Work.

  16. I think that is funny!
    What is impressive is using 2 cameras to see the movement instead of encoders or pots.

  17. ewan says:

    @robwentworth

    i know loads of jugglers who can balance itens smaller than a pencil on their nose. teaspoons are quite popular. but i have seen a few people balancing cigarettes and once

    there even one guy who balances a juggling club on the top of his head, where he can’t actualy see it!!

    i read an article in Cascade (the european jugglers journal) a few years back that explained that the movements that a juggler makes are actually faster than the ammount of time it takes for the the brain to comunicate with the muscles. the cited a principle called “dynamic noise” that was apparently also used in the design of aircraft wings. apparently just adding a small random wiggle makes the whole system more stable.

  18. psuedonymous says:

    @Ewan
    The reason this works is that the ‘random’ but predictable noise can be compensated for by the control algorithm. A random, even if smaller, unpredictable noise is much harder to compensate for.

  19. Harvie says:

    2psuedonymous:
    > A random, even if smaller, unpredictable noise is much harder to compensate for.
    I think we can use it as RNG in cryptography :-)

    i also guess that it’s possible to make it more stable using proper algorithms. but if it was 100% stable it would look like any other pencil holder, so the motion is cool – almost like lava lamp :-)

  20. Spork says:

    Very cool project and I do agree with making operate more quietly as well as an algorithm to stabilize the pencil. The issue I have is with the writer/creator making poor comparisons.

    What is most bothersome about the article is the claim about how they are simulating an animal (human) eye to get data, but they use optical sensors at 90* of each other. What animal has eyes at 90* apart?

  21. kak says:

    a 10 cent pencil will cost 15$ a month to run :P

  22. Whatnot says:

    Scale it up to a person? I can already stand up and don’t need to be madly corrected by external devices to keep standing up.

    Well maybe after a great many hours or drinks I might :)

    So scale it up and put a palace guard on it at the end of his shift you mean, or a brit or irishman when pubs close?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,374 other followers