standalone TX

Everything about OpenLRS

standalone TX

Postby gompf » Fri Sep 16, 2011 6:40 pm

Hi!

No rocket science... I just added another control mode to readout 2 analog sticks from a PSP2 gamepad via ADC2-5 to ch0-ch3

change config
Code: Select all
#if (TX_BOARD_TYPE == 0)
    #define PPM_IN A5
//    #define RF_OUT_INDICATOR A4
    #define RF_OUT_INDICATOR 8 //ADC4 needed for poti


add
Code: Select all
unsigned int adc_temp;

to the mains var section
paste in the main function under the #if (CONTROL_TYPE==1) section,

Code: Select all
   #if (CONTROL_TYPE==2) //read ADC inputs A2-A5
               adc_temp = analogRead(A3); 
               adc_temp = adc_temp + 2500;
               if ((adc_temp>1500) && (adc_temp<4500)) // check the signal time and update the channel if it is between 750us-2250us
               {SetServoPos(0,adc_temp);}
               
               adc_temp = analogRead(A4);
               adc_temp = 3500 - adc_temp; //reversed
               if ((adc_temp>1500) && (adc_temp<4500)) // check the signal time and update the channel if it is between 750us-2250us
               {SetServoPos(1,adc_temp);}
               
               adc_temp = analogRead(A5);
               adc_temp = adc_temp + 2500;
               if ((adc_temp>1500) && (adc_temp<4500)) // check the signal time and update the channel if it is between 750us-2250us
               {SetServoPos(2,adc_temp);}
                           
               adc_temp = analogRead(A2); 
               adc_temp = 3500 - adc_temp;  //reversed
               if ((adc_temp>1500) && (adc_temp<4500)) // check the signal time and update the channel if it is between 750us-2250us
               {SetServoPos(3,adc_temp);}                       
              #endif


This is the first qnd approach. I thought about a looped version but with this solution it´s easier to change channel assignments/reverse channels for testing. The signal check can be also dropped as the ADC outputs shoud be consistent between 0 and 1023.
I´ll start to refine code for travel adjustment etc. when all is fitted insight the gamepad, atm the basic function is sufficient for an 1:18 mini inferno.

On the genuine modules from Melih you have access to ADC4/5 only via the futuba pins. I use a basic setup with a pro mini, so I can use ADC2-5. Maybe nice for future versions to change SW to I2C ADCs and also use eg PCF8574 to check all the buttons for setup purpose/funktions/have at running as an I2C addon module to Melihs RX/TX.

Regards,
gompf
gompf
 
Posts: 10
Joined: Tue Sep 13, 2011 9:35 am

Re: standalone TX

Postby CrashingDutchman » Fri Sep 16, 2011 6:49 pm

Hey, this is nice... The real "Open" in OpenLRS is shown here!
CrashingDutchman
 
Posts: 154
Joined: Thu May 12, 2011 5:01 pm

Re: standalone TX

Postby gompf » Sun Sep 18, 2011 1:04 am

If you remove the "vibrators" for the dual shock funktion a minimalistic setup fits quite nice into the controller:
Image

I use a standard pro mini with a rfm22b connected by ribbon cable and power the unit from external 3,3V via vcc pin. I´ll order 3,3v Arduinos from Melih next time.
Image
Image
(yellow cables under the rfm22 connection are for A6/A7 on the tqfp32, nothing to do with openlrs)

I made a qick test with min tx power (0x6d=0x00), TX in the 2nd. floor and had connection in the living room at ground level. Some red blinks while going down the stairs/trough the door frames due to massiv metal parts. Power consumption is 30mA. Seems to be fine for "my son´s" :D rc-car. Only drawback is that the sticks in my "HAMA" brand PSP2 controller have quite a big backlash, so really only useable for not so fast car/boat etc.
gompf
 
Posts: 10
Joined: Tue Sep 13, 2011 9:35 am

Re: standalone TX

Postby msev » Mon Sep 19, 2011 9:04 am

