Tri-state output problem ..

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)

do you have any idea to solve this problem

Thanks

00.JPG

00.JPG

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.

gilshultz:
Could be however my eyes are not strong to see your project.

Clearly a failure of the crystal ball! :roll_eyes:

Are you driving the MOSFETs from the tri-stated '595 outputs or something like this?

Circuit please...

my circuit is like this :

it's work well with the HC595 output enable on GND .. :confused:

I will find you a detailed circuit in a while ...

Can you augment your circuit with all the connections to each '595? Devil is always in the details
with electronics.

MarkT:
Can you augment your circuit with all the connections to each '595? Devil is always in the details
with electronics.

yes yes

the source pin of the MOFSET is connected to +12V

Well that's interesting extra detail, but not actually what I asked for.

Every connection to each 595 please, not just some, but every.

MarkT:
Well that's interesting extra detail, but not actually what I asked for.

Every connection to each 595 please, not just some, but every.

sorry ... :-[

Unless your segment current exceeds 150 mA, a TPIC6B595 would be far more sensible than the obsolete ULN2803 with a 74HC595. :roll_eyes:

The "phantom" segment problem is usually an error in your secret code. :grinning:

Mind you, you have not revealed all the connections to the obsolete ULN2803 either.

I propose a solution :

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.

Paul__B:
Unless your segment current exceeds 150 mA, a TPIC6B595 would be far more sensible than the obsolete ULN2803 with a 74HC595. :roll_eyes:

The "phantom" segment problem is usually an error in your secret code. :grinning:

Mind you, you have not revealed all the connections to the obsolete ULN2803 either.

OK ..
I will add connection of ULN2803
the solution is to change ULN2803 to TPIC6B595 ???
or it's a arduino code error ?

it work very well without brightness control .. with OE connected to GND ..

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.

Thank you for this answer .. too many thinks to test .. I begin with the most easy to do :

MarkT:
... keep the MOSFET '595 OE as low, try just tristating the other one.
...

and it's work fine now
:sunglasses:

Thank again for help

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.. :slight_smile:

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.. :slight_smile:

I will do this just for you if you want my diagram ..

for me : problem solved 8)

Thanks

esloch:
I will do this just for you if you want my diagram ..

for me : problem solved 8)

For you a proper circuit diagram will help you in the future and anyone using this thread to help with a similar problem.
Tom... :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.