hi my first post here i have zero experience in coding and need some guidance here
i have built this bullet sizer to size thousands of bullets without the need to do it by hand and it does work as you might be able to see if i can upload the video
i used 12v relays to control the cylinders and used on way flow control valves to limit the speed of the cylinders this works however is very basic and has draw backs.
id like to control this machine using Arduino controller so i can have some other functions as well and gain some control over the machine to prevent it crashing or damaging itself.
Hardware i have is
Arduino R3
Extension board
Display 2 row
8 relay board
programmable time delay relays
the machine is already fitted with 12v micro switches and the DA cylinders
it has 3 way 5 port DCV solenoid operated valves 12v
I would like to have
Functions:
Push button on / off
Push button one cycle
Push button Bullet feeder on / off
Push button Air pressure on / off
Push button Reset
Display:
bullet count
Air on/off
Faulted micro switch A+
Faulted micro switch A-
Faulted micro switch B+
Faulted micro switch B-
Interlocks :
Micro switch cyl A retracted
Micro switch cyl A extended
Micro switch cyl B retracted
Micro switch cyl B extended
(Cylinder start / stop position) =
Cylinder A retracted (micro switch Cyl A - = (1)
Cylinder B retracted (micro switch Cyl B - = (1)
Outputs:
Display
Relay 1
Relay 2
Relay 3
Relay 4
Relay 5
Relay 6
Relay 7
Relay 8
I need help writing the code for this machine so please if you could help get me started id appreciate it
dont bash me here if this makes no sense i dont know how to write the code guys just having a crack here
Sequence / loop
If Cyl B - micro switch = ( 1 ) Cyl A + millis 1.000 sec (relay 1) ;
Else = return to start position ( Cyl A - (relay 2) millis 1.000 (display (Faulted micro switch reset push button required ;
If Cyl A + micro switch = (1) Cyl A - millis 1.600 sec (relay 2)
Else = return to start position ( Cyl A - (relay 2) millis 1.000 (display (Faulted micro switch A) reset push button required ;
If Cyl A - micro switch = (1) Cyl B + millis 1.600 sec (relay 3)
Else = return to start position ( Cyl B - (relay 2) millis 1.000 (display (Faulted micro switch A-) reset push button required ;
If Cyl B + micro switch = (1) Cyl B - millis 0.3000 sec (relay 4)
Else = return to start position ( Cyl B- (relay 4) millis 1.000 (display (Faulted micro switch B + ) reset push button required ;