Where did you get that rfm22b? Thanks!
msev
 
Posts: 74
Joined: Sat May 14, 2011 8:05 pm

Re: standalone TX

Postby gompf » Mon Sep 19, 2011 6:33 pm

I bought it from oktamex germany:
http://www.octamex.de/shop/?page=shop/flypage&product_id=1588&category_id=44963f0fdda6ad2bdf98e07a9177fc9b&/RFM22B_S1_433MHz_FSK_Funkmodul,_SMD_RF_Transceiver_kaufen,.html
It´s the B Version, but S1. Means new revision of si4432 but big crystal, funktion/performance identical to RFM22B S2 but may be more shock sensitiv due to bigger crystal (reference Ulrich Radig).
On the other hand bigger crystal makes it easier to measure real osc frequ for channel fine tuning...
gompf
 
Posts: 10
Joined: Tue Sep 13, 2011 9:35 am

Re: standalone TX

Postby Flytron » Tue Sep 20, 2011 4:35 pm

Hahahaa, very nice project. It is really OPEN version of OpenLRS :D
Please share the flight results too.

Cheers
Melih
Melih from Flytron
Flytron
Site Admin
 
Posts: 1076
Joined: Sat May 07, 2011 2:51 pm

Re: standalone TX

Postby gompf » Wed Sep 21, 2011 7:23 pm

I would never fly with such a setup :shock:
I build this QND one because a 27MHz pistol grip style rc car transmitter as delivered with the 1/18 cars is to big/heavy for my sons hands (4y) and I wanted to check the ppm jitter issue.
ATM I´m waiting for the RX V2 as my original plan was to build an all in one unit for MWC, but you were faster :D. I´ll order an OSD and some other stuff, too.
I just posted this "rubish one" to give some input to the community/newly interested people and to thank you for making it open. Not because it maybe possible to build it cheaper by the open design, I just like it to know how things work.
You did/do a great job on your projects and I like the 2-way option you offer: Buy hardware or build hardware, use software or mod software. You offer an option for not so skilled people to learn from you and/or use a "finished product".
If you ever need material charakeristics down to nm/A scale or like to see an 8" Wafer with some test chips in your shelf feel free to contact me.

Regards,
gompf
gompf
 
Posts: 10
Joined: Tue Sep 13, 2011 9:35 am

Re: standalone TX

Postby skrankesvin » Tue Jan 17, 2012 9:31 pm

Great guide :)
I have a transmitter on backorder at hobbyking, so while waiting i have built a tx from a ps3 controller.
It is supposed to control my hexacopter when it is finished.
I have built it module based, so i can take it apart if i need to replace parts(i plan on doing some experiments with the booster circuit when i have the time, and i dont expect everything to go as i plan...). Plus i only have a 5v arduino programmer, so i need to be able to take the arduino out when programming it.....
The tx have been testet with the original rx, and it works as it should.
Next step is to build a rx so that i can upload the multiwii software.
I have taken a few pictures, but they are too large to upload to the forum, but i fill shrink them or find an other place to upload them within a couple of days
Great work with the openlrs, this really rocks....
skrankesvin
 
Posts: 6
Joined: Sat Nov 19, 2011 10:17 pm

Re: standalone TX

Postby skrankesvin » Wed Jan 18, 2012 4:38 pm

Here are some pictures
Image
Image
Image
Image
Image
Image
Image
I am currently working on the batteries for the tx. The plan is to use two 18650 lithiums.
skrankesvin
 
Posts: 6
Joined: Sat Nov 19, 2011 10:17 pm

Re: standalone TX

Postby Flytron » Thu Jan 19, 2012 10:38 am

Looking like a mad scientist project :D
Have you got a control or flight video? I will subscribe your videos.
Melih from Flytron
Flytron
Site Admin
 
Posts: 1076
Joined: Sat May 07, 2011 2:51 pm

Next

Return to OpenLRS Project

Who is online

Users browsing this forum: No registered users and 1 guest

cron