Tell A Friend

  • Friend's email:
 

Servo Control with Radio Remote
This project is a follow on from my Servo Control project. If you haven't seen the previous project, now is a good time to do so. The previous project demonstrated an application of servo control to steering a trike. I wanted to expand the control into a full blown radio control (for those lucky enough to own two NXTs) and also to improve the trike. The main trike improvements were the addition of a differential (pic 2) and a rebuild of the steering into a symmetrical arrangement (pic 3). But the ideas kept flowing to include fake lights and exhaust pipes (pic 4). Of course a trike without a rider is a bit weird so Oscar was created (pic 5).

Posted by:

 norama

Created:

 28 January 2013

Rate:

 

Tags:(?):

 servo, servocontrol, bluetooth, radio, remote, trike

Building the Trike

You may use the trike from the previous project but if you are really keen, the lxf files will help you build the new trike. The parts came mostly from two NXT 1 sets plus a few from RCX and Technic sets. You may need to substitute pieces with what you have available. As in the previous project, build the front of the trike first. Then build the two halves of the back section. Attach the front of the trike to the back left hand half using the detail photos for a guide (pic 1). Then join the back right half (pic 2) and finally add the back wheels and exhaust pipes. Please note that beside each 12 tooth bevel gear is a 16 tooth free wheeling gear. The 16t gears represent what should be a differential (pic 3). Also the missing piece from the exhaust pipe is a number 5 angle element. The main drive motor connects to port A and the steering motor to port B.

The Remote Control Unit

The lxf file will show you how to build the remote control (pics 1, 5). Steering is controlled by the motor rotation sensor. Use the largest wheel you have to make it easier to turn. The trike speed is controlled by the lever on the left (pic 2). This arrangement is a lot easier to use than trying to operate a second motor. Pushing the lever forward accelerates the trike through 10 steps to maximum power in 1.5 seconds. A quick bump of the lever will increment the speed 1 step at a time. Pulling the lever backwards will decrease the speed and eventually stop and reverse the trike. Pressing the orange Enter button will bring the trike to an emergency stop.

The Programs

The trike program is very similar to the earlier programs. The proportional control section controls the steering. The later section controls the trike's speed and direction. Instead of data coming directly from a device (such as a touch sensor or rotation sensor) it now comes as values through the Bluetooth mail box system. If you study the remote control program you will see that using Bluetooth messaging is quite easy. The main loop scans each input device. Any value recorded is conditioned to fall within specified limits. Note that messages are only sent if the current value of a parameter is different to its preceding value. This saves on battery power and messaging time delays. *** IMPORTANT NOTES ***: (1) Change the name of the slave brick in the connection block to match the name of your NXT (pic 1). (2) If you are using the trike from the previous project, change the limit to 60.

Running the Programs

Here are the steps to ensure a successful run of the programs. (1) Set the steering on the trike to straight ahead (pic 1). (2) Set the steering wheel on the remote to point straight ahead (pic 2). (3) Turn on both NXTs. (4) Start the slave program (the program on the trike NXT). (5) Start the master program (the program on the remote control). (6) When the Bluetooth connection has been made, the master NXT says Start and the slave NXT plays three notes. You are now ready to drive away.

Some Bluetooth Advice

In the past few months, I have seen a number of projects that have attempted to use NXT to NXT Bluetooth communications but without success. Here are some important notes to keep you out of trouble. (1) If you are going to connect your bricks with the Bluetooth Connection block in NXT-G, you must have made the connection manually some time in the past. (2) A BT Connection block must ONLY be placed in the master program. You will need one BT Connection block for each slave to which you are connecting. Do NOT place BT Connection blocks in the slave programs. (3) A connection needs only to be made ONCE. Therefore the BT Connection block should be placed at the very beginning of a program and definitely NOT in a loop (pic 1). (4) A Receive Message block should always be followed by a switch (pics 2, 3). Connect a data wire from the Message Received plug to the logic input of the switch. Any processing of the message value must take place inside the switch. This ensures that you only process the value if there is in fact a value to process. To do otherwise may result in unexpected behaviour. (5) Make sure that the slave NXT(s) are turned on and running before starting the master program.

Conclusion

Do not feel that you must build the trike to benefit from these programs. If you have a steerable vehicle of your own creation then you can drop these programs into it with very little modification. In fact the whole point of this project is to provide you with a pair of programs that you can use on a wide variety of vehicles. If the vehicle direction is reversed then swap the leads in ports 1 and 2 of the remote NXT (pic 1). If the steering sense is reversed then swap the values in the sense correction multiplier in the remote program (pic 2). But it doesn't stop there. The proportional control parts of the program may be adapted to other uses as well. Control of a robot arm comes to mind. Use your imagination and Play Well.

Comments

10 most recent comments out of 14  [VIEW ALL]
  • gusieburger

  • That is great. I looked at your previous project, and I couldnt quite understand how it works. Could you please give me some guiadance on that?

  • Posted 112 days and 18 hours ago


  • gusieburger

  • On my comment I meant the program. It woud be great if you could give me some guidance.

  • Posted 112 days and 18 hours ago


  • norama

  • kritonas: I have 3 NXTs - two NXT 1 and one NXT 2.

  • Posted 111 days and 22 hours ago


  • norama

  • gusieburger: I am afraid your question is too general to be able to give a specific answer and there is not enought space to do so here. Carefully read the Program step in the project and the comments in the program. These tell you WHAT is happening. To understand HOW the program does it, you need to read the program carefully step by step and check all of the switch branches.

  • Posted 111 days and 22 hours ago


  • legolancer4

  • sorry I did not comment, it's neat thou!

  • Posted 108 days and 23 hours ago


  • gusieburger

  • ok. I will have a look and be more specific if i cant understand anything in particular.

  • Posted 104 days and 19 hours ago



  • Mindstormer8372

  • It's just awesome. Please can you post the building instructions

  • Posted 54 days and 14 hours ago


  • Garrett8365

  • THATS AWESOME 5 STARS

  • Posted 34 days and 1 hour ago


  • RoBoTs9999

  • This won't work on my NXTs! I've tried like a million programs to try and make an RC vehicle. It's not working!

  • Posted 1 day and 14 hours ago


Add A Comment


Please log in or register to add a comment