|||
Not Registered
Go AD FREE & get your membership medal
BRONZE
Less Ads
SILVER
GOLD
Ad Free
Cancel
Anytime
ยฃ2.50
ยฃ4.50
ยฃ6.50
Subscribe
Go AD FREE & get your membership medal
BRONZE
Less Ads
SILVER
GOLD
Ad Free
For A Whole Year!
ยฃ25
ยฃ45
ยฃ65
Donate
You Will Be Helping Towards:

  • Domain Fees
  • Security Certificates
  • iOS & Android App Fees
  • Website Hosting
  • Fast Servers
  • Data Backups
  • Upkeep & Maintenance
  • Administration Costs

    Without your support the website wouldn't be what it is today.

    Please consider donating towards these fees to help keep us afloat.

    Read more

    All donations are securely managed through PayPal.

    Many thanks for your kind support
  • Join Us On Social Media!
    Download The App!

    Login To
    Remove Ads
    Login To
    Remove Ads

    Model Boats Website
    Model Boats Website
    Home
    Forum
    Build Blogs
    Media Gallery
    Boat Clubs & Lakes
    Events
    Boat Harbour
    How-To Articles
    Plans & Docs
    Useful Links
    Bill's Arduino flower class corvette
    12 Posts ยท 3 Followers ยท 16 Photos ยท 18 Likes
    Began 4 years ago by
    Warrant Officer
    Ireland
    Follow This Thread
    Not currently following
    > Click to follow
    Latest Post 4 years ago by
    Warrant Officer
    Ireland
    Oldest posts shown first   (Show Newest First) (Print Booklet)
    ๐Ÿ“ Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 5 Views ยท 3 Likes ยท 7 Comments
    Flag
    ๐Ÿ’ฌ Add Comment
    Hi Everyone,

    Been away for a while but I haven't been idle.
    My latest passion is playing with Arduino, I'm still at the very early stages and modifying existing sketches, but the feeling of triumph after biting off to much to chew, that getting something to work gives you is exhilerating (I know that's a spelling mistake but I'can live with that ๐Ÿ˜Š).
    I'm taking the flower class corvette off of the top of the fridge and doing something with it. I.E. controlling the RC with a 433MHz comms module. So my build starts here with an update of where I am just now.
    The boat - hull is put together and.... well Rome wasn't built in a day, plus I needed thinking time - several years worth ๐Ÿ˜Š
    Arduino - Slightly further ahead, I've got the steering part done, I've just to do a bit of re-scaling there to completely finish that part off - I just discovered a trim wheel on the joysticks ... ah read the attached it's all in there ๐Ÿ˜Š
    I've tried attaching the document as a pdf file hopefully it's worked

    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 2 Views ยท 0 Likes
    Flag
    Just looking at your message again Doug, the Radiohead library seems to be the goto place for arduino comms, the link for the download is on the first of the 433MHz weblinks I posted (I think it's the first ๐Ÿ˜Š)

    Bill
    Login To
    Remove Ads

    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 2 Views ยท 0 Likes
    Flag
    Oh yeah, 9V battery clips from Germany???. As it happens they are not so easy to find here, I'm sure most towns have a radio shack type store but I haven't found one here. So I just added it to an order of other stuff.

    Bill
    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 2 Views ยท 0 Likes
    Flag
    Hi Doug,

    Yep I'll do that, up until recently I've been getting my stuff from the big 2 mail order firms E-*** and A*****, but most of the stuff was coming from the far east and some wasn't arriving at all, I'm not the most patient person, so I was looking around and found AZ, their prices are in the same ballpark and delivery is within a week to Ireland, so I gave them a whirl, plus their tech documentation is pretty good and free to download.
    P.S. you get a free nano with your first order ๐Ÿ˜Š

    Bill
    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฉ๐Ÿ‡ช RNinMunich ( Fleet Admiral)
    โœง 4 Views ยท 2 Likes
    Flag
    Hi Bill,
    Glad to hear you making progress๐Ÿ‘
    When you have tested the Sketch post it as a 'New Update', see yellow bar at the top.
    Not sure why you have to get 9V battery clips (9V block battery?) from Germany, but thanks for the AZ-delivery tip and link.
    They have lots of goodies and I am ordering an Arduino Starter kit from.
    I know the town where they are, about an hour's drive from me.
    Pretty little town on the Danube so worth a day out๐Ÿ˜Š
    Only seen it from the river up to now๐Ÿ˜‰
    Cheers, Doug ๐Ÿ˜Ž
    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 3 Views ยท 1 Like
    Flag
    I've finished the next part of the sketch which includes the speed control section, used the trim dials that I found on the joysticks to give me 2.5K ohms in the center position so I'll adjust the calculations accordingly and I've brought the fritzing layout up to date.
    I'm, just waiting for 9V battery clips to arrive from my new toyshop AZ-delivery in Germany (hopefully my link worked) so that I can test the sketch
    https://www.az-delivery.de/
    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 2 Views ยท 0 Likes
    Flag
    Hi Doug,

    Many thanks for your input and advice, I have a load of stuff that I have gleaned from the net but only a few items are worth keeping and using, the comms issue is pretty interesting and as I dig deeper I'm finding more and more options, but 433 MHz is a cheap and relatively simple (??? yeah heard that before ๐Ÿ˜Š) system, oh and did I mention that it's cheap ๐Ÿ˜Š. I've made a bit more progress so I'll do another post with that. Still looking for the lead to connect my camera to the laptop, so we should have a couple of photos soon

    Bill
    ๐Ÿ’ฌ Re: Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฉ๐Ÿ‡ช RNinMunich ( Fleet Admiral)
    โœง 4 Views ยท 2 Likes
    Flag
    Excellent start Bill๐Ÿ‘
    Hope this can be applied to other comms module in a different frequency band cos I suddenly remembered that here in Germany we can't use the 430MHz band since 2008.
    Some other countries seem to require you to hold an Amateur Radio license to be able to use 433MHz๐Ÿค” Not sure about UK.
    As you say there are many other LPDs (Low Power Devices, TX power 10mW) using this frequency 433-434MHz, but not microwave ovens; they are in the 2.4GHz band. Thankfully not in the part we use for RC๐Ÿ˜Š
    433-434MHz is also slap in the 70cm Amateur band, 430-440MHz, where the Hams are allowed to transmit 40 or 50W, so interference could be expected.
    Jonathan (G6SWJ) will know more about that๐Ÿ˜‰

    Main thing (to me at least) is the Arduino control info. Then I can see about mating it to a 40Meg or 2.4Gig set.
    Awaiting developments with interest๐Ÿ‘
    Cheers, Doug ๐Ÿ˜Ž
    Login To
    Remove Ads

    ๐Ÿ“ Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 3 Views ยท 1 Like
    Flag
    ๐Ÿ’ฌ Add Comment
    And here is the Fritzing connection details

    ๐Ÿ“ Bill's Arduino flower class corvette
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 10 Views ยท 3 Likes
    Flag
    ๐Ÿ’ฌ Add Comment
    And the tidied up version of the Sketch

    ๐Ÿ“ Part 1B speed and steering from a single controller
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    ๐Ÿ’ฌ Add Comment
    Hi everyone this is the second part of part 1...if that makes sense...a part 1b if you will๐Ÿ˜Š
    Although I haven't had a chance to test this part yet the sketch compiles so that's good enough for me ๐Ÿคž, I revised and brought up to date the frizling drawing and Arduino Sketch, so I'll attach them here. This second part deals with motor control, so hopefully some useful bits for you

    Enjoy

    Bill

    ๐Ÿ“ Some research details on 433MHz comms
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like ยท 3 Comments
    Flag
    ๐Ÿ’ฌ Add Comment
    I'll try to include some links to 433MHz comms that should be useful for the next stage

    https://rootsaid.com/rc-boat-transmitter-receiver/
    ๐Ÿ’ฌ Re: Some research details on 433MHz comms
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Ah, this video answers a lot of my questions. I'm ok with setting up the initial comms settings, libraries etc, but I wasn't sure how to send more than one piece of information between the 2 arduinos i.e the 2 joystick positions.
    All the other example videos I found use a text message to illustrate the concept, but this chap uses a temperature and humidity sensor (2 inputs transmit end, 2 outputs receive end ๐Ÿ˜๐Ÿ˜๐Ÿ˜) which I can modify to suit. Ah at last, I can now hook up 2 arduinos on the bench and test simple comms using the 433MHz units.
    I'll be changing the 433MHz units to RFM69HCW units as these are bi-directional transceivers and you can change the operating frequency to a legal frequency band, but the 433 units will do just now for basic testing and the code will need minimal adjustment for the RFM units
    Mmm just realised that this is the same video as the post above...I don't think I watched it all before๐Ÿ˜that'll teach me

    Bill
    https://dronebotworkshop.com/433mhz-rf-modules-arduino/
    Login To
    Remove Ads

    ๐Ÿ’ฌ Re: Some research details on 433MHz comms
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    And another one, I'll print these 3 documents out and get a clearer picture from there of how this all works.
    As for the legality of this I've tried researching the subject for here in Ireland, but govt depts all over the world seem to pride themselves in making what should be a simple task into an ordeal...I wonder if I should just adopt the Irish approach of "Ah sure, it'll be grand" ... maybe I'm just overthinking this ๐Ÿ™„ ๐Ÿ˜‰๐Ÿค“๐Ÿ™ˆ๐Ÿ™‰๐Ÿ™Š

    Take care

    Bill
    https://dronebotworkshop.com/433mhz-rf-modules-arduino/
    ๐Ÿ’ฌ Re: Some research details on 433MHz comms
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    and another, unfortunately I don't seem to be able to include more than one link in a message
    http://electronics-diy.com/arduino-rf-link-using-433mhz-transmitter-receiver-mod
    ๐Ÿ“ The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 11 Views ยท 4 Likes ยท 18 Comments
    Flag
    ๐Ÿ’ฌ Add Comment


    https://toptechboy.com/lesson-16-controlling-a-servo-with-arduino/
    https://toptechboy.com/arduino-tutorial-33-understanding-how-to-control-servos-w
    https://toptechboy.com/arduino-tutorial-37-understanding-how-to-control-dc-motor
    https://toptechboy.com/arduino-tutorial-39-using-a-joystick-to-control-dc-motor-
    https://www.arduino.cc/reference/en/language/functions/math/map/
    https://www.az-delivery.de/products/uno-r3-board-mit-atmega328p-und-usb-kabel?va
    https://www.az-delivery.com/en/collections/arduino-kompatible-boards/products/na
    https://www.amazon.co.uk/gp/product/B07MY33PC9/ref=ppx_yo_dt_b_asin_title_o01_s0
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Ah that's interesting Jonathan, a nice easy way to check data transfer.

    Bill
    Login To
    Remove Ads

    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Jonathan,

    Just been through the datasheet, thank goodness I don't need to know all of that, quite a read ๐Ÿ˜Š and I found the "HM-TRP Setting GUI" on the Hoperf website, so that I can now put in the basic settings.
    It's quite amazing the difference between the RFM69HCW and the cheap 433MHz modules, not just in documentation but also functionality (transceivers rather than just one way comms), just ordered 2 of them to try out. Now I'll have to find something to send back from the boat, mmm battery level perhaps.
    Thanks again for the info.

    Bill
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Bill,

    Arduino RF data exchange - Test Script

    Found this video from a while back so uploaded to YouTube.

    Each line is a seperate data packet - this is throttled to 1 packet every 150ms

    Jonathan _._
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Bill,

    You hit the nail on the head 100% re NRF24L01...

    You will get quite a buzz when you see data appearing @ Arduino No.2 - still makes me smile.

    I use extensively HOPERF RFM69HCW UHF 433MHz (424-510MHz configurable) devices - I have loads of them.

    Not that you need it but the manufacturer handbook is 80 pages which hints at the product calibre.

    They are brilliant little workhorses. They are quite sophisticated and I use them with the lowpowerlabs library.





    It (radio/RF) is a great micro topic within the Arduino world.

    Get ready to hit some brick walls:
    > Like how do you receive a value greater than 255 - most devices send data as individual byte's and you may have to do some bitwise manipulation to add 2 bytes together at the reciever end

    >Throttling the data exchange so it occurs for example 4 times a second and not continuously to allow other processes to exist harmoniously on your single core

    etc etc.

    Look forward to an update on your progress

    Regards
    Jonathan _._
    https://cdn.sparkfun.com/datasheets/Wireless/General/RFM69HCW-V1.1.pdf
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Jonathan,

    That's great thanks for helping out.
    Yep I know what you mean about finding the Irish info, I've spent a few fruitless days searching, so I'm just going to go with the UK regs and hopefully they will be harmonised, I can't see the communication regs being different on each side of the border, and as I live only a few miles from the border and possibly have to use sailing facilities in the North I'm just going to go with that.
    Once I get to the stage of installing the equipment I might check with the authorities, only problem with doing that is once they are aware of what you are doing they will become extra inquisitive๐Ÿ˜Š
    I'm going to go with the modules you talked about that will take me into the slightly higher legal frequency.
    I've had a look at the NRF24L01 module and there appears to be a huge variance in quality and ability, So for now I think I'll stay in the lower frequencies.
    I'll be playing about with comms this weekend with the 433MHz modules that I have, I want to find out how to read the movement in the joysticks in one arduino over the 433MHz link into another arduino.

    Bill
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Bill,

    I spent a while on the various internet sites trying to unravel rules for use of SRD's in Ireland. They don't make finding the info easy! Seem to have been down many rabbit holes and not found an answer yet.

    I will keep looking - perhaps you could use 2.4GHz using an NRF24L01

    That said unless your "solution" is CE stamped (CEPT) then it will more than likely fall outside the strict letter of the law anyway.

    Regards
    Jonathan _._
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Jonathan,

    Thanks for that, I was looking at that document yesterday strangely enough, unfortunately I was looking at the wrong part of it (pg19), I wondered why the reg ref no's didn't make any sense, I just went by the frequency, probably wishful thinking ๐Ÿ˜Š. Rats, now I have to find the Irish regs, that will be another wasted day๐Ÿ˜ด, I tried looking for this before but the Irish regs - any of them - have about 20-30 pages, or more, of irrelevant rubbish before you get to the meat'n'totties, ah well, most of the Irish regs are aligned with the UK - so I was being cheeky and trying a shortcut ๐Ÿ˜Š.
    Thankfully you spotted that, strange how you can only do telemetry in that part of the band, but then again your unfortunate but spectacular friend can probably answer that question.
    I'll have a look at your HC12 stuff and see if I can use these 433MHz units for anything. Back to the drawing board, my stuff didn't arrive from Germany so I've got a few days to have a look, the comms should be similar hopefully.

    Best regards

    Bill
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Bill,

    See comments in other post re HC12 frequency change etc - My understanding 433MHz is not legal in UK for model control

    From OFCOM site
    458.500 - 459.500 MHz General model control (not airborne)

    Many people doing Arduino and boat/sub projects

    There is a forum dedicated to it with a few participants -


    https://rcarduino.freeforums.net/
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Jonathan,

    I was looking at your arduino project earlier, you've a lot of interesting stuff in there.
    Wow, I would have loved to have seen his exit, pity he missed the grass though. I haven't really thought about a fail-safe but now I'll really have to think of one, interference is a definite risk in this band. Doug was saying that it can't be used in Germany now, but I found some stuff saying that it can be used in the UK for RC models ๐Ÿ˜Š
    Do you have any info on how to alter the frequency, I was just going to go with the 433MHz modules as they came, I didn't realise I could alter the frequency on the wee cheapies. At the moment I'm still on the bench, and waiting for a delivery of bits so that I can test the motor control, then onto the comms.
    PS. do you know if someone else was doing an arduino project as well?

    Bill
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 9 Views ยท 2 Likes
    Flag
    What a great project...

    Bill do think about a failsafe for your system - I have an "Arduinoer" friend that had "go fast stripes" added to the bottom of his lifeboat as it exited the pond and traversed across the tarmac (did some considerable damage)!!!

    What frequency are you using - you should be able to set registers to crank it up to 459Mhz.

    Doug 40-50 watts tuh! - ERP in the kW's thank you! ๐Ÿ˜Š

    Regards
    Jonathan
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    Yeah I'm quite proud of myself ๐Ÿค—
    Login To
    Remove Ads

    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง Martin555 ( Fleet Admiral)
    โœง 9 Views ยท 2 Likes
    Flag
    Not guilty Doug.
    I struggle to remember this sort of stuff myself LOL!!

    Martin555.
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฉ๐Ÿ‡ช RNinMunich ( Fleet Admiral)
    โœง 9 Views ยท 2 Likes
    Flag
    Who's a clever lad then?๐Ÿ˜‰
    ๐Ÿ˜Ž
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    Dang got it wrong the new series of toptechboy videos are at the top, the earlier series is listed at the bottom
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 9 Views ยท 2 Likes
    Flag
    Actually I managed to figure it out...somehow ๐Ÿ˜Š
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 9 Views ยท 2 Likes
    Flag
    Hi Doug,

    Yeah I figured there had to be an easier way ๐Ÿ˜Š all I have to do now is to remember to paste the link ๐Ÿ˜Š, this is fun I love finding out how to do things
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    Hopefully the links I posted will be of help to you, if you are starting out in Arduino I would highly recommend that you watch the first 4 videos in the first toptechboy series (the one with the grey shirt), I'll add the link below to the full listing of the Arduino lessons, so the first 4 lessons are the ones. Enjoy

    https://toptechboy.com/arduino-lessons/
    ๐Ÿ’ฌ Re: The reference links for Arduino
    4 years ago by ๐Ÿ‡ฉ๐Ÿ‡ช RNinMunich ( Fleet Admiral)
    โœง 9 Views ยท 2 Likes
    Flag
    Thanks Bill, very useful๐Ÿ‘
    I see you've twigged how to post several links at once.
    Suspect Martin may have PMed you how๐Ÿ˜‰ Good for him๐Ÿ‘
    Cheers, Doug ๐Ÿ˜Ž
    ๐Ÿ“ 433MHz comms
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes ยท 1 Comment
    Flag
    ๐Ÿ’ฌ Add Comment
    Hi,

    The communications between the Arduino Nano in the Boat and the Arduino Nano in the RC hand set will be carried out by a 433MHz transmitter and receiver set. To interface the Arduino's and the 433MHz set we need to install the Radiohead library, within the Radiohead library is the RF_ASK.h function which will be called by the line "#include< RF_ASK.h > " at the start of the sketch in both Nano's. The ASK (amplitude shift keying) function will, after being configured with a few simple commands, read and write our code between the 2 arduino's. Sounds simple huh mmm we'll see ๐Ÿ˜Š

    Take care all

    Bill

    ๐Ÿ’ฌ Re: 433MHz comms
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Bill,

    The HC12 can be used "barebones" for comms without any library - it simply acts like a wireless Serial Port.

    Utilising the RadionHead library may give you some additional functionality. (Data Packets,CRC checks).

    The HC12 can be "configured" using AT commands - you bring the "SET" pin low and then send your AT commands (change baud rate , radio channel (400Khz steps))

    The failsafe needs to protect your project from data errors but most significantly from signal loss. If the motors are commanded to spin and you loose radio data link you have no way of stopping the motors (or steering) !! - forget what the specs say 1KM + the RF output/receiver capability for these devices is minimal and likely to drop out at some point.

    I don't think the HC12 has an RSSI facility (signal strength) - many other RF devices do and it's a great thing to have...the software can monitor the "signal state". Indeed the remote transceiver can request an "ACK" from the shore based transceiver to see if it's still alive ๐Ÿ˜Š

    I have not used the HC12 but I have used many other Arduino comms devices with great success - BUT I have chosen not to use them to control the throttle or rudder on my models - I value them too much.......

    Investigate using "constrain" for any "maps" or data values you use to command throttle,rudder - the map function is linear and does not trap rogue values passing through if you pass a rogue value in ( the fromLow & fromHigh parameters do not stop out of range values!!)

    You will need to be mindful of the loop efficiency (latency)

    And the last and most important point "Have fun with it" - hope my comments "add" to your journey - they at least might save a few more grey hairs ๐Ÿ˜Š

    Regards
    Jonathan
    ๐Ÿ“ Stage 2 - complete
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like ยท 7 Comments
    Flag
    ๐Ÿ’ฌ Add Comment
    Hi Everyone,

    The past week has been spent searching for info, it was only when I took a step back and deciphered what I had already that things finally took shape and I actually felt that I understood what was on all the printouts that had amassed around me into ever growing piles. Sometimes you can't see the wood for the trees ๐Ÿ˜Š.
    The bottom line is that I can now move the joysticks on one Arduino and see the change in value on the other. This brought a huge sigh of relief, I was beginning to feel that I would never get it.
    I used the cheap 433MHz set just to get this bit of code completed, but I will be using Hopefm's RFM69HCW 433MHz module for the next stages and the final project: this module has the major advantage of being able to have it's operating frequency (among other parameters) programmed to a legal one and it's comms is bi-directional-so maybe I might do something there to bring back some telemetry.
    Many thanks to Jonathan (G6swj) for his guidance and advice on things, not least on what comms modules to use. I'll do another update tomorrow with the code and some photos.

    Bill

    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Ah gotcha, that makes a lot of sense.
    Yeah now you put it in those terms 16MHz is pretty fast, last time I was involved in comms, many years ago, we were working in KHz ๐Ÿ˜Š, but that was just making up (RS232) data cables and making sure the baud rates were the same, I'm pretty sure it was about the same time windows 3.1 came in ๐Ÿ˜Š which will give you an idea how long ago it was.
    I'm slowly making progress, I've soldered in the pin headers to the Nano's and soldered leads onto everything else ready to put the transmitter together, I'm just thinking of a way that I can put the antenna together now so that I won't have to do to much mangle-isation when I change over to the RFM69HCW modules. Antenna wise I was thinking of a monopole, adding a ground plane antenna to give the signal a bit more oomph.
    I know that I shouldn't, but I'm being drawn to going straight for the RFM modules, I have a bad habit of trying to skip steps-usually ending up with 1 step forward and a lot of shuffling backwards hoping no-one will notice ๐Ÿ˜Š. I'll have to behave and go through the steps ๐Ÿ˜Š
    Oops forgot a power supply to the nano, but added now

    Bill
    Login To
    Remove Ads

    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Bill,

    Let the receive function run unrestrained. It's the TX function that you want to run throttled.

    Otherwise the TX is sending another TX packet and the poor RX hasn't processed the first packet - result is a hung system.

    More fun to come program flow wise when you want 2 ways comms - sending back telemetry.....

    I think we forget that even the standard 16 MHz Arduino is fast... really fast.

    More stark when you talk it in terms of 16 Million cycles per second - with every tick of the clock, the CPU fetches and executes one instruction - still makes me smile - crazy technology.

    Beam me up Scotty...

    Regards
    Jonathan _._
    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Jonathan,

    Ah that does indeed takes me down memory lane, I haven't done wire wrapping since I was at college, I've just had a look at wire wrapping tools and I see what you mean, they were never cheap but wow, even the "cheap Chinese stuff" ain't. I wonder how hard it would be to make one out of a swizzle lolly stick, it must be about the right ID, plus you have to dispose of one of these lollys ๐Ÿ˜Š
    Been doing some soldering today so that's my gimbles plus a few other bits finished, nano's to get pins soldered next, should've been done hours ago but I got distracted and ended up watching Das Boot instead. I'll have another crack at running the software again tomorrow.
    Just one question about the delay code you gave me, I've added it to the transmitter(my earlier post said receiver) but should I add it to the receiver as well, I wasn't sure if these would self sync or if it might cause a clash.
    But it feels good getting back on the tools again.

    Bill
    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Bill,

    Good to see you are making progress - look forward to more updates.

    I think we all tread the same path re our code development. I often spend many happy hours trying to find a set of code I wrote a while back - my filing system is quite logical but it still fails me frequently.

    The software vs. hardware integrity is a challenge when developing a solution. Often we go looking for code issues when it's simply a poor connection. I have started to use "wire wrap" as a fast and pretty reliable way of connecting "stuff" - sure this will take some down memory lane.... The cost of genuine wire wrap tools will make your eyes water and your wallet feather light..

    I will get back to posting about Arduino - been a very strange time for me... got less and greyer hair now having been playing with 1515 RGB Leds (1.5mm x 1.5mm SMT)

    Regards
    Jonathan _._
    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    Hi Jonathan,

    I found the right bits of code for the boat and rc handset and have them uploaded, and your delay code worked a treat.
    Up until I added the delay, I was just using a cutdown test program and once I put the full code together I was getting a load of junk or nothing at all, but after I added the delay to the receiver, everything worked nicely, I'll start reducing the delay now from 1 second so that I get a reasonable response time.
    I'm still losing comms every so often, well quite a lot actually ๐Ÿ˜Š, but that's down to my wiring rather than the code, I've a lot of temporary wiring joints (i.e. bits of wire twisted together) so I'm certain that's the cause. I have a carton of the wire I'll be using for the final project arriving Mon or Tues, along with my pin headers for the Arduino Nano's (the pin sockets on the Uno's aren't very secure and the wires pop out every so often), so I can crack on with making things more permanent and hopefully get rid of these wee niggles.
    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Jonathan, that's great thanks, I'll have a closer look today at your code, I'm thinking of making the transmission time every 500 milliseconds initially, and see how the response is, I see what you mean about packet crashes, so it'll be easier to close up the TX time than trying to figure out where the problems lie. I'm moving onto using the Nano's (now that I can talk to them ๐Ÿ˜Š), and I'll be cleaning up the code a bit before I transfer it over and hopefully everything still works. I've been using temporary bits of code to get the comms working and of course I can't remember which bits of code I've used, so I'm trying to find the right bits now to match what is in the uno's ๐Ÿ˜Š. I think I'll end up printing them all out and eliminate them that way. I really have to find a better way to organise these files, but I don't really mind because I know one of them works, and although I thought my filing system worked, I guess it needs a wee bit of attention ๐Ÿ˜Š.

    Take care

    Bill
    ๐Ÿ’ฌ Re: Stage 2 - complete
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 8 Views ยท 1 Like
    Flag
    Bill,

    Look forward to an update on your progress.

    I have working scripts if you require, personally I don't like asking for help until I have reached the point of throwing the kit across the room or in the bin - I find being an Arduino Detective all part of the fun of getting something working, climbing inside the solution and logically reasoning what is wrong etc etc - I am sure you experience the same.

    One thing you do need to be aware of is that you do not want to "send" every high frequency loop cycle - that simple fact could present itself as a non working solution as the external RFM69HCW does need some time (ms) to do it's stuff before being asked to do it again.

    Much better to adopt - run my "send" function every X time period interval - suggest 200ms to start with

    e.g.

    long previousMillis = 0; // last time updated
    long interval = 1000; // interval - our delay interval in milliseconds
    void setup()
    {
    }
    void loop()
    {
    unsigned long currentMillis = millis();
    if(currentMillis - previousMillis > interval)
    {
    // time interval has been reach - run code here
    previousMillis = currentMillis; // update the time we have run this event so we can compare with future time
    }
    }

    Regards
    Jonathan _._
    ๐Ÿ“ Arduino Nano won't download sketch
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like
    Flag
    ๐Ÿ’ฌ Add Comment
    Hi, my package from Germany finally arrived after 2 weeks with my Arduino Nano's, not A-Z Delivery's fault, just the postal chaos that's still with us.
    I tried to load a sketch onto the first one, no dice, mmm tried the second one -same thing, Ah-ha must be the cable I thought so found another mini usb cable -nothing. So back onto the web tried a few things still nothing then found an instructables article with the same issue, tried all of it still no dice, then second comment down hit it right on the nail, the processor isn't the original arduino so if you follow the below steps, bingo it works ๐Ÿ˜Š

    MichaelB1268
    MichaelB12681 year ago
    ReplyUpvote
    I bought a cheap Arduino Nano clone from China which uses the CH340C USB chip instead of the chip found on the genuine Arduino. I fixed it by:
    1) Installing the CH340 driver
    2) Set processor to ATmega328P(Old bootloader)
    3) Using Arduino IDE installed locally on my Win10 pc, NOT the online Arduino IDE. NB. If both the locally installed and online Arduino IDE are open at the same time they can generate a different error "avrdude: ser_open(): can't open device "\\.\COM8": Access is denied." Simply close the online Arduino IDE to fix this error.

    Bill

    ๐Ÿ“ Comms range testing
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 8 Views ยท 1 Like ยท 3 Comments
    Flag
    ๐Ÿ’ฌ Add Comment
    Hi,

    A while since my last post, but as with all things when you hit a minor road block you end up spending days trying to knock it down instead of simply driving around it, I'm still at that stage. (trying to knock it down unfortunately ๐Ÿ˜ด)
    I'm now trying to put together a simple (hah!) comms range tester. This comprises of 2 breadboards each with a Nano controller and either a transmitter or receiver. The receiver board also has an oled 0.96" I2C SSD1306 display which will display a free running reference 1 second count and a received packet count which is also sent every second by the transmitter. The transmitter will simply send the value 1 every second and the receiver will add that to the packet count and reset the received buffer back to zero ready for the next transmission. This part is relatively simple to code, just 2 lines on the oled display - a reference count and a received packet count.
    The problem is 3 fold:
    The Arduinos have limited memory, 16k of main memory and 2k of Sram, the oled consumes 1k of Sram (which can't be moved into the main memory) and the Strings and variables are also held in Sram (which apparently can be moved into Sram) - task number 1.
    The Sram can become fragmented, which gives a false impression of the amount of available memory, the memory count doesn't count the gaps in the memory table. Can this be defragged ? - task number 2.
    Sometimes the Libraries try to use the same resources which results in something that did work, i.e. the oled display, suddenly no longer working when you add the next stage of code, in this case the comms code (which did work previously) - task number 3.
    Questions:
    1.The Nano shows available Sram but is it fragmented ? causing a false reading.
    2. Is there a conflict between the SSD1306 Oled library and the Radiohead RH-ASK comms library.
    I've attached some reference docs of where I am at the moment, some parts of the sketch aren't complete as yet

    Take care everyone

    Bill

    ๐Ÿ’ฌ Re: Comms range testing
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi everyone,

    I've made some progress, well sort of๐Ÿ˜Š, the memory problems have been solved by using a brilliant text only library SSD1306ascii.h, that Jonathon told me about, for the OLED display that uses very little memory and is perfect for my needs.

    Another good suggestion from Jonathon is to use a second Nano for the RC controller OLED display in the finished project, to spread the memory load.

    I had to do a couple of changes to the range test code to get my 2 lines displayed on the OLED, the first line is a reference free running 1 second counter and the second line is a count of the received packets from the transmitter.

    The transmitter will send a value of 1 for 500 milliseconds and then a value of 0 for 500 milliseconds then keeps toggling between 0 and 1 every 500 milliseconds.

    The receiver then reads these 1's and updates the packet count on the OLED display.

    I've tested this part of the code and everything works...sort of๐Ÿ˜Š, I'm getting some data through then nothing, so I changed to the hello world sketch, which I know works perfectly, and I had the same results.

    So this points to the receiver and transmitter modules, and-or the integrity of the wiring, my money is on the latter๐Ÿ˜Š.

    I'm still hooked up to breadboards (which I'm coming to hate) and despite searching for tight sockets, I feel that I'm not getting good connections.

    After this post I'm going to start soldering things together in a semi permanent fashion, so that I can rule out the wiring integrity doubts.

    It has to be said that the basic 433 MHz modules are susceptible to noise interference and this might be adding to the issue, but lets rule out the obvious first.

    Once I'm happy with my installation, I plan to do the range test well outside of town so that should help with RF interference issues.

    I won't post the code at the moment as I was up to stupid o'clock this morning, and I ended up unsure which sketches I had modified... again ๐Ÿ˜Š, so I'm taking a day off from the code side of things, to do some much needed hardware modifications, then I'll figure out which is the real version of the code.

    I promise I will do some photos soon, I just need to re-find my camera

    Take care everyone

    Bill
    Login To
    Remove Ads

    ๐Ÿ’ฌ Re: Comms range testing
    4 years ago by ๐Ÿ‡ฎ๐Ÿ‡ช billmcl61 ( Warrant Officer)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Jonathon,

    Yep been there before, I used to write and commission plc's when I was working in engineering, never gave up and the feeling you get when you finally crack it can't be beaten. I found that breaking code down and proving each block on it's own helps a lot, at least you can isolate and concentrate on the problem areas and deal with them one by one. I got an answer from Adafruit in the US which pretty much confirmed what I suspected, the Nano boards don't have enough memory, so I might have to scrub the OLED display and use the serial print monitor instead, just means that I'll have to take my laptop on the range test, which is a real pity, the OLED is a really nice (and compact) display.

    Bill
    ๐Ÿ’ฌ Re: Comms range testing
    4 years ago by ๐Ÿ‡ฌ๐Ÿ‡ง G6SWJ ( Midshipman)
    โœง 7 Views ยท 0 Likes
    Flag
    Hi Bill,

    Good to read your update. I have been in your position so many times - all works, then you add something and it doesn't. I often get ambitious and add loads of code only to find it does not work.

    I am certain you will know all this and probably practise it - You then have no option but to backtrack and then slowly add line by line until you find the offender and then work out the way forward. I save every day, if not many times each development session with the myFileName_001, myFileName_002 so it is easy to backtrack.

    However there are some funnies with Arduino which everybody seems to know about apart from the developer at the times things misbehave.

    Always a solution - I often use multiple - distributed Arduinos in the same solution - sometimes one just handles the display interface while others are doing the real stuff.

    I will have a look at your code and see if I can make any suggestions. I love the process of fixing what's broken - it can however at times get tedious - would be nice to move of to the good stuff type experience.

    Never been beaten by the little blighter yet...

    Regards
    Jonathan _._
    Show 2 More Posts


    About This Website
    Terms of Service
    Privacy Policy