Books Item ID: #237




Running Small Motors with PIC Microcontrollers



WAS $29.95 NOW $17.17

Product Information:

Item Description



Program PIC microcontrollers to drive small motors

Get your motors running in no time using this easy-to-follow guide. Detailed circuit diagrams and hands-on tutorials show you, step by step, how to program PIC microcontrollers to power a wide variety of small motors. You’ll learn how to configure all the hardware and software components and test, troubleshoot, and debug your work. Running Small Motors with PIC Microcontrollers is filled with more than 2,000 lines of PicBasic Pro code you can use right away.

Use PIC microcontrollers to control all kinds of small motors, including :

  • Model aircraft R/C servos
  • Small DC motors
  • Servo DC motors with quadrature encoders
  • Bipolar stepper motors
  • Small AC motors, solenoids, and relays

Users electronic tags:

picbasic encored, board 3 steper motors, picbasic quad encoder

Customers Who Bought This Item Also Bought

  1. Programming 32-bit Microcontrollers in C: Exploring the PIC32 (Embedded Technology)
  2. Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24 (Embedded Technology)
  3. Designing Embedded Systems with PIC Microcontrollers, Second Edition: Principles and Applications
  4. The PIC Microcontroller: Your Personal Introductory Course, Third Edition
  5. MSP430 Microcontroller Basics

Item Reviews

4 Responses to “Running Small Motors with PIC Microcontrollers”

  1. Andrew Fong says:

    “Running Small Motors with PIC Microcontroller” is a well written book on the subject. I am new to Picbasic programming and Interfacing PIC with small motors but this book combined the two into one. As I go through the book, I appreciate the ease of use of the picbasic language in the applications and got a lot of helpful hints to interfacing motors with the PIC microcontroller. The chapter on “DC Servo Motors With Encoders” is well written with the programs graded with increasing difficulty to guide anyone through the programming of encoder controlled applications.

    This book will serve as an excellent introduction to newcomers in programming the pic microcontroller as well as a reference to more seasoned programmers. I highly recommend this book to anyone interested in the pic microcontroller.

  2. Charles Moher says:

    I’m not at all impressed with having yet another book out there that requires you to go out and buy an absurd amount of extra hardware to use it. A previous reviewer seems to shrug off the quoted $500 price tag of the required Lab X-1 board. I can’t. And if you want to start producing more than 1 end product, what do you do, go out and buy an X-1 for each one of your projects ? What’s wrong with building motors from discreet, low cost components ? It also follows that anyone serious about programming PICs for any use should be using the free C compiler offered by Microchip. C isn’t much more difficult than PIC Basic and it is the professional choice. Did the author/publisher forget to mention about the extra cost and overhead required to use this book ? It should have been mentioned up front and in bold print !! The author also makes use of prepackaged amplifier boards when a free sample or low cost LMD18200 or similar amp-on-a-chip would do. If you want the kind of simplicity that the book boasts, you can get a Parallax Basic Stamp at a fraction of the cost. This book is a money vampire. I’m glad I got it on loan from the library and back it goes.

  3. Peter J. Hall says:

    This book is good value, as it contains more information than the cover may suggest. As a new comer to PIC programming and deciding to use PicBasicPro, I welcome the comprehensive approach adopted by the author. Chapters take you on logical steps towards Motor Control, Including eeprom, real time clocks and serial communication, all with example source code. The detailed chapters on DC Motors some with Encoder feedback and Stepper types are also backed up with extensive PicBasic code listings, which I must add work faultlessly. I enjoyed the author’s easy style. I recommend this book without reservation, as it contains invaluable knowledge which is helpful to the beginner and the more experienced PIC user, who wants to add Motor control to their projects.

  4. Stephen M. Tobin says:

    “Running Small Motors with PIC Microcontrollers” fills a void in the literature for those of us who don’t write embedded firmware for a living. Sandhu cuts through all the mystery surrounding the PIC, and uses an easy to understand compiler from Micro Engineering Labs called PIC Basic Pro. This makes it especially easy for non-C programmers to get projects up and running quickly. Although only unsigned integer math is supported, it is sufficient for many useful DC servo applications. I was especially interested in running DC motors with quadrature encoders attached to them, and I agree that there is a considerable mystique attached to running these “servo” motors with encoder feedback. What this really means is that a lot of the know-how for doing these things is locked up in trade secrets held by companies who depend on motion control to make a living. Sandhu gives us a rare glimpse into the inner workings of discrete-time (digital) DC servo control on a very practical level, and I for one really appreciate his willingness to share this hard-won knowledge.

    “Running Small Motors with PIC Microcontrollers” packs more useful information into 334 pages than any other book I have seen on this subject. It is not overly theoretical, but instead gets right into the nuts and bolts of running PICs and interfacing them to the outside world, including motors. The book covers all the essential details for getting a project up and running, and presents the material in a very logical order, with one concept building on another as the book is read through. The reader follows along by actually doing each “mini-project” using the PIC Basic Pro compiler to run Sandhu’s programs on the Micro Engineering Labs “LAB-X1″ hardware platform. The editor included with PIC Basic Pro, Micro Code Studio, provides seamless programming at compile time. For this kind of work, where many elements of hardware and software have to work together, there is no substitute for direct experience as the reader gains knowledge. I agree with Sandhu’s “learn by doing” philosophy, and I believe this is a trend the engineering schools ought to be following. Pure theory is necessary but not sufficient to build complex machines in the real world.

    (4-16-10) In response to a negative review on this site:

    I am writing a book to be published this fall entitled “DC Servos: Application and Design with MATLAB”. I used the same hardware as Mr. Sandhu, because it was the only platform I could get working in the time I had to publish my book. I tried to reproduce hardware and software from Microchip’s application note AN696, but was unable to get it to work in the lab. My philosophy was to only feature hardware and software in the book that I had personally gotten to work on my bench. More specifically:

    1-The Lab X-1 board costs $200.00. The USB programmer costs $90.00. The Lab X-1 is a development tool, and many features of it are not used. For making any end product, a new board would normally be designed to eliminate most of the unused parts (like the LCD display and push-buttons).

    2-I don’t think it’s necessarily true that anyone serious about programming PICs should be using C. For those of us who don’t know C well (like me), it’s a serious barrier to entering the exciting PIC world. As such, I felt shut out of the action until I picked up Sandhu’s book. As for the price of the Microchip C compiler, it is free for 60 days on a trial basis. It took me longer than that to optimize my code for chapter 8 of “DC Servos”. The price for their full C compiler supporting the PIC 18 series controllers is $495.00. On the other hand, the ME Labs PIC Basic Pro compiler costs $250.00.

    3-The pre-packaged amplifier board from Xavien is $45.00 and saves the user the hassle of bread-boarding and heat sinking the LMD18200 IC. If the user prefers to do this, the LMD18200 is available from National Semiconductor as a sample, however the user needs to add charge pump capacitors to the circuit and make sure it is properly heat sunk and properly grounded.

    4-The Parallax Basic stamp is a different animal entirely. It uses a Basic interpreter to “compile” code every time the program is run. It is much too slow to handle the servo update rates required for DC motor position control and I don’t believe interrupt requests are supported.

    I still think this is a great book at a bargain price…highly recommended!

Leave a Reply