Adding to a completed project i just want to get a feeling feeling for how feasible an improvement on it would be.
At the moment I have an Arduino controlling 4 relays which control pneumaitic solenoid valves.
This is used to cut wire at a certain length one of the soloenoids activates and deactivates a set of drive wheels the length been determined by time.
I would like to improve on this as time is not the most accurate, a reel of wire at the start is heavier than when comes to the end and with less resistance the wire travels faster.
I want to replace this with an encoder if possible.
Basically wire travels over an encoder for a set number of turns (distance) when reached this will trigger the relays.
In my head I have an idea of 2 arduinos one for relays and one for encoder, the encoder activative other board when number of turns is reached and this would be looped.
The worst thing you can do is to assume two processors are better than one. Major error in thinking.
One processor with enough inputs is the only way to approach it and a Mega is more than you could possibly need. Compact versions are available from China.
One Arduino will be more than able to do this - better even as it saves the complexity of communication between two of them.
Reading an encoder is easy - just count pulses, and at the correct number of pulses activate your relay (for a period of time) and start counting again.
The encoder is 24v so I will opt for the following 8 Channel 24V To 5V Optocoupler Isolation Module PLC Signal Level Voltage Conversion Board NPN Output DST-1R8P-N.
At the moment I have a 4 relay module board with independant 5v supply connected to the Arduino.
This is up and running perfectly but as i stated on an earlier post it is using time as the actuator.
Is it posiible for me to link the optocoupler board and relay board to arduino at the same time and use signal from encoder to actuate relay sequence.
terrycoyle:
Is it posiible for me to link the optocoupler board and relay board to arduino at the same time and use signal from encoder to actuate relay sequence.
I don't see why not, I assume that it would only need one digital input as you're always turning the reel the same way. As to the relay board, you've already proved that out.
I'd guess too that you can simply poll the input to get encoder data. If not, use interrupts.
The 24v encoder is already attached to cutting machine.I had no intention of using it but had a successful first attempt and this has whether my appetite to attempt this.
Hi Guys apologies if my response to specific help is slow but if I get advice I have to go check what it all means.
Diodes etc are something I may have touched on throughout the years but its a different matter when it comes to actual using them in an actual project.
terrycoyle:
The 24v encoder is already attached to cutting machine.I had no intention of using it but had a successful first attempt and this has whether my appetite to attempt this.
It would be useful to know the output type/voltage of the encoder. Got a part number or schematic you can reference?
Yes it coule be.
But as I was unsue if it was feasible hence the title.
I am going to purchae another Uno and get the encoder attached to that to see whats involved and then i intend to use that experience to incorporate the encoder into the original uno that is currently controlling the 4 module relay board.