Go Down

Topic: Dimming 12V led strip with rangefinger (Read 353 times) previous topic - next topic

janbanan

I have no electrical engineering skills so I put my hopes to this forum for some guidance. The problem that I have is that when I write anything else than 0 or 255 on the transistor pin the readings from the rangefinder are incorrect. It is a nano, hc-sr04 rangefinder and a tip120 transistor. The 12V input is in the upper right corner and the led output is the white and grey wire top left.
Thanks! /Jan

johnwasser

Is the reading correct if you disconnect Pin 9 (the LED pin)?  If so that might mean that the LED circuit is causing problems with the power going to the distance sensor.  The PWM pulses can create a lot of noise.

I don't see a resistor between the Arduino and the Transistor.  If that is an NPN transistor the Base-Emitter junction acts like a diode straight to Ground.  Without a resistor (try 1K)  it will draw too much current from the Arduino pin.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

janbanan


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy