feasibility and recomendations for project

I am new to Arduino but have built minor electronic projects, assembled computers, and did minor code changes and uploaded them to a PLC. So not a complete moron but close. I have spent a few days looking at PLCs, encoders and HMI. I believe the Arduino system may be the most cost effective option for me to do what I want but need advice on what components to buy and how to make it work.
The project --- I have a hobby sawmill that is all hydraulic, the main functions I would like to automate are now controlled by hydraulic valves that are activated by 12v DC (push buttons and toggle switches). To start with I would like to control the head up and down function then move on to other functions.
I do not want to just move the head up and down, I want to have it move up or down a specific distance.

My thought was to use a rotary encoder (pulse type) to measure where the head is. Use an arduino to act as the PLC, and use an android phone/tablet to act as the HMI. I know this is very simplified but that is the gist of it. set the head manually, push a "button" on the touch screen, the head moves down 1.25". Push the button again it moves down another 1.25". Push another button and it moves 2" etc. Preferable with a readout that gives me height above the bed and one that tells me how much it has moved.

Is this feasible and if so what components would you recommend so I can start playing with the code and hardware? I would eventually like to have up to 8 outputs to different valves, inputs for the bidirectional encoder, inputs for various prox sensors, and hook it up to my phone/tablet (wifi?) and computer. I say phone/tablet because I would probable start with my phone and when I get it into the field switch to a dedicated tablet.

Please be easy on me as I am new to this and don't know all the lingo but willing to learn. It has been 50 years since I have soldered resisters, transistors, capacitors, etc together. A lot has changed. My computer experience is a lot fresher.


It sounds appropriate for an Arduino project. Since you need WiFi, start with a board that has WiFi, such as the Wemos D1 Mini or NodeMCU.

I would start with getting an Arduino sensor kit (including a rotary encoder) and either an Uno or one of the previously mentioned boards. (They are cheap, buy a few). Experiment with the encoder using some of the example sketches (what Arduino calls a program) in the IDE. This gets you familiar with the programming environment and how to make things work on the Arduino.

Next, figure out how to get the absolute position of the blades from the encoders. That! Will be the hardest part of the project.

I know that some people use their phones for the UI, but I have absolutely no experience there. (The Wemos or NodeMCU boards can be a web server however).

It sounds like a great project. I would be sure you include a Dead Man Switch, I just do not trust WiFi and people damaging things. For your solenoids look at a L9822E octal solenoid driver, It also has diagnostics built in. For distance up and down you can use time but a position sensor would be much better which you are looking at. You have tons of options for input, look at the MAX14662 as your input device. The reason for these choices if you do use something based on the ESP8266 (D1 included) you have a limited amount of I/O available, and many have to be in a specific state at reset so it starts in the correct mode.

Unless you're using an absolute encoder, you will probably want to use a limit switch so that you can home the head to start with. Then the encoder can keep track of position.

Grab yourself a suitably sized display to show the height. Preferably I2C or SPI so it doesn't consume too many pins.

As always with this kind of thing, it is much easier to do it in small pieces - make a list of small projects you can do just to use each piece of hardware on its own. With that done, combining into the full solution is far simpler.

woodman52:
My thought was to use a rotary encoder (pulse type) to measure where the head is.

Have you considered the type of linear Digital Read Out (DRO) that is commonly used with lathes etc. They give an absolute position with great precision and you can get versions that can send data to a computer such as an Arduino.

...R

wildbill:
Unless you're using an absolute encoder, you will probably want to use a limit switch so that you can home the head to start with. Then the encoder can keep track of position.

Grab yourself a suitably sized display to show the height. Preferably I2C or SPI so it doesn't consume too many pins.

As always with this kind of thing, it is much easier to do it in small pieces - make a list of small projects you can do just to use each piece of hardware on its own. With that done, combining into the full solution is far simpler.

