Blog

Arduino Day 2017

Arduino Day 2017

The Cultural Technology Development Lab will host an Arduino Day Show & Tell at the NM Museum of Natural History & Science, in Albuquerque NM.

Day: Saturday April 1st
Time: 10:00am-12:30pm
Where: Museum Classroom #2 (subject to change)
Cost: free

Open Source Hardware for Exhibits & Installations

10:00-10:15 – Welcome, What is Arduino Day, who are we & why do we participate?
10:15-11:15 – What is open source hardware? How is it used in museum environments? What are some examples? How have we built off of the Arduino platform to make robust, responsive exhibits, demonstrations
11:15-11:45- Museum tour of open source in action! Behind the fabric at the Hall of the Stars
11:45-12:30- Return to classroom, questions, additional demos,  resources, how to get involved.

Puppet Theater

Our puppet theater sample project (created for Hands of Enchantment Puppeteers in Albuquerque, NM) uses the Bluetooth LE Shield in order to control the color of the neopixel strips with the Adafruit Bluefruit LE Connect iphone/android app. The final version uses Museduino 2.0,  with 2 30-neopixel strips and 2 external power satellite boards.

 

Download Code

IR + Processing

The CTDL team spent a week at Grinnell College working with students on site specific installations. During our visit, we worked with student Jack Dunnington to implement sensors into his proposed video projection project.  The final installation implemented an IR Sharp to control fullscreen video via Processing3. The Museduino was used to handle input up to 15ft away from the laptop and projector setup.

Download Code

 

Pneumatic Tubes

Our pneumatic tube system is built as two stations that can send and receive messages on either end. Originally, each station housed their own arduino, but were autonomous systems, existing together but not communicating directly.

We have redesigned the tubes with Museduino. Now we can use one Arduino for both stations. When a station sends a message, the lightbulb on the receiving end gets a light pulse, and when the other side recieves the message, the sending side pulses. It’s a more real system, and despite the fact that its a complete anachronism, the joy of sending pneumatic messages feels current to us!

_1190933

DC Motor

Overview

This tutorial will teach you how to implement a DC Motor with a Satellite Board of your choice.

Components

Arduino + power and usb connectors
Museduino Shield
1 Museduino Satellite board
CAT5/RJ45 cables
DC Motor
1N4001 diode
1k resistor

Setup

Attach your Museduino Shield to your Arduino and connect a Satellite board on Port A. For this tutorial we are going to use Satellite I/O 3. Before we get started, take a look at the Pin Configuration Chart.

pinconfig

Both the Smorgasboard and External Power boards have a built-in Mosfet which is ideal for I/O that require more power than an Arduino digital output can handle directly.

When working with DC motors, it is also important to use a flyback Diode, which is a diode used to eliminate negative voltage spikes when power is suddenly reduced or removed. To prevent damage to the Mosfets on your Satellite boards, place the diode in parallel with the motor. Use pin 1 for power and pin 2 for Signal with an Open drain to Ground. Then place a resistor between pin 3 and 4.

Next, upload our example DC Motor sketch.

Code


/*
  Museduino | DC Motor Tutorial
  Set the speed of a DC motor.
*/

//satellite Pin 1 on Port A
int s2A = A1;

//satellite Pin 3 on Port A 
int s3A = 9; //default arduino pin is D8, use PWM Select to swap with D9

//variables
int InputValue = 0; //potentiometer value
int motorValue = 0; //motor speed value

// the setup routine runs once when you press reset:
void setup() { 
  
  Serial.begin(9600);
  
  // initialize potoentiometer as input and the motor pin as an output.
  pinMode(s2A, INPUT);
  pinMode(s3A, OUTPUT); 

}

// the loop routine runs over and over again forever:
void loop() {
  
  //read value from potentiometer
  inputValue = analogRead(s2A);
  
  //map value from 0 (off) to 255 (on)
  motorValue = map(inputValue, 1023, 0, 0, 255);
  
  Serial.println(motorValue);
  
  //if motorvalue > 0, set the speed
  if(motorValue > 0) {
    analogWrite(s3A, motorValue);
  } else {
    //stop the motor
    digitalWrite(s3A, LOW);
  }
  
  
}

Github

NeoPixel RGB LED Strip (External Power)

Overview

