Let's Make Robots!

Remote Control Using XBEE and PICAXE 40X2


Here are my main obstacles:

  • What is the circuit used for a programming interface for a PICAXE 40X2 that uses the audio jack? *accomplished
  • What is the PIN connections that I make from the XBEE to the PICAXE 40X2?
  • How do I create a program that computer controls the picaxe (Commands used for communication)
  • Is it possible to use keys on the keyboard (ie an arrow key) to make the picaxe run a command? *accomplished
  • What is the pin connection I would make for the PICAXE 40X2 to the APC220 (433MHZ module)

Here is the XBEE kit I was considering

http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2171225_-1

Here is the 433MHZ module I will be using:

http://dx.com/p/arduino-apc220-wireless-rf-modules-w-antennas-usb-converter-143011?utm_source=GoogleShoppingUS&utm_medium=CPC&utm_content=143011&utm_campaign=Arduino%20&gclid=CL7UvsON07YCFYMWMgodbkMAJw


Alrighty, I have decided to go with 434 MHZ and 315 MHZ recievers and transmitter so 2 way transmissions are possible. I also have decided to scrap the whole entire computer and take use of the KBIN command, therefore I will only be hooking up keyboard(s) to a picaxe unit (multicore PICAXE processor haha) which will transmit the data gathered from the keyboard(s) and other inputs to another picaxe unit.

*note: Keyboard(s) will be hooked up to each chip in the transmitter picaxe unit. Each keyboard will have its own variable so u can theoretially have an infinite number of inputs. however, I am planning a more of a Pilot, Copilot scenario.

This is the RF equipment I plan on using:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Did you make it?? Even I am tring to do the same thing. I want to make a remote controlled car using picaxe.

http://winavr.scienceprog.com/example-avr-projects/running-tx433-and-rx433-rf-modules-with-avr-microcontrollers.html

This is just an example of how to wire the RF equipment to a microcontroller

So, at the end of the day, we are talking about getting two (or more) picaxe chips to talk to each other. One of these picaxe chips will have an input device of some kind and, after accepting data from this device, will transmit that data to the other picaxe chips. 

Awesome.

Now, we have to ask what the end-goal is. I can assume that you are going to want to do some kind of remote control drive. If so, it would simply make more sense to use a joystick on the picaxe instead of hitting AWSD or the arrow keys on the keyboard. On the other hand, the keyboard gives you a ton of "input buttons", so if you are controlling a lot of momentary (or "toggled") things, the keyboard might be just the ticket. --Just curious what you are doing with this, there might be simpler ways of doing things.

The idea that I have is creating a robot that is used for simple mining (like in a sandbox). It would have two arms, one with a gripper and one with an auger. I was actuallying thinking of using joysticks for the two arms, but i thought of using a pc mouses or is it mice? but I think that a joystick would be easier. also I was thinking about using potentiometer knobs (for gripper, motor speeds) as well. However, when it all comes down, like you said, a keyboard has more than enough inputs and everything being accomplished with the extra "hardware" can be simply accomplished by using a keyboard. So I will stick with the keyboard idea for now, but the nice thing is I will design it so it will be easy to add extra hardware (ex potentiometers, pushbuttons, etc.)

Perhaps I can use a picaxe 08M2 to interpret a keyboard that is directly connected to the picaxe 08M2 using the KBIN command. The PICAXE 08M2 can then relay the information wirelesly using the SERTXD command to communicate which button was pressed on the keyboard with the PICAXE 40X2 which would be using the SERRXD command to interpret the data from the PICAXE 08M2.

What would be the goal or advantage to doing this KBIN thing?

Also, why are you stuck on this KBIN thing? --It really will not help you with learning serial comms.

I would be able to get rid of the computer and it would be replaced with another picaxe. this picaxe would be connected to a keyboard and would communicate via its SERIN and SEROUT ports with a different picaxe that reacts to the data it recieves from the picaxe that is connected to the keyboard. I was also thinking of linking together multiple picaxes together via the SERIN SEROUT ports so the processing and reaction speed would be faster.

 

Ok, we need to simplify a bit here. The first place to start is with the Picaxe Terminal (NOT the debug window). This terminal (and really all terminals) let you send data to and from your computer. Anything sent from the picaxe shows up as text in the window, and you have a small box where you can enter characters to be sent. This terminal uses the sertxd and serrxd commands and the "headphone jack" connection. Here is what I would do:

  • Start by sending data from the picaxe to the computer --this is easier and will let you know your connection is correct and at the correct baud.
  • Write a program that sends out a simple count 1..2..3..4.. via the sertxd command --Open the terminal window and confirm that you are seeeing your count. Use a 1 second pause so you can actually see the numbers as they are being sent
  • Once you have confirmed this works, you can move on to doing this the other way
  • Start with one character only. Generally, folks send an "A".
  • Write a program that simply waits for an "A" to arrive (via serrxd) and blink an LED when it does
  • Move on to sending 2 (or more) bytes
  • Learn about using qualifiers
  • Move on to the hser commands and learn how to buffer in the background
  • finally learn Processing so you can write a desktop app to control your robot.

Pin connectioins

  • APC220 (RX) connects to PICAXE (SERIN and hSERIN)
  • APC220 (TX) connects to PICAXE (SEROUT and hSEROUT)

Major question completed!

  • Serial
  • serin
  • serout
  • hserin
  • hserout
  • hsersetup