Jump to content

Strange startup behaviour for shift registers


latigid on
 Share

Recommended Posts

I've spent a few days scratching my head with the BLM. Basically when applying power the Core boots up fine but the LEDs are lit up, sometimes all, sometimes in random patterns. I have a Meanwell 2.5A SPSU supplying 5V to both the Core and the BLM+miniCore.

 

What I imagine happens is the SRs have undefined states on startup which leads to a kind of latch-up condition. If I reset the power once the miniCore and 5V are stable, the communication initialises as expected. Having a hard reset button is a bit too brute force, so I've arrived at a solution which works every time. I essentially cut the 5V line and implemented a low pass filter with a 0.68R resistor (cap is 470 uF). This does draw a bit of current, but suppresses the initial spike and there is little to no loss in brightness. The LPF is after the miniCore's power, which always initialises first.

 

It's possibly peculiar/particular to my PSU, I'd love to scope the start up but I don't have a DSS... Linear supplies with good regulation will probably have no trouble. I thought CMOS chips normally had a power-on reset, but it seems like the combination set up in the BLM (current surge? long chains?) can produce some strange results.

 

 

Perhaps another method would be to control the /OE pins of each shift register, but I can't think of a neat way of doing that without tying up 24 MCU pins or having horrible fly wires everywhere.

 

 

So, more of an FYI as I have a solution already, but of course any insight or experiences are welcome.

 

Link to comment
Share on other sites

This is one of the problems with using a serial interface to the Dout boards that don't have a power ON reset circuit or pin to hold the shift registers off. Most latching IC;s will power up in a random state and this is what you see before the Midibox starts scanning the Dio chain.  For lights its usually not a problem but if you are driving electromagnets it can be problematic and something to consider in your design.  Bringing up the power in stages with 2 power supplies works fine too.

 

Pete 

Link to comment
Share on other sites

  • 2 weeks later...

This is one of the problems with using a serial interface to the Dout boards that don't have a power ON reset circuit or pin to hold the shift registers off. Most latching IC;s will power up in a random state and this is what you see before the Midibox starts scanning the Dio chain.  For lights its usually not a problem but if you are driving electromagnets it can be problematic and something to consider in your design.  Bringing up the power in stages with 2 power supplies works fine too.

Not so fast perhaps! 

When I tried moving the resistor to the main board the problem reappeared. The crocodile leads added half an ohm and 0.9 uH each. Trying to tailor this LCR circuit with real components also didn't help.

I now think there may be a problem with the current sink drive transistors on the common cathode lines (595 out --1k-- transistor base). Because they have no bias resistor at the base, small leakage currents can propagate which might lead to weird behaviour. So that's probably the first thing to try.

Secondly, I've seen examples of using the /OE (output enable) pin to tri-state the outputs at startup. This could be configured in two ways: first is an RC circuit shown below:

RC.thumb.png.ad4ec5a10e69ab8f0d27d90d9f7

The cap should probably be 10 uF for a delay of about 150 ms. The resistor at 10k should work, while the diode helps to discharge things when the power is removed. 

Second is to replace the cap with a 10k pullup, then use a spare PIC pin to drive /OE low only when the SRIO chain is properly initialised (diode and "R8" out of circuit). As an added bonus, pulsing /OE can then control LED brightness, although the utility is reduced in my design as the /OE pins of three separate 74HC595s are tied together to make PCB routing easier. And there's the question of 5 spare pins needed from the PIC (5x SCALAR circuits chained)

 

I've read that you shouldn't leave transistor bases floating (remember DOUTs will be essentially open circuit at startup), so that's another reason for pull downs on the bases. The question remains whether similar pull downs are needed on the 595 outs connected to the LED anodes. I don't want to decrease the current with an additional voltage divider (even though 220R/10k sets up a divider of only 10000/10220, should be insignificant). And I suppose that no current can flow with the transistor off.

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...