I was thinking of the prox switches for limit but would a simple micro switch work?
Start small was my thinking as well. Probable start with head position above base. Than distance traveled since last cut. than control up/down movement. Does that sound about right?

Robin2:
Have you considered the type of linear Digital Read Out (DRO) that is commonly used with lathes etc. They give an absolute position with great precision and you can get versions that can send data to a computer such as an Arduino.

...R

That was my first thought but I need about 36" of travel and I have not seen anything in my price range. Do they make something like that that would not empty my wallet? Can you give a recommendation? I started by looking at magnetic linear DRO. They seem pretty pricey. Maybe I am not looking at the right places. If I get everything working and start making some money with the mill I would be willing to buy more expensive items but at this point I would like to stay under a few hundred dollars for the whole works. Is that possible?

I don't know about the DRO Robin mentioned but I recently helped a user who used this display for counting strokes. I expect you could use it for your needs too:

HiLetgo 2pcs 0.36" 4-Digit Tube LED Segment Display Module Red Common Anode TM1637 Drive Chip Tube Clock Display for Arduino UNO R3

For the limit switch, a micro switch such as are used for 3D printer axis homing would probably do. My only concern would be how quickly movement stops after 12V is removed from the hydraulics.

SteveMann:
It sounds appropriate for an Arduino project. Since you need WiFi, start with a board that has WiFi, such as the Wemos D1 Mini or NodeMCU.

I would start with getting an Arduino sensor kit (including a rotary encoder) and either an Uno or one of the previously mentioned boards. (They are cheap, buy a few). Experiment with the encoder using some of the example sketches (what Arduino calls a program) in the IDE. This gets you familiar with the programming environment and how to make things work on the Arduino.

Next, figure out how to get the absolute position of the blades from the encoders. That! Will be the hardest part of the project.

I know that some people use their phones for the UI, but I have absolutely no experience there. (The Wemos or NodeMCU boards can be a web server however).

Is there an inexpensive HMI touch screen that would work with this project. every thing I have seen starts at $200 and goes up. I can get android NOS notepads for under $50 that would blow away any dedicated HMI I have seen, as far as resolution and size plus they would be wireless. I am ok with a wired low res HMI that will do the job than move up to something more sophisticated once I have proved the concept. I am looking for advice - would a wired HMI be best to start with? Any recommendations?

I've never used one, but Nextion has a range that are rather less costly than that. Look in the displays area of the forum, plenty of people have used them.

Alternatively, look at Blynk. You can use it to put the interface on a phone or tablet.

wildbill:
I don't know about the DRO Robin mentioned but I recently helped a user who used this display for counting strokes. I expect you could use it for your needs too:

For the limit switch, a micro switch such as are used for 3D printer axis homing would probably do. My only concern would be how quickly movement stops after 12V is removed from the hydraulics.

On this circuit movement would stop almost instantaneously. On circuits that move heavy items (carriage) they have valving that allows drift so as not to put stress on the machine. So when I get to the point I want to start controlling the carriage back and forth I will need to take that into consideration.

wildbill:
I've never used one, but Nextion has a range that are rather less costly than that. Look in the displays area of the forum, plenty of people have used them.

Alternatively, look at Blynk. You can use it to put the interface on a phone or tablet.

I guess I was looking in the wrong place. These look like they would work well.

One thing to beware of is that if hardware external to the Arduino is involved, as it is in your case, keeping to a budget can be difficult. On every such project I've been involved in, my own and assisting others, the original design needed to be changed as lessons were learned.

Or put another way: "No plan survives contact with the enemy".

Also, usually, your requirements will evolve as new inspiration strikes once you see the thing in action. In addition, be aware that you may well destroy parts along the way and need to replace them.

If you know exactly what you want, have chosen your hardware with significant margins, know what you're doing with the equipment you have chosen and are colossally lucky, you might get away with one and a half times what you intended to spend. I never have though :wink:

This isn't intended to discourage - your project looks interesting, but there will almost certainly be setbacks, some of which will be expensive.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.