.A Speed and Position Control Electronics Design Laboratory 1
Procedures 4.A.0 4.A.1 4.A.2 4.A.3 4.A.4 Turn in your Pre-Lab before doing anything else Speed controller for second wheel Test Arduino Connect power systems Robot Speed Control with Arduino IMPORTANT! Supply 10VDC to the V in Arduino pin only. DO NOT apply more than 5VDC to any other pin! Applying more than 12VDC to V in or more than 5VDC to any other pin may cause your Arduino to fail! Electronics Design Laboratory 2
A.1 Speed controller for second wheel Experiment 2.A and Experiment 3.A & 3.B must be duplicated for the second robot wheel. You do not need to redo the past labs complete simply build the circuitry and test to make sure that it works (as was done for the Experiment 3 demo) A recommended layout is shown on the next slide. As with all hardware builds, an incremental approach is recommended. You do not need to re-design the feedback controller or re-calculate motor parameters. Use the same motor parameters and feedback controller components. If you have not done so, ensure that ALL integrated circuits have decoupling capacitors. Clean up your circuits. The battery powered system that you are transitioning to will be noisier. Long loops of wire and loose connections will cause more trouble going forward than they have in the past. In the report include a copy of the complete LTspice schematic and summarize any modifications you made compared to your Experiment 2/3 circuit design Note: you are not using the Arduino board yet. Electronics Design Laboratory 3
Recommended Board Layout 5V Generated by Arduino 5V 5V 10V 10V 10V B1 - Left B2 - Left Encoder 1 Power Encoder 2 Power B1 - Right B2 - Right DC1 DC2 5V Encoder 1 Encoder 2 Speed Sensor (1 per wheel) 5V 10V CW CC PWM 1 V ref 1 PWM 2 V ref 2 Speed Control (2 per wheel) 10V 5V Linear Regulator DC1 DC2 10V 10V 10V from power supply Electronics Design Laboratory 4
A.2 Test Arduino It is important to make sure that you can successfully build and download code to your Arduino before connecting it to your robot. Plug your Arduino into a computer, and install the latest Arduino development environment from the web. Make sure to say yes when asked if you want to install USB drivers. Run the blink example. Modify the Blink example to have the LED on for 2 seconds, and off for 0.2 seconds Modify the Blink example to include an external switch: blinking should stop or start depending on the external switch Include a copy of your code in the report Note: your Arduino should not be connected to your robot yet. Electronics Design Laboratory 5
A.3 Connect Power Systems The Arduino power systems are reviewed below, along with the needed connections for your robot. Make sure to include decoupling capacitors. You may use a DC power supply for now in place of a battery pack. Review Lecture #8 slides if needed. In your report, include a simple schematic detailing power connection. Power Connections Internal Power System Electronics Design Laboratory 6
A.4 Robot Speed Control with Arduino Use the Arduino to control your robot speed Test using the example speed control code Modify the speed control code to perform the following: Stop, wait for the switch to be in the ON position Wait 1 second 360 o clockwise rotation of the robot Stop and wait 1 second 360 o counter clockwise rotation of the robot In the report, include a copy of your code With robot on the bench use scope to capture the feedback controller output signals for a single wheel (two signals total) during one execution of the loop. Include this result in your report Recommended Pin Connections v s v ref R I R I C I _ +10 V + C I O1 v o output signal to measure Feedback Controller Electronics Design Laboratory 7