You might be wondering what an Arduino is or why it could be useful. An Arduino is something called a micro-controller and it is a way to get your computer to interact with the real world. To put it simply, it can take an input and give an output. You don’t have to be an expert, but you will need to learn the basics of computer coding.
The Arduino is my preferred micro-controller. This post will focus on the Arduino. There are a lot of options out there, but I found something i liked and stuck with it. The Arduino is great for beginners. It’s simple and there is a large community for support. If you can’t get something to work right somebody can help you get your code straightened out.
What Can it Do
Have you ever forgotten to feed the fish, or water a plant? With a micro-controller you don’t have to worry about doing these things you set the computer to do it once and it takes care of the rest. the possibilities are endless. If you can think it then you can do it.
These things can be powered by a 9v battery. There are no limits of where you can put one based on power requirements. An arduino only runs on 5v of power. If you’re in the US then the outlet has 120v, but that isn’t a problem. You can use the usb power cord in a phone charger just fine. If you aren’t sure what you can do, there are plenty of project ideas out on the internet, such as the ones that can be found here.
So you’ll need to buy an Arduino there are lots of different kinds of arduinos they they come in all shapes and sizes anywhere from 1 in by 2 in to 5 in by 6in.
There are also tons of different knock off brands of Arduino all of them work just fine if they all have the same software that they use and they’re all coded in the same language, and they use the same software. If you don’t shop around, you can expect to pay up to $25 for an Arduino but typically you can find them on like Amazon for 8 bucks.
All of the different brands of Arduino are going to have the the same things on them. They’re going to have a plug in it to plug it into your computer, a plug for you to power it from an external source, and they’re going to have wholes to plug wires into.
If you plug the arduino into a computer it’ll pull power from the computer and you don’t have to worry about plugging it into an outlet. There are some Arduino out there that don’t come with the cable to connect it to the computer. You’ll need to make sure that the one you pick has the cable or you’ll be buying a cable separately.
So the only thing that you’ll need to purchase to use an Arduino is a breadboard, sensors and some wires. The sensors you will need are going to be dependent upon the project that you’re doing. Before you go out and start buying sensors you need to have an idea of what you want to do and if you stay tuned for an upcoming post I’ll come up with some ideas that you can use for Arduino projects. You can also get a starter kit while you are getting accustomed to using an ardunio.
How it works
An Arduino works based on whether the pin holes are in a high state or a low state. Low and High states are 0 volts and 5 volts respectively. You’ll have to program the Arduino so that it knows what to do when a certain pin goes to a high state or goes to a low State and we’ll talk about that program in a little bit.
There are two kinds of of pin holes on an Arduino. The first is an analog and the second is digital. An analog pin will give a signal that is not just on (high) or off (low) but it ranges from 0 to 1024 (I’m not sure what the unit of measure is, but I’m guessing it’s based on the number of bits in a kb).
Based on what signal you get, you can write a formula to correspond that signal to some percentage. For example if you have a moisture sensor in a cup of dirt you’ll be able to tell if you have moist dirt or basically water with some particles in it.
The digital pins are either on or they’re off there’s no middle ground but on an Arduino they do have something called pulse-width modulation. Pulse-width modulation allows the controller to turn something digital on and off really fast so that it gives the impression that something is at 25% or 50% power. This is easiest to be seen with light bulbs but electric stoves do the same thing but with bigger pulse-widths.
The easiest way to use an arduino is based on cause and effect. For example, if the dirt gets too dry, it will open the water valve. There are more complex things that you can do, but those are for when you feel more comfortable with programming.
If you want to be able to control things that take more than 5 volts (which is almost everything that plugs into an outlet), your output will go to something called a relay. This is just a small and cheap way for a small amount of electricty to flip a switch for a large amount of electricity.
In order to program an Arduino you have to have the software that’s developed by the company that created the arduino. This software it’s free to download and you’ll need to do to to get it set up. You can download it from here. You’ll need to download the Arduino IDE for your operating system. Alternatively, you can use the web version without downloading anything.
When downloading software from the internet, it’s very important to always download from the originators website. Getting software from a random third party could introduce viruses onto your computer.
I know what your thinking. Programming is for all of those computer science guys, or the guys in the IT Crowd. You don’t need to worry about it. It’s not hard at all. I like the arduino because it is open source and there is a large community. You will need to learn some coding to know whats going on, but there are plenty of people that are much better at using an arduino than me that are happy to help others. There are also plenty of open source codes out there that you can steal shamelessly from.
I know I just told you not to download things from the web without knowing what they are. When you are downloading a source code, there are no secrets. It’s not possible to hide malicious code when you are showing everything you have to anyone that wants to look. It’s like trying to hide a terrible poker hand when you play with all of your cards on the table.
After you’ve downloaded and installed the software, you’ll need to get a few things setup. In order to send code to your arduino you need to tell the program what port the board is plugged into. This is a little different on different operating systems. My instructions are for a windows computer, but it’ll be similar on linux and Macs.
- You’ll go to tools
- Then select port
- Pick the port that looks like it has something different.
- Go back to ports
- Select board
- I mainly use an Arduino Uno, but you’ll need to select the board that you have.
I won’t be able to go into the details of the actual programming. That’s a big enough topic for it’s own post, and this one is already running out of space. There is nothing wrong with coping and pasting code for arduino projects. You really only need ot learn the programming language to know what’s happening.
While programming and messing with small electronics aren’t for everyone, there is nothing wrong with trying something new out. It isn’t until we try something that we can find that we actually like it. So get out there and learn somthing new. If you get stuck, there’s a whole community out there to help you, or you can drop a comment below and I can see if I can help you get it working.