Jump to content


Photo

Using Arduino Devices


  • Please log in to reply
4 replies to this topic

#1 brett

brett

    Member

  • Members
  • PipPip
  • 11 posts

Posted 24 January 2014 - 02:54 PM

I'm interested in Arduinos and saw that you system supports them.  What kinds of things can I do with an Arduino?  



#2 Felix

Felix

    Member

  • Members
  • PipPip
  • 19 posts

Posted 24 January 2014 - 05:43 PM

Arduinos are electrical swiss army knives - they allow your system to do all kinds of things.

 

As you know, Arduinos have lots of pins capable of digital IO, analog input, PWM and servo output.  The system can configure an Arduino pin for any of the modes it's capable of, and there are also additional modes for Schmitt triggers (for analog inputs), and optional debouncing for digital input pins (see http://www.catalinac...ArduinoPinTypes for details).

 

Connect an Arduino to your system host's USB port, use any of the Arduino pin scripts to configure the Arduino pins, and they'll appear as terminals in your system's Device Explorer.  Inputs will display their analog or digital values, outputs will respond to whatever values you assign their terminals (digital outputs respond to on/off, servo and PWM outputs respond to 0-100 type values).  If you virtually wire the Arduino terminal to other parts of the system, your system can respond to Arduino input pins and control things using the output pins.

 

I've used Arduinos to connect the system to temperature sensors, relays (for turning higher currents and voltages on and off), LEDs (PWM pins make great dimmers), sound sensors, hall sensors (sense currents and magnets), AC current sensors, servos, potentiometers, light sensors, motion sensors, moisture sensors, buttons, switches ... long list, so I'll stop here.

 

You don't have to write any Arduino code to use these devices - uses Arduinos running Firmata (often comes preloaded when you buy Arduinos).  Don't have to write any code at all.  Just wire the devices the the Arduino, configure the Arduino pins with scripts,  and you can monitor and control the devices from the Device Explorer web page (and you can virtually wire them to each other or other parts of the system).



#3 brett

brett

    Member

  • Members
  • PipPip
  • 11 posts

Posted 24 January 2014 - 07:33 PM

Thanks, I'll checkout the webpage.



#4 brett

brett

    Member

  • Members
  • PipPip
  • 11 posts

Posted 24 January 2014 - 11:48 PM

I'd like to manipulate a servo.  Looks like I just hook the servo control input to an Arduino servo output pin, use the ServoOutputs script to configure the Arduino, and then I can manipulate the servo from the Device Explorer page.  Sound about right?



#5 Felix

Felix

    Member

  • Members
  • PipPip
  • 19 posts

Posted 25 January 2014 - 12:36 AM

Yup.  And you'll need to connect the servo's two power wires to 0 and 5V (or whatever voltage the servo spec says).

 

There's a really clean way to wire servos to Arduinos.  The Grove system (see seeedstudio.com) has an Arduino "Base Shield" which brings the Arduino I/O pins and 5V power out to small headers (see http://www.catalinac...o/ArduinoDevice for some pictures).  They also make a wiring harness that plugs into the shield and plugs into a standard servo connector.  Using the Base shield, you can wire your Arduino and servo together without breadboarding, and the connectors are all keyed, which makes them pretty idiot proof.  Because the shield only brings the Arduino 5V power to the connectors, your servo needs to work using 5V (many do).

 

If you are using an Arduino Uno (and most of the other models, too), you can have servo pins on any of the 12 lowest available digital pins (D2-D13) .  You'll want to connect your servo to one of those pins.  If you hook your servo to pin D3 on the Arduino and want it called "servo", you'd click on the ServoOutputs script and fill in the dialog box with:

 

arduino_id: "arduino"
names: "servo"

pins: 3

 

I'm assuming you've already installed an Arduino into your system by running the Arduino script, with Arduino ID "arduino".

 

After running the servo script, go to the Device Explorer page, click on the "servo" terminal, enter any value from 0-180, and watch the servo respond.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users