Show Posts
Pages: [1]
1  Using Arduino / Interfacing w/ Software on the Computer / Re: StandardFirmata with pinModes for ping and capacitive sensing on: February 25, 2012, 06:34:08 pm
Updated version with a small fix.

The sampling rate of the ping readings is limited to no more than once every 65 milliseconds (regardless of the general analog sampling rate), because otherwise you'll occasionally get wrong readings .

It is recommended (i guess) to set the general sampling period equal to or higher than this, if you want to avoid other analog readings to jitter. Well they will jitter anyway, I guess, but I think you'll reduce the jittering if the sampling period is higher than this
2  Using Arduino / Interfacing w/ Software on the Computer / Re: StandardFirmata with pinModes for ping and capacitive sensing on: February 25, 2012, 05:39:02 pm
Well, I've done the "ping" part (not the capacitive sensing part).

I'm sure it can be done much better, but (or that's precisely why) here it is just in case anyone may want to start from here to improve it.

I've started from Hans-Christoph Steiner's StandardFirmata 2.2 and StandardFirmata_2_2_for_UNO_0_3, though I've only tested the first with a Duemilanove board.

I've added a new pinMode called "PING" which is 0x07 and is meant for use with digital pins.

This is how it works (or is supposed to work): you connect a digital pin, say pin N, to the signal pin of the ultrasonic range sensor, and you set this pin to PING mode.
The pin will periodically trigger the ultrasonic sensor and then read the pulse width, at the same rate as analog reads. It will report the value as if it belonged to a virtual Analog Pin N+8  (so this is ad-hoc for arduino boards with no more than 8 analog pins). You don't need to enable analog pin reporting for the corresponding virtual analog pin (N+8).

Note that Analog pins can only be 0-15 so you can only use digital pins 2-7 in PING mode.

Also, the reading can take up to about 30 milliseconds, so it may slow down the other analog readings, especially if you use more than one ping sensors. I haven't tested what happens in those cases. At the very least, the rate of all analog readings will slow down and jitter, but I haven't checked out if there are even worse side effects. This is just a quick hack, use at your own risk.

