DIY Remote control Casing

Looks like your board is a little bigger. The UNO could use a few more I/O pins. But now I’ve got a project built around it, and a few more to come.

Alan KM6VV

The Mega versus the UNO.

Yep lots more IO’s (digital 54 16) (Analog 16 6).

Lots more memory (new one 256k old one 128k) vs 32K

In some projects the thing that makes it nice: 4 USARTS vs 1. So on this project, you can have one USART on the USB, one on the XBEE and one on the LCD and never worry about the serial data being corrupted by anything…

Kurt

Forgot to mention: Size, yes the official Mega is bigger, but the Seeeduino version is the same size and has even more IOs…

My code…

if someone is interested to see. I have started to make test with the screen too.
Button_Test.zip (3.21 KB)

Here is a little video.

It’s take by my iPod touch… so the quality is realy poor.

What you see, or not see… lol
When pressing a button it go from Menu Page 1 to Menu Page 2… etc

Ok Menu Test…!

==== EDIT ====
Scrolling menu… in progress

Why not another…

Here is a picture of the cut parts.

The place where i have made them cut took it.

http://farm6.static.flickr.com/5135/5494245614_cfebdf0e0e.jpg
High Res:
farm6.static.flickr.com/5135/5494245614_cfebdf0e0e_b.jpg

Looks Good.

You probably can not wait to get it and try assembling the whole thing!

Kurt

Right… !

Damn the post is not fast… lol
Was shipped last 25.

More menu work.


Watch in HD …

I want to know what do you include in your transmitter software normaly. Realy apreciated to know.
Tanks again everyone…!

btw: Casing is at custom…!

Looking like you are making some great progress! Do you have construction going on in the background?

For the DIY transmitter code - I have tried to keep the code non robot specific. That it is simply has the code to the currently selected robot (XBEE DL) and it simply outputs some standardized formats of data, with some handshaking. It also has a couple of configuration pages. 1 is to allow you to use the keypad to enter the DL (old method) and a second that does a Node Discovery, which returns back ID, plus text… I cache away this data in the EEPROM of the Atom Pro, so then I have simple code that allows me to scroll through the list and choose one, or to try issuing the ND command again to see if any new robots out there…

I also have a Joystick configuration page that has you move all of the joystick and sliders their full extent then gets the current center location and uses this to do mappings from 0-255 with 128 (or was 127) at the center spot…

That is about it.
Kurt

Tanks a lot Kurte,
The sound is my son playing with kitchen things…

I will need to do something like that. In fact the only option is about linking to different source “robot” ? And of course calibrating.

I would like to have 2 mode.

Mode 1:
Output value by XBee
Mode 2:
Output some value as a PPM signal to send via a RC TX-RX module.

Some more menu testing…

I have found someone who did a PPM out on a arduino. He use it to pan&tilt a camera.

But i guess i can use that to send a complete PPM signal to a transmitter like the Spektrum module ?
His anybody who know programming better than me tell me if it make sense…?

Tanks … :wink:

WebPage:
arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1193927390
Here is the code:

