Archive for the ‘Tools’ Category

Getting Started with Pachube & Arduino

Thursday, June 25th, 2009

Another post on Pachube and how easy it is to get setup and going. This post will cover the basic steps on how to get some sensors online!  I will be using my project of two light sensors as an example.  The status of my light sensors are viewable at http://www.pachube.com/feeds/2145

Pachube + Arduino from Morgellon on Vimeo.

STEP ONE: GET A PACHUBE ACCOUNT!

Head over to the Pachube website and see various sensors from all over the world and view their status.  Be sure to view the ABOUT page, this describes INPUTs and OUTPUTs, along with ways to interface with Pachube and your sensors.  The QUICKSTART page has the details to get started and how to use your API.  Pachube is still in beta, so you’ll need to get an invite code… but no worries, Pachube has an email address on the QUICKSTART page.  Just send them and email asking for an invite and what you would like to do.  If they let me in… they will let anyone in! ;)

STEP TWO: PREPARE ARDUINO!

The Arduino can be interfaced with Pachube two ways: 1. With an Ethernet shield OR 2. Via USB connected to a PC running Processing… which is the way used in this tutorial… as I feel it is an easy and inexpensive way.  You can learn more about each way at the Pachube Arduino page.

To prep the Arduino, you need to connect the sensors you will be using and verify that they are working correctly! Once the sensors are good, then upload the “Standard Firmata” to the Arduino.  Now the Arduino is prepped for Pachube!  Leave the Arduino connected to the PC.

STEP THREE: PREPARE PROCESSING!

To have Processing communicate easily with Pachube, you will need to add a few libraries.  They are the Pachuino, Arduino and EEML libraries, they are available and there is more info at the PACHUINO page.  Download, unzip and move them to the libraries folder, in your sketchbook folder.  Now Processing is ready!

STEP FOUR: PREPARE INPUT FEED!

Once you have a Pachube account and your API key, go ahead and set up a new feed for your sensors.  Since I have light sensors, I started a new INPUT FEED.  I chose to make my feed “manual” (as this is easier for me) which means Pachube gets updates only when I send them.  Instead of Pachube connecting directly to my PC to pull the info.

STEP FIVE: PREPARE CODE FOR PROCESSING!

Once you have the libraries in the folder, you are ready to start Processing and start coding.  Below is the code I used for my light sensor.  This was taken from the sample code and stripped to make it more simple. I added a LED on pin 11 to light up (to let me know when my Arduino was running) and a delay(1500).

Be sure to add you API Key, and the URL of your INPUT FEED!

import processing.serial.*;
import cc.arduino.*;
import eeml.*;
import pachuino.*;

Pachuino p;
Arduino arduino;
int ledPin = 11;

void setup(){
p = new Pachuino(this, Arduino.list()[0], 115200);
p.manualUpdate(”http://www.pachube.com/api/2145.xml”); // change URL — this is the feed you want to update
p.setKey(”—YOUR API KEY HERE—”);

// local sensors
p.addLocalSensor(”analog”, 0,”Light Sensor Inside”);
p.addLocalSensor(”analog”, 1,”Light Sensor Outside”);
}

void draw(){
//p.debug();
p.digitalWrite(ledPin, Arduino.HIGH);
delay(1500);
}

// you don’t need to change any of these

void onReceiveEEML(DataIn d){
p.updateRemoteSensors(d);
}

STEP SIX: LAUNCH CODE AND COLLECT DATA!

Make sure that:

  • Sensors are *working* and connected to Arduino
  • Arduino is running “Standard Firmata” and connected to computer
  • Processing is collecting sensor data from Arduino
  • Computer has Internet connection

Now run your program and begin collecting data and sharing it on the web!!  Check your feed to make sure you data is being transmitted.  Have fun and happy tinkering!

–Morgellon OUT!

Arduino + Pachube = Web Connected Sensors!

Wednesday, June 24th, 2009

Quick update before I zonk out…  Yesterday I setup an account for Pachube and spent all night getting familiar with how it works. Pachube describes itself as a service that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world. The key aim is to facilitate interaction between remote environments, both physical and virtual.

It also works with Arduino and Processing… hrmmmmm…..

As a “test” project, I set up two light sensors in my room.  One is mounted on the wall, the other is taped to the window facing outside.  The idea is to compare inside light levels to outside light levels and adjust for energy consumption.  If the light level outside is equal or greater than inside, then perhaps I should open the blinds to let in more light… or maybe even go outside… *gasp*
The two light sensors are connected to an Arduino running the Standard Firmata.  The Arduino is connected to a PC running a Processing sketch that sends the sensor data to Pachube.  Nice and easy!  I’ll post more details, code and a basic tutorial later… after I’ve slept… that way it *might* make sense.
Until then, here are some pictures and graphs. (yay graphs!) The two graphs are generated by Pachube and are fairly easy to customize.  The higher the number, the less light is present.  So, hopefully the Inside Light Sensor will stay a nice high number as I sleep… while the Outside Light Sensor should lower over the course of the day.

The graphs will continue to update as they receive more data from the sensors.  It will be interesting to watch and compare the differences in the two graphs.  More to come soon!

–Morgellon OUT!!


Search Engine Power!

Thursday, June 18th, 2009

So, you have a *great* idea for an Arduino project… you’ve thought about what parts you will need and how they will work… but where will you find the parts?… and are you sure that’s the right resistor value?!

Today I would like to share a few tools that I use to help me, when I am in the design phase of a project.  Both are relatively new and you may already be aware of them… but I thought it was worth a post… just in case ;)

