Adapting an Board of Education w/ a Frequency crystal to control an R/C car
neverfinished
Posts: 7
I have a 2 channel transmitter with a 27.145mhz crystal. I have a matching crystal on the reciever of 27.145mhz which is mounted onto the R/C car.2 channel is a minimum because i have to control the DC motor im adapting onto the Rc Car as well as the steering servo. I want to plug the crystal into the Board of Education and use that to control my steering servo and DC motor. I'm unable to find anything as to how i would program this however.
The crystal looks like this
http://www.parallax.com/Store/Microcontrollers/AllMicrocontrollers/tabid/758/CategoryID/1/List/0/SortField/0/Level/a/ProductID/341/Default.aspx
The million dollar question i have is their any resources that someone could refer me to to help me solve this problem?
p.s im open to buying a different board if neccessary. Just looking for some help getting on the right track.
The crystal looks like this
http://www.parallax.com/Store/Microcontrollers/AllMicrocontrollers/tabid/758/CategoryID/1/List/0/SortField/0/Level/a/ProductID/341/Default.aspx
The million dollar question i have is their any resources that someone could refer me to to help me solve this problem?
p.s im open to buying a different board if neccessary. Just looking for some help getting on the right track.
Comments
Questions. Do you want to control the transmitter with the BOE or receive output from the receiver? Do you really want to just control the servos?
Basically think of your RC system like a pipeline starting with the source of control signals, then flowing through the transmitter to the receiver, to the object being controlled. When in the pipeline do you want the BOE?
RC servos can be controlled directly from the Basic Stamp 2 and no RC system is required to do that. You can also set up a BS2 to accept the RC receiver's control signals using pulsin command.
Currently i have my Boe bot being controlled by IR signals off of a tv remote using the pulsein command but i'd like to control this rc car with my HPI TX2 transmitter with the radio frequency 27.145mhz. Do i need to plug an antenna into the RC car to recieve the signals from my Transmitter?
Also i notice that using the Pulsein command with the TV remote required using ''if'' ''Then'' commands alot which meant i was only able to achieve one forward,backwards,turn right and turn left command. But in the RC car i would like gradual control of the servos turning right slowly as i turn the wheel on my transmitter more and more and the same for the throttle. Would i just program endless if then commands so that it understands as i turn the wheel more and more or is there some kind of command i can use to achieve the gradual control of the servos.
I hope that was more clear because i'd really like to get this project up and running.
http://forums.parallax.com/showthread.php?138259-How-to-interface-basic-stamp-with-servo-output-of-r-c-radio-reciever
However, that doesn't do what you want which is remove the radio receiver and I'm not sure of the value of that.
Keeping the reciever on the car and wiring it into the BOE would serve my purposes as well. The code file available in that other link looks very promising. Now can i get a double ended servo motor plug and plug it into the servo motor ports from the reciever to the BOE or would i be better off getting a single ended servo motor plug and then connecting each wire of the 3 into the bread board on the BOE and then reading the information that way? What im thinking right now is once i can identify the values of the incoming signals from the RC reciever i program 4 if then commands going both ways for both rc servos as well as center commands for a total of 20 if then commands.
If executed properly as i imagine it this should give me 4 increments in each direction for each servo motor. This wouldnt give me the smooth action i have right now directly controlling it with the R/C reciever but it would make it functionable.
Does that sound feasible or is their a better way to do it?
But how do you plan to power the BOE?
If you run a servo cable from the receiver to the BOE's servo header you'll connect the ground and signal, which is good. But the center wire is the power line which might conflict with the BOE's power or the receiver's power, depending upon the power setup. If you run the servo line to a breadboard, then you can connect only signal and ground and avoid the possibility of a power conflict.
-Phil
Do you mean pulsout? I was able to accomplish this with no problem. If there is no pulsout signal the servo will not move so I just use "IF" condition = 1 "THEN" pulsout Servo. If you used the example code provided in the documentation for the remote control then that needs to be modified as it is set specifically for full left and right turns and a specific distances for forward and reverse.
I dont suppose you had something in mind ?
I was referring to the pulsout command in that text. My apologies for the mistake. So it sounds like you are saying that you found a way to gradually control the servos, but im not fully grasping what your saying. Could you post up an example of a code demonstrating what your saying. It sounds very promising!
Really appreciating all the good input here.
I was browsing the web for ways to solve my problem and ended up looking at the parallax store. Correct me if im wrong but its been my experience that the Board of education im using right now is only capable of dealing with a single command at a time therefore it cant turn and go forward at the same time like an rc car can.
Now if i was to upgrade to a Propellar board of education outfitted with one of these XBee 1mW Wire Antenna (802.15.4) - Series 1
Since the Antenna runs off of 2.4ghz (a digital signal) i would most likely have to get a new transmitter, But then it would be able to accept multiple commands (left and forward at the same time). Still unsure of how i would get the smooth control i have right now though.
EDIT: It seems all the information to do what i want to do is found here and i dont even need to get a propellar board, But i think im looking at the video game building kit pretty seriously which uses the propellar board. If it teaches you how to use C++ im definitley getting it since i've wanted to learn that code for along time now.
Sorry, My bad. I used HIGH and LOW commands instead of the PULSOUT. That way when you press the right or left channel the servo will pulse only as long as the button is pressed.
Edit: I will see if I can dig up the code and post it.