Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


austen520 last won the day on May 21 2015

austen520 had the most liked content!

About austen520

  • Rank
    Noob Class
  1. I've been toying with this method over the last few days for an audio synthesizer project. With a 62.5KHz PWM (16MHz main clock with CCR0 set to 255), it works well for lower frequencies, as long as you feed the PWM into an appropriate low pass filter. TI has a decent application report that details how to set this up with the MSP430: http://www.ti.com/lit/an/slaa497/slaa497.pdf @zeke: That sounds like a great idea. I did some googling and found some interesting resources on the topic from Open Music Labs: http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/(theory) http://wiki.openmusiclabs.com/wiki/PWMDAC(an example using arduino)
  2. Just to more or less reiterate igendel's point, this course is taught in parallel with the intro analog circuits course at UC Berkeley (you might say it's analogous to the edX class. Ba-dum-tss!). I took the course in the Spring, and the focus is certainly basic electrical theory and analog circuit design, with the MSP430 serving mainly as a tool to further explore those topics. That being said, depending on your application, having a good handle on the analog domain seems to be half the battle when working with an MCU (even more so with tools like Energia simplifying the development process... or at least, in theory).
  3. Thanks for checking it out! Unfortunately the left motor is currently out of commission, and we lacked the foresight to design a chassis that would allow for easy motor replacements, among other shortcomings. I'm hoping to find the time to build a new chassis sometime over the next few weeks. Although I can't make any guarantees, if that day comes I'll be sure to post a video.
  4. I recently completed a final project for an undergrad circuits class, throughout which this forum was a huge help, and so I just wanted to try and give back a little by presenting our code here. The project was, as you may have guessed, a two-wheeled self-balancing robot via a PID controller: We used an MSP430G2553 with the EXP430G2 launchpad, although the code should of course be applicable to any similar MCU. We also used the apparently popular MPU6050 IMU to produce angle estimates, and a simple H-bridge using TIP-102 transistors for motor control. The schematic that I've attached is a complete reproduction of our setup (including our pin configuration), and can also be found on the github linked to at the bottom of this post. The files that describe the primary control sequences are main.c, which of course has the setup and main loop, as well as the PID controller code; and StateEstimate.c, which describes how the raw IMU data is combined into a more accurate estimate of the robot's current angle with the ground (we used the so-called "complementary filter" with reasonable success, which just sums a low-passed accelerometer reading with a high-passed gyroscope reading). Furthermore, the parameters for the PID controller are located in Config.h (the parameters currently in the repo are just toy values), and the parameters for the state estimator are located in StateEstimate.h. The two biggest frustrations we faced when developing the project was successfully communicating with the MPU6050 over I2C (included in the github is the i2c device library, separately available at http://www.i2cdevlib.com),and getting useful information sent over a UART connection. So, I hope that by releasing this code we can make those tasks at least a little bit smoother for people tackling the same problems. The code is set up, by default, to use pins 1.1 and 1.2 for UART communication over the hardware serial interface. The MSP430 will send the angle estimate and PID control signal over UART, which can be captured and saved as a CSV, or even displayed in an OpenGL gui, using the supplied serialReader.py python utility (instructions are in the repository README). Using the supplied C code as a template, sending and receiving arbitrary data for post-processing should hopefully be trivial. UART is configured in main.c, and the functions for sending data over the connection are located in hwuart.c. Link to github: https://github.com/austensatterlee/robotbuddy Anyway, I hope this is helpful or at least interesting to some of you. I'd be happy to answer any questions about how we got this working, or receive any criticisms from more knowledgeable members!
  • Create New...