Automatic level

Discussion in 'General Electronics Chat' started by bug13, Aug 13, 2013.

  1. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Hi guys

    How hard or easy to make a automatic level device? And what do I need to know to make one?

    Thanks a lot!
     
  2. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,577
    231
    First you need to know what you want to level!...audio?...terrain?...emotions?...??? ;)

    Ken
     
  3. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Does it need to be optical? How about a piece of tubing, two syringes without pistons and some water?
     
  5. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    Here is one I cobbled together to auto-level my RV. Sorry to say, I no longer have the schematic of what I put together. The way it is set up, if the photo sensors both see bubble or both see fluid, it says level. Reasoning behind that is that the bubble size changes with temperature.
     
    THE_RB likes this.
  6. #12

    Expert

    Nov 30, 2010
    16,355
    6,852
    Here's one for $364, which is a great bargain, considering that they cost $6000 when I was working on them in 1976.

    http://www.ebay.com/itm/Spectra-Pre...032?pt=LH_DefaultDomain_0&hash=item4d1065d190

    Obviously, you can make something cheaper and more specific to your needs. I just thought I would throw this in to demonstrate that automatic leveling has been done for decades. The principle behind this model is a pair of partially filled, curved, glass vials, with the ability to conduct current. A square wave is applied to measure conductivity from each end, some processing, and a stepper motor levels the laser. In this model, the laser is reflected by a spinning mirror to cast a beam in a 360 degree, horizontal circle.

    The cheaper model just showed you a couple of leveling vials and 3 adjustable feet. You adjust, the laser beam spins.
     
    bug13 likes this.
  7. studiot

    AAC Fanatic!

    Nov 9, 2007
    5,005
    513
  8. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Hi #12
    I don't need one, I am just curious how they work. I think I understand your explanation on how this one sense the orientation. My first thought would be a accelerometer or something to sense the current orientation. then use 3 stepper motors to adjust the orientation. Is that a reason they are not using a accelerometer?

    And I don't understand how to decide which motor to adjust, and how many steps need to be adjust for that motor, to make the it level.

    Would you mind explaining it a little more on this please.

    Hi BillB3857
    I like your idea, I have never thought of this kind of tool and put some photo sensor on both side of it.

    No optical is needed, I am more interested in how it work and how to implement it electronically :)


    Thanks for the idea :)
     
  9. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    Unless you *REALLY* have too much time on your hands - DIY spec laser spirit levels turn up at various times at discount store chains,

    In the UK we have mainly Lidl & Aldi, I bought a laser-level from Lidl a year or two ago for about 6 - 7GBP.

    IIRC - EPE magazine, not too long ago published an accelerometer based level - you'd have to tape a laser pointer to it yourself.
     
  10. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Hi ian field

    Someone asked me how these work, I first thought it's pretty easy, just some accelerometer and/or gyro, then adjust it with some step motors.

    But when I think again, I have no idea how to decide which motor to control and how many steps. It's not as easy as I first thought.

    I just want to find out how it actually work, I do not intend to buy one, or build one. At lease no now. (although it would be fun to just build one :))
     
  11. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    Googling "accelerometer level sensor"; I got 1.48 million hits.
     
  12. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Hi ian field

    I did the search you suggested, and read the first 4 links, it doesn't seem to have the info I am looking for (see attached screen dump), perhaps I asked a poor question again.

    What I want to know is:

    • Assuming I am controlling a flat plane, there are some (3 motors?) step motors connected to the plane mechanically.
    • Assuming the device is stationary.
    • Now I successfully read some data from whatever sensors (accelerometer? gyro? tilt sensor?) to get the orientation info (x, y, z axis).
    • How do I level the plane (make z=1g, x=0, y=0, assuming z is facing upward and using accelerometer), explain in the following format is prefer (or other method you prefer to use):

    Code ( (Unknown Language)):
    1.  
    2. //first calculate blah blah
    3. //then calculate blah blah
    4. //drive motorA xyz steps
    5. //drive motorB xyz steps
    6. //drive motorC xyz steps
    7. //now the plane is level (eg. z=1g, x=0g, y=0g)
    8.  
    Is there a better question? Or is my approach a bad one to start with?
     
  13. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    You would only need two motors. If you make one point fixed elevation, the other two motors would then adjust two other points forming a triangle. Three points determine a plane. Two sensors would detect which point is high or low and drive the proper motor to bring that point to be level with the fixed point. My RV leveler only senses the front to back level. I park, disconnect the truck, flip a switch from Manual to Automatic, press the start button and walk away. My auto leveler determines whether the front of my RV is too high or too low and drives the landing gear motor the proper direction toward level. When it gets level, the motor stops. There are fully automatic systems for RVs that will fully level the unit, but prices start at about $2K. I'm a tight wad.
     
    bug13 likes this.
  14. wayneh

    Expert

    Sep 9, 2010
    12,156
    3,063
    +1
    The internals of an auto mirror are a useful example. Two small DC motors provide all the range of motion needed to adjust the mirror.
     
  15. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    If you are capable to make your own, why spend $2K.:D And, thanks for your help, I think I am starting to understand it now, appreciated!

    PS: almost forgot, using 2 motors is a pretty good idea
     
  16. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,073
    3,856
    There are Apps for iPhone and Android hones that turn the phones display into a spirit level. I would imagine an app that turns one axis to an analog voltage to the audio jack would also be possible if you need to control something.
     
  17. wayneh

    Expert

    Sep 9, 2010
    12,156
    3,063
    I'm not so sure. I don't think it can pass a DC voltage to the audio jack. If you mean an AC signal, maybe to allow a frequency-to-voltage conversion, that could work.
     
  18. #12

    Expert

    Nov 30, 2010
    16,355
    6,852
    It might be that accelerometer chips were not invented in 1976. That leaves a gyroscope and a strain gauge, or glass vials. I don't know.

    Consider the accelerometer chips we have now. When the chip is level, it produces an output voltage. When the chip is not level, gravity has a different amount of effect and the output will be different. The effect will change in both the down direction and the lateral direction. One could try to measure a torque force at the edges, too. It is not very important that you know the exact voltage, you just need to know it is not the same as it was when it was level. Another aspect is that anything besides level will have a lesser voltage output in the down direction. From this, you can merely search for maximum output like a Maximum Power Point solar panel controller. Remember the recent thread about a brake light for a bicycle and the discussion about the idea that, from the frame of reference on the bicycle, decelerating and rolling downhill appear to be the same thing to an accelerometer chip. (I really hope I got this part correct!)

    So...when the output of the accelerometer chip is not what it was when it was calibrated, something is not level. I expect some fancy computing would tell which way it is off and tell the motors which way to go. I would not be surprised if there were more than 2 accelerometer chips mounted at certain well considered angles to "level". I would also not be surprised to find that accelerometer chips are not sensitive enough to do this job. A single degree of "wrong" might be very hard to measure.
     
    Last edited: Aug 14, 2013
    bug13 likes this.
  19. studiot

    AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    bug13 likes this.
Loading...