Close

Notes on configuring Raspbian

A project log for Raspberry Pi EVSE Hat

Use a Raspberry Pi to build an EV charging station

nick-sayerNick Sayer 09/25/2019 at 15:440 Comments

Add this to config.txt:

dtoverlay=pwm,pin=18,func=2

That will populate /sys/class/pwm so that you can properly generate the pilot signal on GPIO18.

You also need to enable SPI with raspi-config for the ADC.

Nothing else special needs to be done for the remainder of the GPIO pins.

EDIT:

Well, maybe you need the overlay, maybe not. It depends on whether you want hardware PWM or not. For python's GPIO.PWM functionality, you actually don't want to use hardware PWM, but it remains to be seen whether the python methodology is going to result in a stable enough output.

EDIT 2:

Yeah, the overlay is going to be necessary. I haven't built the hat yet, but I took a look at the output from GPIO.PWM and it's jittery as hell. Definitely not clean enough for this.

Discussions