Light Detection Input Control
In the final project build in exploring human interaction and control with the physical world, we’ll adjust the DC motor’s speed using a light. The light detection input control is similar to the potentiometer shown in Figure 4-3, with one exception: no contact with a sensing device is required in order to change the speed of the DC motor.
A proportional voltage based on the CdS photocell resistance provides the appropriate duty cycle of the PWM output control signal from the Arduino computing platform. With ambient light present, placing an object (such as hand) over the CdS photocell will increase the DC motor’s speed. If the light sensor detects no object, the DC motor will spin at a medium rate. If a light source shines on the sensor, the DC motor will stop completely. Figure 4-22 shows the circuit schematic diagram of the light-activated DC motor speed controller.
The motor speed control sketch remains the same, with the exception that the 10KΩ potentiometer is replaced by the light detection circuit shown in the circuit schematic diagram of Figure 4-22. The final project build is shown in Figure 4-23. The placement and orientation of the CdS photocell is optimum because of the quick response the Arduino computing platform provides in adjusting the DC motor speed based on varying light levels detected. The speed ramp-up and ramp-down based on the change in ambient lighting is quite smooth, with little to no hesitation in motor acceleration adjustment.
Figure 4-22. Circuit schematic diagram for a light-activated DC motor speed controller
Figure 4-23. Final project build of the light-activated DC motor speed controller
Final Testing of the Devices
This chapter outlined a series of testing activities for capturing bugs in building the hardware circuits. Using a DMM and an oscilloscope, the testing techniques described can be validated on the bench. Depending on the type of vendor of the testing instruments, the results may vary by +/–10 percent. While testing, make sure the wiring is correct prior to applying voltage to the Arduino and supporting circuits. Use proper wiring methods, as discussed in Chapter 3. The “How it Works” section of this chapter is a great reference to help you verify that the circuit breadboard is working correctly. Also, review the sketch entered into the Arduino IDE editor for typos that could cause the hardware device to operate improperly as well.
Further Discovery Methods
There are quite a few activities that you might investigate for the two projects in this chapter. The first is to change the functional behavior of the simple DC motor control using a transistor relay driver circuit. Instead of controlling the device with an active-high switch, use an active-low digital input configuration. Figure 4-10 earlier in the chapter shows the wiring roadmap for the investigation.
In the second activity, change the wiring positions of the 10K resistor and the CdS photocell to have the motor speed increase in ambient (normal) light as shown in Figure 4-21. Also change the 2N2222 transistor to either a TIP31C or TIP120 transistor, and use a higher operating current and voltage-rated DC motor, and note the speed control behavior. Remember to document the design in a lab notebook along with sketch modifications you made for the new DC motor speed controller you’ve created.
Remixing Motion Controls
I am continuing with the technique of remix, and I am using four motion control devices with two input controls to illustrate how to create motion controls with the Arduino. The potentiometer and FlexiForce sensor are used to vary the speed and/or direction of both the stepper and servo motor components. The Arduino provides the intelligence to the motion control platforms by reading the input voltage level from either the potentiometer or FlexiForce sensor and providing the appropriate output control signal to drive either the stepper or servo motor device. Figures 5-2 through 5-5 show the system block diagrams for the four stepper and servo motor controllers. Note that the sketch for the interactive electronic devices allows speed control operation of the stepper and servo motor by manual method; in other words, you can control the speed manually via the potentiometer or the FlexiForce sensor. 电机物理计算英文文献和中文翻译(3):http://www.751com.cn/fanyi/lunwen_29982.html