What is Arduino?

Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino provides an open-source and easy-to-use programming tool, for writing code and uploading it to your board. It is often referred to as the Arduino IDE (Integrated Development Environment).

The Arduino boards are able to read inputs – light, proximity or air quality on a sensor, or an SMS or Twitter message – and turn it into an output – activating a motor, turning on a light, publishing content online or trigger external events. You can tell your board?what?to do by writing code and uploading it to the microcontroller on it using the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.

Over the years Arduino has powered thousands of projects. Arduino has gathered around a community where beginners and experts from around the world share ideas, knowledge and their collective experience. There are thousands of makers, students, artists, designers, programmers, researchers, professionals and hobbyists worldwide who use Arduino for learning, prototyping, and finished professional work production.

Arduino was born at the Interaction Design Institute Ivrea IDII from the Wiring project as an easy tool for fast prototyping, aimed at students without a background in electronics and programming. The main objective of both projects is to make the process of working with technology and electronics easier. The Arduino board has evolved to adapt to new needs ranging from simple 8-bit boards to products ready for IoT applications. All Arduino boards are completely open-source, empowering users to build them independently and eventually adapt them to their particular needs. The software is open-source, and it is growing through the contributions of developers and the Arduino community worldwide.

There have been many similar projects, but none of them succeeded as well as Arduino has, due to how easy it is to use the software, and the affordability of the hardware. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users needs. It runs on Mac, Windows, and Linux.

 

Arduino boards are relatively inexpensive compared to other microcontroller platforms, ranging from 8-bit microcontrollers to IoT applications.

The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users. For educators, it’s conveniently based on the Processing programming environment, students learning to program in Processing will be familiar with how the Arduino IDE works easily transferring their knowledge.

The Arduino software is published as open source tools, available for contribution by? programmers worldwide. The language can be extended through C/C++ libraries and ported to other hardware platforms.

The diagrams of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the different modules, extending and improving them or simply learn how they are built. Novices can build breadboard versions of the board in order to understand how it works and save money.

 

ArduCAM USB Camera Shield Released

The?ArduCAM?USB camera shield is?a universal camera control board designed for both PCs and embedded systems like the Raspberry Pi, TI?Beaglebone, and similar products. It supports most parallel interface image sensors ranging from 0.3MP to 14MP, including both global and rolling shutter sensors. The camera is packaged with the software you need to put it to work on Windows and Linux systems?and??a?comprehensive SDK library is provided to support this.??This SDK is fully integrated with Python, which allows for direct integration of our cameras with your?OpenCV?based applications.

The plug and play USB control interface simplifies integrating the camera with a wide range of computer hardware. The ready to use SDK library and demo source code makes the software integration process straightforward and efficient. Users can make it work in minutes without writing a line of code. The broad range of modules?ArduCAM?supports, combined with support for formats like RAW, RGB, YUV, JPEG assures our users a successful outcome.

