[PD] pduino and FSRs

Derek Holzer derek at umatic.nl
Sat Apr 12 17:55:41 CEST 2008

This makes sense. I used some FSRs with a hacked joystick HID device and 
got into some trouble there as well. FSRs have zero resistance when no 
force is applied, so essentially you are short circuiting the 5v 
directly to ground when you plug them in without any force applied. I 
would definitely try a resistor in series with each FSR, that's how I 
did it with the HID joystick, which also crashed (the joystick did not 
function) when the FSR was plugged in without any resistance.

good luck!

marius schebella wrote:
> hi nick,
> did not read through the whole history of this thread but it seems the 
> crash is related to the arduino powering down because of a short 
> circuit. actually the usb port is the one that powers down the arduino 
> or at least disconnect the arduino and that can cause comport to crash.
> I think you should check your circuit again to make sure there is no 
> short circuit. I am not sure about the phidget but what you need is a 
> resistor connected to ground that circumvents short circuit when you are 
> at the lowest sensor resistance. that is, when you - for example - turn 
> a potentiometer all the way up, it connects the "in" directly to the 
> "out", without any resistance and that causes a short circuit.
> with the fsr it might be something similar, but it is just a guess.
> marius.
> nick burge wrote:
>> OK this is getting interesting.
>> I have got the FSRs set up again on my breadboard so I can experiment a 
>> bit. I've tried different baud rates and get the same result...that is 
>> to say a crash in PD.
>> The FSRs connect to Phidget voltage dividers as recommended by the 
>> suppliers and from the  voltage dividers we have 3 wires: analog in, 5v 
>> and ground. Now if I swap the wires they call "analog in" with the 5v 
>> wire on the breadboard and connect again to Pduino I can enable all the 
>> analog inputs in the Arduino object and NO CRASH....
>> I am no expert in electronics, but I'm sure someone can give me an 
>> explanation as to what is going on. 
>> Looking at the manual for the Phidget voltage dividers I see that in the 
>> proprietry software designed for use with the phidget microprocessor 
>> there is a setting you have to select: namely "Ratiometric" when using 
>> these voltage dividers. Could that have anything to do with it?
>> Nick.
>> ------------------------------------------------------------------------
>> *From:* Hans-Christoph Steiner [mailto:hans at eds.org]
>> *Sent:* 12 April 2008 00:41
>> *To:* nick burge
>> *Cc:* Pd List
>> *Subject:* Re: [PD] pduino and FSRs
>> I use 6 analog inputs all of the time on Mac and Linux. I've never used 
>> 19200 tho. Try using [comport] alone to eliminate anything in [arduino]. 
>> Maybe there is a bug in comport on vista?
>> .hc
>> On Apr 11, 2008, at 3:17 PM, nick burge wrote:
>>> Thank you Hans, am I being unrealistic in trying to have six analog 
>>> inputs active all at once? I know you said that was a lot of data, but 
>>> I run a fairly powerful laptop with a dual core Centrino processor, 
>>> and Windows task manager reports only a modest demand on the cpu of 
>>> around 30% when I have the patch running and all inputs active, so it 
>>> seems to be an error in timing or syncronisation rather than simply 
>>> overstressing the system that causes this....I've taken the patch 
>>> right down to the basic arduino-test patch, but still the crashes 
>>> occur when I activate more than 2 analog inputs. I'll experiment with 
>>> different baud rates, go back to a usb connection rather than the xbee 
>>> wireless system and keep trying to identify the source of the problem. 
>>> I'll get back to you if I learn anything new. Below is the data 
>>> produced by the event viewer in Windows in case it means anything to you.
>>> pd.exe
>>> 		**
>>> 		** 	47148d16
>>> 		** 	pd.dll
>>> 		**
>>> 		** 	47148d15
>>> 		** 	c0000005
>>> 		** 	00004e04
>>> 		** 	17ec
>>> 		** 	01c89bd26543018e
>>> Nick.
>>> ------------------------------------------------------------------------
>>> *From:* Hans-Christoph Steiner [mailto:hans at eds.org]
>>> *Sent:* 11 April 2008 18:30
>>> *To:* nick burge
>>> *Cc:* Pd List
>>> *Subject:* Re: [PD] pduino and FSRs
>>> Let's keep this on the list since it could be generally useful.
>>> In order to get to the next step, you should try to isolate the 
>>> problem, to see where the crash is actually happening. Otherwise, 
>>> there are far too many possibilities for me to try guessing. Ideally, 
>>> you could make a simple patch that reproduces the crash.
>>> .hc
>>> On Apr 11, 2008, at 3:01 AM, nick burge wrote:
>>>> Firmata, Pduino and xbees. are all set to communicate at 19200 baud.
>>>> Nick
>>>> ------------------------------------------------------------------------
>>>> *From:* Hans-Christoph Steiner [mailto:hans at eds.org]
>>>> *Sent:* 10 April 2008 23:57
>>>> *To:* nick burge
>>>> *Cc:* Pd List
>>>> *Subject:* Re: [PD] pduino and FSRs
>>>> What baud are you running each at? IIRC, the XBee needs a strange value.
>>>> .hc
>>>> On Apr 10, 2008, at 5:52 PM, nick burge wrote:
>>>>> I wish I knew. I'm loading the arduino-test patch with no other 
>>>>> objects or abstractions so as to eliminate other suspects. Still PD 
>>>>> crashes when I enable more than 2 analogIns.
>>>>> Would it help to speed up or slow down the xbee connection?
>>>>> ------------------------------------------------------------------------
>>>>> *From:* Hans-Christoph Steiner [mailto:hans at eds.org]
>>>>> *Sent:* 10 April 2008 23:12
>>>>> *To:* nick burge
>>>>> *Cc:* Pd List
>>>>> *Subject:* Re: [PD] pduino and FSRs
>>>>> The code and the electrics are quite separate. If the electrics work 
>>>>> with one firmware, then they'll work with another. The question is, 
>>>>> what is the "it" that grinds to a halt.
>>>>> .hc
>>>>> On Apr 10, 2008, at 4:17 PM, nick burge wrote:
>>>>>> Yes, I've got the latest version....maybe a silly question...but 
>>>>>> could it be that Pduino is optimised for sensors working on a 
>>>>>> supply of 5v. because the phidget voltage dividers i've got my FSRs 
>>>>>> attached to come with a potentiometer that alters the resistance of 
>>>>>> the circuit...with pduino i can only activate 2 at a time before it 
>>>>>> all grinds to a halt...on arduino2PD i can activate all six without 
>>>>>> any problem. Strange.
>>>>>> Nick.
>>>>>> ------------------------------------------------------------------------
>>>>>> *From:* Hans-Christoph Steiner [mailto:hans at eds.org]
>>>>>> *Sent:* 10 April 2008 21:51
>>>>>> *To:* nick burge
>>>>>> *Cc:* Pd List
>>>>>> *Subject:* Re: [PD] pduino and FSRs
>>>>>> I've never run on Vista before, so I can't say much about that. I 
>>>>>> have run on Debian, Ubuntu, and Mac OS X. It shouldn't matter what 
>>>>>> is generating the data on the arduino, the messages coming to Pd 
>>>>>> via the serial port should be all the same.
>>>>>> Are you using the latest version:
>>>>>> http://at.or.at/hans/pd/Pduino-0.3.1.zip
>>>>>> .hc
>>>>>> On Apr 10, 2008, at 12:57 PM, nick burge wrote:
>>>>>>> Hello Hans-Christoph, I am using PD 0.39.3 extended. on a windows 
>>>>>>> vista system. Its PD that crashes, or "stops working" as Vista so 
>>>>>>> nicely puts it, when I connect the FSRs.
>>>>>>> I have arduino connecting via wireless xbees at 19200 baud.
>>>>>>> I also use an infra red distance sensor that gives no problem.
>>>>>>> I've been routing the data from the FSRs through the autoscale object.
>>>>>>> Maybe I should find a way to reduce the amount of data being 
>>>>>>> sampled...every 40ms for example? How would I do that?
>>>>>>> Nick.
>>>>>>> ------------------------------------------------------------------------
>>>>>>> *From:* Hans-Christoph Steiner [mailto:hans at eds.org]
>>>>>>> *Sent:* 10 April 2008 17:25
>>>>>>> *To:* nick burge
>>>>>>> *Cc:* Pd List
>>>>>>> *Subject:* Re: [PD] pduino and FSRs
>>>>>>> Which program crashes? Which version are you using? You will get a 
>>>>>>> lot of data, from 6 sensors, Pduino/Firmata will read them all 
>>>>>>> every 20ms. I have never seen a crash using [arduino], except when 
>>>>>>> I unplug the arduino when Pd is connected to it, so I suspect the 
>>>>>>> problem lies elsewhere.
>>>>>>> .hc
>>>>>>> On Apr 10, 2008, at 11:16 AM, nick burge wrote:
>>>>>>>> I have a little problem using Pduino and some force sensing 
>>>>>>>> resistors that I am using in conjunction with phidget voltage 
>>>>>>>> dividers....they seem to crash the program as soon as I activate 
>>>>>>>> more than 1 at a time.....
>>>>>>>> Should I be applying some sort of filter to the data stream?
>>>>>>>> Arduino2PD seems more robust, allowing me to activate all 6 
>>>>>>>> analog inputs at once.
>>>>>>>> Nick Burge.
>>>>>>>> _______________________________________________
>>>>>>>> PD-list at iem.at <mailto:PD-list at iem.at> mailing list
>>>>>>>> UNSUBSCRIBE and account-management -> 
>>>>>>>> http://lists.puredata.info/listinfo/pd-list
>>>>>>> ----------------------------------------------------------------------------
>>>>>>> Looking at things from a more basic level, you can come up with a 
>>>>>>> more direct solution... It may sound small in theory, but it in 
>>>>>>> practice, it can change entire economies. - Amy Smith
>>>>>> ----------------------------------------------------------------------------
>>>>>> There is no way to peace, peace is the way. -A.J. Muste
>>>>> ----------------------------------------------------------------------------
>>>>> There is no way to peace, peace is the way. -A.J. Muste
>>>> ----------------------------------------------------------------------------
>>>> Mistrust authority - promote decentralization. - the hacker ethic
>>> ----------------------------------------------------------------------------
>>> All mankind is of one author, and is one volume; when one man dies, 
>>> one chapter is not torn out of the book, but translated into a better 
>>> language; and every chapter must be so translated.... -John Donne
>> ----------------------------------------------------------------------------
>> You can't steal a gift. Bird gave the world his music, and if you can 
>> hear it, you can have it. - Dizzy Gillespie
>> ------------------------------------------------------------------------
>> _______________________________________________
>> PD-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista
---Oblique Strategy # 57:
"Do the words need changing?"

More information about the Pd-list mailing list