Sunday, June 8, 2014

Arduinos and Motors, Part 1

So tonight I took my first look at Arduinos and motors, watching a couple videos and reading a few webpages that talk about this topic.

I'm spending time on how DC (direct current) motors interact with Arduinos because this week's Humboldt Microcontrollers (MCUs) Group meeting will be at least partly focused on motors and MCUs. When the group is discussing this topic, it would be nice if I have at least a general understanding of what they're talking about, even if some or a lot of what they say is over my head, both knowledge and experience-wise.

I started out by watching the Jeremy Blum 'Arduino Basics' #5 video tutorial, which addresses motors and transistors. I didn't try to do the exercises in the video while I watched it today because figuring out the exercises, wiring up the breadboard, writing the code and figuring out what I did wrong will take a couple hours, based on my experience with the earlier Blum video tutorials. Tonight's video viewing was just to find out what components were used in the exercises and to get an overview of what Jeremy is trying to teach in the video. At right is the DC motor that came with the official Arduino Starter Kit. I need to figure out whether that motor will work with the exercise Jeremy presents, because he doesn't always use parts from the starter kit that I have.

After watching the video, I did some online reading, starting out with the Adafruit Arduino Lesson 13: DC Motors. I wanted to read this over to compare Adafruit's intro to 'Arduino and Motors' to what Jeremy discussed in his video. Next I read a blog entry titled, 'Using motors with an Arduino.' The post author said, "Motor control turned out to be trickier than I expected, and I don't see a lot of "Arduino motor control for dummies" pages on the web, so I'm writing one." The blog post had some good tips about the author's experiences controlling motors with an Arduino. Something the post author did was buy a Freeduino motor shield kit (shown at left) and solder it together. That might be a fun, interesting and useful way for me to improve my soldering skills!

The post talks about controlling motors with an MCU using Arduino shields for motors, using a motor driver carrier PCB, using electronic speed controllers (ESCs) and using H-bridges. One of the author's goals was to find an inexpensive Arduino motor control method because they were shopping for parts to teach a summer camp class in robotics. After the post was written, someone suggested the author use a transistor as a very inexpensive way to run small motors and protect the Arduino from a high current load. The tutorial linked by the author for the transistor method shows pretty much the same concept as Jeremy explained in the #5 video.

One last webpage I read about motors and MCUs was on a Wikispaces wiki called Arduino-Info. This page had some info not covered on the other online places I visited today. It talked about two ways to totally protect the Arduino from the motor's high voltage or high current. (I don't know if you need to protect it from one or the other or both. Something else to try and figure out before this Thursday evening's meeting.) The two 'complete isolation' methods are to use an opto-isolator (as shown to the right above) or use a mechanical relay.

Tomorrow's goal for my "Arduinos and Motors, Part 2" post will be to start figuring out how to breadboard the first exercise in Jeremy's video. He uses a breadboard that has three terminal posts hooked up for the exercise, and I don't have posts on my breadboard. So I'll need to figure out if those posts are essential, or if they're just a convenience that I can work around on my breadboard.

The Blum videos are 'Arduino basics' tutorials, but someone as inexperienced with electronics as I am needs to spend a fair amount of time researching and talking to people to figure out how to hook up the different circuits shown in the videos. That's mostly a good thing because figuring that stuff out, rather than just blindly following each step, helps me to better understand and remember the concepts presented in the videos.

However, when someone new to microcontrollers comes to the Humboldt Microcontrollers Group to learn how to use MCUs, we need to be aware of that person's potential frustrations when they don't have a clue about how to hook up some of the circuits in the Blum videos.

Reminder! This Thursday, June 12, from 6 to 8 PM is the third meeting of the Humboldt Microcontrollers Group at 1385 8th Street, Arcata, California, USA. To make sure no one gets locked out of the building (which happened two weeks ago), we'll start out the night by meeting at the big table right by the front door. We'll also have a sign on the door with a cell phone number of someone who's in the meeting so if we're not by the door later in the evening, people who are inadvertently locked outside can call for someone to come open the door.

**********

No comments:

Post a Comment