|||
Current Website Support
90
Contributors
12
Subscribers
You are Not Registered
Donate for your silver medal ๐Ÿ…
ยฃ10
ยฃ15
ยฃ25
ยฃ50
Subscribe for your gold medal ๐Ÿ…
ยฃ1
ยฃ3
ยฃ5
ยฃ10
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. Amounts donated are not published online.

    Many thanks for your kind support
  • Join Us On Social Media!
    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
    4

















    Followers
    Bill's Arduino flower class corvette
    by billmcl61 ๐Ÿ‡ฎ๐Ÿ‡ช ( Warrant Officer)
    ๐Ÿ“ฃ










    Click To
    Follow
    12 Posts 44 Comments 0 Photos 18 Likes
    Most recent posts shown first   (Show Oldest First) (Print Booklet)
    ๐Ÿ“ Minor setback
    15 days ago by billmcl61 ( Warrant Officer)
    Flag
    Hi Everyone,

    I soldered everything together yesterday and in a burst of enthusiasm assembled it only to find that something isn't quite right, I suspect a dry joint somewhere...

    lesson one (the one I keep forgetting to do - ok that I bypass๐Ÿ˜Š) TEST IN STAGES

    lesson two ..... refer to lesson one ๐Ÿ˜Š

    So everything is disassembled - again, and I'll check all my joints. If in doubt redo the joints.

    I had a closer look at the pinheaders on the Nano this morning and it looks like there could be a few dry joints, so my first step will be to get the soldering iron out again and just work through them one by one.
    I'll take a small break from this just to recharge my batteries, and then have another go.

    All part of the learning curve ๐Ÿ˜Š

    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ“ Progress to date
    17 days ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    Hi Everyone,

    At last I found my camera so I can finally post some pictures, nothing truly awe inspiring, but they mark my progress... Albeit slowly, there's one photo in there that's totally unrelated to this thread but I thought Martin might like it to show off his amazing miniature handy work, sorry that they are a bit blurry but this camera doesn't have stabilisation, once I've posted I'll try to get them in some sort of order and provide some comments to explain them.
    Thanks for having a look.
    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    1
    5
    ๐Ÿ’ฌ Re: Progress to date
    16 days ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    I've got all the parts ready for the receiver part of the receiver transmitter pair, all ready for final assembly.

    All the parts fit into a wee plastic box that I had lying around that used to hold key tags (left over from my security days... I knew it would come in handy some day๐Ÿ˜Š.

    So the whole thing is nice and compact.

    The antenna is 173mm of silicon covered stranded cable, so it's pretty floppy, I cadged some drinking straws from the local garage last night, so I'll run the wire inside of that and hot glue the whole thing together.

    I've cut a hole in the lid of the box for the visible part of the OLED display, and drilled a hole in the opposite corner to run the antenna wire through,

    I've posted a photo of the component parts ready for final assembly.

    Hopefully, now that all of the wires will be soldered, I can rule out loose connections.

    If this test goes well, then I'll know that my code works, and I can then switch the cheap receiver and transmitter for the RFM69HCW's that Will be in the final project, and only have some minor code changes to make.

    Take care
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Progress to date
    16 days ago by billmcl61 ( Warrant Officer)
    Flag
    I've finally had enough of these fuzzy images, so I've ordered a new camera which has anti shake, and I'll be able to post some decent pictures in a week or so.

    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Progress to date
    16 days ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    Just a short post showing what will be the lid of the range tester with the receiver and the OLED display hot glued in place, I now know why it's called HOT glue ๐Ÿ˜Š

    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Progress to date
    16 days ago by billmcl61 ( Warrant Officer)
    Flag
    Ah ha, you guys didn't spot the deliberate mistake, I had the transmitter connected instead of the receiver, but by a stroke of luck connected to the right pins, ok it wasn't deliberate, I goofed...

    Not too big of a job, just unpicked the hot glue, drilled a new hole for the antenna and we'll try again.

    Mmm I wonder if I had these... nah couldn't have - could I ?๐Ÿ˜Š

    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Progress to date
    16 days ago by billmcl61 ( Warrant Officer)
    Flag
    Taking a wee tea break just now so I'll try to make some sense of my previous posts.

    The first post in this thread has a bunch of photos that range in age, some go back to nearly the start of this voyage.

    Photo number 1 is the old remote controller that I pulled down from the attic and took apart and stripped out, I'll be reusing this case for the Arduino based remote controller.

    Photo number 2 is just the back of the controller.

    Photo number 3 is a fairly recent one showing how everything connected to the breadboards, the one on the left is the receiver and also has the oled display attached - even though it's not clear to see. the one on the right is the transmitter.
    Above is a Nano controller and to the right of it is an uno controller, both have pretty much the same capability despite the difference in size.

    Photo 4 is another early photo when I was using the uno to develop the code.
    At this stage the code was all in one before I split it to develop the comms code.
    One of the problems I was having at this stage was losing the joystick signal - which wasn't surprising when the wires were just twisted together ๐Ÿ˜Š

    Photo 5 This is totally unconnected to this thread, just a bit of fun really, I found this wee bottle during my rummage through the attic, and I immediately thought of Martin and his miniature creations, just to the right of it is a 10 Eurocent coin which is pretty small.

    Photo 6 this is some of the bits that I'll be using for the range tester and some main denomination coins to give a sense of scale. the 2 units just above the coins are the RFM69HCW transceivers that I'll be using for the final project, and below the coins is the OLED display.

    Photo 7 shows the circuits still wired to the breadboards and the plastic box that I'll be using for the range testers.
    The straws that I'll be using to hold up the antenna cable, which is just 173 mm of the silicon wire that is from the box also in shot.

    My apologies for the quality of these photos, the camera that I'll be replacing in a week or so is pretty old at this stage, and doesn't have anti shake, and I can't figure out why the flash isn't working.

    Thanks for looking

    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ“ Comms range testing
    21 days ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    1
    3
    ๐Ÿ’ฌ Re: Comms range testing
    21 days ago by G6SWJ ( Midshipman)
    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 _._
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Comms range testing
    20 days ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Comms range testing
    17 days ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ“ Arduino Nano won't download sketch
    1 month ago by billmcl61 ( Warrant Officer)
    Flag
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ“ Stage 2 - complete
    1 month ago by billmcl61 ( Warrant Officer)
    Flag
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    1
    7
    ๐Ÿ’ฌ Re: Stage 2 - complete
    1 month ago by G6SWJ ( Midshipman)
    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 _._
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Stage 2 - complete
    1 month ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Stage 2 - complete
    1 month ago by billmcl61 ( Warrant Officer)
    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.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Stage 2 - complete
    1 month ago by G6SWJ ( Midshipman)
    Flag
    View All
    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 _._
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Stage 2 - complete
    1 month ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Stage 2 - complete
    1 month ago by G6SWJ ( Midshipman)
    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 _._
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Stage 2 - complete
    28 days ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ“ 433MHz comms
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: 433MHz comms
    2 months ago by G6SWJ ( Midshipman)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ“ The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    https://toptechboy.com/lesson-16-controlling-a-servo-with-ar...

    https://toptechboy.com/arduino-tutorial-33-understanding-how-to-control-servos-with-a-joystick/

    https://toptechboy.com/arduino-tutorial-37-understanding-how-to-control-dc-motors-in-projects/

    https://toptechboy.com/arduino-tutorial-39-using-a-joystick-...

    Map function description
    https://www.arduino.cc/reference/en/language/functions/math/...

    Equipment used

    Arduino Uno (used for sketch development and testing)
    https://www.az-delivery.de/products/uno-r3-board-mit-atmega3...

    Arduino Nano (will be used in final project)
    https://www.az-delivery.com/en/collections/arduino-kompatibl...

    L298N Motor Drive Controller Board - Dual H Bridge Module https://www.amazon.co.uk/gp/product/B07MY33PC9/ref=ppx_yo_dt...
    https://toptechboy.com/lesson-16-controlling-a-servo-with-arduino/
    ๐Ÿ”—
    https://toptechboy.com/arduino-tutorial-33-understanding-how-to-control-servos-with-a-joystick/
    ๐Ÿ”—
    https://toptechboy.com/arduino-tutorial-37-understanding-how-to-control-dc-motors-in-projects/
    ๐Ÿ”—
    https://toptechboy.com/arduino-tutorial-39-using-a-joystick-to-control-dc-motor-speed-and-direction/
    ๐Ÿ”—
    https://www.arduino.cc/reference/en/language/functions/math/map/
    ๐Ÿ”—
    https://www.az-delivery.de/products/uno-r3-board-mit-atmega328p-und-usb-kabel?variant=40220505042
    ๐Ÿ”—
    https://www.az-delivery.com/en/collections/arduino-kompatible-boards/products/nano-v3-mit-ch340-arduino-kompatibel
    ๐Ÿ”—
    https://www.amazon.co.uk/gp/product/B07MY33PC9/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    4
    18
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by RNinMunich ( Fleet Admiral)
    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 ๐Ÿ˜Ž
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    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/
    https://toptechboy.com/arduino-lessons/
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    Actually I managed to figure it out...somehow ๐Ÿ˜Š
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    Dang got it wrong the new series of toptechboy videos are at the top, the earlier series is listed at the bottom
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by RNinMunich ( Fleet Admiral)
    Flag
    Who's a clever lad then?๐Ÿ˜‰
    ๐Ÿ˜Ž
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by Martin555 ( Fleet Admiral)
    Flag
    Not guilty Doug.
    I struggle to remember this sort of stuff myself LOL!!

    Martin555.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    Yeah I'm quite proud of myself ๐Ÿค—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by G6SWJ ( Midshipman)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by G6SWJ ( Midshipman)
    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/

    Regards
    Jonathan _._
    https://rcarduino.freeforums.net/
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by G6SWJ ( Midshipman)
    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 _._
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by G6SWJ ( Midshipman)
    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
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by G6SWJ ( Midshipman)
    Flag
    View Video
    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 _._
    Testing RFM69HCW UHF Transceiver Arduino data exchange
    โ–ถ๏ธ
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: The reference links for Arduino
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    Ah that's interesting Jonathan, a nice easy way to check data transfer.

    Bill
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ“ Some research details on 433MHz comms
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    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/
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    1
    3
    ๐Ÿ’ฌ Re: Some research details on 433MHz comms
    2 months ago by billmcl61 ( Warrant Officer)
    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-modules.php
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Some research details on 433MHz comms
    2 months ago by billmcl61 ( Warrant Officer)
    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/
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Some research details on 433MHz comms
    2 months ago by billmcl61 ( Warrant Officer)
    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/
    ๐Ÿ”—
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ“ Part 1B speed and steering from a single controller
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    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
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ“ Bill's Arduino flower class corvette
    2 months ago by billmcl61 ( Warrant Officer)
    Flag
    View All
    And the tidied up version of the Sketch
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    3
    Show 2 More Posts


    About This Website
    Terms of Service
    Privacy Policy
    Cookies used in this website are gluten free, wheat free and dairy free. By using this website you agree to our use of cookies. More Info