SV328 / QTR-8RC problem

Hi,

I’m trying to use the QTR-8RC 8 channel digital sensor with my SV328 controller. I am connecting to pins PD0, PD1 and PC0 to PC5 and using the routines in the pololu avr library. Everything seems to work OK except the sensor I connect to PD1. No matter what sensor I try it shows a constant output value of 0. I notice that this port has the user red led connected - do I have to disconnect it? If so, how do I do this? I can’t find anything in the documentation showing limitations in using PD1 as a digital input.

Chris

Hello, Chris.

Yes, that is what would happen if you set PD1 to be an input for the Orangutan SV-328. You can see this in the “Using the Demo Program” section of the user’s guide, under the “B Button: User I/O Demo” heading:

So you would need to use another pin as an input for your sensor.

-Derrill

To expand on my previous answer; PD1 can be used as a general purpose I/O. However, in order for the RC QTR sensor to work correctly, there cannot be any pull ups or pull downs on the same line. This is because the sensor measures the time it takes a capacitor to discharge to measure reflectance, and if the pin it is reading is pulled down, the capacitor will always discharge through the pull down immediately. You can find more details about how the QTR RC works on its product page. Unfortunately, there is not a method for disabling the red user LED, it is hardwired onto the Orangutan SV-328 board.

-Derrill