Hello, my name is Davide.
I'm a farmer, form Italy.
Sometimes I see something and I say it would be nice to have an Arduino to do it.
I already built a calf incubator with a heater fan and a dht sensor.
This time I'm wondering if I could build a remote control for a machine. It would be a big upgrade if I could control it from a distance (~20m).
The machine has 3 electric two way oil valves. These valves are now controlled by direct wire switching.
My idea, by what I learned searching for similar projects, is to have two Arduino nano communicating together by radio modules, maybe the NRF24L01.
The first Arduino will be connected to a switch board with 3 SPDT momentary lever switches.
The second Arduino will be connected to a relay board to control the six 12V coils that move the valves.
My questions are:
Is this the right design?
If yes, can someone help me with the code?
Thank you for reading and for the help. I will appreciate it so much.
Hi, thank you for answering. I have some little experience. I think I can get right the commands that control the relays.
I have instead some doubt with the code for the communication between the two arduinos.
While "it would be nice to have an Arduino to do it", if you are only switching things on and off, this is apparently nothing more than a common remote control application for which purpose-designed devices will be simpler, cheaper and possibly more reliable in practice.
With a proper antenna on the receiver, 20 metres should be quite practical. Four channel devices are common and should be applicable. There may be some additional logic required, but not necessarily an Arduino.
With remote control you have to be careful of machines starting up unexpectedly when someone is passing by or has their hand in it .
The noise can be enough to startle someone so they hurt themselves .
Just need to consider this and the means of isolating the machine when it is worked on ( hardwired !)
BTW -as previous there are a lot of remote control relay setups on eBay using car type remotes , cheap and work well.
No I haven't thought about that yet.
Maybe the code could include a part that keeps/moves the valves in closed position if there is no connection?
There is really no problem if the machine is kept in the starting state, (all valves closed).
There could be an issue if a valve is kept open for too long, as it could heat the oil pump. But this could be in any case avoided by turning of the pump. It is started by a control on the tractor and it doesn't depend on the control that I'm trying to build and even on the wired controller that we're now using.
Thank you all for answering me.
It's right to have safety concerns. I assure you that it is not dangerous. There won't be people involved operating near the machine while it's working.
Maybe a better description of it will help you understand.
The machine I'm talking about is a round bale chaser.
You can see a newer version of it in this video: https://youtu.be/mrdHCdvo8As .
Ours it's older and it doesn't have the feature shown in the video that automatically moves back the bales to unload the cart.
So the only way to do it is to have two people, one moving back the bales and one onloading. Or one person that would be forced to step up and down from each tractor every two bales. And when you have to move thousands of them it's a hell.
By the way the movements to control are basically three: side shift to prepare for loading, fork up and down, and back and forward.
The control would be moved from one cabin to the other. And it would get power from the 12V lighter socket. So if the remote control is not on a tractor it won't work.
I already considered the 4 channel remotes. But the interface wouldn't be the same, and I don't think those remotes could stand long operating cicles, they are too delicate.
And also 4 channels are not enough, as I need to control on/off state of 6 coils.
If you mean the durability of the "tact" buttons, that may well be the case. But you can use the electronics and provide your own switches.
Two remotes!
That was easy, wasn't it?
Now you have eight channels. And if connected to your own switches, could be mounted in the same box. Even better, you can attach a serious antenna to the transmitters and massively augment the range.
Hi to everyone. I wanted to update you on that idea that I had. I couldn't write you anymore because the machine smashed me lol. Just kidding.
I did something but I got to much busy with work that couldn't go ahead with the project. Now in winter things are more easy and I'm back on charge
I'm trying to upload some photos of the controller and the receiver that I built.
Shoots! It says I can only upload one photo per message.
First of all I got tempted by all those tutorials on YouTube with personalized pcbs, and after all I thought that it would be a nice solution to withstand vibrations and bumps that the two circuits with be subject to.
So I had to learn that too.
And after some head banging, I was able to transmit and receive the buttons state from the control to the receiver.
Btw, before I stopped working on it I observed 2 issues: when I closed the control box the wires went near the radio module and disturbed it and it wouldn't send anymore.
And for those who had safety concerns, inspired by a tutorial on drone radio control, I added to the code of the receiver an instruction that brings back to starting state the outputs if radio signal is lost. And that part I already observed that works
Second issue was. The receiver was activating normally the relay board but when the button was released and the signal went back to normal state the relay remained activated.
Another mistake I did was when soldering the radio module to the board and put too much solder and didn't notice and almost fried the Arduino's voltage regulator
I have that pair of issues to adjust.
But it was promising. The zeros on the Line was the change of state imposed by the controller and seen on the serial monitor of the receiver.