This tutorial will teach you how to use the External Power Satellite board while implementing a NeoPixel RGB LED Strip.

Components

Arduino + power and usb connectors
Museduino Shield
Museduino External Power board
CAT5/RJ45 cable
NeoPixel RGB LED Strip
Switching Power Supply
Female DC Power adapter

Setup

For detailed information getting started with Neopixels, please review the Adafruit NeoPixel Uberguide. The NeoPixel LED Strip requires a power supply with a minimum of 3.6 Amps. For this tutorial, we recommend using the External Power satellite board and a 5V DC Switching Power Supply which can handle up to 10 amps.

20150707_143110

Take a look at the The External Power satellite board. Notice that the board is equipped with 3 External Power jumpers which allow you to switch from 5V to 6-12V. When external power is in use, the red LED indicating 6-12V will be on.

20150707_132916-1

To setup our NeoPixel Strip, connect its wires to satellite pin 5 on the External Power board. The strip has four wires; power (red), signal (white), and two grounds (black).

2.0_pinchart

Based on the Satellite pin configuration, you will use terminal block pins 1, 3, and 4. A small screwdriver is needed to close the screw terminals.

pinconfig

Next, use the external power jumper directly across from satellite pin 5 to switch to external power.

20150707_151226

In order to use the Switching Power Supply, connect the Female DC Power adapter to the two pin terminal block. Use male-to-male jumper wires or wire strippers to make your own.

20150707_144922

20150707_154446

Plugin your Switching Power Supply to the Female DC Power adapter.

20150707_161917

Via CAT5 cable, connect the External Power satellite power board to Port A. Then connect your Arduino via usb to upload the program to control the NeoPixel strip.

20150707_150732

Code

Download the Adafruit_NeoPixel library. For this tutorial, upload the strandtest sketch to your Arduino. This sketch uses Arduino digital pin 6 which you setup earlier in this tutorial (Satellite Pin 5 on Port A).

20150707_150653-1

extpow

Servo Motors (PWM Select)

Overview

This tutorial will teach you how to implement a servo motor and use PWM Select.

Components

Arduino + power and usb connectors
Museduino Shield
Museduino Smorgasboard
CAT5/RJ45 cable
Servo Motor
Male to Female Jumper wires

pwm tutorial parts

Setup

Before we get started, let’s learn about the PWM Select feature. In our Satellite I/O chart, there are 4 pins that denote PWM Select. Each pin is designated to a port.

2.0_pinchart

Next, look at your Museduino Shield and locate the two red dip switches. Each switch is placed between two ports. The dip switch to the left is between port A and B. The other is placed between port C and D.

20150604_121023

These switches are designed to swap a PWM pin between two ports. By default digital pin 8 is on port A. However, in the instance that an extra PWM pin is needed on port A, the switch allows you to swap digital pin 8 with digital pin 9 on port B.

pwmselect

When both switches are pushed up towards A or D, you can follow the Satellite I/O chart for default PWM Select pins. If either switch is pushed down towards B or C, satellite pins 3 and 5 are swapped. If the right switch pushed up towards D, satellite pins 3 and 5 are swapped.

Now that you have learned about the PWM Select feature, let’s implement a servo motor on port D. First, connect the Museduino and Smorgasboard satellite via Cat5 on port D.

servo tutorial

Then, connect your jumper wires to the Servo Motor.

unnamed-6

Next, connect the opposite ends of the jumper wires to the PWM select arduino pin on your Smorgasboard Satellite. In this instance, satellite i/o 3 on port D is denoted as PWM Select.

pinconfig

Use pins 1 (power), 3 (signal), and 4 (ground).

20150701_161600

Code

/*
  Museduino | Servo Motors (PWM Select) Tutorial
  Servo Motor repeatedly turns from 0 to 180 degrees, then 180 to 0 degrees.
*/

#include  
 
Servo servo;  // create servo object to control a servo 
              // a maximum of eight servo objects can be created 
 
int pos = 0;    // variable to store the servo position 

//Use PWM Select switch to swap default pin D2 with D3~
int s3D = 3; // Digital Pin 3 on Satellite Pin 3 via Port D
 
