Well, we are getting somewhere on this project. As you can see, we assembled the body of the robot (really complicated eh? 1 sheet of polycarbonate and a few motors glued on...)
Anyways, we are having some extreme difficulty with not only two of the people in our group, but silly things that I've been doing -like not fully reading datasheets- has kinda screwed a few (read: lot) up.
For starters, I promised I could control the speed and direction of 2 DC motors with only 4 pins. Not impossible. A little challenging. I was planning on 2 analog out pins, where we would set a 16-bit number and would have 2^16 (65536) different speeds to choose from. This is a real no-no. Why? because there is no such thing as an analog output on a PIC. Shit.
So what I have to look into now is a way of controlling speed with 2 digital pins (4 possible outputs) and direction with the other 2. So, how am I going to get >4 speeds out of only 2 pins you ask? My answer is: creatively.
This is what I got so far. I'm looking into finding a 1-2 decoder, connected to a pair of 4 bit shift registers, each of which is then also connected to a 4-bit D/A Converter. This will give use 16 levels of resolution for our motors. Seeing as I can't drop below 4V anyways, this should be more then enough variation to make it all work. Problem is that the Shift registers need to be clocked in. And I already need 2 pins for Decoder Select and output Bits.
Whats a Guy to do? Never catches a break.
Not to mention the one guy in our group bickering bout how hard his part is -which I've friggin babied him through.- Damn it! he's somehow written 100+ lines of code for something that isnt terribly difficult. Edge Detection Man, F---in edge detection. Thats all.
So, this mother's got to be completed in 10 days. ....Yup, 10. Built, tested, running. You see a circuit board on that thing anywhere? Nope that has to be made still. I got most of it done, but It got the "No redeeming qualities" check from a friend. (Story of my life =( .... )
Thats enough for now.
Back to work for you!
No comments:
Post a Comment