I'm not doing well w ith the control toggling light sensor
I'm not getting my analog voltage comparator act together.:confused::eek:
I want the teacher, at race time, to certify that each car will respond correctly to the bright lights at the beginning and end of the maze.
The photoresister R/C to PIC toggling threshold should be calibrated per car.
The PICkit2 comes with a built in pot attached to pin RA0. Each car while being exposed to the bright light could have its pot turned with a long handled screw driver (avoiding shadows) to the point that the car's control toggles.
This translates to a voltage comparison between the input of RA0 and RA1. The photoresister 10807 reduces its resistance in bright light from 5k down to near 500 ohms If I build a voltage divider with a 5k resistor to Vss = 5V and the 10807 to Gnd and attach it to RA1 will that do the trick? It would give the PIC a swing of about 2V not figuring the input impedance of the PIC.
I've got a some of questions.
First, does the above make sense?
Second, do any of you know some PBP code that does a similar comparison?
Three, I believe I will need to smooth out noise during the transition as the car comes into and leaves the bright light? How would you suggest I do that?
Ken
Learn something new every day..
I took the car to a TV studio today. It was going to be on Access television. I brought the laptop computer and the USB connector. I forgot the battery charger. The car had not been charged for a couple of days. Big mistake.
At the beginning it did just as I thought I had told it, but then as time went on it crashed more, got stuck more. I chose not to do the TV shoot. It sort of worked, but not quite.
I think as the battery discharges, even with the 5volt voltage regulator in the electronic speed control box, everything degrades before it finally refuses to move. I know the DC wheel power motor uses lots of juice
Sound correct to you all?
Ken
Noise, just like you guys warned me
Today after watching my car behave very differently when actually running on the floor as compared with its wheels spinning freely on a pedestal I decided that I need to install the second battery pack and its 5volt regulator. Nuts, more micro-soldering.
Ken
I would appreciate some suggestions
Please suggest your ideas on competitions that could be implemented with my PIC and/or RC controlled hobby level car. Right now all it does is go through a left turning maze. Programming for both right and left turns is the most obvious extension.
What if I added different sensors and maybe some kind of emitter. I am thinking of a game of tag. Somehow the rest of the cars in the group would need to know which car is "IT".
What fun could be had with a group of these cars?
Ken
Could use some suggestions
I think the code is pretty solid. Now the problem is response time, size of maze passageways and RC car speed. A fraction of a second does not seem very long when the car is up on blocks, but it is enough time at speed to crash into a far wall when it should have detected a turning opportunity and done its thing.
I think I need:
1. Techniques using PICBASIC Pro for recording data in memory that can be read back into my PC for analysis. How do I do this? I have not the faintest idea what app to use.:confused:
I think the PIC is plenty fast enough
Thanks for your attention and replies.
I think the PIC is plenty fast enough. I think the SFR05's are responding quickly enough judging from their flashing LED's. My guesses are either SFR inconsistencies and/or weakness in my jury rigged PWM signal.
The servo and the speed control want PWM pulses at 50 per second. I have not been able to do that with my PIC. I get the pulse width correct, but I can not get the rep rate down to once each 20 millisec.
Ken
Sorry gang, I've been out of touch
I'll catch you all up a bit.
I have changed tack.
I am trying to go from a hobby level car with PWM controls to a toy level car most of which have simple DC wheel and servo controls. The purpose is to reduce the cost of kitting for school students. In addition to reducing the cost, DC control of two wheel drive makes it easier to implement a sporty racing-like skid steering.
I purchased (at K-MART) two 1/10 scale toy cars on sale each for $25.95. Their original prices were $50. The 1/10 size gives me more room for adding microchip electronics. The wheels and the steering if driven simply by DC with reversing current are easily controlled using DPDT relays controlled via current drivers by my PIC .
WRONG! :o The steering servo contains both a DC motor and an angle measuring device which is read by the electronics that comes with the car. A total of six wires go to this servo. Where can I read how this works? Should I just go back to the store and buy 'proper' toy level cars? Your suggestions would be greatly appreciated.
Thank you thank you for the oscilloscope. Without it I would not have the faintest.
Ken
Prototyping with the PICkit 2
I have some Radio Shack solderless prototyping boards. With 22 guage solid wire I can create a fairly robust kit. I need to connect ten signal wires from the PICkit 2 to the solderless board. The Digi-Key S5752-12-ND header might work. The question is whether 22 gauge solid wire will fit and stay in this device. If not #22, then what gauge will work? Or is there a crimp-on male connector that will do the job.
What did the Microchip engineers have in mind when they designed the PICkit 2 printed circuit board? Any ideas?
Ken
Seems to do what it is desinged for, and very well, I think.
Quote:
Originally Posted by
Kenjones1935
What did the Microchip engineers have in mind when they designed the PICkit 2 printed circuit board? Any ideas?
A compact USB device that programs all their MCU's, using 5 to 6 connections?
But what do you mean Ken?
On a tangent, here is what they were thinking for the pickit3:
http://www.youtube.com/watch?v=3YUvl...watch_response
Back to the six wire steering mechanism
This describes what I found when I took the "servo" apart. (I got it back together with much struggling so this is from memory.)
It has 2 wires that go to the motor and 4 wires that go to some kind of rotating position sensor. On a small board are 2 etched concentric circles which are in contact with a 4-pronged device mated to the spinning gear. I think 2 of
the 4 prongs touch the outer circle, the other two the inner circle.
Have any of you come across such a device? Any idea its purpose and how I control it. Other cheap cars just go bang bang into the steering motor with a little spring plus the caster effect to bring it back to neutral.
Ken
We have hear a problem in communication
My 16F887 is attached to a Microchip PC board. It is the PICkit #2. My problem is getting ten signal wires off that board an onto a solderless proto board like Darrel used. Are you all suggesting that I do the whole job on a solderless board? If I were to do that, where do I get the solderless header that fits my Microchip provided USB connector? I'm pretty sure my 44 pin square shaped PIC will not fit. I need the long rectangle shape.
Ken
A major break through - I hope...
Here is a proto board that will carry all my parts and then some. Each board has two rows of 62 pairs of bussed 0.1" centers pin holes.
http://www.circuitspecialists.com/prod.itml/icOid/6888
I need 20 paired pins for the forty pin 16F887, 48 paired pins for the 6 sixteen pin DPDT relays, 7 paired pins for the fourteen pin SN7407, 6 isolated pins for the USB device and three isolated pins for the 5v regulator.
The board is 6 and 1/2 by 3 and 1/8 inches. That fits fine on my 1/10 scale hobby level SPRINT (the belt up the middle driving the front wheels is a problem that can be overcome) and my toy level 1.10 and 1.12 scale toy cars.
Is that a plan, or what? :cool:
Ken
PC and solderless incompatibility
New unexpected problem.
I have not been able to find socket headers that are compatible with the solderless proto board technology. All the headers are designed for PC use. This makes it very difficult to connect my six pin 0.1" centers USB connector device. It also makes it difficult to connect the servo PWM three pin cord, the Electronic Speed Control three pin cord, and the connectors needed for the radio receiver three pin male headers.
I could cut and strip six 1/2" #22 lengths of solid #22 gauge wire and stick then into consecutive holes. The female connector would come in perpendicular to the board.
This is not as reliable as 90 degree square header stock, but what choice do I have?
Remember this is for middle school students.
Suggestions anyone?
ken
The problem is the length of the legs
The 90 degree headers do not have long enough stems. They do not reach to the springs in the proto board holes. I solved this by bending them straight, but I would rather have the connectors coming in horizontal.
BIG REAL PROBLEM!! My PBP 2.6 version DEFINE pulsin_max
command does nothing. I can see this from the speed at which the sonar LED's blink. I am using a PULSIN command to detect whether the radio transmitter is powered on. If no PWM signal comes in, the power is off and the PIC is on its own to guide the car. This is my new TOGGLE system, but it does not work. When power is off the LED's flash about once per second no matter what I set pulsin_max to be. When power is on they flash many times per second.
Any rumors around campus to which I am not privy?
Ken