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#msg544729The 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/NpQpcuhYiR4Now 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