Special concerns when using motors and servos

Projects that use servos and motors have some special considerations for them that are mostly focused around power and the fact that Johnny-Five projects are tethered to the computer running the Johnny-Five code.

Power concerns

Servos and motors draw a lot of power. This can be an issue when you are using several of them. If you are using 5V servos and motors and more than two or three at a time, you should use an external power supply for your Arduino to draw this extra current without affecting performance. These power supplies are usually plugged in to an external outlet, and look like the following figure.

Note

WARNING!

Before plugging any external power supply into your board, make sure that the board you are using is voltage regulated for the voltage of the power supply; for an Arduino Uno, this is 12V. When in doubt, use a 5V power supply for Arduinos. Also, follow proper safety protocols when dealing with outside power sources. SparkFun has a great guide at https://learn.sparkfun.com/tutorials/how-to-power-a-project.

If you are using servos or motors that require more than 5V, you will need to supply power externally to your motors or servos. This is outside the scope of this book.

Tethering and cables

Johnny-Five usage means that the code running on the board is receiving messages from the host computer. If this connection is lost, the project cannot run. This means that for most Johnny-Five projects, you will need to maintain a USB cable connection. So if you're going to make a project that involves motion, you'll want a long USB cable.

There are options for wireless NodeBots using Johnny-Five described in Chapter 9, Connecting NodeBots to the World, and Where to Go Next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.219.166