need some new ideas… Sorry for the repeat, I am still learning…
Do you all have some creative ideas for things to do with this little car? Right now it follows a wall counter clockwise looking down at a leisurely pace. High speed introduces response time problems.
Two sonar proximity sensors can be placed looking anywhere from the car and a pot. controls the top forward speed. Actually three sonars are available. Sonars cost ~ $29 each. PIC’s cost $2.20. Amazing!
I can show you all the code if you like. It is crude, but it works. PICBASIC PRO.
A thought! My car, when standing still, can detect motion. How about a relay race? Pass the baton merely by arriving. I want something simple but exciting. Something with easy to conceptualize parameters that can be readily changed in PICBASIC. I would like for the kids to see the code as LOGO, but I have no access to that language.
The LEDs on the sonars are almost steadily illuminated. The ping rate is many many per second. Yet the car seems to react slowly. I do not know why.
Hey, Ken. Since you are looking for ideas, how about cops 'n robbers? Add IR emitters and detectors so the cars will be aware of each other. Program one to flee and the other to chase!
I am making a robotic car from a MJX R/C NISSAN Fairlady. It contains R002-RX REV01 electronics.
I would like my microprocessor (a Microchip 16F887) to detect when the transmitter has been turned on. With this knowledge it can toggle between microchip control and radio control.
I have been looking unsuccessfully for a signal on your R002-RX which activates when the transmitter is turned on. Does anyone in the forum know anything about this R/C receiver electronics card?
That seems a natural for these cars. Every car has a light. Only the car that is ‘IT’ has it illuminated. Every car has - I don’t know - maybe four directional light sensors. They can run away from the light. The ‘IT’ car TAGs by making contact. We’d have to give some thought to how a car might figure out that it has been tagged and therefore become ‘IT’. Also how does the IT car ‘see’ the cars to chase?
The model level car is too expensive for middle school use. As fritsl warned me way back, it seems to be too fast for my level of software and SF05 sonar sensing. I have found a commercially available electronic speed control that has no ‘smarts’, but that’s $50 added cost to the package.
The 1/10 size gives me more room under the plastic car body for my solderless protokit plus an extra 4 AA battery package. This $50 toy car comes with a rechargable 7.2 volt battery. There is still a mystery. How can the PIC detect that the RC transmitter is turned on? I do not know enough about radio receiver electronics to decode the car’s original printed circuit card. If I could figure that out I could toggle between PIC control and RC control. Presently turning on the transmitter with the trigger in a particular position stops the car in its tracks, but does not toggle to RC control.
It is not good. This has been frustrating. You can hear the car spin its wheels on the cement floor. I’ve not been able to get it to follow the wall. It turns too far when making what should be small adjustments. Could be my code. I’ll share it if you want.
On the plus side this car cost $50 retail. It is light and very rebust - as you can see. All my solderless kit easily fit underneath the plastic shell with holes for the sonar sensors.
It does seem that the model level car with the POT to adjust the speed is the way to go.
The videos help a lot. Let me ask you something. How well does that car manage the turns on the track you are using if you are controlling it yourself via RC? The reason I ask is, the track area seems small in comparison to the car. If you can’t manage to drive the car successfully yourself under your track conditions, then maybe you need a bigger track.
Slowing the speed way down may help too, if you can find a way to do it.
By all means, post your code. I’m not a PIC programmer so I may not be able to help too much, but maybe someone else on the site can.
One more step for the model level - get it up more to speed. This needs a bigger room. I’ve got that, but it needs cleaning. The toy level needs my understanding of the servo that drives the steering. Presently the can does not easily go straight, just left or right. I will clean up and post my code.
I took the car to an old gymnasium this morning. I had adjusted the “frontfree” distance from four feet to five feet. That’s the proximity response from the front sonars which triggers the code to turn sharply left. I left the potentiometer at the speed that was too fast for my garage. In the gym it negotiated the corners fine, but could not hug the wall.
I may need to recalibrate the steering, but more likely I need to restructure the wall hugging code.
Here’s a link to the code I am presently running. The only difference between the toy car code and the model car code is the servo and DC motor driving commands. For the model code I use the HPWM PicBasic command. For the toy level I command certain pins to be HIGH or LOW.
I need help figuring how to control a robocar at speed. Simply said:
The MODEL level car has proportional control. I preset the max velocity with a POT. I need a robo system that can figure out when to turn given the speed and the distance of oncoming obstacles.
The TOY level cars have only bang-bang controls. Their tires are plastic. They slide and skid. The 1/12 scale car is slow enough for simple sonar distance threshold control. Boring!! The 1/10 scale car is a big fast colorful device: spectacular and fun! With size and speed comes momentum. I need to get better control of the steering (current drivers instead of DPDT relays?) and an algorithm to implement that control.
"Tuning the distance parameter like in your video is a recurring task in most navigation algorithms. No amount of planning, designing, modelling of simulating can do that for you. That single number has to be determined in field tests."
I know nothing of navigation algorithms. I know nothing of control theory. I do know that velocity is a differential. It would seem that the micro has to calculate velocity as part of the robo feed back loop. Any suggestions for PIC and code? My guess is my 16F887 is sufficient, but I need C with libraries just to help me be organized.
The solution is obvious for the MODEL level robocar.
I made the wheel velocity proportional to the POT position. Stopping and turning distance requirements are proportional to speed. Make these distances proportional to the POT also. Easily done.
I have no answer for the 1/10 TOY car aside from making it expensive by implementing a proportional control system.
I cannot offer you help with your specific language, but I can always brainstorm with you about the generic concepts. You are right in saying that velocity is a differential (of position or distance in time). But are your sensors giving you distance and time? Or is your encoder directly giving you speed?
I may also have suggested that the “danger threshold” for “distance to obstacle” can be speed dependent. The faster you go, the earlier you need to start braking and/or turning. But before I start rambling, you had better state which specific department you need help in.
Whenever I hear “expensive”, I think “make our own”. True, that just shifts the expense from our wallet to your calender. And you need the secret ingredients: knowledge, skills and experience (I call that combination expertise). Since you are doing this for educational purposes, I am guessing you don’t mind the investment curvature here.
I don’t read the word “proportional control” very often on this site. Usually people around here speak in solutions, rather than design concepts. That’s amateurs for you…
For proportional steering, the servo was invented. They are cheap, but might not directly fit your toy cars.
For proportional velocity, the ESC was invented. That is basically a piece of electronics that takes in commands (in RC lingo) on one end and spits out electric power (in degrees of voltage) on the other end. Those can get very pricey. That’s why many of us build their own. We tend to call them motor controllers and we choose which lingo they accept on the input side. There is not really a de facto standard for a motor controller because the requirements vary a lot on either end of the gizmo. If your prototype is ever going to be replicated by school kids or others, you might want to venture into designing your own board and have it manufactured in multiples by a professional service. If you are into that challenge, you should definitely start a new thread. Many people would take interest!
Today in the mail came two toy store Xmas catalogs. Both feature toy level R/C vehicles. All the more reason my autonomous car for introduction to STEM is a good idea. It may be that we need to teach-the-teachers first.
On the subject of cost. In Fitchburg well over 50% of our public school students come from families that fall below the poverty line. In Massachusetts that means they are eligible for free or reduced price school lunches. If we were to use my cars to teach STEM to middle school kids, it would be nice if they could keep what they build. (Maybe in the context of an after-school program.) If we use my cars to guide teachers toward this corner of STEM through a college supported Professional Develpment course, again it would be nice if the students could keep what they build.
Here’s the question. What games can $50 1/10 scale TOY level cars play given the limitations of bang-bang controls and a 16F887 PIC. As a goal keep the total cost less than $100.
Sounds like your now broadening the aim of your project here. Is wall-following racers now reduced to “one of many” options? Almost sounds worthy of a separate brain-storm-forum-post.
Boy, you may be asking the wrong people here. I’d hate to speak on behalf of the kids. I cannot claim to understand what they like. Speed sounds obvious. So do flashy sounds and lights. Interaction, like any RC toy, sure. Autonomy might not appeal so much for that very reason. Takes away the interaction. Sure programmers feel differently, but you’re trying to hook the entire class, not just the nerd in the corner.
And that’s most of us here: nerds finding each other in that corner.
Did you consider a NASA Space theme? Convert your car into a Mars Rover? Space is still cool. Or is it?
The point of my project is communicating “how things work” to pre-teens. Examples of todays difficulties. My Mom’s gas oven was obvious. Ever try to explain a micro-wave? Souping up a car in my day included high lift cams, carborator changes, tuned straight through pipes. Today the first thing you do to hop up a car is change a computer.
The dashboard on my 2004 GM car told me: “TIRE Pressure LR 23psi LOW”. It also said, “TIRE Pressure RR 28psi OKAY”. I pumped up my left rear tire. Then the car told me,“TIRE Pressure LR 23psi LOW” and “TIRE Pressure RR 33psi OKAY”. WHAT??
The garage mechanic told me each tire valve contains a pressure gauge and enough of a computer to maintain a connection to the car’s internal wireless network. A previous owner of my car had rotated the tires. The mechanic also told me that my car, depending of accessories, carries some twenty computers.
It seems to me that the first question out of a future STEM professional is, How does it work?
or look higher on this page for the last video. It shows the parts on my car and some of the frustration in getting it to go fast. It turned out that the DPDT switch was being intermittent during that whole video taping. It affected R/C control of the car. I am not sure whether it affected the PIC control.
Today I brought both of my PIC controlled cars to the old gym to see how they fared together on the same track. Here’s the video. Which do you think was the winner? Remember the TOY car is red. The MODEL car is blue. The TOY cost originally cost $50. The MODEL cost $200. Both have my kit.
If you could move away from the racing rc cars maybe sumo bots might draw more interest because who does not like things slamming together. Also you could use them as line followers… At our schools in town they used lego mind storms and thats what finally made me get into this and lead me to the start here. They started the legos with kids in 6th grade. Those were the kids with the best grades.