Go Down

Topic: Fun with Arduino - a Series of Introductory Videos (Read 2705 times) previous topic - next topic

RudyB

Fun with Arduino - Introductory Videos

As a model railway hobbyist I have found the Arduino to be an invaluable tool. It can liven up any layout by making things move, switch lights on and off, and it can even be used as a full fledged DCC decoder.

Not every hobbyist has affinity with electronics or with software however. To some the hill to start can be just too steep, even while there may be an interest to use Arduino and to try things out.

That is where the plan arose to do a series of articles and videos titled 'Fun with Arduino' ... aimed at anyone who is not an IT specialist (yet :) ).

The first two articles, both with video, are out:

Fun with Arduino 01 Getting Started in 6 Easy Steps.

Fun with Arduino 02 Digital Input and -Output

Have fun.
Youtube channel on Model Railway, Traincontroller, Arduino and more

Willpatel_Kendmirez

I enjoyed both of those, and wonder what you plan for future episodes?

I'm asking because there is no shortage of Arduino material around the webz. In fact it sometimes seems there's too much, some of it subtly different from others, some of it conflicting and some of it factually incorrect.

Apart from some factual faults like suggesting to power servos from the Arduino 5V, the examples on this site are as good a place as any to start. What's going to make your series different from the others?




RudyB

@Willpatel_Kendmirez
Yes, many articles and video's are already available. Yet at our model railway club I found the hurdle still is steep for many to start, even 'beginner' tutorials tend to go too fast. I intend to intermingle a bit more explanation on hardware and software, hoping that non electronic / IT educated might be able to follow along.

Future subjects will probably focus on examples related to model railway lauouts: lighting (LED and relay / FET), servo (railway crossong), optical sensor (automate the railway crossong), DC or stepper motor to introduce some movement ... things like that.

On Rudy's Arduino Projects blog I'll probaby not promote powering the Arduino directly via a 5V pin, whereas on my Rudys Model Railway blog I do. If 5V is the only available power on the railway layout there's no choice. What is the 'factual faiult' you mention?
Youtube channel on Model Railway, Traincontroller, Arduino and more

Willpatel_Kendmirez

What is the 'factual faiult' you mention?
That one shouldn't power servos from the Arduino 5V as a matter of good practice... ok, maybe not factually incorrect as long as it's a small servo but even micro servos can draw 7-800mA. Both the servo sweep and knob examples say to do that... as soon as one moves to more than one and / or a bigger servo there's not enough current.

(I didn't say not to power an Arduino into its 5V pin, I said not to power anything substantial out of it.)

I like your idea of making your material "Arduino in a model railway world": that makes perfect sense for your audience, who do not want to get bogged down in the arcana of electrical engineering, but do want to get their model railways to work safely and reliably without too much fannying about.

Coincidentally, Robin2 had this to say to me yesterday:

I use them [nRF24L01's] for radio control for model trains. I have made some units for my model railway club that take the place of wired controllers so folk aren't tripping over the wires. And I have some installed in my own trains for battery powered radio control.


RudyB


The third video is online.

To control the on board LED is fun, but the real fun only starts when we can control external LEDs, like on a switch panel, or on a model railway layout. This video is about how to connect a LED and how to choose the value of the series resister we need to set the LED brightness.

In the next video we are going to control the external LED and we will simulate a night cycle on a model layout.

Link to Fun with Arduino 03 External LED and Resistor

Youtube channel on Model Railway, Traincontroller, Arduino and more

RudyB



The goals in this video are:
  • To make our code better readable and easier to maintain.
  • We imagine pin 8 operates 20 street lights on a model railway layout. They switch on when we press the button. To simulate a night cycle we want them to stay on for 3 minutes and then automatically switch off again.

Link to Fun with Arduino 04 Readable & Maintainable Code , #define, delay()




Youtube channel on Model Railway, Traincontroller, Arduino and more

RudyB


Arduino outputs can only switch 20mA. If we want to control groups of multuple lights on our model railway layout, we will need some more 'oompf'. A 12V power supply will do great and we can use Relay or FET modules, controlled by the Arduino, to swicth the higher current / voltage. How to do this, how to wire this, is the subject of this video and article.


Link to Fun with Arduino 05 Connect multiple LEDs with a Relay or a FET


Youtube channel on Model Railway, Traincontroller, Arduino and more

RudyB


In this 6th video we are going to create a fully automatic day / night sequence, witch a toggle switch and an indicator LED on our switch panel. The day & night times are going to be configurable in seconds, which means we need some math to go to milliseconds.

Link to Fun with Arduino 06 Automatic Day & Night Cycle with on/off Switch


Youtube channel on Model Railway, Traincontroller, Arduino and more

Go Up