COOL!!! It works!!!
Videos???
Or may the code is rusty?Of course it might be that my car needs a grease job.
Are you using interrupts or just running straight?
The PIC should be able to react faster than humans.
COOL!!! It works!!!
Videos???
Or may the code is rusty?Of course it might be that my car needs a grease job.
Are you using interrupts or just running straight?
The PIC should be able to react faster than humans.
Last edited by mackrackit; - 4th March 2010 at 03:35.
Dave
Always wear safety glasses while programming.
It is not that he PIC is slow, I think it is that the steering mechanism is too complex. It is a close match for what is in a real automobile. I need to get the car to go slower if it is going to drive along a wall no more than 15 inches away.
My code also needs some serious tweeking.
Ken
When up on blocks and I am fooling the sonar with my hands. (Remember it is supposed to hug the walls and thereby go around a room counter clockwise looking down.)
It:
1. goes straight when my hand is about 10 inches away on the car's right side and nothing is in front.
2. turns right when my hand is more than 10 inches away on the right
3. turns left when my hand is 15 to 20 inches away up front
4. goes backward when my hand is much closer up front. Once it has retreated 15 to 20 inches it turns left and tries again.
When on the floor the car is too fast for the PIC driven steering mechanism. It bumps into things, retreats, turns, and comes flying forward. It is too fast for me.
It is behaving similarly to those floor vacuuming robots only way too fast. I have the electronic speed control at its slowest PWM settings.
Needless to say, manipulating a video camera while waving my hand at this machine ain't easy.
Ken
Ken,
Either the car needs to travel slower, or you need to increase the range / sensitivity of the sensors, or possibly use different servos which can react quicker (digital ?)
Took the car to the local radio control hobby shop. They played with the steering mechanism and told me that it was "all bound up". The ball joints had ceased within their plastic housing. (I got the car as a freebe.) The solution was new tie rods. (Fashioned out of two bits of plastic, tiny metal ball joints and #4-40 screws with their heads cut off. It took the guy behind the counter no more than five minutes.)
Now the thing steers like mad. Gotta calm it down a bit.
Ken
Ken,
You are doing one heck of a job. Four months from your first post here, give or take a day or two, with an idea and a new language.
Now you have a working project ready for fine tuning.
Nice Job!!!
Dave
Always wear safety glasses while programming.
I took the car to R/C Excitement yesterday and gave it a try. It worked quite well. It followed the wall then negotiated the left turns to go completely around the room. It was fast. I had to run to keep up. The wall following was too zigzag. Classic case of over compensation.
Took it to R/C again today. It did not work at all well. I screwed something up!!
Question: What makes the 16F887 reset or restart. I know a power glitch will do it, but I don't see how that can be. Possibly an inductive surge from telling the motor to reverse itself without first telling it to stop. That might do it. I am changing my code so that can not happen. What else? Anything?
Another question. Have any of you seen a PBP command snippet that interprets an incoming PWM signal and puts it into a register so that I can do IF statements like, "IF signal < 110 THEN ....." There's some code in the Q&A article in this month's SERVO magazine that seems to do that, but not in PBP.
Ken
Bookmarks