|||
Current Website Support
89
Contributors
11
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
    9

















    Followers
    Arduino and model boats
    by G6SWJ ๐Ÿ‡ฌ๐Ÿ‡ง ( Chief Petty Officer 1st Class)
    ๐Ÿ“ฃ










    Click To
    Follow
    6 Posts 14 Comments 0 Photos 24 Likes
    Most recent posts shown first   (Show Oldest First) (Print Booklet)
    ๐Ÿ“ Arduino & Model Boats 6 - Digital Multi Voice Sound
    10 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    Time for some carrots!!!

    Putting in the time and energy to learn a new skill is hard work, until you reach the tipping point where things begin to fall into place it can all seem a bit confusing, boring and pointless.

    Often initial motivation ebbs and the realisation of the new skill fades.

    So time for something inspirational ....DIGITAL MULTI VOICE SOUND DEVICE

    So these videos are of a guys amazing project which might re-ignite some motivation.

    It's "Jedi" level so not for the next tutorial๐Ÿ˜‰

    There are many different sounds/ engine types that are available free and you can easily encode your own sound - yes it's in a truck but think how this concept could be transferred to a model boat - engine sound, horn, anchor, guns, sea gulls , general harbour noise ......

    Total cost excluding small amplifier and speaker about ยฃ10

    Oh and did I mention that this was Jedi level - it's a very complex project as published, hundreds and hundreds of lines of code and does some crazy amazing stuff - most not relevant to model boats - extract the good bits and we have a simple sound project which performs as well as some commercial boards costing 5 to 20 times the price....

    However complex the code this is the single command that makes the noise

    dacWrite(DAC1, Value);



    Enjoy these videos - I hope you find them inspirational...

    Jonathan

    https://youtu.be/xKvJeDONK5M?t=28

    https://youtu.be/qd8sOaW5Di4?t=29

    https://youtu.be/kLBms7BGrdM?t=13
    https://youtu.be/xKvJeDONK5M?t=28
    ๐Ÿ”—
    https://youtu.be/qd8sOaW5Di4?t=29
    ๐Ÿ”—
    https://youtu.be/kLBms7BGrdM?t=13
    ๐Ÿ”—
    โ–ถ๏ธ
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    4
    3
    ๐Ÿ’ฌ Re: Arduino & Model Boats 6 - Digital Multi Voice Sound
    5 days ago by Martin555 ( Fleet Admiral)
    Flag
    Hi G6SWJ,
    I am definitely not anywhere near "Jedi" level and have an extremely limited budget so i might not be able to do some of this course but i am looking forward to your next log update.

    Martin555.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Arduino & Model Boats 6 - Digital Multi Voice Sound
    5 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    Hi Martin,

    I have limited play time each week - I have recently been working with another model boater to create a two way serial data exchange module that turned out just fine but used up my play time so no tutorial publication here.

    I find myself in a situation where every penny counts due to the pandemic - in my previous life I had a healthy monthy budget that I could spend on electronic gadgets without thinking twice... most of the examples I will publish are based around the Arduino Nano or esp32.

    I will collate some of the suppliers I have used over the years and publish the list if that's ok with the forum owners(?)

    Next installment to follow soon...

    Regards
    Jonathan
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: Arduino & Model Boats 6 - Digital Multi Voice Sound
    5 days ago by RNinMunich ( Fleet Admiral)
    Flag
    Hi Jonathan,
    Recommendations and useful links to suppliers are always welcome, especially when relevant to current projects and topics. Only exception might be if it is obvious that the poster has a personal commercial interest in the linked company.
    I for one would be VERY interested in benefiting from your pioneering experience๐Ÿ‘
    My opinion anyway. I'm sure Stephen will chime in if he has other reservations.
    Cheers, Doug ๐Ÿ˜Ž AKA Assistant Chief Cook and Bottle Washer๐Ÿ™„
    BTW: I love carrots, especially caramelised๐Ÿ˜‹ What's up Doc?๐Ÿ˜
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ“ Arduino & Model Boats 5
    11 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    View All
    After this buidling block hopefully things will start to fall into place and become more interesting - hold the faith๐Ÿ‘

    The next building block we are going to cover is the IDE SERIAL MONITOR.

    The SERIAL MONITOR allows us to โ€œseeโ€ what is going โ€œunder the hoodโ€ of our program โ€“ itโ€™s a bit like having a see-through oven door! to get used to how it works we will send a simple message from the Arduino to the IDE Serial Monitor on our desktop computer.

    The SERIAL MONITOR is mainly used during program development & debugging to help identify what is going on inside our program LOOP as will be seen in the next tutorials..

    Using the SERIAL MONITOR we can:

    >>> Receive data from the Arduino serial port (serial = one character after the other)

    >>> Send DATA to the Arduino serial port. (which I am not going to cover here)

    The SERIAL MONITOR is accessed through the IDE command ribbon by selecting โ€œTOOLSโ€ and then โ€œSERIAL MONITORโ€ - when selected a popup window opens on your computer which is the SERIAL MONITOR. (see pic 2)

    To send serial data from the Arduino to the SERIAL MONITOR we have to:

    In SETUP
    Start the serial connection using the command Serial.begin(speed) where speed for serial communication is one of the following Supported baud rates are 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600, and 115200

    In the program LOOP
    We need to send data to the serial port - to do this we use this command

    Serial.print(); an example might be Serial.print(โ€œhello from your Arduinoโ€);

    Everything between the quote marks will be sent to the Arduino serial port and be received by the IDE SERIAL MONITOR via the USB cable and displayed in the desktop IDE popup window.

    The serial monitor popup in image 3 is highlighted in yellow

    The example program is detailed in image 1 and also below

    void setup() // put your setup code here, to run once:
    {
    Serial.begin(9600); // start the serial connection at speed 9600 bits per second (baud rate)
    }

    void loop() // put your main code here, to run repeatedly:
    { // open bracket for the START of the main LOOP

    // send the characters inside the quotes mark to the Arduino serial port

    Serial.print("Hello from your Arduino ");

    } // close bracket for the END of the main LOOP

    and with all the // comments removed


    void setup()
    {
    Serial.begin(9600);
    }

    void loop()
    {
    Serial.print("Hello from your Arduino ");
    }



    NOTES
    # We need to make sure that the baud rate speed we set in the program SETUP โ€“ Serial.begin(9600); matches the SERIAL MONITOR baud rate โ€“ we can change the Serial Monitor baud rate by selecting a value from a drop down list just to the right at the bottom of the monitor popup window โ€“ if they donโ€™t match you will either see lots of odd characters or nothing at all in your SERIAL MONITOR popup window

    # A good speed to use to start with for the Serial Communication baud rate is 9600.

    # The Arduino Uno and Nano only have one serial port. Other Arduino boards may have more serial ports and we would need to use a slightly different command as we would also refer to the serial port number e.g. SETUP serial3.begin(9600); and Serial3.print(โ€œhelloโ€);

    Regards
    Jonathan
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    3
    ๐Ÿ“ Arduino & Model Boats - Part 4
    13 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    Summary of learning points so far:

    > Arduino is open source โ€“ anybody can make the boards
    > Arduino boards have inputs and outputs - analog (0-5v) and digital 0 or 5v
    > We use the IDE to write our code and upload it via a USB cable to the Arduino board
    > We need to tell the IDE which com โ€œportโ€ and type of Arduino board we are using
    > Programs are also known as sketches
    > Programs have 2 parts โ€“ SETUP runs once as the program starts and LOOP that runs continually
    > DOCUMENT code as you create it using // This is a comment
    > SAVE your code regularly using a new name each time, the name hints at what the program does โ€“ e.g. MyLedFlasher_001, MyLedFlasher_002, etc
    > Syntax โ€“ a set of language rules you must comply with
    >> Terminate lines with ;
    >> Use upper and lower case appropriately where needed
    >> Brackets always used in pairs โ€“ open and close

    Future topics we will cover:
    + Data types
    + Compiling code
    + Debugging code
    + Functions
    + Common programming structures/concepts e.g. "If this then do that"
    + Command sheets
    + Addin libraries
    + Interrupts
    + Serial monitor
    + Debouncing
    + i2c & SPI
    + PWM = pulse width modulation
    + Sensors
    + Arduino performance
    + How to power the Arduino
    + Quick glimpse at ATtiny, Teensy and esp32

    And the command I hate the most โ€œdelayโ€ - like driving a Ferrari with the hand brake on...

    Regards
    Jonathan
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    5
    ๐Ÿ“ Arduino & Model Boats - Part 3
    14 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    HINTS AND TIPS

    >>DOCUMENT your code as you go

    We can add comments to our program code to help us understand what each line or section is doing. All text on the same line after a double forward slash is defined as a comment
    e.g. // This is a comment

    This has no effect on the program code or memory use when uploaded to the Arduino.

    In a simple program this may seem unnecessary โ€“ it is however a good habit to adopt. When you open a program 6 months down the road you may find you look at the code you wrote and struggle to understand your long forgotten logic โ€“ it can be very annoying when you canโ€™t understand your own code!

    >>SAVE your program regularly with a different name

    I use an approach where I give the program a name and suffix _xxx.

    xxx is simply an incremental serial number โ€œMyLedFlasher_001.inoโ€, โ€œMyLedFlasher_002.inoโ€ etc

    Often my enthusiasm overruns and I change lots of lines of code all at the same time only to find the program does not do what I expected or results in an error. If you have overwritten your previous working copy with the same file name you will feel your blood pressure rising. When the going gets tough I rename after each and every change - trust me this approach pays dividends...

    >>SYNTAX โ€“ what is it?

    Definition = โ€œthe structure of statements in a computer languageโ€

    There are a set of rules (syntax) you need to comply with in order for the IDE to accept your program code as valid.

    For example one syntax rule is most lines of code require the โ€œline terminator characterโ€ โ€“ a semi colon to be added to each line of code to tell the IDE โ€œend of lineโ€.

    If you make Syntax errors then the code will not upload(compile) to the Arduino board and you will be left with an orange error bar at the bottom of screen and some error text hinting at what might be wrong with your code.

    Another example of a Syntax error is incorrect use of lower case or capital letters for program commands.

    digitalWrite(LEDPin, HIGH); is valid syntax and works
    digitalwrite(LEDPin, HIGH); is invalid syntax and does not work as the letter w is in lower case

    Brackets are always used in pairs - open and close () or {} - it is easy when code gets more complex to omit a bracket

    Get used to the orange error bar and syntax errors they happen all the time to all programmers โ€“ or at least it does for me.

    You will get familiar with solving the errors over time โ€“ some can take a few minutes to work out what you have done wrong.

    In the worst case it can be best to take a step backwards โ€“ open the previous saved working version, rename it so the working version is left untouched and then start again with your changes.

    -x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

    So that was some heavy stuff, on a lighter note looking forward to some of the upcoming projects I will touch on - very happy to add requests to this list

    Bilge water alarm
    Temperature Alarm
    Dimming LEDโ€™s
    Morse code & Aldis lamp signalling your own message
    Simulating rotating emergency light
    Moving a servo - this could be to let down a ramp or simulating gun turret movement
    Slowing down servo movement
    Running a servo movement sequence
    Automatic ballast trim to correct/rebalance vessel leaning to one side or other
    Active stabilisers
    Reading the receiver channels
    Engine sound device
    Switching 16 circuits from just one transmitter stick
    Holding a compass heading

    Remember Rome was not built in a day - Be patient with yourself and enjoy this fascinating topic

    Regards
    Jonathan
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    4
    ๐Ÿ“ Arduino & Model Boats - Part 2
    14 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    View All
    If you have watched the โ€œsetting the sceneโ€ videos from Part 1 you should now be more familiar with some aspects of Arduino.

    I am going to suggest that you donโ€™t purchase any boards or accessories right now. Wait until we have covered a bit more of the topic โ€“ you will be able to judge then whether this is for you or not and therefore save wasting money.


    In Summary:
    > Arduino is open source and anybody can manufacture the boards โ€“ if not made by Arduino(Italy) then they should have a different name e.g. Seeeduino

    > The boards have inputs and outputs (Analog 0-5v, Digital 0 or 5v)

    > It is necessary to select the com (communication) "port" in the IDE that the Arduino board is connected to

    > It is necessary to select which Arduino board type (Uno,Nano etc) you are using in the IDE

    > Programs (also known as Sketches) are written in the free IDE computer software

    > Programs are uploaded from the IDE to the Arduino board using a USB cable

    The next video shows you how to write a very simple program to flash an LED - the full program code can be seen in the attached image


    https://www.youtube.com/watch?v=d8_xXNcGYgo

    Regards
    Jonathan
    https://www.youtube.com/watch?v=d8_xXNcGYgo
    ๐Ÿ”—
    LESSON 1: Simple Introduction to the Arduino
    โ–ถ๏ธ
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    4
    6
    ๐Ÿ’ฌ Re: Arduino & Model Boats - Part 2
    14 days ago by Newby7 ( Sub-Lieutenant)
    Flag
    I liked the videos but not sure yet if can use the nano.
    Rick
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Arduino & Model Boats - Part 2
    14 days ago by Martin555 ( Fleet Admiral)
    Flag
    Hi Rick,
    I have used a Mega, Uno and a Nano and they all program the same.
    Hope this helps.

    Martin555.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    ๐Ÿ’ฌ Re: Arduino & Model Boats - Part 2
    14 days ago by mturpin013 ( Captain)
    Flag
    Great article but can it be transferred to the "HOW TO" section otherwise it will as time goes on disappear as the blogs move on, in the "HOW TO" section it will always be available.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: Arduino & Model Boats - Part 2
    14 days ago by Colin H ( Commodore)
    Flag
    Good video, I believe I can understand your explanation and I will be trying it for myself.
    Following with great interest, thanks, Colin.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Arduino & Model Boats - Part 2
    14 days ago by RNinMunich ( Fleet Admiral)
    Flag
    "Great article but can it be transferred to the "HOW TO" section "
    I 'see' your thinking Mike, but the advantage of leaving it as a Blog is that we can print the whole caboosh as a Booklet๐Ÿ˜
    Finding it again later should be easy enough by simply searching for Arduino!
    Cheers, Doug ๐Ÿ˜Ž
    PS Another advantage is that here we can add comments and ask questions, which is not easily possible in the How To section. One (anyone) can only make revisions - which might lead to chaos.๐Ÿ˜ฎ As far as I know there are only four of us at the moment who can alter Blog posts in addition to the originator, and only one of those has direct experience of Arduino programming.
    Cheers, Doug ๐Ÿ˜Ž
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1
    ๐Ÿ’ฌ Re: Arduino & Model Boats - Part 2
    13 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    Hi Rick,

    All Martin said and - Yes the Nano can be used - it's great for model boats as it has a small footprint. It is easy to connect more than one Nano together to form distributed processing if we need more input/output pins or more processing power.

    Regards
    Jonathan
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    3
    ๐Ÿ“ Arduino and model boats
    15 days ago by G6SWJ ( Chief Petty Officer 1st Class)
    Flag
    PART ONE

    Hello โ€“ itโ€™s great to see that there are a bunch of you interested in Arduino and model boats

    I love playing with Arduino, I learn something new almost every day and find it mentally stimulating and rewarding working through the โ€œHow can I do thisโ€ of an Arduino project.

    Itโ€™s a big topic and comes with a set of itโ€™s own jargon so it can be difficult to know where to start, how much is it going to cost, where can I purchase the boards etc. etc.

    There are some fundamental building blocks that you need in place to be able to start your Arduino journey and it can be all to easy to give up on the subject when you hit a brick wall.

    My approach will be blended learning โ€“ there are some fabulous free learning resources on the internet โ€“ these are top notch well thought out and well-presented short videos.

    We all have different levels of understanding about Arduino โ€“ I will pitch the posts at those just starting their adventure โ€“ read on past if this is not you and and you come across familiar territory and maybe check back in when things get a bit more juicy.

    A taster for some of the projects to come

    A bilge water alarm - https://www.youtube.com/watch?v=HcpV0flL-zA

    A Morse code/ Aldis flasher - https://www.youtube.com/watch?v=8_SiZkciRsA


    No more waffle from me - lets scratch the surface of 2 of the building blocks โ€“ investing time watching these video a couple of times each will give you a good grounding in the subject.

    Arduino Hardware overview and Arduino Integrated Development Environment โ€“ the free text editor like software where you create a program (from this point onwards referred to as the IDE)

    The four videos below have some overlap but they give a great introduction - enjoy

    https://youtu.be/nL34zDTPkcs

    https://youtu.be/09zfRaLEasY

    https://www.youtube.com/watch?v=fJWR7dBuc18

    https://www.youtube.com/watch?v=CSx6k-zXlLE

    This post is intended to set the scene and give you an overview of the subject

    Please do post any questions / feedback

    PART TWO will cover:
    Writing your first program

    Regards
    Jonathan
    https://www.youtube.com/watch?v=HcpV0flL-zA
    ๐Ÿ”—
    https://www.youtube.com/watch?v=8_SiZkciRsA
    ๐Ÿ”—
    https://youtu.be/nL34zDTPkcs
    ๐Ÿ”—
    https://youtu.be/09zfRaLEasY
    ๐Ÿ”—
    https://www.youtube.com/watch?v=fJWR7dBuc18
    ๐Ÿ”—
    https://www.youtube.com/watch?v=CSx6k-zXlLE
    ๐Ÿ”—
    โ–ถ๏ธ
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comments
    ๐Ÿ—ฃ๏ธ Share
    4
    4
    ๐Ÿ’ฌ Re: Arduino and model boats
    15 days ago by Martin555 ( Fleet Admiral)
    Flag
    Hi Jonathan,
    I started learning Arduino after watching Paul Mcwhorter's
    videos.
    I only learnt to switch a few lighting circuits on and off and some Morse signals then promptly forgot it.
    I must try and do better LOL!!!

    Martin555.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: Arduino and model boats
    15 days ago by Julio ( Leading Seaman)
    Flag
    Hi:
    I am added to the study group ... if you like it.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: Arduino and model boats
    13 days ago by Hellmut1956 ( Master Seaman)
    Flag
    It is great to see another one trying to add to the toolbox of the naval modeler the use of electronics. About more than a decade ago I had been disappointed by the poor implementation of a multi prop module from robbe. During just a weekend a friend, also a naval modeler and myself, build a small board using the avr mega8 controller and were able to display a numeric value of each of the 8 channels signal on an 80x4 display. From there it was just a small step to have these simple circuits offer full functional operation and control of 8 servos from a single signal, a single channel of an RC system. In those days this was a simple and cheap way to achieve this.
    Today, with an Arduino UNO clone for less than 5 Euros from China and with a tremendously more powerful controller, the AT mega328P is the cheapest and easiest way to use electronics to implement the desired functionality, RC controlled, into your model. The Arduino IDE, the programming environment, additionally makes the programming and loading of programs on the controller. This will open a world of possibilities as a powerful tool for naval modelers. When you look on the circuit board of an Arduino UNO, is really not more than making available all pins of the controller on pins of the board.
    In my days we programmed the atmega8 with a Basic compiler, BASCOM. The great think of this compiler ist that may of the instructions it offers are building blocks for naval modelers projects. Here you find the Basic compiler which can do programs the size most of the projects might require and it is for free. The purchased version, as I own it, in my opinion is worth it once you have projects exploding in your mind.
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    2
    ๐Ÿ’ฌ Re: Arduino and model boats
    13 days ago by MouldBuilder ( Captain)
    Flag
    I will be following with great interest. I bought a 32 exercise Arduino starter pack some time ago which is still unused. Time to get cracking I think. I am in quarantine now so I should find some time to start.
    Thanks for all of your time you are giving us Jonathan. It is much appreciated.
    Peter.๐Ÿ‘
    ๐Ÿ‘ Like
    ๐Ÿ’ฌ Comment
    ๐Ÿ—ฃ๏ธ Share
    1


    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