{"product_id":"4638-n20-dc-motor-with-magnetic-encoder-6v-with-1-50-gear-ratio","title":"N20 DC Motor with Magnetic Encoder - 6V with 1:50 Gear Ratio","description":"\u003cp\u003eThe first step in a robotics project is to get a motor spinning. Once you've done that you quickly learn that not all motors go the same speed, even if they are the same part number! There are always variations that relate to voltage, environment, and manufacturing changes. So, the second step is to figure out how fast it's going! Turns out that's not so easy, but the best way to get started is to \u003ca href=\"https:\/\/www.adafruit.com\/product\/3782\"\u003eadd an encoder wheel\u003c\/a\u003e and an \u003ca href=\"https:\/\/www.adafruit.com\/product\/3985\"\u003eoptical or magnetic counter\u003c\/a\u003e . As the motor turns, the attached encoder wheel spins, causing the counter to detect each passing spoke and that lets your microcontroller count and determine speed.\u003c\/p\u003e \u003cp\u003eIf you want to do one better, add a second counter, and now you can tell direction as \u003cem\u003ewell\u003c\/em\u003e as speed! All this wiring is kind of a pain, so that's why this motor is really nice! \u003cstrong\u003eIt has a magnetic wheel and two hall effect sensors already attached.\u003c\/strong\u003e Using this motor is a breeze, and it's a nice small motor as well, in the 'standard' N20 size.\u003c\/p\u003e\n\u003cp\u003e Provide 4.5 to 6V DC (nominal) to the white and red wires - these connect to your motor driver, and can be PWM'd for speed adjustment and direction by using an H-bridge.\u003c\/p\u003e \u003cp\u003eConnect the blue wire to your microcontroller ground pin, and the black wire to 3-5V DC use whichever voltage your microcontroller uses - see the markings on the motor since these are not standard colors. Then you can read the hall effect outputs on the yellow and green wires. \u003ca href=\"https:\/\/github.com\/adafruit\/Adafruit_Motor_Shield_V2_Library\/tree\/master\/examples\/encoderMotorRPM\"\u003eWe have an example sketch here for Arduino, it can be adapted to other languages\u003c\/a\u003e ​​- basically you just want to interrupt on one of the encoder pins, use count the time since the last interrupt, and multiply the count time by 14-counts-per -revolution and the gear ratio.\u003c\/p\u003e\n\u003cp\u003e This particular DC motor comes with 1:50 gear ratio, uses 6V nominal power for the motor and draws about 100 mA (200 mA when stalled). The gear ratio will not affect the current draw but does change the torque and RPM. See below for the no load\/rated\/stall current, RPM and torque for a range of ratios! \u003c\/p\u003e\n\u003cp\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cimg class=\"video-insert\" alt=\"https:\/\/www.youtube.com\/embed\/cfO7Sk1Ga2A?start=830\" contenteditable=\"false\" allowfullscreen=\"true\" frameborder=\"0\" src=\"https:\/\/img.youtube.com\/vi\/cfO7Sk1Ga2A\/hqdefault.jpg\"\u003e\u003c\/p\u003e","brand":"Adafruit","offers":[{"title":"4-6 Days","offer_id":47700494385497,"sku":"ADA-4638\/B","price":18.3,"currency_code":"EUR","in_stock":true},{"title":"1 day","offer_id":47886578090329,"sku":"ADA-4638\/A","price":18.3,"currency_code":"EUR","in_stock":false},{"title":"2-4 Weeks","offer_id":47886747926873,"sku":"ADA-4638","price":18.3,"currency_code":"EUR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0781\/1009\/7753\/files\/4638-01.jpg?v=1705520774","url":"https:\/\/xernuqvalzi.pro\/en\/products\/4638-n20-dc-motor-with-magnetic-encoder-6v-with-1-50-gear-ratio","provider":"Robot Italy","version":"1.0","type":"link"}