The circuit diagram for servo motor control by FLEX sensor is shown in below figure. Software: Atmel studio 6.2 or Aurdino nightly. Hardware: Arduino Uno , Power supply (5v), 1000 uF capacitor, 100nF capacitor (3 pieces), 100KΩ resistor, SERVO MOTOR (SG 90), 220Ω resistor, FLEX sensor. We will match this digital value to servo position, with this we will have servo control by flex. This variable voltage is FED to one of ADC channels, we will have a digital value relating to FLEX. The flex sensor can be used for servo motor control, intensity control or you can use where ever the resistance need to be changed when the bending occurs. With this transducer connected to a voltage divider circuit, we will have a changing voltage with FLEX on transducer. Index Terms: flex sensors, Arduino, servo motors, NRF (Wi-Fi modules). 1: Prototype of Arduino and Flex Sensor based Servo Motor Angle Controller. This loading effect of resistance based voltage divider is important as the current drawn from Vout of voltage divider increases the error percentage increases, for now we need not worry about loading effect.įLEX SENSOR when bent its resistance changes. Additionally, as a virtual representation of the effect of bending the flex sensor, we (poorly) drew a leg that bends at the knee when the flex sensor is bent.Now important thing to note here is, the input taken by the controller for ADC conversion is as low as 50♚mp. In this circuit we will use the amount of bend of the flex sensor to control the position of a servo. Once again, when the flex sensor is bent, the servo rotates. The following diagram shows the modified circuit setup for S4A:Īfter converting our code from Arduino C to S4A, the flex sensor controls the servo in the same way it controlled the servo by using the Arduino C code. We again moved the jumper wire from pin 9 to pin 7 since S4A only recognizes pins 4 and 7 as pins that can be used for motors (one of S4A’s limitations). Similar to the servo example (circuit 8), when converting our code from Arduino C to S4A, we had to to alter our circuit in order for it to work properly. Watch the following video to see how the flex sensor controls the servo, and how bending the flex sensor in turn makes the servo rotate: The following diagram shows the setup of the circuit: Flex sensors can be used to measure angles of bending of arms and legs, for example, in rehabilitation patients. When the flex sensor straightens, the servo rotates in the opposite direction. Based on the Arduino C code, when the flex sensor is bent, the servo rotates as an outcome. For a project we are trying to use an ESP32 with flex sensors, to control the servo motors attached to another ESP32 (connected via ESP NOW). A flex sensor has a range from about 10K to 35K, that means it wont give us a full 0-5 volt range (or 0-1023 analog value). Based on the values provided the motor moves and hence pulls the hand simulation, hence replicating the motion of the hand. I used the following code: // open serial Serial.begin (115200) // setup for time cost measure // using micros () timeBudget 1e6 / sampleRate // micros will overflow and auto return to zero every 70 minutes // Attach the servo on pin 9 to the servo object myservo. The sensor sends the value to the ARDUINO the ARDUINO processes the data and sends it to the servo motors. Im using a DFrobot Gravity EMG sensor to move a 9g servo. In this circuit, we incorporated a flex sensor as an input device that controls the servo. The flex sensors and servo motors work in co-ordination with ARDUINO as their mediator to achieve this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |