My current BoeBot project, wireless controll.
Hello
I have just succeded with my current project. Controlling my BoeBot wireless with my computer.
I know you can buy parts from Parallax to communicate wireless by radio between BasicStamp modules. But I think they are quite expensive and· because I live in Sweden they get even more expensive. Instead I bought a RX433 receiver module and a TX433 transmitter module for about 12,50$ apiece in Sweden. I aslo had to buy a BasicStamp HomeWork board for about 60$ (but it can always be good to have one extra, right·
). Then I just connected the transmitter module to the HomeWork board which I connected to my comupter and I connected the reciver module on my Boebot. Then just a little program code and my robot is wireless controlled!
Now I am developing my program.·I have fit my robot with some IR-sensors so that the robot can roam by itself but I can start to controll it at any time. I shall also try to·get a two-way communication so that the robot can sent stuff to the computer. Maybe get a distance sensor on the robot and send the measurements to the computer.
I will also try to steer the robot with my Texas TI-83plus calculator instead of the comuter.
\Jonas
http://www.geocities.com/jcee324
I have just succeded with my current project. Controlling my BoeBot wireless with my computer.
I know you can buy parts from Parallax to communicate wireless by radio between BasicStamp modules. But I think they are quite expensive and· because I live in Sweden they get even more expensive. Instead I bought a RX433 receiver module and a TX433 transmitter module for about 12,50$ apiece in Sweden. I aslo had to buy a BasicStamp HomeWork board for about 60$ (but it can always be good to have one extra, right·
). Then I just connected the transmitter module to the HomeWork board which I connected to my comupter and I connected the reciver module on my Boebot. Then just a little program code and my robot is wireless controlled!
Now I am developing my program.·I have fit my robot with some IR-sensors so that the robot can roam by itself but I can start to controll it at any time. I shall also try to·get a two-way communication so that the robot can sent stuff to the computer. Maybe get a distance sensor on the robot and send the measurements to the computer.
I will also try to steer the robot with my Texas TI-83plus calculator instead of the comuter.
\Jonas
http://www.geocities.com/jcee324

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
COOL! Do you have ideas on HOW to do this. Or is it more in the concept stage?
\Jonas
http://www.geocities.com/jcee324
Could i have alink? I've been looking for this for some time
Can you tell how I can control my BoE-Bot with my computer?
First I did it with the debug window of the basic stamp editor, but that isn't working very good.
So, how are you doing that?
Martin
how did you hook them up? Do you have sample code? What additional details can you provide? What a great, and inexpensive way to play!!
I have a robot that I also control with RF. But I use the RF-modules of Parallax.
I think the pbasic-code is the same.
Transmitter code:
' Martin van Leussen - Control BoE-Bot Wireless - Transmitter v2.3.bs2 ' Control: ' Camera: BoE-Bot: ' [noparse][[/noparse]P1] [noparse][[/noparse]P7] ' [noparse][[/noparse]P0][noparse][[/noparse]P2][noparse][[/noparse]P3] [noparse][[/noparse]P6][noparse][[/noparse]P8][noparse][[/noparse]P9] ' P14 Buzzer ' P15 Transmitter ' {$STAMP BS2} ' {$PBASIC 2.5} commandboe VAR Byte commandcam VAR Byte command VAR Byte counter VAR Word OUTPUT 15 FOR counter= 2000 TO 4000 STEP 200 FREQOUT 14, counter/50, counter NEXT DO IF IN0=1 AND IN1=1 THEN commandboe=7 ELSEIF IN0=1 AND IN2=1 THEN commandboe=1 'Directions ELSEIF IN3=1 AND IN1=1 THEN ' forward commandboe=9 ' [noparse][[/noparse]7][noparse][[/noparse]8][noparse][[/noparse]9] ELSEIF IN3=1 AND IN2=1 THEN ' left [noparse][[/noparse]4][noparse][[/noparse]5][noparse][[/noparse]6] right commandboe=3 ' [noparse][[/noparse]1][noparse][[/noparse]2][noparse][[/noparse]3] ELSEIF IN0=1 THEN ' backward commandboe=4 ELSEIF IN1=1 THEN commandboe=8 ELSEIF IN2=1 THEN commandboe=2 ELSEIF IN3=1 THEN commandboe=6 ELSE commandboe=5 ENDIF IF IN6=1 AND IN7=1 THEN ' up commandcam=7 ' [noparse][[/noparse]7][noparse][[/noparse]8][noparse][[/noparse]9] ELSEIF IN6=1 AND IN8=1 THEN ' left [noparse][[/noparse]4][noparse][[/noparse]5][noparse][[/noparse]6] right commandcam=1 ' [noparse][[/noparse]1][noparse][[/noparse]2][noparse][[/noparse]3] ELSEIF IN9=1 AND IN7=1 THEN ' down commandcam=9 ELSEIF IN9=1 AND IN8=1 THEN commandcam=3 ELSEIF IN6=1 THEN commandcam=4 ELSEIF IN7=1 THEN commandcam=8 ELSEIF IN8=1 THEN commandcam=2 ELSEIF IN9=1 THEN commandcam=6 ELSE commandcam=5 ENDIF commandboe=commandboe*10 command=commandboe+commandcam SEROUT 15, 17197, [noparse][[/noparse]command] LOOPReciever code:
' Martin van Leussen - Control BoE-Bot Wireless - Receiver v2.3.bs2 ' P4 Buzzer ' P10 Receiver ' P12 Servo BoE-Bot right ' P13 Servo BoE-Bot left ' P14 Servo camera vertical ' P15 Servo camera horizontal ' {$STAMP BS2} ' {$PBASIC 2.5} counter VAR Word command VAR Byte commandboe VAR Byte commandcam VAR Byte vertias VAR Word horias VAR Word vertispeed VAR Word horispeed VAR Word INPUT 10 FOR counter= 2000 TO 4000 STEP 200 FREQOUT 4, counter/50, counter NEXT vertias=845 horias=700 vertispeed=10 horispeed=5 DO start: SERIN 10, 17197, [noparse][[/noparse]command] IF command>99 THEN 'Filter GOTO start ENDIF commandboe=command DIG 1 commandcam=command DIG 0 IF commandboe=1 THEN PULSOUT 12, 850 ' PULSOUT 13, 750 'Directions PAUSE 20 ' forward ELSEIF commandboe=2 THEN ' [noparse][[/noparse]7][noparse][[/noparse]8][noparse][[/noparse]9] PULSOUT 12, 850 ' left [noparse][[/noparse]4][noparse][[/noparse]5][noparse][[/noparse]6] right PULSOUT 13, 650 ' [noparse][[/noparse]1][noparse][[/noparse]2][noparse][[/noparse]3] PAUSE 20 ' backward ELSEIF commandboe=3 THEN ' PULSOUT 12, 750 PULSOUT 13, 650 PAUSE 20 ELSEIF commandboe=4 THEN PULSOUT 12, 700 PULSOUT 13, 700 PAUSE 20 ELSEIF commandboe=6 THEN PULSOUT 12, 800 PULSOUT 13, 800 PAUSE 20 ELSEIF commandboe=7 THEN PULSOUT 12, 650 ' PULSOUT 13, 750 PAUSE 20 ELSEIF commandboe=8 THEN PULSOUT 12, 650 PULSOUT 13, 850 PAUSE 20 ELSEIF commandboe=9 THEN ' PULSOUT 12, 750 PULSOUT 13, 850 PAUSE 20 ENDIF IF commandcam=1 AND vertias<1380 AND horias>350 THEN vertias=vertias+vertispeed ' up horias=horias-horispeed ' [noparse][[/noparse]7][noparse][[/noparse]8][noparse][[/noparse]9] ELSEIF commandcam=2 AND horias>350 THEN ' left [noparse][[/noparse]4][noparse][[/noparse]5][noparse][[/noparse]6] right horias=horias-horispeed ' [noparse][[/noparse]1][noparse][[/noparse]2][noparse][[/noparse]3] ELSEIF commandcam=3 AND vertias>380 AND horias>350 THEN ' down vertias=vertias-vertispeed horias=horias-horispeed ELSEIF commandcam=4 AND vertias<1380 THEN vertias=vertias+vertispeed ELSEIF commandcam=6 AND vertias>380 THEN vertias=vertias-vertispeed ELSEIF commandcam=7 AND vertias<1380 AND horias<1275 THEN vertias=vertias+vertispeed horias=horias+horispeed ELSEIF commandcam=8 AND horias<1275 THEN horias=horias+horispeed ELSEIF commandcam=9 AND vertias>380 AND horias<1275 THEN vertias=vertias-vertispeed horias=horias+horispeed ENDIF PULSOUT 14, vertias PULSOUT 15, horias PAUSE 20 LOOP·And can someone tell me·how I can control my BoE-Bot with my computer?
Martin
That's a great looking bot. I was wondering how I would mount some additional hardware on my bot and I never thought about cutting out some plexi. I also plan to control my Boe-Bot with my computer at some point. I'll most likely use some CGI scripting with a web based front end. I just got my PINK set up so that could be a likely choice.
-Marc
I also like it to control my robot with internet, but the pink kit is to expensive for me.
So I am looking for a alternative.
Can you post some pictures of your bot?
Martin
Here's a link to my bot with a hacked Radio Shack ZapZaps car as the remote: http://forums.parallax.com/forums/default.aspx?f=21&m=93838
If you can connect your PC with your transmitter board through the Parallel port, there is a Perl module which allows you to control the Parallel port which would make it pretty simple to write a CGI web app. You can downlaod Apache and Perl for free.
-Marc
but where can I find that "Perl module"?
Martin
ppm install Device-ParallelPort
ppm install Device-ParallelPort-drv-win32
Then, if you open the file C:/Perl/html/index.html and scroll down on the left under modules you will see the documentation for how to use the Device::ParallelPort module.
-Marc
Sorry about the delay of my answer but I haven't been at home for a couple of weeks now and I haven't been working with my boebot. But here is two pictures of the robot and some sample code. I have to say that there is alot work left before the robot goes smoothly. But you can drive your robot with the computer using this code.
This first code is the code of the transmitter (the card connected to the computer).
'{$STAMP BS2} ' {$PBASIC 2.5} ' =================================================== '=====Wireless control of the BOEBOT. Transmitter program===== ' =================================================== '--------- Variables ----------- InVar VAR Nib UtVar VAR Nib PauVar VAR Byte Ini VAR Nib '--------- Pins ----------- Sandare PIN 0 'Transmitter pin Knapp1 PIN 1 'Button1 Summer PIN 2 'Buzzer '--------- Main Loop ------------ UtVar = 5 Ini = 0 PauVar = 20 FREQOUT Summer,250,1000 start: DO DEBUG CLS DEBUG "Invar = ", DEC Invar, CR DEBUG "Utvar = ", DEC Utvar, CR SEROUT Sandare, 3313, [noparse][[/noparse]utVar] 'Transmitt value from utVar to the BOEBOT PAUSE PauVar IF (Knapp1 = 1) THEN Ini = 1 IF Ini = 1 THEN program LOOP Program: SERIN 16, $4054, 20, start, [noparse][[/noparse]InVar] 'Receive value from the computer, store in InVar PAUSE PauVar utvar = invar GOTO startWhen the program starts it sends the value "5" over and over again until you push "Knapp1" (button 1) on the card. This is used to synchronize the communicaion between the transmitter and the receiver. When you push the button the it starts to receive values that you enter in the debug window in BASIC Stamp Editor.
This is the robot program code.
'{$STAMP BS2} '{$PBASIC 2.5} ' ===================================== '=====Wireless control of the BOEBOT. Robot (receiver) program===== ' ===================================== '----- Variables ----- InVar VAR Nib IniVar VAR Nib Ini VAR Nib MyVar VAR Nib InPutVar VAR Nib irDetectLeft VAR Bit irDetectRight VAR Bit pulsecount VAR Byte '--------- Pins ----------- Mottagare PIN 1 'Receiver Summer PIN 2 'Buzzer IrInLeft PIN 10 IrInRight PIN 3 IrLedLeft PIN 11 IrLedRight PIN 4 Right_Servo_Wheel PIN 12 Left_Servo_Wheel PIN 13 IniLED PIN 9 '----- Constants ----- CRMid CON 750 CRDeviation CON 225 CRMax CON CRMid + CRDeviation CRMin CON CRMid - CRDeviation CRHMid CON CRMid + 20 CRLMid CON CRMid - 20 CLMid CON 750 CLDeviation CON 225 CLMax CON CLMid + CLDeviation CLMin CON CLMid - CLDeviation CLHMid CON CLMid + 20 CLLMid CON CLMid - 20 Stopped CON 5 Forward CON 8 back CON 2 Turn_Right_Frwd CON 9 Turn_Left_Frwd CON 7 Turn_Right_Sharp CON 6 Turn_Left_Sharp CON 4 Turn_Right_Back CON 3 Turn_Left_Back CON 1 Ir_styrd CON 12 Ini = 0 LOW 15 Inivar = 5 myvar = 5 FREQOUT Summer,250,1000 '----- Initiating ----- ini_loop: DO DEBUG CLS 'Clears the debug-window DEBUG "Invar = ", DEC Invar, CR 'Show the In-variable in the debug-window DEBUG "Ini = ", DEC Ini, CR DEBUG "Myvar = ", DEC myVar, CR SERIN Mottagare, 3313, [noparse][[/noparse]InVar] 'Receive value and store it in the variable InVar PAUSE 20 'Pause 20 ms IF Invar <> Inivar AND Ini=0 THEN Reset 'Jumps to the Reset-loopen if not the initiation-value is received IF Invar = Inivar AND Ini=0 THEN Ini = 1 'Makes "Ini" high if the initiation-value is received IF Ini = 1 THEN HIGH IniLED IF Ini = 1 THEN GOTO start 'Jumps to the main program when the communication is initiaded LOOP '----- Reset loop ----- Reset: SLEEP 1 '"Sleeps" for one timeunit, ca 2.3s GOTO ini_loop '----- Serial communication loop ----- start: DEBUG CLS 'Clears the debug-window DEBUG "Invar = ", DEC Invar, CR 'Shows the In-variable in the deboug-window DEBUG "Ini = ", DEC Ini, CR DEBUG "Myvar = ", DEC myvar, CR SERIN Mottagare, 3313, [noparse][[/noparse]InVar] 'Receive value and store it in the variable InVar LOW Iniled PAUSE 20 'Pause 20 ms HIGH iniled GOTO program '----- Main program loop ----- Program: myvar = InVar SELECT myvar CASE = Stopped GOSUB still CASE = Forward PULSOUT Right_Servo_Wheel, CRMin PULSOUT Left_Servo_Wheel , CLMax CASE = Back PULSOUT Right_Servo_Wheel, CRMax PULSOUT Left_Servo_Wheel , CLMin CASE = Turn_Right_frwd PULSOUT Right_Servo_Wheel, CRLMid PULSOUT Left_Servo_Wheel , CLMax CASE = Turn_Left_frwd PULSOUT Right_Servo_Wheel, CRMin PULSOUT Left_Servo_Wheel , CLHMid CASE = Turn_Right_Sharp PULSOUT Right_Servo_Wheel, CRMax PULSOUT Left_Servo_Wheel , CLMax CASE = Turn_Left_Sharp PULSOUT Right_Servo_Wheel, CRMin PULSOUT Left_Servo_Wheel , CLMin CASE = Turn_Right_back PULSOUT Right_Servo_Wheel, CRHMid PULSOUT Left_Servo_Wheel , CLMin CASE = Turn_Left_back PULSOUT Right_Servo_Wheel, CRMax PULSOUT Left_Servo_Wheel , CLLMid CASE = Ir_styrd GOTO Ir CASE ELSE GOSUB still ENDSELECT GOTO start '----- IR-controlled ----- Ir: FREQOUT IrLedLeft, 1, 38500 irDetectLeft = IrInLeft FREQOUT IrLedRight, 1, 38500 irDetectRight = IrInRight IF (irDetectLeft = 0) AND (irDetectRight = 0) THEN 'Both IR, back up, turn left GOSUB Back_Up GOSUB Turn_left GOSUB Turn_left ELSEIF (irDetectLeft = 0) THEN 'Left IR, right turn GOSUB back_up GOSUB turn_right ELSEIF (irDetectRight = 0) THEN 'Right IR, left turn GOSUB back_up GOSUB turn_left ELSE GOSUB Forward_pulse 'No IR, forward ENDIF GOTO Start '----- Subroutine ----- Forward_Pulse: FOR pulsecount = 0 TO 10 PULSOUT 13, 850 PULSOUT 12, 650 PAUSE 20 NEXT RETURN Turn_Left: FOR pulsecount = 0 TO 20 PULSOUT 13, 650 PULSOUT 12, 650 PAUSE 20 NEXT RETURN Turn_Right: FOR pulseCount = 0 TO 20 PULSOUT 13, 850 PULSOUT 12, 850 PAUSE 20 NEXT RETURN Back_Up: FOR pulseCount = 0 TO 40 PULSOUT 13, 650 PULSOUT 12, 850 PAUSE 20 NEXT RETURN still: PULSOUT 13, 750 PULSOUT 12, 750 RETURNFirst of all. Yes I have copyed alot from a program called "Tethered BOEBOT Control using SERIN from Debug", so if you who made that program reads this. Thank you very much, your program helped my alot.
Back to my program. When the program starts it tries to receive the value "5", if it doesn't receive it the program sleeps for about 2.3 seconds and then it starts over. When the program receive the value "5" the "IniLED" turns high and then you know that the transmitter and the receiver is synchronized and you can push the button1 on the transmitter board. Then the program jumps to different subroutins depending on what number you enter in the debug-window.
As I said, there is alot of work left before the program is finished so please, be not disappointed if your robot not always obey the commands that you give it. Maybe it is the transmitter/receiver that isn't the best but for that money I spent I think it works better than I hoped.
Please enjoy!!!
\Jonas
http://www.geocities.com/jcee324/
Post Edited (Jonas) : 12/22/2005 9:20:35 PM GMT
Can you supply us with the schematics...
I've been looking for a cheap wireless project for ages...
Thankfully, Provas, GReece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
\Jonas
http://www.geocities.com/jcee324
I have also·control my BoE-bot with·a debug window of the basic stamp editor. It was working very good. But in the futere I think its better to control my BoE-bot with a Visual Basic program.
The program I use:
···· Transmitter:
' Martin van Leussen - Control BoE-Bot Wireless - Transmitter.bs2 ' Keys: forward ' [noparse][[/noparse]w] ' left [noparse][[/noparse]a][noparse][[/noparse]s][noparse][[/noparse]d] right ' backward ' {$STAMP BS2} ' {$PBASIC 2.5} Command VAR Byte counter VAR Word OUTPUT 0 DEBUG "Welkom" DO SERIN 16, 16468, [noparse][[/noparse]Command] IF Command= 0 THEN Command=1 ENDIF SEROUT 0, 17197, [noparse][[/noparse]Command] LOOPReceiver:
' Martin van Leussen - Control BoE-Bot Wireless - Receiver.bs2 ' Keys: forward ' [noparse][[/noparse]w] ' left [noparse][[/noparse]a][noparse][[/noparse]s][noparse][[/noparse]d] right ' backward ' {$STAMP BS2} ' {$PBASIC 2.5} command VAR Byte counter VAR Word previos VAR Word INPUT 1 previos= 1 DO SERIN 1, 17197, [noparse][[/noparse]command] IF command= 0 THEN command= previos ENDIF IF command= 100 THEN PULSOUT 12, 800 PULSOUT 13, 800 PAUSE 20 previos= 100 ELSEIF command= 97 THEN PULSOUT 12, 700 PULSOUT 13, 700 PAUSE 20 previos= 97 ELSEIF command= 119 THEN PULSOUT 12, 650 PULSOUT 13, 850 PAUSE 20 previos= 119 ELSEIF command= 115 THEN PULSOUT 12, 850 PULSOUT 13, 650 PAUSE 20 previos= 115 ENDIF LOOPI like some reply for use Visual Basic to control my BoE-bot.
Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Martin_vL) : 11/30/2005 6:59:48 PM GMT
Here is my schematics for the robot and the transmitter. I assume that you will solve power supply schematic by yourself.
\Jonas
http://www.geocities.com/jcee324
TX433 and RX433
Where did you get them from...
I have a friend that can order me things from Germany, if this is right...
Provas, GReece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
http://www.velleman.be/Downloads/7/TX433N_datasheet.pdf
http://www.velleman.be/Downloads/7/RX433_datasheet.pdf
http://www.velleman.be
US distributors sell them for $12 for the pair.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 12/6/2005 10:20:13 PM GMT
www.qkits.com
www.sparkfun.com
www.rentron.com
I believe that they are made by Laipac Technology in Canada... They do have european operations in Spain. Check them out at http://www.laipac.com/easy_eng.htm
509-RCR-433-RP $4.99
509-RCT-433-AS $3.99
Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have also thought about controlling the robot with a visual basic program. And maybe also have the robot send back information to the computer, such as distance to objects or something like that. But sadly my visual basic skills are very limited.
\Jonas
http://www.geocities.com/jcee324
http://www.crownhill.co.uk/product.php?prod=434
if you are looking for TWS-434 and RWS-434 in Greece
Michael (aridaios)
Our Greek Forum about robotics!!!
Thanks, Provas!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Yes, I live in Greece
I will visit the site
The only programing i have done so far, is testing various values for the servo's on my (sumo bot), so u can say i'm not very into programing yet :P.
U can say i'm kinda lazy, and have all my life tried to make things "easier", so wireless programing for the school bot seems like a good first choise. (not a good choise if u think about me learning of it)
The good thing is:
first. that i can do this by puzzling (and learning) together everything by the schematics and the program kodes.
second. u found a cheap way to buy a transmitter and a reciever, so my school can buy them [noparse]:)[/noparse]
third. a LOT of time saved, without the need of plugging the serial cable inn and out 10 times pr. program line :P
it's just a tiny thing i wanted to ask about-
Program kode for the Homework board:
I see the buzzer is still programmed in there, and just wanted to know which lines i have to delete (to remove the useless lines) without breaking the program anyway, i know it doesn't matter if it's there, but i learn from it, and it looks more tidy [noparse]:)[/noparse]
Anyway, thank you very much for an exelent post [noparse]:D[/noparse]
MVH
Kim (Norway)