The Association of Model Submariners.

Would you like to react to this message? Create an account in a few clicks or log in to continue.

* THE FORUM FOR ALL THOSE INTERESTED IN BUILDING AND OPERATING MODEL SUBMARINES *



Join the AMS - Registered Forum users can become members of the AMS and it's free ...... To join send an email with your name , address and phone number to amstreasure@googlemail.com


For further details of any events shown here also see the "Shows and Events" section on the forum

*HOPING FOR A BETTER 2021 AND MORE OF THESE EXCELLENT FREE EVENTS ALL AROUND THE COUNTRY!

.

CANCELLED because of coronavirus. Papplewick Pumping Station, Nottingham, Sunday 12th & Monday 13th April
CANCELLED because of coronavirus. Bournville Sub Day, Sunday 10th May 2020

. ,

(CANCELLED) Submarine, Boating & Sailing Weekend, Norwich MBC, Weekend of 25,26th July

,./
.
Model Boat Convention, Haydock Park (Cancelled this year)

.

CANCELLED. Bournville Sub Day, Sunday 13th September

,,,,

(CANCELLED) Club Submarine Regatta, Furness MBC, Barrow in Furness, Sunday 20th Sept 2020

Who is online?

In total there are 4 users online :: 0 Registered, 0 Hidden and 4 Guests

None


Most users ever online was 180 on Tue Nov 05, 2019 6:03 am

Latest topics

Statistics

Our users have posted a total of 11276 messages in 1849 subjects

We have 886 registered users

