Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: BANE on June 05, 2008, 04:24:27 AM

Title: using lego mindstorm tower as serial cable?
Post by: BANE on June 05, 2008, 04:24:27 AM
Hello, i just had an idea about being able to load/debug programs into a conventional
micocontroller using a lego minstorm IR tower   (http://www.active-robots.com/products/lego/lego-spares/legotower-750.jpg) 
I got the idea when i was making a bi-ped and it was having trouble walking with this huge serial
cable coming out of head.  The communication between the tower and robot is just (i think) a
simple IR emitting and receving circuit.  However, i don't what the circuit to be in the robot
 program but out side and just acting as a wireless serial cable.  My question is, can i use the
tower and reciever/emitter as a wireless serial cable?  

(http://msdn.microsoft.com/fr-fr/library/Bb469880.lego_intro_1(fr-fr,MSDN.10).png)

Any suggestions?

Bane

 
Title: Re: using lego mindstorm tower as serial cable?
Post by: Rebelgium on June 05, 2008, 05:46:36 AM
In theory yes it should be the same.
I think it should work, but as admin likes to say: "don't quote me on that"

Maybe you're easier off if you'd use an RF transmitter and receiver pair, this way you won't need to stay in the line of sight all the time...
Title: Re: using lego mindstorm tower as serial cable?
Post by: BANE on June 05, 2008, 01:22:03 PM
Quote
this way you won't need to stay in the line of sight all the time...
I like the way you think ;D
http://www.computronics.com.au/module/txrxpair/ (http://www.computronics.com.au/module/txrxpair/)

What about this ^.  Do you think that i can connect the receiver to my robot serial port and emiter on laptop serial port?

Bane
Title: Re: using lego mindstorm tower as serial cable?
Post by: Rebelgium on June 05, 2008, 02:34:59 PM
Yes you can.
But first you'll have to calculate the max speed that Transmitter and receiver can handle.
Then convert it to Baud rate, then you know what baud rate (=transmission speed) you need to program in the microcontroller and the PC to communicate with eachother.

Read some tutorials and google to understand completely.

The transmitter and receiver you showed are "low speed" I'm not sure if that's fast enough for a decent serial transmission (9600 ,19200, ... baud)
Title: Re: using lego mindstorm tower as serial cable?
Post by: pomprocker on June 05, 2008, 02:44:28 PM
i've been working on wireless reprogramming using the BlueSMiRF for quite some time now. The only thing is getting that MCU to reset wirelessly so the bootloader will be entered. I got that working using hyperterminal sending 'r' to my robot and then the watchdog timer resets the MCU. still some kinks though.
Title: Re: using lego mindstorm tower as serial cable?
Post by: BANE on June 05, 2008, 03:31:54 PM
I want to try to keep this as simple and cheap as possable :P.   Here is a part of my microcontroller schem. and the pins. (see pic)

I don't know exactly what "sout" "sin" "atn" are but i'm assuming that they are Vcc, RF, Code.  Also, on my microcon. the serial port has pins 6 and 7 connected so it knows when its connected (duh)  So i'm guessing that when i turn on the RF i need to manual connect 6 and 7 on my laptop?

Just out of curiousity, do the RF devices have the same output frequence as a serial port?

Bane
Title: Re: using lego mindstorm tower as serial cable?
Post by: pomprocker on June 05, 2008, 04:18:45 PM
Hah, I just made that programmer for my Basic Stamp 2 (BS2)

Thats what that is as well. It has been suggested to put .1uF caps on there too.

Look on page 234/235 of this book:

http://books.google.com/books?id=oqI5WC8M8qEC&pg=PA240&lpg=PA240&dq=BS2+Programmer&source=web&ots=YF238XwqKe&sig=OGOpcgXAEVTnT3JpTCnJMYAxRrs&hl=en#PPA234,M1 (http://books.google.com/books?id=oqI5WC8M8qEC&pg=PA240&lpg=PA240&dq=BS2+Programmer&source=web&ots=YF238XwqKe&sig=OGOpcgXAEVTnT3JpTCnJMYAxRrs&hl=en#PPA234,M1)


The BS2 requires +/-12vdc to program it, so I'm assuming that anything else hooked up to that would not work.
Title: Re: using lego mindstorm tower as serial cable?
Post by: BANE on June 06, 2008, 03:13:39 AM
Yea, im using the BASIC atom 28 pn from Basic Micron.  But what about "Vcc" "RF" and "Code" on the RF transmitter; any idea how to hook it up?

Bane
Title: Re: using lego mindstorm tower as serial cable?
Post by: pomprocker on June 06, 2008, 10:38:03 AM
wait, are you using RF or IR?
Title: Re: using lego mindstorm tower as serial cable?
Post by: BANE on June 06, 2008, 02:14:05 PM
RF