inside of a SONY brushless dc motor

Inside of a SONY brushless dc motor

For an upcoming project I’ll be needing a brushless dc motor controller so I had to choose between purchasing one (more than 4 actually) and adapt my system around those or design&build one that would best fit my system. Obviously I went with the second option for 2 reasons : I like making stuff & it’s cheaper to make than to buy. After I finish it , this project will be open-source and I hope people will contribute by making it better.

Brushless DC motors (BLDC motors, also known as electronically commutated motors) are electric motors powered by DC electricity that have electronic commutation systems. Usually the electronic commutation system is external and this is our case also. A BLDC motor is constructed with a permanent magnet rotor and wire wound stator; This type of construction offers many advantages including more efficiency and torque per weight, reduced noise, reliability, longer lifetime (no brush erosion), elimination of ionizing sparks from the commutator, more power, and overall reduction of electromagnetic interference (EMI).

There are 2 main methods for controlling a BLDC motor one is with the use of hall sensors for sensing the position of the rotor and the other one also called sensorless driving involves sensing the rotor position by measuring the back EMF (electromotive force) feedback from the motor instead of external sensors. I’m gonna focus my project on the sensorless method, the advantage being the ability to use any motor no matter if it has the sensors fitted or not.

I’m gonna post updates as I make progress on the project, but first here is the documentation that I’ve read so far:

  • wikipedia on BLDC motors
  • Microchip AN857 – Brushless DC Motor Control Made Easy
  • Atmel AVR444 – Sensorless control of 3-phase brushless DC motors
  • Atmel AVR443 – Sensor-based control of three phase brushless DC motor (although I’m going to use sensorless control its good to know the difference between the two methods)
  • Atmel AVR194 – Brushless DC motor Control using ATmega32M1

These documents cover the basics and the actual control of BLDC motors so I suggest you start by reading these.

The Youritronics electronics lab has a new look: 2 new benches and shelves all of them hand-built. When space is an issue you really have to make the most out of it. One thing is sure, I need more Ikea plastic boxes. On the first bench I do most of the electronics stuff while on the second one I do all the other stuff like assembling – disassembling or breaking stuff. Also on the second bench you can see my DIY reflow oven.

youritronics electronics bench 2


The past few months I’ve been working on the project for the Digilent Design Contest so I was quite busy. Together with my colleague Dragos I worked allot on this project but the results were great, our project the BlueRover won the 1st place so I say it was well worth it. First of all Digilent provided most of the parts needed for the project like :

  • 1 x Cerebot 32MX4 dev board
  • 4 x dc motors
  • 4 x HB5 motor drivers
  • wheels, metal pieces to put everything together

Besides these we also used:

  • 1 x LiPo 2S battery
  • 1 x 5V dc to dc converter
  • 1 x 6v dc to dc converter
  • 1 x BTM222 bluetooth module
  • 1 x MQ6 LPG gas sensor
  • 1 x MQ7 CO sensor
  • 1 x TMP275 digital temperature sensor
  • 1 x MMA7455 digital 3 axis accelerometer

The idea of a remote controlled rover excites almost every electronics student and when we heard about the Digilent contest we realized that we have the possibility to make such a project real. We decided to build our own remote controlled rover but it had to be different from what we’ve seen before. We came up with the idea that we could control the rover by using accelerometer data and that we could use a second accelerometer placed on the rover to sense the driving surface.

I handled the Rover with the sensors and my colleague took care of the control unit which is a Nokia E55 smartphone running a custom application in Python. The principle is simple the control unit sends acceleration data to the rover every 100ms thus controlling the movement of the rover. The rover reads data from the on-board sensors (CO, LPG, Temperature, Accelerometer, and Battery) and sends it to the control unit every 100ms. The control unit receives sensor data from the rover and reacts according to the rover accelerometer by vibrating on each bump sensed by the accelerometer. At the same time the control unit displays sensor data on screen.

I’m not going to go into details about the source code or the specs of all the boards we used in this project but you can find those in our report which I’m linking at the end of this article. I would like to add that Digilent RO did a great job in organizing this contest, it was a really great experience to be there and I’m sure we’ll be there next year too.

You can watch photos from the contest here:

Now I’ll leave you with a demo of our project captured right at the contest presentation:

You need to a flashplayer enabled browser to view this YouTube video


This article will be followed up by one dedicated to the BTM180 and BTM222 bluetooth modules from Rayson. Due to the lack of documentation on this module it was really difficult to get them working and I would like to share my experience for those who are facing the same issues.

If you make a lot of prototyping, especially with SMD components like myself you need to make for each design its own pcb. With SMD’s the one layer design usually isn’t feasible and since the component pins doesn’t run trough the board  the double layer approach results in many vias, even for a simple schematic you can have 50 of them.

Off course everybody can order from the factory trough hole plated pcb and they are off the hook, that is the professional solution and for the end product I do the same. But that costs more, there is a lead time and if there is some error on the board or on the schematic, you need redesign and order another one.

I personally use home-made double layer pcb’s for my prototypes, with photo method and some design constraints like track width, spacing,  clearance, the results are quite good.

Double layer pcb home made vias

Yes, that’s nice but it has a lot of vias, and can be painstaking  to make the connections for each via by running  through a thin wire, soldering one end then soldering the other end, cutting down the excess, because for each via you have to handle the wire, the soldering iron, the cutter resulting a great “overhead”. I admit this was my solution and took hours to make each via separately, until somebody showed be a clever trick, but that’s enough talking, here are the pictures:

You need some thin copper wire:

You need some thin copper wire:

First anchor one end of the wire by soldering to one side:

First anchor one end of the wire by soldering to one side:

Run through the vias(like sewing) the wire:

Run through the vias(like sewing) the wire: Run through the vias(like sewing) the wire:

Solder each end:

Solder each end: Solder each end:

Start cutting as close as possible(on each side):

Start cutting as close as possible(on each side):

The result:

The result

Nice, round bumps 🙂

Nice, round bumps :)

And after soldering the TQFP package:

And after soldering the TQFP package:

As you can see, the vias underneath the TQFP doesn’t cause any problem, although more attentions is needed when soldering. Fast and simple, hope you get the spirit and start tinkering.

December 31st, 2009

2009 Youritronics highlights

This is the last post for 2009 and I promise there will be much more in 2010. In 2009 we had some interesting projects developed here at here is some of the highlights:

20 Band Audio Spectrum Analyzer

You need to a flashplayer enabled browser to view this YouTube video

The analyzer is currently at v.2.0 and it has allot more features then it originally had. Kits are still being produced and the shop has a new look.

Clever Digital I/O handling in C

A nice tutorial written by Laci which caught the attention of the hobbyists.

Seven segment display explained

Another really good tutorial written by Laci an youritronics author, explaining the 7 segment display and how to use it with microcontrollers.

Matrix keyboard explained

The same good quality tutorial signed by Laci this time explaining the matrix keyboard and how it can be interfaced with a microcontroller.

matrix keyboard demo

RGM-3550LP GPS module connected with Asus Eee pc

The idea behind this project was born when a friend asked me too take a look at he’s broken GPS unit (MyGuide 3000) to see if I can fix anything. After figuring out that the processor is the faulty part I decided to use the gps module for a stand alone gps module that you can just connect to a netbook.

TMP275 digital sensor thermometer

The TMP275 is a 0.5°C accurate, Two-Wire, serial output temperature sensor. I got it as free sample from TI and I put together this project to experiment with the sensor.

The 3 part DIY speaker building tutorial written by youritronics author Andrei, the kind of project that gets the most out of everything using inexpensive materials:

© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS