Howdy all, looking for direction on how to use an ipac to control a motor that drives a bball net.
The IPac is an encoder that translates button presses into keystrokes/gamepad button presses/mouse clicks, so it can't
directly control the motor, but you're on the right track with tapping into the existing wiring.
I'm thinking I could just splice a switch into the harness and add a plug but there wouldnt be any on/off timer function.
Based on your posts on this subject, you may want to try an approach like this:
1. At the IPac Start switch input, add a second wire leading to an input on an Arduino.
- When you press the Start switch, ground will be applied to both the IPac and Arduino inputs which will trigger both of them.
- Arduino Pro Micros are inexpensive and should work well for this application.
Start switch _______________ IPac input
|
|_ Arduino input
2. You'll need to write an Arduino "sketch" (program code) that does the following:
- Initialize and start the program loop.
- Read the input.
- When the input is triggered, start a countdown timer.
- When the timer reaches a certain value, command the motor driver or relay(s) to move the motor as desired.
-- The exact commands to use depend on the type of motor and the desired behavior.
-- You may need to use limit switches to keep the motor from going too far in either direction.
-- Try to time things so the motor returns to the starting position just before the timer runs out.
- When the timer runs out, kill power to the motor driver/relay(s), re-initialize, and start the program loop again.
3. You'll need some type of motor driver board or relay(s).
- Not sure if that is an AC, DC, or stepper motor.
- The motor will draw more current than USB can provide, so you'll need a power supply for it.
-- If the motor runs on 5VDC or 12VDC, you can get that from the computer's Molex connectors.
---------------
First step is to identify what type of motor it is (AC, DC, or stepper) and what voltage it runs on.
That will lead you to how to control it.
- 1 relay for AC.
- 2 relays for DC. (may need limit switches)
- Motor driver board for stepper. (may need limit switches)
That info combined with the desired timing and actions leads to the Arduino program code.
-------------
Automated Projects is a good sub-forum to check for info on motors.
Raspberry Pi & Dev Board is a good sub-forum to check for info on Arduino code.
Scott