Go Down

Topic: Terrain mirroring (Arduino & Raspberry Pi 4) (Read 924 times) previous topic - next topic

joestracka

Nov 25, 2019, 06:10 pm Last Edit: Nov 25, 2019, 09:36 pm by joestracka
Hello everyone!

My company and I need help with a project. We are based out of Southern California and are looking for local help.

Our project uses a system of 24 electric jacks (think car jack), in a grid formation. On top of these jacks are some metal plates, for support, and a piece of AstroTurf. The idea is to recreate simple terrain from data we've collected.

Controlling the jacks are 2 Relay control boards connected to a Raspberry Pi 4. Each jack also has an ultrasonic sensor to gauge the distance from the top of the jack to the ground. Because there are 24 jacks, we have 24 sensors. These are hooked into an Arduino that is also connected to the Raspberry Pi, and powered through a custom board. All the code for the project is written in Thonny and the Arduino IDE.

We have hit a road block and we need some help finalizing our project.

EDIT: To clarify, the Arduino is mainly used to monitor the Ultrasonic Sensors and is connected to the Raspberry Pi through USB. Our problems are mainly the speed at which everything moves as well as powering everything efficiently as well as the accuracy of the ultrasonic sensors.

EDIT 2: I found some pictures I had lying around

I can provide more details if required, but if you live in Southern California and are willing to travel, please don't hesitate to respond.

zwieblum

So you have these 24 jacks mounted on a flat ground, you tell the RPi "jack 4: 12cm, jack 5: 16cm ...". RPi sens data to arduino(s). Ardunio should move the jack up/down/stop. You are stuck at the point where the control loop does not work as intenden. If that's about it, drop me a PM.

joestracka

So you have these 24 jacks mounted on a flat ground, you tell the RPi "jack 4: 12cm, jack 5: 16cm ...". RPi sens data to arduino(s). Ardunio should move the jack up/down/stop. You are stuck at the point where the control loop does not work as intenden. If that's about it, drop me a PM.
The 24 jacks are mounted to the ground yes. The RPI tells the jack to move up and down, but uses the arduino to get the distances from the sensor. The majority of the issue is the speed at which the jacks move (we move them in groups of 4, I think), the accuracy and timing of the sensors, and the overall optimization of everything.

I am working on this project with no background experience... so bear with the lack of knowlege, sorry,

zwieblum

Sorry to say, but ultrasonic as distance feedback in a control loop (like this) is not the brightest idea. Mind posting some pictures, datasheets etc.?

joestracka

#4
Nov 25, 2019, 09:19 pm Last Edit: Nov 25, 2019, 09:25 pm by joestracka
Here are some pictures I have underneath. You can see the jacks, and some rudimentary wiring. I circled the sensor in blue, and keep in mind that there is one for every jack.

EDIT: I also found a picture of the boards.

zwieblum

Oh my :o ... just what I feared. Just some points:
- ultrasonics won't work reliably in this kind of setup (interferience, reflections, noise ...)
- you won't get the jacks move faster than they are now (I assume you operate them on max. voltage).
- why don't you build one control loop per jack and daisychain them? (2 relais+one Arduino+one poti+2 endswitches per jack and you are fine to build how many jacks ever you want)
Just my 2¢after 20 years in this business  :D

joestracka

#6
Nov 25, 2019, 10:14 pm Last Edit: Nov 25, 2019, 10:15 pm by joestracka
Using an arduino for every jack isn't something affordable or the path we want to take for this project... at least if I am understanding you correctly. As far as ultrasonic interference, this is the major player in what is slowing down our jacks, and not letting them 0 in on a distance. What are your suggestions around the same price range?

zwieblum

Use a potentiometer. The jacks have 4 joints, one of them is perfectly fit for the job. A Ardunio Nano is ~ 5 bucks, that's cheap (or get a bluepill, it's ~ 1 buck). And please use solidstate relais, they are a bit more expensive (~ 5 bucks), but work reliably. You'll end up with 3 wires for dasychaining all nanos and one 110 (or whatever voltage your motors use) cord. Not that mess on the ground. And not that ratsnest on the desk.

joestracka

Thanks for your input and we will keep that in mind, however we still need an actual professional to help build it in person.

As far as a potentiometer, I have no clue what those do and how/where to even begin installing it. Like I've said, I am no electrical engineer. All this stuff is way over my head

zwieblum

Let me put it this way: If you are able to solder some wires (or you have a person that can solder some wires) and you (or a person you have access to) can do some hardware job (bend some sheet metal, use superglue, operate a drill without injuring himself) this project can be done remotely with ease. Would not be the first talk-through-job for me.

Well, fell free to contact me in case you need assistance :)

cedarlakeinstruments

That statement has me questioning your budgeting and the amount of control you want over the project.

24xcost of an Arduino Nano (roughly $4 each) is a minor detail in the cost of this project. Refusing to use one Arduino per jack at the suggestion of an expert without otherwise explaining why not (it's a perfectly valid design solution) indicates that the project may not go well if you aren't willing to follow recommendations.

From your description, you're basically building an array of high-force actuators. Other than the amount of force, there's nothing unusual about this project and it should be pretty straightforward. However, taking into account the amount of force, a safety analysis might indeed say that a completely distributed system (Arduino + actuation + position feedback element at each point) is the best solution.


Using an arduino for every jack isn't something affordable or the path we want to take for this project... at least if I am understanding you correctly. As far as ultrasonic interference, this is the major player in what is slowing down our jacks, and not letting them 0 in on a distance. What are your suggestions around the same price range?
Electronics and firmware/software design and assistance. No project too small

6v6gt

Can you post a data sheet for the jack unit you are using ? I guess this design has at least built-in limit sensors but cannot report its position (how far it is extended) hence the need for the external distance sensors (ultrasonic in your case).

I guess this solution  has a tendency to oscillate, like a jack is sent high then overshoots. The attempt to correct it undershoots a bit and it takes some time to stabilize at the desired height. Maybe there is some scope improving the current algorithm for determining how long the jack motor should run, and in which direction, based on its initial height and desired end height.

For a more scalable design I would also suggest making each jack unit, its position sensor and its power control an autonomous unit and a bus to interconnect them. I'm surprised, incidentally, that you have succeeded in using a single arduino to control an array of 24 ultrasonic sensors, not least because of the length of the wiring.

Anyway, it looks like a interesting activity and good luck with it.


zwieblum


Go Up