Saturday, October 13, 2007

Lots of discoveries tonight!

Man what a day. I worked with the students today on getting the TIMER basics down, configuring their development platforms (WinAVR, AVR Studio, JTAG ICE), and learning how useful Excel is for calculating TIMER registers.

During all the back and forth, I had an epiphany. I was using code that limited my PID adjustment to +-100 (as in percent). I was using 10-bit PWM, but by limiting myself to (let's just look at forward speed) 100 possible values (out of 1024 (2^10)). Well that's still not totally true either. I'm using locked anti-phase PWM so only values above 512 generate forward motion. But I digress, I'm still only using 1/5 of the total values I could. So I modified my code and changed the limits to +-511. It works, and a lot better. Still need to tune the PID constants, but things are a lot smoother.

On a bad/disappointing note I ran my Lipo to 12.8V. Minimum is 12V (3V per cell) but I decided to check (for the first time since I had it) the individual cell voltages. Bad news:
  • cell 1 - 2.9V
  • cell 2 - 3.49V
  • cell 3 -3.02V
  • cell 4 - 3.34V
Wow, not good. My charger wouldn't even attempt to charge cell 1. Lipo charges are constant current, constant voltage chargers. I have a pretty sophisticated NiMh/NiCD/Pb charger. I set it for 2 NiMH and the charge current to .1A. I connected my DMM and monitored the voltage until it was 3.2V. Now the Lipo charger is charger that cell first. Only 3 more to go. Oh well, better than having to replace the pack.I'm not drawing huge currents or this could have been a lot worse.

From now on, I'm going to check balance every time.

Jay