-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DE10-Nano adcTest.py not working #20
Comments
@julisaverdejo Are you testing it with a potentiometer wired to 5V (or 3.3V), GND and the ADC pin? The demo is fixed on ADC channel 0... I'm not sure which end of the header that is on, so maybe try both. I aim to try this on a DE10-STD, once I get it to boot. They should be the same, in that respect. If you're using a DE10-Nano, you could also try this: https://github.com/truhy/f2h_uart_de10nano
|
FWIW, this is what I see on the DE10-Standard, without making any connections to the ADC header: root@cyclone5:~# python3 adcTest.py The ADC CH0: value changed, mostly showing 1704 or 1703, with the voltage changing slightly too. That was just due to noise being picked up on the open pin. With a suitably small value potentiometer, it's possible the reading would just be constant. I'll try it with a potentiometer later. |
@julisaverdejo I've now tried it, on the DE10-Standard, with a 50k potentiometer, connected to the 5V, GND and ADC_IN0 pins of the 10 pin ADC header. Initially, I got no response, but that's because the diagram of the ADC header in the examples section of the manual is upside down, from the point of view of having the buttons and LEDs facing me, and it's not shown in context - the DE10-Standard manual has a few stupidities in it like that. Once I connected it properly, it worked fine, changing the value as I turned the potentiometer:
Using a potentiometer with too high a value might give little or no response. I would guess anything from 5k Ohms to 100k Ohms would be fine, but I've only tried 50k so far. A higher value can introduce more noise in the reading, but wastes less current. There shouldn't really be a need to go below 5k. With a 50k potentiometer, the reading stays stable when I'm not moving it and not holding onto the potentiometer. |
I am also working with de DE10-Nano and when I run the
I tried all the ADC pins on the board and there is no change. I am using the version
|
Do I need to change anything to run the adcTest.py script, it doesn't work, raw_value is always one, any suggestions?
rsyocto Vers. 1.042
The text was updated successfully, but these errors were encountered: