Model Boat Mayhem

Please login or register.

Login with username, password and session length.
Pages: [1]   Go Down

Author Topic: Arduino Relay Control Over 2.4Ghz  (Read 4035 times)

IKB

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 271
  • Location: Wakefield
Arduino Relay Control Over 2.4Ghz
« on: January 14, 2017, 07:12:00 pm »

Hi Guys,

I have been a fan of Arduino for a long time and what is possible with these tiny, yet inexpensive micro controllers and like most people, I have read the tutorials, seen the YouTube videos of people making fun stuff and thought to myself, I can do that, bought the parts only to have them sit on a shelf for ages, so after a very long time, I have finally gotten around to actually having a stab at writing some code for my first project.
Personally I find it quite difficult to learn new skills unless I am actually learning as I try to accomplish a goal, so with that in mind I set about having a go at creating my own stand alone aux relay system with the following features:

  • Stand alone radio communication, completely separate to model's system
  • Communication to be based on 2.4Ghz radio modules
  • Control of four relays minimum
  • Make system expandable for future upgrades
  • Reduce response lag between input and output to an absolute minimum
Now there are two main reasons behind my wanting to do this project, one, I do have a Robbe F14 with an aftermarket switch expansion module, the write up on that can be found in the following link:
http://www.modelboatmayhem.co.uk/forum/index.php/topic,52951.msg544729.html#msg544729
The kit is very good and is a big improvement over the original Robbe electronics, but like the original version, this one still has a major draw back and that is lag, the time it takes between you flicking a switch and something happening, now dependent on several factors, this can be anything between 0.2 & 0.5s, not a huge amount of time I know and if you are just switching things like lights, smoke or sound on and off then this is not the end of the world, I am also not a fan of each switch operating two functions; up for function one, down for function two and neutral in the middle, again, not really an issue I appreciate, this is just my personal preference.
So apart from the F14 I use on my larger, more complicated models, I also have a cheap £30 2.4Ghz 6 channel unit I use on my simpler models, which is a great unit, but it would really benefit from an upgrade on the aux channel front; now I didn't really want to take the unit apart and start tapping into the radio system like the F14 does, so a standalone 4 channel bolt on would be ideal.
The setup is quite simple, on the TX end we have:On the RX end we have:The final outcome works very well, lag is virtually non-existent, this is in part thanks to the code continually checking the switch states at a much higher rate than the old Robbe electronics ever could, when a change is detected, it is only then that this change is transmitted to the RX end, reducing power consumption on longer run times.
Bench test of the fully working system: https://youtu.be/NpQpcuhYiR4
Now I must confess that I did not do this all by myself, a very good friend and work colleague of mine is one of the coding gurus in our electronics department, who works with Arduinos on company projects day in,day out, so I may have picked his brains once or twice when I got stuck, but hey, wouldn't you? After all, I wanted to get something on the lake and learn coding, not bang my head against the Shedshop wall for a month trying to get something to work, when the only problem with my base code was a misplaced, ";"
Like most things in life this has been an experience and now that I have completed this first step, I realise that coding Arduino is not so daunting after all, I can do it and the list of possible future projects is growing by the day and although my code may not have the finesse of a full time pro's, now it is working I can learn better, cleaner ways to do the same job with fewer lines.
So far some of the future projects I would like to do are:
  • Autopilot for my Clyde Puffer using GPS positioning
  • Auto return for Clyde Puffer, upon loss of signal, boat does a 180 until return of signal or sails to a predefined set of coordinates
  • Simple telemetry recorder and readout for jet boat, ability to record speed, throttle position, current draw to memory card
Alex


Logged

Martin (Admin)

  • Administrator
  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 23,366
  • Location: Peterborough, UK
    • Model Boat Mayhem
Re: Arduino Relay Control Over 2.4Ghz
« Reply #1 on: January 14, 2017, 08:38:35 pm »


 Nice project Alex.
 This is going to be interesting.   O0
Logged
"This is my firm opinion, but what do I know?!" -  Visit the Mayhem FaceBook Groups!  &  Giant Models

IKB

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 271
  • Location: Wakefield
Re: Arduino Relay Control Over 2.4Ghz
« Reply #2 on: January 14, 2017, 09:38:38 pm »

Cheers Martin,

The next step is to take the prototype and install it into my Clyde Puffer, posts as progress is made

Alex
Logged

PeachyPM

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 114
  • Location: East Yorkshire, UK
Re: Arduino Relay Control Over 2.4Ghz
« Reply #3 on: January 14, 2017, 09:39:21 pm »

Great stuff Alex, let me think.....what do I need for the Scharnhorst???
Logged
"Bismarck must be sunk at all costs ... even if it ... means towing King George V"

g6swj

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 313
  • Short Wave Jammer! -.-
  • Location: Northamptonshire, UK