Octopart octopart.com/

Octopart is a search engine for electronic parts.  This is a great resource for many reasons!  Octoparts allows you to filter your search by relevance, price, or quantity.  You can also search by manufacturer or supplier, along with package type, size and many other options.  I can see this being quite helpful for when your favorite parts supplier is out of stock… or perhaps you’re looking for an alternative to an existing part… maybe you’re building hundreds of bots for a robotics swarm and you need lots of parts and you want them from the same supplier… or… (it goes on and on…)

Wolfram Alpha www.wolframalpha.com

Wolfram Aplha is a “Computation Knowledge Engine”. What does that mean? I have no clue… but what I do know, is that it’s a wonderful tool for doing equations. It’s like having your own ship’s computer from the Star Trek!  For those who like it, it’s a very nice reference tool and a great way for doing math or double checking equations.

I highly recommend that you spend time with these two sites!! See if they have a spot in your toolkit!

Thoughts on Solder

Tuesday, February 3rd, 2009

Wow, ice storms pack quite a wrath! Having no power for almost a week made me really consider doing some “alternative energy powered” Arduino projects. Perhaps using a solar panel, dynamo or other method… but first a week worth of Internet to catch up on!! While I catch up, here’s a neat video to tide you over until the next post!

Did you know there are different types of Solder? Solder comes in many different forms, with various melting points and properties!

Here’s a great video detailing some of the differences and possible myths between lead/lead-free solder

Time to Solder! (Soldering 101)

Tuesday, January 20th, 2009

There are many reasons to learn the art of soldering, if you don’t already solder.  Whether to take a project from breadboard prototype to a completed project… saving money by buying a kit instead of a pre-assembled… harvesting parts from old/broken electronics… modifying existing consumer electronics… the reasons go on and on!

BUT learning to solder can be intimidating… especially if you’re learning on your own or don’t have someone to consult with.

Luckily, the fine people at Curious Inventor have put together a great resource for soldering and solder reference. They also have a great video tutorial, which you can view below.


Be sure to check out the Curious Inventor Solder Guide for pics, reference and hints!

Signal Analysis: Analog V.S. Digital PWM!!

Tuesday, November 18th, 2008

Signals come in two basic types – Analog and Digital. Analog signals are capable of being any value, where Digital signals are called “discrete”, meaning they capable of being in only one of two states! The terms for these two states of a Digital signal are varied but include; ON/OFF, TRUE/FALSE, 1/0, HIGH/LOW, etc.

So what’s that mean? A good example of a Digital signal is a light switch in your house. You can either flip the light switch ON, or flip the light switch OFF. To follow this line of thought, an example of an Analog signal would be a light with a dimmer switch. With a dimmer switch you can adjust how bright or dim the light is, anywhere from completely OFF, to completely ON.

Okay… The Arduino is capable of analog and digital INPUT, but only capable of digital OUTPUT. When working with the Arduino we see that there are 6 analog pins and 14 digital pins. (It should be noted that if you have no need of analog INPUT; you may use the analog pins as extra digital OUTPUT pins — declaring them as digital pins 14 – 19)

So, if we are only capable of digital OUTPUT on the Arduino, how are we able to dim a LED?

Dimming LED's with digital PWM

dimming LED with digital PWM

ENTER PWM!! (Pulse Width Modulation) Some, but not all pins on the Arduino are capable of Digital PWM OUTPUT. Basically, PWM is the digital way of mimicking an analog OUTPUT.

To better show the difference between Analog and Digital PWM, I put together a simple LED dimmer circuit and hooked up an oscilloscope to view the Analog and Digital PWM signals. I took some video of everything in action to better serve as an example.


Analog Signal VS PWM Signal from Morgellon on Vimeo

The sketch I used in this video is available here: http://serverwillprovide.com/icuubi/examples/analog_vs_PWM.pde

  • Cool Arduino Parts

  • You are currently browsing the archives for the Tools category.



  • Viagra online
  • Order cheap cialis
  • Buy viagra no prescription
  • Cialis online
  • Buy generic cialis
  • Order propecia no prescription
  • Cheap propecia online
  • Propecia online pharmacy
  • Order levitra online
  • Cheap price cialis
  • Online pharmacy levitra
  • Buy viagra online
  • Buy discount levitra
  • Cheap cialis online
  • Propecia hair loss