Being completely new to Arduino and coding but having a frim grasp of the fundamentals I wanted to ask opinion if I should try and tackle my real world problem first or is it too much and I should find someone to hire if I want to realize a result in the next 30 days.. and only have a couple hours a day to tinker...
Outline of the project here, I am sure there will be additions once we realize we missed something in the real world tests..
We are using stepper motors to turn large Variable Transformers , one per phase in a 3 phase power setup. We will have some internal voltage transducers and some external amperage transducers for further down the test setup. We want to be able to set either the target voltage from phase to ground on each phase or the target amperage downstream as the load resistance varies both of course are related but its just the user experience we want to change.
Please let me know your thoughts
Project Summary
Selector Switch one when closed will put the System from Manual to Auto Mode.
Manual Mode- Priority
Manual Mode is selected by closing Selector Switch 1 open indicates Auto Mode
In manual mode the three encoders will control the three Steppers directly. When rotated in one direction stepper will move in one direction and vice versa.
When in manual mode Selector Switch 2 will choose between two step speeds Fast When closed (X Steps per increment of the encoder) and Slow when open (1 step per increment)
Limit switches will be checked after each step and when closed the respective stepper will reverse its current direction, backup three steps and blink 0000 on the respective Segment Screens (1+4,2+5,3+6) for 5 seconds before returning the screen to its prior reading.
Segment Displays 7-9 are off
In All Modes
Segment Display 1 will display Voltage read from Voltage Transducer 1
Segment Display 2 will display Voltage read from Voltage Transducer 2
Segment Display 3 will display Voltage read from Voltage Transducer 3
Segment Display 4 will display Amperage read from Current Transformer 1
Segment Display 5 will display Amperage read from Current Transformer 2
Segment Display 6 will display Amperage read from Current Transformer 3
In Auto Mode
Selector Switch 1 Open
Selector Switch 3 when closed puts the system in Voltage Select Mode and when open puts system in Amperage Select Mode
Selector switch 2 is non-functional speed will be determined by the gap between current reading and target reading see below.
In Voltage Select Mode
Encoder 1 will be used to select a voltage between 0-347 (will be limited in future) increasing by a value of 1 for each increment in the encoder. This value will be the target voltage for Stepper 1 to achieve via reading Voltage Transducer 1 This target value will be displayed on Segment Display 7
Encoder 2 will be used to select a voltage between 0-347 (will be limited in future) increasing by a value of 1 for each increment in the encoder. This value will be the target voltage for Stepper 2 to achieve via reading Voltage Transducer 1 This target value will be displayed on Segment Display 8
Encoder 3 will be used to select a voltage between 0-347 (will be limited in future) increasing by a value of 1 for each increment in the encoder. This value will be the target voltage for Stepper 3 to achieve via reading Voltage Transducer 3 This target value will be displayed on Segment Display 9
The speed of the steps should be altered based on the size of the difference between Target reading and Actual reading (Faster the larger the gap, slower the smaller the gap) Direction for now will be DIR + HIGH if lower than target and DIR + LOW if higher than target (this may need to be reversed).
Limit switches will be checked after each step and when closed the respective stepper will reverse its current direction, backup three steps and blink 0000 on the respective Segment Screen (7-9) for 5 seconds before returning the screen to its prior reading the target for the corresponding Stepper will be updated to the actual reading after reversing 3 steps
In Amperage Mode Selector Switch 3 open
Same as Above however the targets are Amps from 0-6000 in increments of 10 per encoder step (this will be limited in future) these targets are displayed one the same Segment displays as the voltage targets were in Voltage mode. The comparison in this mode will be between targets and reading from Current Transformers 1-3
Hardware Setup
Arduino Mega 2560 R3
2x Channel I2C 4-20mA Current Receiver with I2C Interface MCP3428
Encoders1-3 KY-040
Segment Displays 1-9 .36 Inch 3.3~5.5V LED 4-Digit Adjustable Brightness Display Module for Arduino Red Light
Voltage Transducers # VADT500-42-24
Stepper Controllers EM542S
Current Transducers MGT-0420
Hooked up to
AccuCT-5170R-5000-333mv
Proposed pinout
Arduino Mega | |||||
---|---|---|---|---|---|
Pin | Pin Description | Protocol | Use | ||
20 | SDA | I2c | 4-20MA to I2C boards x2 | ||
21 | SCL | I2c | 4-20MA to I2C boards x2 | ||
3 | Digital | Hi/Low | Stepper 1 PUL + | ||
4 | Digital | Hi/Low | Stepper 1 DIR + | ||
4 | Digital | Hi/Low | Stepper 2 PUL + | ||
5 | Digital | Hi/Low | Stepper 2 DIR + | ||
6 | Digital | Hi/Low | Stepper 3 PUL + | ||
7 | Digital | Hi/Low | Stepper 3 DIR + | ||
8 | Digital | Hi/Low | Limit switches Stepper 1 | ||
9 | Digital | Hi/Low | Limit Switches Stepper 2 | ||
10 | Digital | Hi/Low | Limit Switches Stepper 3 | ||
11 | Digital | CLk | Segment Display 1 Clk | ||
12 | Digital | Dio | Segment Display 1 Dio | ||
13 | Digital | CLk | Segment Display 2 Clk | ||
14 | Digital | Dio | Segment Display 2 Dio | ||
15 | Digital | CLk | Segment Display 3 Clk | ||
16 | Digital | Dio | Segment Display 3 Dio | ||
17 | Digital | Clk | Encoder 1 Clk | ||
18 | Digital | DT | Encoder 1 DT | ||
19 | Digital | Clk | Encoder 2 Clk | ||
22 | Digital | DT | Encoder 2 DT | ||
23 | Digital | Clk | Encoder 3 Clk | ||
24 | Digital | DT | Encoder 3 DT | ||
25 | Digital | Hi/Low | Selector switch 1 | Manual / Auto Mode | |
26 | Digital | Hi /Low | Selector Switch 2 | Fast / Slow Steps | |
27 | Digital | Hi Low | Selector Switch 3 | Amperage / Voltage | |
28 | Digital | CLk | Segment Display 4 Clk | ||
29 | Digital | Dio | Segment Display 4 Dio | ||
30 | Digital | CLk | Segment Display 5 Clk | ||
31 | Digital | Dio | Segment Display 5 Dio | ||
32 | Digital | CLk | Segment Display 6 Clk | ||
33 | Digital | Dio | Segment Display 6 Dio | ||
34 | Digital | CLk | Segment Display 7 Clk | ||
35 | Digital | Dio | Segment Display 7 Dio | ||
36 | Digital | CLk | Segment Display 8 Clk | ||
37 | Digital | Dio | Segment Display 8 Dio | ||
38 | Digital | CLk | Segment Display 9 Clk | ||
39 | Digital | Dio | Segment Display 9 Dio |
I2C Boards | |
---|---|
1 | Voltage Transducer 1 |
2 | Voltage Transducer 2 |
3 | Voltage Transducer 3 |
4 | |
5 | Current Transformer 1 |
6 | Current Transformer 2 |
7 | Current Transformer 3 |
8 |
Thoughts?