The newest registered user is David

    openLRS on 458Mhz and 433Mhz and submarines

    avatar
    SimonH

    Posts : 10
    Join date : 2020-09-29
    Location : Nottingham, UK

    openLRS on 458Mhz and 433Mhz and  submarines - Page 10 Empty Re: openLRS on 458Mhz and 433Mhz and submarines

    Post  SimonH Sat Feb 20, 2021 2:09 pm

    I must admit the use of a commercial Tx does make for a far better looking kit, mine will probably be built in a cardboard shoebox!
    In the end I decided to go with the PCA9685 16 channel PWM module in the Rx as simpler than having to convert to S-bus. The main issue as already noted by others is the frequency accuracy. However since there are spare outputs (even when using the outputs as ON/OFF) I set a calibrate output to 50% sqaurewave, fed that back to the Arduino and measured the actual frequency. This was then use to correct that nominal 50Hz set via the I2C bus. Seems to work, and has a trap if the measured frequency is too far away from 50Hz.
    I still had to caibrate each servo, the two G9 used as test seem to go from 0.58mSec to 2.5mSec @ 50Hz, but these values are added as data definitions, and used to map the message values 0 to 255 to these time values.
    I am finding that 3x AA bateries are not enough to power even these 2 servos when lots of test waggling is tried the voltage drops and resets the Arduino.

    I've also added a small rotary DIP switch to define the RF channel; with a hex switch (0 to F) I map to channels 3, 5, 7, ... 33 so I keep away from the band edges as I think it uses about 3 RF channels due to still using LoRa. Interstingly when set to 'adjacent' numbers (e.g. RF channels 3 & 5) there is nothing received at the Rx unit, but it would be more interesting to have 2 pairs and the same test.

    Using the ADC module and the resitive joysticks and a message format of 8 bits per servo seems to result in a stable servo postion, though only 256 positions spread over the 180deg travel. There is the occasional 'ZZZ' from the servos and a barely perceptible mechanical twitch but I'm not sure if thats noise pick up at the analogue joystick inputs (no filtering at the moment, but I am going from 12-bit to 8-bit so that shouldn't be a problem) or just the servo dreamingi in its sleep or a function of the PWM module. Don't think its message corruption or the CRC would flag an error.

    I havent done any range checks, too cold out, and I'm building a module based in the MCP23017 16 bit I/O expander to provide the digital channel inputs. It will also I hope provide a digital trim function as another advantage of using the commercial Tx is the mechanical trim available on the joystick controls. I intend to use a digital input to increment/decrement from the joystick value as a digital trim.
    I've also got a small I2C OLED display for displaying the RSSI signal strength, SNR and other lovely data from the RF module as well as the returned Rx status but thats a bit further away, but would be useful for range tests.

    When I get round to it I'll put my code on github for interest.

    david f likes this post

    david f
    david f
    AMS Treasurer

    Posts : 2144
    Join date : 2010-11-10
    Age : 70
    Location : Cumbria

    openLRS on 458Mhz and 433Mhz and  submarines - Page 10 Empty Re: openLRS on 458Mhz and 433Mhz and submarines

    Post  david f Tue Feb 23, 2021 1:04 pm

    Hi Simon,

    Nothing wrong with a shoebox!  (It just seemed to me that shelling out £30 for a secondhand 35Mhz TX was worth it.)

    I like the way that we are tackling this project from different angles, anyway. (Clever use of a DIP switch for channel setting, by the way.)

    I think that you will find that servos are designed to be pretty tolerant to the frequency or pulse interval but you will need a better power source. Servos take a lot of instantaneous current. You will need a set of rechargeable batteries or  an analogue voltage regulator fed from a main drive battery. (Switch mode supplies can give interference problems)

    I have just uploaded my version of the TX/RX software for the RFM69 RF chip to my Github.

    So that means that I have the following "fairly " practical RF hardware ready for testing in a sub (and it can't be too many weeks away - lock down permitting!) :

    - RFM22 based DIY RX and TX for openLRS on 458MHz.
    - RFM96W based LoRa module on 458MHz.
    - RFM69HCW based FSK  module on 458MHz.

    I don't know which one will win out. I think that the last 2 will push forwards the use of 458MHz for subs on technically. They all have good range (100m) in air and we know that 458Mhz is OK for underwater communication  with model subs.

    The problem is likely to be bandwidth restrictions (as originally pointed out by Jonathan), particularly for several users in one place. You know more about this so perhaps you can advise on this topic and my radio settings?

    And yes, please share your code - it pushes this project along much quicker. And many thanks to all the other contributors!

    David
    avatar
    SimonH

    Posts : 10
    Join date : 2020-09-29
    Location : Nottingham, UK

    openLRS on 458Mhz and 433Mhz and  submarines - Page 10 Empty Re: openLRS on 458Mhz and 433Mhz and submarines

    Post  SimonH Yesterday at 3:46 pm

    Thanks for comments by the way. I've resisted getting a battery pack etc for the Slave as I am not quite sure what I aim to use in the boat, together with a motor ESC that should provide the 5V/6V receiver power from the 12V battery. I think I will go with the newer electronic motors rather than the older DC spark generators.
    whilst off subject I've seen a few pictures where the battery just seems to have rubber sealant on the terminals, but then not bother to fit in the WTC, does that work?

    I've uploaded my code to github now, see
    https://github.com/SHopper-prog/LoRaRadioControl

    Todays updates are
    1. adding a 128x32 OLED (based on SSD1306) display to both Master & Slave, and scrolls through various parameters (RF channel, RSSI, SNR, freq errror etc.). Note that the adafruit library for these devices is huge, I had to find a much lighter-weight library that only does characters for it to fit in the memory. I'll probably keep the dislpay on the Slave, but get a bigger 128x128 for the Master. Library was by Bill Greiman by the way.

    2. Built hardware to have the MCP23017 IO expander & ADC module. This provides 16 digital inputs, 8 for the digital channels, but the others for such things as I have a digital 'trim' on analogue channel 0 (probably the rudder). The current h/ware has 2 centre-off switches controlling 4 digital channels as both switches have 3 positions, up,off,down. The PWM chip can drive 25mA so can drive an LED directly, but I envisage controlling 12V relay boards to control pumps etc. 2 channels from a contre-off switch using 2 x change-over relay contacts would give forward-off-reverse control for a pump.

    3. I've reduced the implemented channels to 4 x servo, though the s/ware is provisioned for 6. I use channel 7 as the calibration for the PWM controller frequency.

    4. Receiver(Slave) errors are passed back to the Master via the ACK message and can be cleared with digital channel 7 (i.e. connect wire to GND for channel 7!).

    5. Modify the Slave so that 6 consecutive Rx timeouts are needed to invoke the 'failsafe' settings. Curently these are hard-coded, I have yet to implement the expanded message set to pass the failsafe settings from the Master but thats the aim.

    It seems to work OK, but I am getting the occasional Rx timeout at the Master, no errors detected at the Slave, so I'm not sure what that is at the moment, but it always recovers, so more work required, it never ends! One option if required would be to convert 2 digital channels to define 2, 3 or 4 positions of a servo.

    I think my next aim is to implement the rats nest of the arduino, RF module, hex rotary switch, 16-bit input &  ADC module on one PCB, possibly with the ability to saw off the ADC & digial input if not wanted (eg. as a reduced size for the Slave), and also a box for the Master to mount the various switches & joysticks, then on the actual boat......

      Current date/time is Sun Feb 28, 2021 1:34 am