The map command executes the relationship between the two values. The motor needs a value between 0 and 180. The sensor sends a fact that there is between 90 and 10. Is there a command in the Arduino program that allows us to pass a value to the motor in proportion to that which occurs in the sensor. We have already seen that with the command myservo.write (90) we move our servant in any angle between 0 and 180 °. When the sensor will be bending bent, the motor will move proportionally. We connect a servant Arduino following the diagram below. You will have to replace them with those that I will use in the tutorial.ĬOMMAND MAP (Open the sketc _2_1_sensore_1_motore_val) Write down the values of the sensor retainer and bent forward. If you used a different resistance value changes. Holding the sensor stopped the displayed number should be a 50.īending it forward reach the number 10, by folding it in the reverse direction the number 90. Uplodate code tab and open the Serial Monitor. This sketch allows you to read any sensor positioned in pin 0 Arduino. To test the operation of the sensor open the file inside the Arduino program for reading analog sensor (FILE – EXAMPLES – BASIC – ANALOGREADSERIAL). The assembly will be done at the end, when the code and the circuit of a single finger will be completed. For the moment we do not use either the glove or the robotic hand. Made the circuit of the previous page and open the Arduino software to start programming. NB: if you use another type of resistance these values will be different. Inserting a resistance of 2.2 Kohms as we read analog value equal to 50 if the sensor is not bent, equal to 90 if the sensor is flexed in one direction and a value of 10 if the sensor is bent in the opposite direction.īelow is a small chart to see the sensor values of flexion. In this case the resistance serves to decrease and make visible the sensor value. The cable that comes to analog pin Arduino (used to read the value of the sensor) must be paid before the resistance (see diagram above). The largest bar must be connected to GND Arduino passing through a resistance. The sensor must be connected bending this way: the sidebar closer must be powered with 5V Arduino. This tutorial was made in 2014, prior to purchase online if you check other sites sell cheaper sensors downturn. Otherwise you can buy at any electronics store of resistance from 2.2 Kohms They can be purchased online at Robot-Italy. The flex sensors must be connected to Arduino with resistors. Attacking the fingers of the glove know exactly the movement of each finger. The sensors of flexion (picture above) are small flexible rods that indicate the amount of bending to which they are subjected. The electronics then consists in creating a glove with sensors and robotic hand with the five scooters. We insert the sensor flex on the fingers of a glove, we analyze the value of these sensors and servo motors move 180 ° pulling a wire connected to each finger of the robotic hand. In this tutorial we make a robotic hand (low cost) can replicate the movements of our hand. Const int flexPin = A0 // Pin connected to voltage divider output // Change these constants according to your project's design const float VCC = 5 // voltage at Ardunio 5V line const float R_DIV = 47000.0 // resistor used to create a voltage divider const float flatResistance = 25000.0 // resistance when flat const float bendResistance = 100000.The material to build the robotic hand (tubes, paper, glue, wire, etc …)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |