I made a clock with an arduino nano, some HC595s, some MOSFETs, and a ULN2083.
work very well, no problem.
I wanted to add a brightness control for my displays, I added an LDR, remove branch 13 of my HC595 (output enable) from the ground, and connect to port 6 of my arduino, and made the necessary changes in my program.
with this change I have a display problem, the segments of my display which should be turned off are not, I think this is a high impedance output (tri-state)
Could be however my eyes are not strong to see your project. Please post A schematic as you have wired it, not a frizzy thing. I think by the time you finish the schematic you will find your problem. Show all interconnections, ground and power.
to control the brightness .. i have connected the two HC595 OE pins to arduino pin 6 .. I think this wrong .. I suggest to connect only one to pin 6 .. and the other to GND .. no ?
but wich one ?
very interesting to see the connections in front of you.
So you are tristating everything, rather than just the ULN2803. Not sure your MOSFET
circuit will switch off fast enough if its input is tristated. Try changing the pull-ups on the
pFET gates to 1k, and the 4.7k base resistors to 1k.
Alternatively keep the MOSFET '595 OE as low, try just tristating the other one.
You seem to be lacking decoupling capacitors for both '595's - they are always needed for logic chips,
this needs fixing before anything else as the symptoms of inadequate decoupling can be many
and bizarre. 100nF ceramic or so is typically used, as close to the pins as possible is good.
I presume you have PWM on pin 6 that's unrelated in frequency to the LED driving code. I suspect
there's some difference in timing between the MOSFET circuit and the ULN2803 such that when
the PWM changes state some segments get a short glitch of current - its not immediate clear how,
but trying to speed up the MOSFET driver as I mention may help (that high value 10k pullup is an obvious suspect here).
Alternatively you may need to relax the timing in the code.
Hi,
Please label the pins in your diagram.
What are pins 6, 9, 8 and 10 connected too.
OE, latch or what?
Please include ALL gnd and power supply wires.
Where are you getting your 5V supply from?
TomGeorge:
Hi,
Please label the pins in your diagram.
What are pins 6, 9, 8 and 10 connected too.
OE, latch or what?
Please include ALL gnd and power supply wires.
Where are you getting your 5V supply from?
Thanks.. Tom..
I will do this just for you if you want my diagram ..