Page 1 of 1

About ADC and PWM

Posted: Tue Dec 11, 2018 2:18 pm
by fabeeto
Hi there! I am noob at Raspberry and I need some guidance.

I am using the InfiniPi hat which is a hat designed in Chile oriented to domotic projects. It was designed to read analog inputs, so it has four grove connections: 1 for I2C communication, and 3 for reading analog inputs (ADC). It also has other stuff like relays and Xbee communication.

So my work here, is to use, somehow, one of those ADC grove inputs as a PWM signal.

I have done some research about it, but I just find things related to programming PICs using the C programming language, and it's sommething related to change the ADCs registers. But I can't find information about this on Raspberry using Python.

Here's the link for the hat user manual: http://www.mcielectronics.cl/website_MC ... finiPi.pdf

I asked them if they knew what path should I take about this subject. They said it was impossible because those ADC grove connections were invented only for reading analog data.

Any help will be useful, thanks!

Re: About ADC and PWM

Posted: Tue Dec 11, 2018 2:55 pm
by mikronauts
If the hat uses an ADC chip, you can't reprogram it to get a pwm output.

If the hat uses a microcontroller for analog input, then if the chip lets you change modes for the pin to pwm output, and the firmware supports it ... maybe, however if the manual does not say the hat can do that, forget it.

Just use one of the Pi gpios to generate the pwm signal via pigpio.
fabeeto wrote:
Tue Dec 11, 2018 2:18 pm
Hi there! I am noob at Raspberry and I need some guidance.

I am using the InfiniPi hat which is a hat designed in Chile oriented to domotic projects. It was designed to read analog inputs, so it has four grove connections: 1 for I2C communication, and 3 for reading analog inputs (ADC). It also has other stuff like relays and Xbee communication.

So my work here, is to use, somehow, one of those ADC grove inputs as a PWM signal.

I have done some research about it, but I just find things related to programming PICs using the C programming language, and it's sommething related to change the ADCs registers. But I can't find information about this on Raspberry using Python.

Here's the link for the hat user manual: http://www.mcielectronics.cl/website_MC ... finiPi.pdf

I asked them if they knew what path should I take about this subject. They said it was impossible because those ADC grove connections were invented only for reading analog data.

Any help will be useful, thanks!

Re: About ADC and PWM

Posted: Wed Dec 12, 2018 9:37 pm
by fabeeto
Thanks! I am gonna use an Arduino to move the servos I guess.