void setup() 
{ 
  servo.attach(s3D);  // attaches the servo on pin 3 to the servo object 
} 
 
 
void loop() 
{ 
  for(pos = 0; pos =1; pos-=1)     // 180 degrees to 0 degrees 
  {                                
    servo.write(pos);                // tell servo to go to position
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
} 

Github

Once your code is uploaded, make sure your switch is in the correct position.

unnamed-1

ezgif.com-crop

Button

Overview

This tutorial will teach you how to implement a push button that turns on an LED with two smorgasboards on different ports.

Components

Arduino + power and usb connectors
Museduino Shield
2 Museduino Smorgasboards
CAT5/RJ45 cables
LED
Button
Female/Female Jumpers

20150604_120952

20150608_145048

Setup

First, follow the setup for the LED Tutorial.

After you’ve completed the setup, attach your second Smorgasboard to the Museduino Shield on Port C.

20150608_142729

Next, add a button on Digital Pin 2. Our chart shows that Digital Pin 4 can be found on Signal Pin 4 via Port C.

2.0_pinchart

Below is the chart Satellite board pin configuration:

pinconfig

Our button has two wires. Connect one wire to the signal pin with resistance (pin 2) and ground (pin 4). The Museduino kit come with your choice of header pins or screw terminals.

20150608_162858

If using a satellite with screw terminals, place the ends of the wires accordingly and use a small screwdriver to shut the terminals. Otherwise, use jumper wires to connect to the header pins.

20150608_162924

Code

Please note that our button uses the INPUT_PULLUP pinmode. When using this method, inputs will report as LOW.

See here for details: http://www.arduino.cc/en/Reference/Constants


/*
  Museduino | Button Tutorial
  Button turns on LED when pushed.
*/
 
// Digital Pin 6 on Satellite Pin 5 via Port A
int s5A = 6;
// Digital Pin 4 on Satellite Pin 4 via Port C
int s4C = 4;

// variables
int buttonState = 0; // variable for reading the button status

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the led pin as an output.
  pinMode(s5A, OUTPUT); 
  // initialize the button pin as an output.
  pinMode(s4C, INPUT_PULLUP);  
    
}

// the loop routine runs over and over again forever:
void loop() {
  
  // read the state of the button value:
  buttonState = digitalRead(s4C);
  
  // check if the button is pushed
  // if it is, the buttonState is LOW:
  if (buttonState == LOW) {
    // turn LED on:
    digitalWrite(s5A, HIGH);
  }
  else {
      // turn LED off:
      digitalWrite(s5A, LOW);
  }
  
}

Github

Once the code has been successfully uploaded, test the button.

20150608_164821

LED

Overview

This tutorial will teach you how to implement a blinking LED with the Smorgasboard.

Components

Arduino + power and usb connectors
Museduino Shield
Museduino Smorgasboard
CAT5/RJ45 cable
LED
Female/Female Jumpers

20150604_120952

led tutorial

Setup

Connect the Museduino Shield to the Arduino header pins.

Arduino + Museduino

Connect the Smorgasboard satellite to port A on the Museduino Shield via CAT5/RJ45 cable.

20150604_120801

Connect the anode and cathode of the LED to Female/Female jumpers.

led tutorial

Pictured above are blue (-) and white (+) jumpers. In order to connect the other ends of the jumpers to the satellite, you will need to determine which I/O are available from port A on the Museduino shield.

2.0_pinchart

Each version of Museduino has its own pinout chart. Use the pinout chart to find Arduino digital pin 6. After reviewing, you will find that Digital pin 6 is signal pin 5 on the Smorgasboard satellite. Each Satellite I/O has a 4 pin configuration. Locate pin 1 for I/O 5 (circled number) with the labeled solder mask.

20150604_121056

Once you’ve found the correct pin, you can review the pin configuration chart:
1 is Power, 2 is the signal pin with resistor in series, 3 is direct signal pin, and 4 is ground.

pinconfig

Next, connect the other ends of the jumpers via header pins. Use pin 4 for ground and pin 3 for the signal pin (digital pin 6).

20150604_120902

Code


/*
  Museduino | LED Tutorial
  Turns on LED for one second, then off for one second, repeatedly.
*/
 
// Digital Pin 6 on Satellite Pin 5 via Port A
int s5A = 6;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(s5A, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(s5A, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(s5A, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

Github

After uploading the code to your Arduino, you will have a blinking LED.

20150604_130131

Want to add a button? Go to the next tutorial.

NEXT