Here is the video demoing the motor controller. I used a Mr.Basic robot platform and included a little review about that platform. Code is found after the break.
Category Archives: MSP-430
ISR PWM Code for Motor Driver Booster Pack
Here is a link to the code’s page.
I will be uploading a video demoing the code. Have to build a tiny robot first.
msPROBOT Ready for Maker Faire
I finished the first physical version of the msPROBOT just in time for Maker Faire. I have the majority of the demo code written and I will post it when I test the code. All the basic library functions are written. Just need to make a main program that strings it all together.
There is more information and PCB files you can download at the msPROBOT project page.
Printf Function for microcontrollers.
So this is meant to be paired with a UART program. This code is not all my own but I could not remember where I found it. I have edited the original quite a bit but the same structure is still there. If someone recognizes it please let me know so I can give credit.
Printf Code (CCS V5)
Project File Ver1.0
main.c
printf.c
printf.h
MSP-430 LaunchPad UART and FIFO
I just put the finishing touches on my extensive UART and FIFO library. It uses the MSP430G2553 chip which has a hardware USCI. This can be used for a hardware UART. There are a couple different options to choose from and versions with or without a FIFO.
I will be making a standalone FIFO library so one can be used to store data.
edit: The standalone FIFO library is there now. Not fully tested but should work.
MSP430 32 LED Driver PCB Done
First Eagle PCB
MSP430 VU Schematic
PID Controller Code
This is a Proportional, Integral, Derivative (PID) controller I am writing for the MSP430. Does this look correct?
/*This is a PID or Proportional, Intergral, Derivative controller.
It is used by passing the current feedback (FDB) and reference (REF) number.
The function computes the correction (COR) and returns it as an int.
For proper functionality, this must be called at regular intervals as it does not
account for time between samples. Adding this into a interupt routine is ideal.
*/
/*These are the PID constants. They will need to be tweaked to get the controller to operate correctly.*/
#define Kp /*to be filled in*/
#define Ki /*to be filled in*/
#define Kd /*to be filled in*/
/*These varibles need to stick around after the function exists*/
static int Ui, Up_old;
/*Additional functions*/
int COR, ERR, Up, Ud;
/*Start PID controller sequence*/
int PID(int FDB, int REF)
{
ERR = REF-FDB; /*Calculate the ERR.*/
Up = Kp*ERR; /*Proportion*/
Ui = Ui + Ki*Up; /*Intergral*/
Ud = Kd*(Up-Up_old); /*Derivative*/
COR = Up + Ui + Ud; //Correction value*/
Up_old = Up; /*Update the derivative value*/
return COR; /*return the correction*/
}
MSP-430: IEEE CS Competition – Knock Knock Security System
Matt and I won a TI sponsored Launchpad programming contest that was held by the IEEE CS here at The University of Texas at Austin.
Here is the link for the details. In case the IEEE site goes down here is a screen cap of the page.
My partner Matt on left. Parker (me) grinning like a fool on the right. I did the majority of the programming and design work where Matt debugged my code as I wrote it saving allot of time.
The idea was to create a simple secret knock security system that could record a knock “pattern” and then only unlock a door when the pattern was repeated. Only three hours where given for the competition and we where the only ones to finish everything in that time slot. They extended the contest another hour to permit more teams to finish. More details about the contest can be had by downloading the packet they gave us.
Code
main.c
The code is a bit rough around the edges and the bulk of the program happens in the timer interrupt (which is a no no) but for only 3 hours to solve, design, program, and debug a solution; sloppy code is a bit expected.
Points where awarded based on a few areas.
Points:
Your solution will be graded and scored on the following categorizes
1) Time it took for your team to create the solution and produce a working
prototype to the Company.
a. Every 1 min is -1 pts
b. Ex: if you finish in 1:30 in you will get -90 points
2) Working prototype: after you submit your prototype to the company,
Quality Control will take it into their lab and run test on your system. Their
test will not exceed the specified requirements and each test you pass you
will get +10 points to your score. (MAX 80pts)
3) Documentation: As in any real project you should keep a good record on
how you came up with your idea for your solution. This is to keep the
company safe from legal problems, have a record of our intellectual
property.
a. Submit your code
b. Submit any notes
c. Document any resources for the internet
d. Instruction Manual
Our legal team at the company will take a look over and award points
(MAX 10pts)
4) Creativeness of the solution: When you submit your solution to the
company, your manager will take a peek at your solution. If you solved it in
a new and ‘creative’ way, this many include additional functionality, more
efficient algorithms, or intuitive (easy to use) interface. (MAX 30pts)
5) Cost: The Company does have a parts store. You will be able to buy extra
parts such as button kits and if you burn out your chip you can buy a new
one.
Help:
If you get stuck we do have an internal consulting group which will help you but
for a cost of 2pts per 1 min. This is not for questions about the contest or
questions about the problem; this is for help solving the problem.
We scored 65 points where the nearest team behind us only scored 22 points. We dominated the competition. The judges loved the simple interface and the admin password setup. The code was fairly changeable so you can adjust the precision of the knock (humans are not robots) and how long the passwords are. Teams that did finish had no where near the feature set our solution had.
This contest made me wonder if GPA should even be a consideration for companies like Texas Instruments in hiring. I have a 2.8 GPA and have a hard time realizing that I actually had the lowest GPA out of the entire contestants and I completely schooled everyone that had 4.0 GPAs. I think this goes to show that theoretical knowledge != practical knowledge. Hey maybe since Texas Instruments sponsored this event I could possibly get a career out of it?
To anyone out there hiring an embedded systems engineer and want a motivated worker that will tackle projects with all of his might? Hire me!






