Pages: [1]   Go Down
Author Topic: Dimming 12V led strip with rangefinger  (Read 234 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* setup.jpg (253.1 KB, 932x531 - viewed 21 times.)

* output.jpg (148.89 KB, 777x873 - viewed 17 times.)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8653
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 1k resistor did it. Thanks!
Logged

Pages: [1]   Go Up
Jump to: