Time Flies
Hard to believe it has been almost a week since I last posted anything, but it has been. My BoaArm is moving forward, I was getting read to implement a PID controller for the motors (I still might), when it occurred the me that I might actually be able to brake the motors.
Some H-Bridges allow you to "brake" the motors, others don't, and attempting to do so results in a short circuit. Fortunately, it appears the H-Bridges on the RoboBoa's main board do support braking. So the motors are now seeking their intended positions almost entirely without jitter. I may even be able to increase sensor resolution out to the full 10 bits instead of the 8 bits I am using currently.
There are still one or two issue that I will need to look at. Primarily the current load produced by the motors changing direction, tends to cause the voltage to drop significantly, more than enough to cause the CPU to reset. Stopping the motors from seeking rapidly back and forth has resolved this issue for now, but I should probably look at using a power supply with more grunt. The other important issue that I will need to look at, is noise in the ADC inputs, which can cause occasional intermittent problems, but always minor and only lasting for a second or two.
Since the motors are now seeking tolerably, that means I should probably look at constructing the basic arm.
On the RoboPanda front, things are not going well. My attempts to create a SPI programmer for my homebrew cartridge have not gone well. Using the X-Modem protocol seemed like such a good idea, especially since I could use the code from one the of appnotes with only minor modification (AVR350: Xmodem CRC Receive Utility for AVR), unfortunately things are rarely that simple.
I've spent a lot of time debugging the X-Modem code, without success. X-Modem seemed like such a good idea at the time, data transfered in 128byte blocks, which goes nicely into the 256byte pages for programming the homebrew cartridge. The receiver controls the speed, so pausing to actually program the data to the cartridge isn't a problem either, and the CRC checking should prevent signal errors. Unfortunately, its not simple to debug, mainly because it uses the serial channels that I would normally use for debuging.
I think I have finally figured out what the problem is. Unfortunately it has nothing to do with the software (so I wasted a lot of time, and pulled a lot of hair for nothing). I think the problem lies in the fact that I am running 5v hardware at 3.3v. I know from past experience that the MAX232 chip will function at 3.3v, but also pick up a large amount of noise. I haven't actually checked the make of the chip on my dev board, but its almost certainly a MAX232 chip. Fortunately, I have other serial level shifters that are 3.3v tolerant, and hopefully things should go much smother when I add one to my current setup.
- Nocturnal's blog
- Login or register to post comments