Monday, November 17, 2014

Putting together the motor driver

A picture story:

I have completed the building of my first motor driver board. This is a prototype so it has been constructed on a perf board protyping board that I bought at Fry's electronics. This is not meant to be a flying prototype just a test bed to get a BLDC motor spinning, and correctly controlled from the xMOS startKIT in a safe environment. Most of this will be explained by pictures and captions, because my last two posts were a bunch of text. The explanation of the component selection was done in this post, and the theory behind all of it was done in this post. Please read those at your leisure and interest.  

Testing the layout before begining soldering and jumpering.

First off I wanted to point out that this is the first time that I have used a perf board for prototyping. In the past I have always used a breadboard. This is largely due to the fact that any of my previous prototyped circuits did not involve as high of a current as the motor driver circuit will be drawing. I did not want to risk melting breadboard connections and blowing something up. So in short don't laugh at my first attempt at a perf board setup haha, but suggestions are welcome. I watched this short video in order to learn some standard techniques first and then gave it a shot myself.

As you can see above, I have the gate driver circuit to the left and the MOSFET circuit to the right. Each phase is identical to eachother. For the resistors on the FET's; the 47 ohm is on the left and the 470kOhm is on the right both attached to the gate pin.

Jumper connections added, power input in the top left, motor phase outputs on the right.
Looks a little better on the top than the bottom haha. Also my jumpering wasn't nearly as good as the gentleman that made the example video that I linked above. I would like to blame the 8 year old radioshack wire that I was using but it was likely my fault for crappy craftsmanship. The output phases I made red, green, and black for Phase A, B, and C respectively. Once I figure out what the corresponding phase colors on the BLDC motor is I will label them in order to ensure correct hookup to the motor.

The bottom side of the perf board. Power, Ground, Power along the top. The two power pins will allow seperation of the IC and driver high rails if desired.
Along the top I have the motor driver supply, system ground, and then the gate driver ic supply. This will allow for seperation of those supply lines if I determine that is what is necessary for the design. I needed to use some shrink wrap along the gate driver IC's to seperate the contacts from some of the leads of the resistors going to the same pins. This probably could have been avoided with better layout, however this was my first attempt. I would not recommend this as a standard practice.

Left side view, with motor connections shown.

Right side view with Power connections off in the distance.

Motor connected to the outputs of the motor driver. Motor used male bullet connectors, motor driver used female.
The connectors that I used were bullet style connectors becuase that is how the motor came. The ones I ordered were not crimp style so I had to basically shove a bunch of stripped wire into the connector and then drop a lot of solder in there. I dont know if that was the best way to make the connection but that is what I did haha. I then wrapped the connection with shrinkwrap for some additional security and safety since the connections are close to each-other.

Close up 1 of the motor and connections, hall effect wires go off to the right.
I will either wire the hall effects to the perfboard as well or to the startKIT dev board directly I haven't decided yet.

Close up 2 of the motor and connections, hall effect wires go off to the right

The xMOS startKIT dev board.
Next step is to read in the hall effect sensor values, and output 6 PWM's in a trapezoidal control scheme. I need to sit down with the documentation of the startKIT and xMOS topologies. There are a lot of similarities to other MCU's but there are also some thinking shifts that need to take place with the addition of multiple cores, and hopefully I can read my way through that.

I will keep you guys posted and once again thanks for reading!