[code]/*

int servoPin = 12; // Control pin for trainer interface

			     // A pulse starts with a low signal of fixed width (0.3ms),
			     // followed by a high signal for the remainder of the pulse.
			     // Total pulse width is proportional to servo position (1 to 2ms)

int pulseStart = 300; // pulse start width in microseconds
int pulseMin = 724; // pulse minimum width minus start in microseconds
int pulseMax = 2048; // pulse maximum width in microseconds
int conversionFactor = 5.7; // (pulseMax - pulseMin - pulseStart)/180

			     // A frame is a succession of pulses, in order of channels,
			     // followed by a synchronisation pulse to fill out the frame.
			     // A frame's total length is fixed (20ms)

int frameLength = 20; // The duration in millisecs of a frame

long lastFrame = 0; // The time in millisecs of the last frame
int channelNumber = 2; // Number of channels to send (keep below frameLength/pulseMax)
int servo[2]; // Values to set for the servos in degrees
int channel[2]; // Values to send on channels (duration of pulse minus start, in microseconds)
int i; // Counter in for loop
int j = 0; // Counter for servo updates

void setup() {
pinMode(servoPin, OUTPUT); // Set servo pin as an output pin
Serial.begin(9600); // connect to the serial port
for ( i = 0; i < channelNumber; i = i + 1 ) {servo* = 0;}
for ( i = 0; i < channelNumber; i = i + 1 ) {channel* = pulseMin;}
Serial.println(“Trainer_PPM_Interface ready”);
}

void loop() {

 // Save the time of frame start

lastFrame = millis();

// This for loop generates the pulse train, one per channel

for ( i = 0; i < channelNumber; i = i + 1 ) {
digitalWrite(servoPin, LOW); // Initiate pulse start
delayMicroseconds(pulseStart); // Duration of pulse start
digitalWrite(servoPin, HIGH); // Stop pulse start
delayMicroseconds(channel*); // Finish off pulse
}
digitalWrite(servoPin, LOW); // Initiate synchronisation pulse
delayMicroseconds(pulseStart); // Duration of start of synchronisation pulse
digitalWrite(servoPin, HIGH); // Stop synchronisation pulse start

// We're done generating pulses and using delayMicroseconds()
// Time to do some other processing before the next frame
// How much time depends on how many channels you are running

// Let's change the servo positions
j=j+1;
if (j==4) {j=0;}

if  (j==0) {
for ( i = 0; i < channelNumber; i = i + 1 ) {
  servo* = servo*+1;
  if (servo* >= 360) {servo*=0;}
}
}

// Calculate pulse durations from servo positions

for ( i = 0; i < channelNumber; i = i + 1 ) {
channel* = abs(servo*-180);
channel* = int(channel**conversionFactor)+pulseMin;
}

//if (j==0) {
// Serial.println(channel[0]+pulseStart);
//}

// We’re ready to wait for the next frame
// Some jitter is allowed, so to the closest ms
while (millis() - lastFrame < frameLength) {
delay(1);
}
}

[/code]***********

I will try to take a look later… But there are lots of people who use servos with the Arduino. I had mine doing a brat awhile ago…

Have you looked at the servo library that you can get to from the Arduino IDEs refererence…
Help/Reference
Click on Libraries
Click on Servo

Kurt

In fact Kurte, i don’t want to hook servo to the Arduino direcly.

Since i do RC stuff too. I would like to have the ability to use the transmitter with standard receiver.
Like controling a RC car, plane, boat… etc

So that’s why i would like to have a RC mode and a Robot mode. XBee or PPM based.

I have a 2.4ghz module that clip on my JR transmitter (RC).
If i can get my DIY remote working with that would be great. Will by another… lol

assan.cn/main/product_24Ghz_all_en.html

Understood. The original DIY remote was RC based. It used(s) the Airmod system: lynxmotion.com/p-676-dsm2-ai … r7000.aspx
I believe Xans remote is still this way and Zenta may still have the ability to throw a switch…

The code you mentioned looks reasonably straight foreword for bitbanging it out… However it might be fun to instead use one of the 16 bit timers (1, 3, 4, 5) that support PWM and the like and have the timer actually drive the appropriate IO line, which should give you very accurate pulses…

Kurt

Yes it look a good idea. I will take a look at how it can be done !

I realy apreciate your feedback :slight_smile:

A very quick search:
arduino.cc/en/Tutorial/SecretsOfArduinoPWM
I does explain a lot of things…

I think the first thing to do is buy a logicAnalyzer… ?

Ok just if someone want to see…

I did a little code hack cause i don’t want the soft to do more than once the thing i want when i press a button…
But the downside is now if i let the button pressed, i am stuck there. And even the SerialOut wait… lol


DIY_Remote_Rev5(03-06-2011).zip (5.76 KB)

I have a set of TX-RX from a Trimerson google.

They where use to send data from a set of video google to the base station… don’t know if i can use them… !

Here is a picture:
http://farm6.static.flickr.com/5173/5505729741_2af604b6c2.jpg
High Res:
farm6.static.flickr.com/5173/5505729741_2af604b6c2_b.jpg

added the complete PDF too
retrieve.pdf (883 KB)

HiHi…!

flickr.com/photos/55725351@N08/sets/72157626217039262/