Re: Arduino Relay Control Over 2.4Ghz
« Reply #4 on: January 14, 2017, 09:50:44 pm »

Alex,

Really impressive stuff here.

The nRF24L01 is a cheap and some what unrealiable TX/RX - have a look at this https://www.youtube.com/watch?v=2A4Uo30eea0

Check out the RFM69CW 433mhz transceivers - proper data packets, auto retry and error correcting comms, 1km plus range, much higher data throughput than RF24 and all for £9

May hep you with future developments.

Regards
Jonathan
Logged

C-3PO

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 1,107
  • I thought that hairy beast would be the end of me
  • Location: Outer Rim world of Tatooine
Re: Arduino Relay Control Over 2.4Ghz
« Reply #5 on: January 15, 2017, 12:09:22 pm »

Alex,

Really great project.

It will be interesting to see how far the nRF24L01's transmit in the real world - I was very dissapointed with them but clearly there are other not very expensive alternatives - also as they are 2.4ghz the may well be some issues with the nRF24L01's swamping you RC RX in the boat if you send back telemetry to shore

Will follow you experiments with interest

C-3PO
Logged
I think it's the way I have learnt most of my stuff - getting very stuck first...

IKB

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 271
  • Location: Wakefield
Re: Arduino Relay Control Over 2.4Ghz
« Reply #6 on: January 15, 2017, 10:39:57 pm »

Hi C-3PO,


We have used them at work on several projects already and have been very  impressed by the range of the units, even when going through two walls in a workshop filled with three phase machinery, but that aside, our lake at BMBS is only 90 x 80ms, so I feel that the range will be sufficient.


Alex
Logged

C-3PO

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 1,107
  • I thought that hairy beast would be the end of me
  • Location: Outer Rim world of Tatooine
Re: Arduino Relay Control Over 2.4Ghz
« Reply #7 on: January 16, 2017, 07:51:12 am »

Hi Alex,

Interesting that you had a positive experience with nRF24L01's - I wonder if there is any variable in the product depending where it was manufactured. I think the ones I used where a bulk buy for not a lot of money so may have been doomed from the off.

I will get some more from a reputable source and see If I have any success with them.

It will be interesting to see how you get on with a 2.4ghz transmitter in close proximity to your Radio Control RX on board - hopefully all will be ok which means that these could be very useful and cheap boards for radio control use. In the past I have had an issue with an Xbee 100mw @2.4ghz onboard a boat - the poor radio control receiver didn't know what time of day it was - again I appreciate not all radio control rx's are born equal and some may have better receiver front end's etc

Look forward to updates with your ventures in this fascinating area of the hobby.

C-3PO
Logged
I think it's the way I have learnt most of my stuff - getting very stuck first...

The Old Fart

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 298
  • Model Boat Mayhem is Great!
  • Location: Caister-on-Sea, Norfolk, UK
Re: Arduino Relay Control Over 2.4Ghz
« Reply #8 on: February 12, 2017, 03:37:54 pm »

I use a Turnigy 9XR pro.

It's a bit OTT, but I replace one, or more, of the available pots with a 12 position switch, complete with 11 smd resistors fitted.

This allows the Arduino/picaxe to see 12 separate values from 1 channel. I then use a second channel, with a 3 position center off, sprung both ways switch to enable / disable each of the 12 positions.

using a uln2803, 8  1/2amp outputs, switches leds, mosfets, relays or whatever you want to hook up.
use a second uln2803 with ip / op linked gives 1 amp outputs.


There is another alternative, 13 positions from a 12 position switch plus a push button, but that another story.
Logged

IKB

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 271
  • Location: Wakefield
Re: Arduino Relay Control Over 2.4Ghz
« Reply #9 on: February 14, 2017, 03:15:11 pm »

Hi,

That is an interesting way of going about it, I like the pot / button combo idea, that is a neat solution, I have just ordered a couple of these 11 detent pots to have a play with for something similar:

http://www.ebay.co.uk/itm/11-Detent-Potentiometer-17mm-D-Shaft-Mixer-Pot-Multiple-Click-Action-/122090396892?var=&hash=item1c6d279cdc:m:mlQkJALEecWcZUICATfRuoA

Alex
Logged

The Old Fart

  • Full Mayhemer
  • *****
  • Offline Offline
  • Posts: 298
  • Model Boat Mayhem is Great!
  • Location: Caister-on-Sea, Norfolk, UK
Re: Arduino Relay Control Over 2.4Ghz
« Reply #10 on: February 14, 2017, 05:17:39 pm »

good pot for experimenting with.

12 position switches I use are 12mm diameter, anything bigger will not fit inside the TX.  google MRK112, get mine from Aliexpress.

Logged
Pages: [1]   Go Up
 

Page created in 0.098 seconds with 22 queries.