pwm code + updated schematics / smartcard designs