The?ArduCAM?USB camera shield joins our product line of shields that offer SPI/IC2 interfaces. The USB camera shield offers significant speed gains over the SPI camera shield, running at as high a frame rate as the USB2.0 480Mbps bandwidth allows which can?deliver??640_480(VGA at 60 FPS, through??4384_3228(14MP) at 2 FPS. By using a global shutter camera headboard such as the MT9V034/AR0134 together with USB camera shield, the user can achieve industrial level machine vision with our camera on a Raspberry pi without effort.

The?ArduCAM?is straightforward enough that it can be easily used with PCs and single board computers such as the Raspberry Pi and the?Beaglebone. In short, the?ArduCAM?brings a plug and play solution to digital cameras at the hardware level.

Second Generation ArduCAM Shields and Modules

Introduction
ArduCAM series camera shield is a universal camera control board for Arduino. It hides the complex nature of the camera and provides the plug and play camera control interface as well as the ready to use software source code library and demo code. User can make it works in minutes without writing a line of code. The ArduCAM supports variety camera modules from 0.3MP to 5MP with different format like RAW, RGB, YUV, JPEG and can be well mated with standard Arduino boards.
ArduCAM Shield V2 and ArduCAM-Mini-5MP-Plus are the second generation of ArduCAM products, they offers the improved performance and enhanced functions than the previous revisions. They not only can capture decent 5MP JPEG images, but also can do 5MP full resolution RAW image capture, which makes it to be the ideal solution for IoT and scientific image processing applications. Even more they can record short movie clips as well.
The ArduCAM is straightforward enough that it can be easily used with an Arduino, however this simple interface means that the ArduCAM is equally easily integrated with other single board computers such as the Raspberry Pi and the Beaglebone black. It isn?t just a camera for the Arduino, it?s a camera that because it can be easily interfaced to an Arduino, can be easily interfaced to any single board computer, either directly, or through an Arduino if needed for a larger system without exposed SPI/I2C busses. In short, the ArduCAM brings a plug and play solution to digital cameras at the hardware level.

 

 

HOW TO READ ENCODER SPEED THROUGH AN INTERRUPT WITH AN ARDUINO BASED PLC?S

How to connect the devices?

The power supply of the?E6B2-C OMRON encoder is between 5V to 24V, we used the 7V from the M-Duino to power supply the encoder. The two resistors are connected, as a Pull-up configuration, between the two phases to the 7V of the M-Duino. And the two phases are connected to I0.4 (phase B) and I0.5 (phase A). And?all the GND are connected to the M-Duino GND.

Once all is connected we can proceed to programming the M-Duino. Remember that the encoder convert revolutions to pulses.

How to read these pulses? How to know the rotate direction?

On this example we use an external interrupt to know when the encoder is rotating. The phase A is connected to the interrupt 0 (I0.5). The interrupt will be configured to active when it appears a rising edge on I0.5. Every rising edge on the phase A will indicate us that the encoder is rotating (one pulse). But to know rotate direction we have to read if value of the phase B is low or high. If the rotate direction is forward (CW; phase B = LOW) and if the rotate direction is going backward (CCW; phase B = HIGH). Next it is showed a signal to get a better understanding of that.

Counting pulses through an external interrupt is the best option, because you get sure that you do not lose any pulse while the microcontroller is executing other code.

With every interrupt we add pulses (pulses++) if the encoder is rotating forward and we subtract pulses if the encoder is rotating backward. Once we have the pulses counting on the right way we just need to know the time to be able to convert these pulses to a speed value. To know the time while we are?getting ?pulses we will use two variables, one for initial time (time0) and other to final time (timeF). Using the function micros() (also you can use millis() function) we will set the two values to implement our equation.

The?E6B2-C OMRON encoder that is used on this example has a resolution of 500 pulses for revolution. So, our equation will be:

Speed = (pulses/500) ? / ? ( (timeF-timeO)/60000000 ) ? rev/min

In this example we display the speed of the encoder on serial monitor. To display it you have to introduce a ?p? of print through?the serial monitor.

IMPORTANT: remember, the interrupt has to be as fast as possible, if not you can get some Aliasing!

To add more information of the functions that are used on this code take a look on the Arduino Reference:?millis(),?micros(),?attachInterrupt(),?detachInterrupt()

 

Introducing Adafruit Feather

Wouldn’t it be great if, instead of collecting shields, HATs, PMODs, Clicks, Booster Packs, Props… you could have a cross-compatible platform? Something that doesn’t force you into one chipset? and allows you to mix-and-match the microcontroller, wireless protocol, and functional extensions?

Yeah, me too! That’s why I created Feather. Feather is a flexible and powerful family of microcontroller main-boards (Feathers) and daughter-boards (Wings) with a wide range of capabilities.

Feathers!

Since we aren’t tied to one chip manufacturer, we feature the best-of-the-market chipsets, including:

  • Atmel ATmega32u4 – 8 bit AVR
  • Atmel ATSAMD21 – 32 bit ARM Cortex M0+
  • Broadcom/Cypress WICED – STM32 with WiFi
  • Espressif ESP8266 and ESP32 – Tensilica with WiFi/BT
  • Freescale MK20 – ARM Cortex M4, as the Teensy 3.2 Feather Adapter
  • Nordic nRF51 and nRF52 – ARM Cortex & Bluetooth LE
  • Packet radio modules featuring SemTech SX1231
  • LoRa radio modules featuring SemTech SX127x

and many more to come!

Wings!

Once you’ve picked your main dish (the Feather mainboard) you can pick and choose from a wide wide variety of Wings. Wings are like little “shields” or “HATs” for Feathers. You can (in theory) add as many Wings as you like to a single Feather main-board, as long as you don’t run out of power, space or have pin collisions.

Best of all, we’ve tested all of our Wings against all of our Feathers. So, other than a few exceptions (mostly the GPS Featherwing), you can re-use, re-cycle, and upgrade your Feathers and Wings between projects and as need arises.

For example, start out with a Feather 32u4, then decide to upgrade to the Feather M0 for more Flash – the pin out is the same! Or, make an IoT project with the ESP8266 and then super-power it with an ESP32 just by swapping out the main Feather. Maybe build a project with a Feather M0 Bluefruit, then realize you need more range so you switch to a Feather M0 LoRa.

The Feathers and Wings all have example code written in Arduino C/C++ so as your projects adapt, all your wings and code will come along with you.

TOOLS40 LIBRARY, USEFUL TOOL USING OUR EQUIPMENTS

Tools40 library?include?SimpleComm library, Filter library and Timer library.

With the?SimpleComm library?you can send data through any Arduino Stream: RS-485, RS-232, and Ethernet? It is enough flexible to support different kind of communication typologies: Ad-hoc, Master-Slave, Client-Server? Using an easy to use API.

Filter library includes filtering software that allow you to smooth analog inputs. This is really useful when you have an analog signal that is unstable.

With?Timer library?you can create 3 different timers like Ladder standard Timers:

  • PulseTimer : when there is a rising edge on input value, PulseTimer active Output during the selected time.
  • OnDelayTimer: when Input is active (HIGH) during the defined time, the related Output will be active. Output will be disabled when Input is inactive.
  • OffDelayTimer: As the same of OnDelayTimer, but?when Input is inactive (LOW) during the defined time, the related Output will be active. Output?will be disabled when Input is active.

Next it is explained?how to use?Filter library and the Timer library:

First you have to define the Timer or the Filter and give it a name. After that, you just have to create a variable and related with the wanted Input. On Timers the last step is to use this variable to selected Output. Next it is showed an example of how to use it.

HOW TO USE STEPPER MOTOR WITH ARDBOX ANALOG

This post is showed how to control a steeper motor with an Ardbox analog.

Example requirements:

Important: our equipment?s are prepared for work with common ground !!!

 

Once we have all the requirements we proceed to connect?Ardbox, Driver and Stepper motor.

Usually the Stepper Drivers has at least 3 Inputs (Enable, Direction y Pulses). On our Ardbox we will connect the GND and the 5V from the SPI side between the GNDCom and 24Vcom from the Output side (Q?s). With that we will fix outputs at 5V. We will connect GNDCom with GND of the Stepper Driver. And we will use two outputs to control Enable and Direction. In this example we have used Q0_0 for Direction and Q0_1 for Enable. At last we will connect PIN 3 to PULL (Pulses).

Important: to generate a PWM enough fast to control a stepper motor we must use PIN 3 (Ardbox) and PIN 3 and PIN2 (M-Duino). The normal digital outputs of our equipment?s (Q?s) are limited over 500Hz!!!

Once inputs driver are connected we proceed to connect the stepper motor. Each phase has to be connected with its respective driver output. And connect power supply of the Driver. In our example it is used a stepper motor of 12V and 1,8? angle for each phase.

Next is showed an example code controlling the stepper motor for turn on the same side

MY OPEN-SOURCE, DO-IT-YOURSELF CELLPHONE

For a little over a year, I?ve been working on an open-source, DIY cellphone as part of my PhD research at the MIT Media Lab. The current version of the phone is based on the Arduino GSM shield and Arduino GSM library. It sports a deliberately low-resolution screen (8 characters, each a 5?7 matrix of LEDs), a laser-cut wooden enclosure, flexure (living hinge) buttons, and a ~1000-line Arduino program that powers the user interface. The phone can make and receive phone calls and text messages, includes a phone book and caller id, and keeps the time. Everything you?d expect from a 20-year old Nokia! (Except snake.) I?ve been using various iterations of the project as my primary cellphone for the past six months or so.

 

The phone is open-source and the design files are available on GitHub (hardware, software). Assembly instructions are on my website, although I wouldn?t recommend making your own unless you have experience with soldering surface mount components.

 

Of course, it?s not just me that?s been building these phones. I?ve run twoworkshops in which other people have made them for themselves. A few people have been building them on their own, including someone who posted his result on Twitter.

 

Here you can see some the variations on the enclosure that my friends have made. On the left is a 3d-printed case by Ben Peters, the middle is a CNC-milled purpleheart wood case by Dena Molnar, and on the right is a hand-cut cardboard case by Jeffrey Warren.

 

The phone has undergone numerous revisions as I?ve tried to get it into a robust, useable form. Here you can see some of those variations. I started with an LCD screen like those found on old Nokia phones, but it would break after a month or so in my pocket, so I switched to the more-robust LED matrix. The enclosure has had a few tweaks as well, primarily to find a good design for the flexure buttons.

 

Overall, I?m pretty happy with the current incarnation. It seems to be relatively robust, simple enough to assemble by hand, and functional enough to use everyday (although a long way from a smart phone). That?s my DIY cellphone.

LOG YOUR HAMSTER?S RUNS WITH ARDUINO

We?ve all seen hamsters in a cage, furiously running nowhere. Perhaps you?ve thought about the pointlessness of this activity, before going to the gym to lift weights up and down or run on a treadmill. From an outside perspective, both activities seem pointless, but when you realize the benefits, maybe?tracking what ?feats of strength? you?re able to accomplish, things become much more clear.

As seen on Hackaday, in order to track the activity of his daughter?s hamster, John Mueller implemented an Arduino Uno-based system that records revolutions using a magnet and a reed switch. Every time the magnet on the wheel passes the fixed switch, it triggers an Arduino input, recording how many revolutions, and thus how many miles the little guy runs each night. Results are quite impressive considering its size, recording over 3.5 miles on one occasion!

This type of encoder concept could be used in many different situations, such as logging bicycle speeds, or tracking motor stats.

Ladyada’s Learn Arduino – Lesson #0

If you’re here, it’s because you want to learn how to build and make stuff with electronics! (If, rather than learn electronics, you’d like to look at pictures of cats instead, please check https://www.adafruit.com/galleries/cats-of-engineering)

And, you’re in luck: there’s never been a better time.

Gone are the days where you need thousands of dollars of equipment and lots physics/math background. Nowadays, if you want to learn to work with electronics, you can jump right in for $100 or less, and any sort of computer. And we’re talking about learning a lot of electronics – from the basics of analog to the complexities of firmware. With a good pack of parts, you can build a base of knowledge that will take you from your first blinking LED to someone who can start prototyping and inventing custom products.

Who is this for?

Anyone with a computer they can install software on, an Arduino or compatible and the ability to type and click a mouse. That’s pretty much the minimum.

You don’t need to know a lot of physics or math, and just like an Art Degree isn’t required for making art and being creative, you don’t need to have a computer science degree. It helps if you’re comfortable using computers but that’s a skill most people pick up through life.

If you know how to program already – great! If not, don’t worry, we’ll teach you enough to be dangerous.

Who are you?

Great question. This is me:

I’m Ladyada, and I love to teach people how to build stuff and how they can be creative with technology.

So, are you ready?

Let’s do this thing!

What is an Arduino?

Arduino is the name of the little electronic circuit board that you are going to use as a tool to investigate and explore programming & electronics.

It is manufactured by arduino.cc a company?led by Massimo Banzi, CEO of Arduino. Here is how they describe themselves:

Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.

Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers – students, hobbyists, artists, programmers, and professionals – has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.

Here’s a photo of Massimo and I at the Adafruit factory, showing off the first Arduino UNO made in the USA!

About This Lesson

This lesson won’t teach any electronics, really. Its more for making sure that everything is setup and ready for the future lessons. It will verify the board is working as intended and that the computer you are using is compatible.

Think of this tutorial as the ‘home base’ of your journey. If things ever get into a weird spot come back here and re-verify this lesson!

One of the most important skills you’ll have to learn is that when things go wrong (and they will, tons) come back to the most basic assumptions. This is a little bit of the “are you sure its on” of electronics. It’s surprising how many skilled engineers will spend hours debugging a circuit to realize that…it wasn’t plugged in!

Which Arduino?

In the ten years since Arduino was first released, there’s been a huge proliferation of hundreds of different “Arduino boards” available. On one hand, there’s an Arduino for just about every kind of specialized purpose, but on the other hand – it can get quite confusing!

In this tutorial we’ll be focusing on the Arduino UNO which is the classic Arduino, by far the most popular and is what 99% of projects use. It’s basic, well supported, and is a great starter-duino.