Welcome to the MIDI Sprout forum

Author Topic: Arduino Uno Set up questions  (Read 4149 times)

Offline JamesNutter

  • Newbie
  • *
  • Posts: 1
    • View Profile
Arduino Uno Set up questions
« on: December 21, 2016, 07:15:07 PM »
Hi Sam,

So I am brand new to doing any sort of electronics work, but the midisprout seemed like a perfect starter project.  I sourced all of the parts, except I got an uno instead of the atmega chip so I could easily upload the code myself.  I found a schematic that helped me figure out which connections to make between the breadboard and the arduino board (different style of UNO with a smaller, fixed chip). And went through your tutorials twice to be sure I had everything connected right.  The galvanometer circuit lights up the LED, but after uploading the code and testing the electrodes the other leds don't turn on (though the galvanometer LED will flicker off when touching the electrodes).   I realized that the uno has an oscillator built in so I didn't use that on the breadboard.  And rather than the two power connections, I just made one to the 5v pin on the arduino board.   So my question is is there anything that I may have missed?

Thank You!

Offline sam

  • Sam
  • Moderator
  • Full Member
  • *****
  • Posts: 187
  • Understand How Your Tools Work!
    • View Profile
    • Electricity for Progress
Re: Arduino Uno Set up questions
« Reply #1 on: December 22, 2016, 09:25:07 PM »
Hello James, yes you are able to connect the 555 timer (galvanometer) to an Arduino Uno directly by programing the Uno with the MIDI Sprout code and connecting the LEDs, galvanometer, and potentiometer to the Arduino.

This is a wiring diagram I drew up in fritzing:

  • The 555 timer Output (Pin 3) connects to the Arduino Pin 2 (INT0)
  • MIDI Output connects to Arduino TX 1 Pin
  • The LEDs each connect to the PWM digital output pins ~3,5,6,9,10
  • A potentiometer (setup as a voltage divider) connects to Analog 0
  • 5v power from the Arduino and Ground connect to both sides of the Breadboard

If you continue to have trouble getting your Arduino to work, it is possible that you have the LEDs in the incorrect orientation (since they are polar diodes), attach the 'short' lead to ground and the 'long' lead to the arduino (through a current limiting resistor 220ohm-1k).

You can always start with the Arduino Blink sketch, which you can make sure that you can get each LED on the breadboard to flash.  Here is a quick bit of modified code from the standard Blink which will test the 5 LEDs.  (if this sketch doesn't work then something else is wrong, its always good to start with the basics and work our way up):
Code: [Select]
  Turns on an LED on for one second, then off for one second, repeatedly.
  added an array of LEDs to test all 5 in the display

const int LEDCOUNT = 5;
int ledPins[LEDCOUNT] = {3,5,6,9,10};

void setup() {
  // initialize pins as Output
  for(byte i=0; i<LEDCOUNT; i++) {
    pinMode(ledPins[i], OUTPUT);

// the loop function runs over and over again forever
void loop() {
  for(byte i=0; i<LEDCOUNT; i++){
    digitalWrite(ledPins[i], HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(150);              // wait for a second
    digitalWrite(ledPins[i], LOW);    // turn the LED off by making the voltage LOW
    delay(150);              // wait for a second
« Last Edit: December 22, 2016, 09:36:03 PM by sam »