I also attach a modified version of Pduino (HCS's Pd abstraction for communicating with Arduino from Pd) which includes the "ping" pinMode.
3  Using Arduino / Sensors / Re: Is there an IC controller for the ultrasonic ping sensor? on: February 25, 2012, 01:23:02 pm
I don't think a "frequency to voltage" does what I need... but I'll have a look at the specs
4  Using Arduino / Sensors / Is there an IC controller for the ultrasonic ping sensor? on: February 25, 2012, 08:47:12 am

I know I can easily control this ultrasonic range sensor directly with an Arduino,

but I was wondering whether there exists some sort of IC that would drive the sensor and convert its pulse output into an analog voltage output. So that the Arduino wouldn't have to switch pin mode and measure pulse width, but it would just read a voltage analog input continuously.

Is there such a thing?

5  Using Arduino / Interfacing w/ Software on the Computer / StandardFirmata with pinModes for ping and capacitive sensing on: January 31, 2012, 04:25:49 pm

I was thinking of hacking the StandardFirmata code a little bit in order to add two pinModes (besides Input, Output, PWM and Servo):
- ping, for use with a ping distance sensor like this
- capacitive, for using the pin as a capacitive sensor like this

When set in one of these mode, the pin would behave from the PC's point of view as an analog pin, sending in measured values continuously.

Has anybody already done something similar? (I'm hoping yes)

Otherwise, any advice to start with? Such as which is the most relevant part of the code of the StandardFirmata sketch that I should look at, or any similar example to look at? Is this something that you can do without hacking the Firmata library itself, just changing the top-level program?

Part of these questions may sound stupid, I don't have a deep knowledge of the Firmata internals, and I don't alway know very well where the Firmata _protocol_ ends and Standard Firmata as a whole program starts......

Thanks in advance
6  Using Arduino / Installation & Troubleshooting / Standard Firmata doesn't work after disconnecting/reconnecting USB cable on: January 31, 2012, 03:27:34 pm

I'm using an Arduino 2009 with the StandardFirmata 2.2 firmware, the [arduino] object in Pure Data, and Ubuntu 11.10.

I'm having this issue that I didn't experience in Ubuntu 10.10 (with the same Arduino, same StandardFirmata, same Pd and same version of [arduino]).

If I follow these steps everything works fine:
- connect the Arduino's usb cable
- upload the StandardFirmata firmware
- open Pd and enjoy the Arduino through [arduino]
If I do a hardware reset to the Arduino without unplugging the USB cable, everything keeps working as expected

But then if I
- close Pd
- disconnect and reconnect the Arduino's USB cable
- open Pd and try to communicate with the arduino through [arduino]

then the arduino doesn't send nor seem to receive any data. Even a hardware reset does NOT fix the issue.

The only way to have it to work again is to open the Arduino IDE and re-upload the StandardFirmata firmware. Then it will work fine again until the next time I disconnect the USB cable.

Everything used to work fine in Ubuntu 10.10. So I am guessing this is a bug in the FTDI drivers? Or maybe StandardFirmata is not correctly "waiting for everything to be up and running" before it initializes the serial port? (and some change in the way drivers work on the Linux side has made the issue surface)?

Has anybody experienced the same? Is there a workaround? Has anybody been able to track down the issue to its real cause?

7  Community / Website and Forum / slightly imprecise installation instructions on: June 13, 2011, 06:49:29 am

under "All Ubuntu versions (old and new) can get the newest packages from Debian Sid", it says:

Download arduino and arduino-core .debs into a clean directory from:
(Uno/Mega2560 owners also need

Indeed, everybody also needs librxtx-java, as it is a dependency of the arduino package, which will refuse to install if you don't have the librxtx-java package installed
8  Development / Suggestions for the Arduino Project / check for updates on startup works only sometimes on: June 13, 2011, 06:31:18 am
Steps to reproduce:

You need a version of the arduino IDE that is not the latest available.

1. Open the Arduino IDE
2. A dialog warns you that an update is available and asks whether to download it. Say no.
3. Close the Arduino IDE.
4. Open it again

Expected: it should prompt about the update again.
Observed: it doesn't.

If I wait some days before I start Arduino again, then the prompt will appear again, but I have no idea of how much time has to elapse between restarts.

This may be expected behavior, but when will it check for updates again? Tomorrow? After the next reboot? How much time has to elapse between restarts to make it reasonable to check for updates again? If the user can't control nor know that, then there should be a menu item under Help or a button under Preferences to "check for updates now".
9  Using Arduino / General Electronics / filtering button noise with a capacitor? on: May 24, 2011, 07:46:05 am

Starting from a simple push button circuit such as the one depicted at,

I thought I would be able to change the circuito so as to avoid "bouncing" in hardware rather than doing software debounce.

I thought that simply putting a capacitor in parallel to the resistor would do: this way, pushing and releasing the button would charge and discharge the capacitor respectively, thus reducing the probabilities of observing bounces on transitions.

However, when I press or release the button, often the arduino resets. What am I missing? I am using a 4.7uF capacitor and a 10k resistor.

I don't see what may be causing any sort of voltage or current peak that may be causing the arduino to reset. I must be missing something very trivial :$

10  Using Arduino / Installation & Troubleshooting / Ubuntu, cannot connect any more to arduino on: May 18, 2011, 06:18:22 am

I have an Arduino Duemilanove and I'm running Ubuntu 10.04. I installed the Arduino software long ago from  synaptic.

I had already used the arduino without issues, meaning I had been able to upload sketches into it and they worked.

Yesterday I connected the Arduino, I uploaded the Standard Firmata sketch from the examples, and I used the Pduino "arduino_test" Pd patch (a Pd patch that communicates with Arduino through the firmata protocol). It worked just fine.

Now I cannot connect to the Arduino any more. The ttyUSB port simply doesn't appear. The pd patch cannot connect to the arduino, and in the Arduino IDE  there is no serial port listed. If from a terminal I type "lsusb", the arduino is not listed (unless it is Chicony Electronics Co. Ltd).
The green light of the arduino is on, and some orange leds do blink for a little while when I connect the usb cable. I am using the same cable and usb port I was using yesterday, and nothing has changed in the system. I rebooted the computer with no luck.

What may I be missing?

11  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: which is the latest revision on: September 13, 2010, 10:05:11 am
This one

However my question applies to all the hardware listed at
12  Forum 2005-2010 (read only) / Frequently-Asked Questions / which is the latest revision on: September 13, 2010, 05:06:23 am

In the description of the Ethernet Shield I read "the latest revision adds... the latest revision includes.... previous revisions don't...." but how do I know which is the "latest revision"?
Maybe this applies to other boards as well (I am not sure if some of them has had more than one revision).

Do the boards have a revision number? Where can I find which is the number of the latest revision of each board? If I buy an arduino board from a distributor, I want to make sure I'm buying the latest revision.

Maybe it's there and I don't see it, but I can't find a place where it reads "Latest revision: x.x.x"

Pages: [1]