# Changing platform from horizontal

I had a builder friend ask how you would make an Arduino based device to set a small platform that he can strap a Bosch laser pointer (the ones that measure distance) onto to set a specific angle from horizontal. That is: attach the pointer, set the angle of slope (say, 15 degrees downwards) into the device, hit the button and the device moves the laser pointer to 15 degrees downward.

I know we have self levelling devices but I guess this is the opposite. I’m thinking accelerometer, stepper motor but I’m sure there’s a better way of doing it.

Gerard

1 Like

Hi Gerard
I think there are a lot of variables to be decided here.
The method of mechanically moving the platform.
The size of the platform and the effort required to move it.
The range of platform movement.
The resolution of movement, deg, 0.1 deg etc.
The accuracy required.

Some of these things will probably depend on others of course so must dovetail to a certain extent. The simplest which comes to mind would probably be a stepper motor arranged for X number of steps per degree. The big problem overall would be getting any relationship right. For instance a stepper might have 200 steps/rev. This equates to 1.8º per step. Now to get a 1º step you would have to micro step dividing by 18 then having 10 steps per degree. This won’t happen as the digital world does not easily work like this. Any mirostepping would be 2, 4, 8, 16, 32. So no 18. So hence my reference to “dovetailing” above. The mechanical system has to overcome the shortcomings of the digital system.

This is thinking Arduino which you suggested. There are systems around obviously that have the grunt to do something about all this, possibly even some Arduino product but I think most devices would have some mechanical correction done such as the thread pitch on a lead screw, gear box ratios etc.

Don’t forget that a small error with the first degree will multiply as the movement increases so the pulses or whatever per degree movement must be a whole number. This is the problem, there are not many occasions where the numbers of degrees (0 to 360) will divide into say 1000 and get a whole number.the timers in an Arduino (and probably anything else for that matter) only deal in integers or whole numbers which with a UNO means 1µsec.

To be really simple I would put an inclinometer on the platform and measure it. Or my phone has a “Bubble Level” app that would do this job.
Cheers Bob

1 Like

The device you are after is the MPU6050, often called an accelerometer but it does more than that. See, for instance:
Measure Tilt Angle Using MPU6050 Gyro/Accelerometer & Arduino.
MPU-6050 Module 3 Axis Gyroscope + Accelerometer | 018-MPU-6050 | Core Electronics Australia

Depending in the range of motion required you could use a stepper or a servo. My preference would be for a small stepper for accuracy. You can get a stepper with built-in gearing for improved resolution

but a direct connection to the pointer would give the best precision. You can improve resolution using a 200 step stepper and microstepping.

The laser part should be easy:

For the user interface you have a large range of options. I am most familiar with Arduino, so this item combined with a UNO would be near top of the list:

but there are many other similar combinations, typically with a lower power usage. For intance, for the Pi family:

or a membrane keypad and OLED display.

1 Like

Hi Gerard,

Jeff and Bob have given excellent responses, only one thing I’d like to ask: Does this setup need to be portable? How are you looking to power it? You’ll also need a stepper motor driver, so once you let us know what sort of power you have access to, we’ll be able to suggest one.

Cool project, what’s it going to achieve at the end of it all?

1 Like

Hi Gerard
If you want to go down the stepper path I would suggest a 200 step/rev (1.8º / step) unit. The “divide by 18” stage could be done mechanically. This scenario would yield 10 steps per degree. Other ratios could be used but have to be a multiple of 18, like a 36:1 ratio would mean 20 steps/degree etc. You might have to work out your own method of getting these particular ratios as most of the gear boxes that attach directly onto motors seem to have quite odd actual ratios. They publish numbers like 100:1 but on close examination they have some other actual odd ball ratio. To be fair the reputable types also publish the Exact ratio also (usually on the same chart). Depending on the accuracy required you need exactly 18:1 or a direct multiple of that. Could do it with toothed belt arrangement if you can get the correct size pulleys.
Cheers Bob

Hi Jeff
I think Gerard (or his mate) already has the laser in the form of a distance measuring tool. Being a builder he would already have a small laser level I would think. Even I have one of those. But those links still useful if he wanted to go down another path.
Cheers Bob

That approach is not recommended. It would be difficult to calibrate an attached laser device. OP has indicated that it’s actually a rangefinder, and is therefore unlikely to have a suitable surface for aligning with a plate on the level. Arranging for calibration each time it is attached would be complex, and having it strapped to the level would interfere with its portability and functionality as a rangefinder. A built-in pointer is relatively easy to add to the project and makes the device much easier to use. Of course, OP is welcome to ignore that advice if the issues I mention do not apply.

Thanks all for your considered responses.

It started out as a wager, James! The more I thought about it, the more interesting it seemed to have a small, portable device that will measure range (as the Bosch thing does) but also inclination/declination. So, it started out as a kind of angle measuring device that the Bosch thing clips on to but Jeff has raised the stakes (or inclined them…heh!).

When I get through this Swinburne Solidworks project, I’ll devote some more time to it in a day or so.

1 Like