thUndeadMod v3.4 - openLRS S**T just got real :)

Started by thundead, February 25, 2012, 02:16:24 AM

Previous topic - Next topic

Any Bugs So Far ?

Nope, thing is rock solid!
This hopping algorithm is rubbish!
I want More options in the config app!
I'm still using the stock FW
RSSI Is Awesome !
RSSI is rubbish!
Range is amazing!
Range is ok I guess
Range is crap

Shikra

Cheers Nigel.

The one I'm using is openlrsng. Seems to be most up to date. Seems to work OK too, but I havent tested in the air - probably right to start a new one. Perhaps I'll do that one have a bit more experience with it.
I was thinking - maybe kha could add a "helper macro" as he calls for an easy UK setup. Real simple to do.

Here is a snapshot - I picked ch6 and it looks about right.

495.1 + 6*50 = 495.4
bandwidth reduced to 50khz. also looks about right

I have no idea what the norm would be for bandwidth in hopping setups. I vaguely recall ScherrerUHF is wide and dragonuhf is narrow. Also what implications are on range! I'll ask Thomas...
Still flying up my own arse ....
And giving Bignose one up his..
Moister than an Oyster...........

Shikra

Asked KHA on his RCG thread and looks like next release will have some good stuff for us in it.

Prob for now best to stick with the 60k channel and bandwidth on CH1-6 whilst see impact of narrower band on the range. May have to accept a lower resolution or something if go down to 10k

Intersting stuff though. Nice to see it moving onwards.

Still flying up my own arse ....
And giving Bignose one up his..
Moister than an Oyster...........

Shikra

as a ref...
EZUHF uses 20k bw, 50k spacing and 40 channels on 433
Scherrer uses 50k or 100k spacing. 16 or 32 channels. I think bandwidth = spacing as he says its quite wideband, but can't see that verified...
Still flying up my own arse ....
And giving Bignose one up his..
Moister than an Oyster...........

Jumpy07

Quote from: Shikra on April 05, 2013, 12:59:01 AM
Right guys, I've had a look at this from the code perspective -

#0 you MUST always clear EEPROM for any changes to frequency etc. otherwise you will not see correct results ;) Having read the code, previous weird scanner results now make sense!
#1 set the correct default carrier and channels
#2 the default channel spacing is 60khz.. (explains jumpy07s slightly off scan)
#3 the deviation is 30khz = bandwidth of 60khz


So for us in the UK to be legal, use recommended aircraft band and play "nice" with other users as Nigel says....., this would be my recommendation.


in openlrsng.ino, set the following

//######### TRANSMISSION VARIABLES ##########
#define DEFAULT_CARRIER_FREQUENCY 459100000  // Hz  startup frequency
or
#define DEFAULT_CARRIER_FREQUENCY 459125000  // Hz  startup frequency


//###### HOPPING CHANNELS #######
// put only single channel to the list to disable hopping
#define DEFAULT_HOPLIST 1, 2, 3, 4, 5, 6, 7


#2 in common.h, change:
   spiWriteRegister(0x7a, 0x06);   // 60kHz channel spacing
to
   spiWriteRegister(0x7a, 0x05);   // 50kHz channel spacing


#3 in binding.h, change:
   { 4800,  50000, 0x00, 0x1a, 0x40, 0x0a, 0xa1, 0x20, 0x4e, 0xa5, 0x00, 0x1b, 0x1e, 0x27, 0x52, 0x2c, 0x23, 0x30 },
   { 9600,  25000, 0x00, 0x05, 0x40, 0x0a, 0xa1, 0x20, 0x4e, 0xa5, 0x00, 0x20, 0x24, 0x4e, 0xa5, 0x2c, 0x23, 0x30 },
   { 19200, 25000, 0x01, 0x06, 0x40, 0x0a, 0xd0, 0x00, 0x9d, 0x49, 0x00, 0x7b, 0x28, 0x9d, 0x49, 0x2c, 0x23, 0x30 }
to
   { 4800,  50000, 0x00, 0x1a, 0x40, 0x0a, 0xa1, 0x20, 0x4e, 0xa5, 0x00, 0x1b, 0x1e, 0x27, 0x52, 0x2c, 0x23, 0x14 },
   { 9600,  25000, 0x00, 0x05, 0x40, 0x0a, 0xa1, 0x20, 0x4e, 0xa5, 0x00, 0x20, 0x24, 0x4e, 0xa5, 0x2c, 0x23, 0x14 },
   { 19200, 25000, 0x01, 0x06, 0x40, 0x0a, 0xd0, 0x00, 0x9d, 0x49, 0x00, 0x7b, 0x28, 0x9d, 0x49, 0x2c, 0x23, 0x14 }


Note - dont bother trying to use the scanner to verify hopping through all channels. Its not accurate enough.
Try using 2 of the channels at a time in the default list and a 1500 sample. It will show up well then.

Cheers for this..    so was not too far off other than the channel spacing and binding

