2

I am generating a 50% duty PWM signal from port 11 (pin 23) on a Raspberry Pi 3.

import RPi.GPIO as GPIO
from time import sleep

GPIO.setmode(GPIO.BCM)
GPIO.setup(11,GPIO.OUT)
p=GPIO.PWM(11,600)
p.start(50.0)

I have a spare dashboard of a VW Golf 4 car. The dashboard is connected to 12V.

enter image description here

Pin 11 on the car dashboard is the input pin for the tachometer. It is supposed to work at 5V.

I expected that by connecting the pin GPIO11 from Pi to the pin 11 on the dashboard should do the trick, but it doesn't.

I also tried with pin GPIO7 and it still didn't work.

I am sure I'm missing something in the circuit. Do you have any ideas?

4
  • 1
    Have you connected the grounds?
    – joan
    Commented Jan 22, 2017 at 23:55
  • This is actually a great question! Where would the ground from PI go? Commented Jan 23, 2017 at 7:22
  • @VladOtrocol The Pi's expansion header has many ground pins. They are all connected together with all the other grounds within the Pi. Any Pi ground may be used, they are all the same.
    – joan
    Commented Jan 23, 2017 at 10:52
  • @joan Thank you. I know I can use any Ground from raspberry, but I am not sure where to connect it to the car circuit. Commented Jan 25, 2017 at 7:46

1 Answer 1

1

Pin 11 on the car dashboard is the input pin for the tachometer. It is supposed to work at 5V.

I expected that by connecting the pin GPIO11 from Pi to the pin 11 on the dashboard should do the trick, but it doesn't.

The GPIOs are not 5V logic, they are 3.3V. They may work to drive 5V inputs, but not probably not reliably.

You should be able to do PWM of this sort through a level shifter, although I make no promises.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.