Hi,
I'm having a problem with the arduino digital ins. According to the arduino website there are pull up resistors inside the ATmega that get activated automatically when the digital ins are turned on. This is not the case here with the Pduino-0.5beta8. When I connect ground to the pin it switches to 0 as expected. When I disconnect the wire it starts switching randomly between 0 and 1. If I use an "external" pullup resistor everything works as expected again. I just read the help file from the pduino and it states that this is the normal behaviour which shouldn't be the case with the internal pullup resistors activated. What's the problem with these internal pullup resistor not getting turned on? Is there a command I can (or have to) send to the arduino?
I've tested this with a diecimila and duemilanove and Ubuntu 10.4 and Windows XP. Maybe there is a problem with Pduino or Firmata 2.1?
Any ideas appreciated! Cheers, Ingo
You got me interested. I didn't know about an internal pull-up resistore, but I asked in the #arduino channel and it seems there indeed is such a thing.
<rdz> hi all. is there an internal pull-up resistor for digitalIns? <scgtrp> (digitalRead btw) yes, pinMode(n, INPUT); digitalWrite(n, 1);
I can't test with [arduino] right now, but it seems you could do:
[pinMode $1 0( | | [digital $1 1( | / [arduino]
Tell us if that really works.
Roman
On Wed, 2010-06-30 at 12:31 +0200, Ingo Scherzinger wrote:
Hi,
I'm having a problem with the arduino digital ins. According to the arduino website there are pull up resistors inside the ATmega that get activated automatically when the digital ins are turned on. This is not the case here with the Pduino-0.5beta8. When I connect ground to the pin it switches to 0 as expected. When I disconnect the wire it starts switching randomly between 0 and 1. If I use an "external" pullup resistor everything works as expected again. I just read the help file from the pduino and it states that this is the normal behaviour which shouldn't be the case with the internal pullup resistors activated. What's the problem with these internal pullup resistor not getting turned on? Is there a command I can (or have to) send to the arduino?
I've tested this with a diecimila and duemilanove and Ubuntu 10.4 and Windows XP. Maybe there is a problem with Pduino or Firmata 2.1?
Any ideas appreciated! Cheers, Ingo
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Roman,
this solution is working also. So in this case it's not really necessary to change the firmata itself. Anyway, I would prefer to have this behaviour as the default behaviour, i.e. included in firmata. At least all of this this should be documented. Before I found out I was soldering all kinds of resistors onto the board for no reason.
Ingo
-----Ursprüngliche Nachricht----- Von: Roman Haefeli [mailto:reduzierer@yahoo.de] Gesendet: Mittwoch, 30. Juni 2010 13:39 An: Ingo Scherzinger Cc: pd-list@iem.at Betreff: Re: [PD] problem with arduino digital ins - Pduino-0.5beta8 /
Firmata 2.1
You got me interested. I didn't know about an internal pull-up resistore, but I asked in the #arduino channel and it seems there indeed is such a thing.
<rdz> hi all. is there an internal pull-up resistor for digitalIns? <scgtrp> (digitalRead btw) yes, pinMode(n, INPUT); digitalWrite(n, 1);
I can't test with [arduino] right now, but it seems you could do:
[pinMode $1 0( | | [digital $1 1( | / [arduino]
Tell us if that really works.
Roman
On Wed, 2010-06-30 at 12:31 +0200, Ingo Scherzinger wrote:
Hi,
I'm having a problem with the arduino digital ins. According to the arduino website there are pull up resistors inside the ATmega that get activated automatically when the digital ins are turned
on.
This is not the case here with the Pduino-0.5beta8. When I connect ground to the pin it switches to 0 as expected. When I disconnect the wire it starts switching randomly between 0 and 1. If I
use
an "external" pullup resistor everything works as expected again. I just read the help file from the pduino and it states that this is the normal behaviour which shouldn't be the case with the internal pullup resistors activated. What's the problem with these internal pullup resistor not getting
turned
on? Is there a command I can (or have to) send to the arduino?
I've tested this with a diecimila and duemilanove and Ubuntu 10.4 and Windows XP. Maybe there is a problem with Pduino or Firmata 2.1?
Any ideas appreciated! Cheers, Ingo
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-
list
On Wed, 2010-06-30 at 14:12 +0200, Ingo Scherzinger wrote:
Hi Roman,
this solution is working also. So in this case it's not really necessary to change the firmata itself. Anyway, I would prefer to have this behaviour as the default behaviour, i.e. included in firmata. At least all of this this should be documented.
Actually, it is here: http://www.arduino.cc/en/Tutorial/DigitalPins
It's not firmata exposing this functionality, but the arduino. So I think it's correct that Firmata handles it transparently, so that from Pd you are still able to decide yourself, whether you actually want that pull-up resistor or not.
Enabling it per default is _not_ a good idea, since there are many applications, where you deliberately want the pull-up resistor not to be enabled. Imagine a sensor with a very high impedance (for instance, an LDR in series with a fixed 1 MOhm resistor), with the pull-up resistor activated the input would always be HIGH, because the internal resistor would brutishly pull the voltage up.
Roman
Roman Haefeli wrote:
On Wed, 2010-06-30 at 14:12 +0200, Ingo Scherzinger wrote:
Hi Roman,
this solution is working also. So in this case it's not really necessary to change the firmata itself. Anyway, I would prefer to have this behaviour as the default behaviour, i.e. included in firmata. At least all of this this should be documented.
Actually, it is here: http://www.arduino.cc/en/Tutorial/DigitalPins
It's not firmata exposing this functionality, but the arduino. So I
And shining through that is the actual microcontroller. It's useful to read the data sheet to see what is possible: http://www.atmel.com/dyn/resources/prod_documents/doc8271.pdf
think it's correct that Firmata handles it transparently, so that from Pd you are still able to decide yourself, whether you actually want that pull-up resistor or not.
Enabling it per default is _not_ a good idea, since there are many applications, where you deliberately want the pull-up resistor not to be enabled. Imagine a sensor with a very high impedance (for instance, an LDR in series with a fixed 1 MOhm resistor), with the pull-up resistor activated the input would always be HIGH, because the internal resistor would brutishly pull the voltage up.
Or if the pin was connected to a relay or something. This is why most of the pins default to high-impedance input after a reset.
Martin
I suppose you're right about the different types of controllers being attached to the arduino. It's definitely better to keep the pullup resistors off as default!
I think it just needs an extra line on the help patch so people would know about this "feature" and how to use it.
Ingo
Von: Martin Peach [mailto:martin.peach@sympatico.ca] Roman Haefeli wrote:
On Wed, 2010-06-30 at 14:12 +0200, Ingo Scherzinger wrote:
Hi Roman,
this solution is working also. So in this case it's not really
necessary to
change the firmata itself. Anyway, I would prefer to have this
behaviour as
the default behaviour, i.e. included in firmata. At least all of this
this
should be documented.
Actually, it is here: http://www.arduino.cc/en/Tutorial/DigitalPins
It's not firmata exposing this functionality, but the arduino. So I
And shining through that is the actual microcontroller. It's useful to read the data sheet to see what is possible: http://www.atmel.com/dyn/resources/prod_documents/doc8271.pdf
think it's correct that Firmata handles it transparently, so that from Pd you are still able to decide yourself, whether you actually want that pull-up resistor or not.
Enabling it per default is _not_ a good idea, since there are many applications, where you deliberately want the pull-up resistor not to be enabled. Imagine a sensor with a very high impedance (for instance, an LDR in series with a fixed 1 MOhm resistor), with the pull-up resistor activated the input would always be HIGH, because the internal resistor would brutishly pull the voltage up.
Or if the pin was connected to a relay or something. This is why most of the pins default to high-impedance input after a reset.
Martin