Wonder if we could get KHA to write the code so it is easier to configure for UK legal.. would stop others maybe just running the stuff illegally unaware..

Many Thanks

Craig
"All that is necessary for the triumph of evil is that good men do nothing"

Shikra

Yep was very close.
To keep completely in the right ranges, just use ch1-6
I'm not sure if it really matters, but if can meet recommended practice / work with others we should try.

Would be easy enough to add in a single #UKLEGAL to do it all easy enough.
Lets see what KHA does for V2 - sound like PC app coming to configure etc.

Lol - I only want to get about 150 meters... on my copter. But with 2.4 vid when I want!
Still flying up my own arse ....
And giving Bignose one up his..
Moister than an Oyster...........

Doofer

(Sorry, I know we're on frequencies now, but this is a slightly diversified thread)

One step forward... but still no luck.
Delay in replying, as the original modules now seem dead. I probably inadvertently fired them at some point.

So, delivery of new Tx & Rx (OrangeRX OpenLRS modules) today. Progammed using a 3.3v serial board (connect board to module, then plug into PC). I now seem to have no Upload errors! Progress.

BUT, I still have no connection  :(

Switch on Tx, board beeps, OK LED lights. Power to Rx, test servo on Ch 1 centres, then goes to extreme throw. And sits there, whatever I do with Ch 1 on the Tx. (Tx mix tested on 35MHz - when I wiggle Ch 1 stick, servo, initially centred, wiggles too). This suggests to me a code problem.

- I am using thUndead v.4, default settings, generating Tx & Rx code - only changing the Tx and Rx buttons while doing so, no other settings altered.
- I get the same result (and stuck output on receiver channels) whether I use Arduino 0022, 0023 or 1.0

This is really quite frustrating!

My request remains - anyone out there who isn't having these problems willing to take delivery of my modules and programmer, and see if they get the same results?




Doofer

(Alternatively, if someone could just send me the Arduino output of thUndead v4 that they have uploaded to their OrangeRx modules  - Rx & Tx versions, set for 459MHz - that worked for them, I can also use that to see if I'm setting something wrong. And if anyone is using the 'son of thUndead', ditto - I'm really not fussy, I just want to get these wretched things to work on 459MHz...)

Jumpy07

Quote from: Doofer on April 05, 2013, 05:56:23 PM
(Alternatively, if someone could just send me the Arduino output of thUndead v4 that they have uploaded to their OrangeRx modules  - Rx & Tx versions, set for 459MHz - that worked for them, I can also use that to see if I'm setting something wrong. And if anyone is using the 'son of thUndead', ditto - I'm really not fussy, I just want to get these wretched things to work on 459MHz...)

Are you using PPM on your TX ?..  also what TX is it ?

Are you using traditional RX channels or PPM SUM ?

Would recommend KHA's code rather than theundead as its more up to date..  https://github.com/kh4/openLRSng/archive/master.zip

Details here of how to flash and code changes http://www.multi-rotor.co.uk/index.php?topic=1226.msg13453#msg13453

If you really stuck can flash them and check them for you..  pm me
"All that is necessary for the triumph of evil is that good men do nothing"

Doofer

Thanks Jumpy07. I'm reasonably confident about the RC Tx side of things, if not simply because the Orange modules have all worked fine 'out of the box' i.e. using the HK stock firmware on 433MHz. It's just when I try the move to 459MHz that it all stops working.

I'm initially just using the conventional 8 separate PPM channels (although I will be wanting to use a PPM train output, to feed a Dragon OSD, at some point).

I've just tried KHA's code, with the tweaks recommended in that multi-rotor thread, using Arduino 1.0. Yup, still no link  :(

That's a very kind offer - if no-one else on this forum makes any suggestions, I'll PM you.

Jumpy07

Try this..

Power up RX on airframe.. (make sure no jumper pins)

Make sure TX is turned off, hold bind button down.. switch on TX.. continue to hold bind button for 7 + secs. (buzzer beeps continuously). .. ...let go button...  then   turn off TX and turn back on again and check link

if you don't do this.. any changes to settings will not be loaded..
"All that is necessary for the triumph of evil is that good men do nothing"

Doofer

Matching place-mats, microwave oven and cuddly toy to Jumpy07 !!!
Houston, on the bench at least, we have a connection!  :D  ;D  :D

(I hardly dare ask, but where is that documented? This is where I find there is a simple manual on how this works... believe me, I've googled...)

Yes, the servo now moves as I wiggle the stick on 459! Phew.

I may be pushing it, but can you also tell me how to get a PPM pulse-train from the receiver?

Jumpy07

Glad you got it going.. its actually in the readme..  but easy to miss..

To enable PPM SUM (combined) mode connect a jumper between CH7-CH8 on the RX. PPM SUM will be available on CH5

PWM channels 1-6 are available at CH1-CH4,CH6,CH7(which is jumpered to CH8).. this is handy as you can use PPM SUM for Flight Controller.. and still plug traditional servos or servos switches into the RX.

Remember first pin is RSSI.. so Ch 1 starts from the second pin..
"All that is necessary for the triumph of evil is that good men do nothing"

Doofer

Great stuff!
Where is this readme? I've been looking for such a thing for these modules since Christmas...

Jumpy07

https://github.com/kh4/openLRSng/blob/master/README.md

QuoteopenLRSng

my fork of openLRS code (based on thUndeadMod of openLRS)

TRANSMITTER HW:

Flytron openLRS M2/M3 TX unit -- set TX_BOARD_TYPE 2


OrangeRX UHF TX unit -- set TX_BOARD_TYPE 2


Flytron openLRS M2 RX as TX -- set TX_BOARD_TYPE 3
◦connect PPM input to 5th slot (fifth from left )
◦button between ground and ch4 (fourth frem left
◦buzzer at ch3 (active high)


OrangeRX UHF RX as TX -- set TX_BOARD_TYPE 3
◦connect PPM input to 'ch4' slot
◦button between ground and ch3
◦buzzer at ch2 (active high)


openLRSngTX -- set TX_BOARD_TYPE 4


RECEIVER HW:
•Flytron openLRS RX

OrangeRX UHF RX

RSSI output at 'first' connector (marked as RSSI on OrangeRX) 32kHz PWM signal. To make this analog you can use a simple RC filter (R=10kOhm C=100nF).

CH1-CH8 are parallel PWM outputs for channel1-8 (50Hz)

To enable PPM (combined) mode connect a jumper between CH7-CH8. PPM will be available at CH5. PWM channels 1-6 are available at CH1-CH4,CH6,CH7(which is jumppered to CH8) NOTE: you can make the connection in the AVRISP header (MISO-MOSI) to have servo at CH7 (=channel6) NOTE: it is also possible to force the PPM mode in the .ino and thus get PWM output for channels 1-7 (CH1-CH4,Ch6-CH8).


SOFTWARE CONFIGURATION:

Modify configurations in openLRSng.ino as needed, mostly you are intrested in:

DEFAULT_CARRIER_FREQUENCY
◦sets base frequency


DEFAULT_RF_POWER
◦limits maximum power


DEFAULT_HOPLIST/default_rf_magic
◦these two parameters bind the tx/rx, note that you can generate random values by using the "randomize channels and magic" feature on TX.


Note: for settings to take effect the TX must be reinitialised by either randomizing or by resetting to 'factory settings'. The RX will need to be paired again.

UPLOADING:

Use a 3v3 FTDI (or other USB to TTL serial adapter) and Arduino >= 1.0.

o set board to "Arduino Pro or Pro Mini (5V, 16MHz) w/ atmega328" (yes it runs really on 3v3 but arduino does not need to know that)

o define COMPILE_TX and upload to TX module

o comment out COMPILE_TX and upload to RX

USERS GUIDE

TX:
•Enter binding mode ◦power up while keeping button down and release button after ~1 second. Buzzer should emit short beep ~5 times/s in sync with led.
◦To exit bindmode powercycle TX.

•Reset settings and randomize channels and 'magic' ◦power up while keeping button down for ~3 seconds (buzzer starts to emit beeps) and release button
◦binding mode is entered automatically

•Reset settings to .ino values ◦power up the TX and keep button down for >~7 seconds (buzzer beeps continously).
◦binding mode is entered automatically

•Setting failsafe ◦Press and hold button for ~1s during normal operation until red LED lights and buzzer beeps, release button.

•LEDs ◦Green(or blue) LED is lit when module is transmitting
◦Red LED indicates setting of failsafe, or problem with radio module.


RX:
•Binding ◦RX always binds at boot (and times out after 0.5s) so it is enough to put TX to bind mode and power up RX. On successful bind blue led lights up (both LEDs remain on until TX is put on normal mode)
◦RX will also enter bind mode forcibly (without timeout) if EEPROM data is incorrect or a jumpper is placed between CH1 and CH2

•Failsafe: ◦Failsafe activates after ~2s of no input data

•LEDs ◦Blue LED lights when packet is received (losing a single packet shows as no pulse on LED)
◦Red LED indicates trouble, it blinks when two consequent packets are lost, and lights up when more than 2 packets are lost

•Beacon (if enabled) automatically starts after 'deadtime' with no data from TX, the beacon will send three tone 'FM' modulated signal hearable on PMR channel 1. The signal starts with 500Hz @ 100mW and continues with 250Hz @ 15mW and 166Hz @ 1mW. The degrading signal allows to estimate distance. ◦you can use cheap PMR walkie to listen to this signal and using your body as shield determine the direction of it. Alternatively use a directional 433Mhz antenna.


SPECIAL FUNCTIONS ======= =========

Both TX and RX can be used as spectrum analysers with the "openLRS spectrum analyser GUI). See http://www.rcgroups.com/forums/showthread.php?t=1617297

TX: Put TX into binding mode and connect with GUI (may need to press update once).

RX: put jumper on CH3-CH4. This will force the RX to act as spectrum scanner.
"All that is necessary for the triumph of evil is that good men do nothing"