Go Down

Topic: Troubleshooting Suggestions (Read 3001 times) previous topic - next topic

RobRothman

I have just completed construction on my first Arduino project, an electronic dice roller.  Before installing a battery and powering up, I thought it would be a good idea to do some basic checks to rule out a short which might blow everything up, so the first thing I did was to check for continuity (hoping to find none) between the ground rail and the 5V power rail.  Strangely, what I get is a momentary beep on the meter -- suggesting that somehow there is a short which only exists for a fraction of a second when I first touch the meter probes to one contact or the other.  Unlike what I would expect if a connection were shorting out, the beep is not continuous.  It does not seem to be related to  movement or position.

I have attached a schematic for the beast -- not very professional, but hopefully adequate to give a sense of what is going on.  Basically, there are three sets of components:

   1) The Arduino board itself,
   2) A perfboard which contains 17 resistors (15 to limit current to the LEDs and 2 to pull down some of the switches, and
   3) Components which interact with the player (15 LEDs and three switches) mounted on the front panel.

Connections between the panel and the perfboard are made with Molex KK connectors.  Connections between the perfboard and the Arduino are made with Molex connectors on the perfboard side, and Polulu connectors (gender changers and female pins/housings) on the Arduino side.

Any suggestions for how I might approach tracking down this odd behavior would be appreciated.

Thanks.

Rob Rothman

fungus


I have just completed construction on my first Arduino project, an electronic dice roller.  Before installing a battery and powering up, I thought it would be a good idea to do some basic checks to rule out a short which might blow everything up, so the first thing I did was to check for continuity (hoping to find none) between the ground rail and the 5V power rail.  Strangely, what I get is a momentary beep on the meter -- suggesting that somehow there is a short which only exists for a fraction of a second when I first touch the meter probes to one contact or the other.  Unlike what I would expect if a connection were shorting out, the beep is not continuous. 


Try the same test with a capacitor...

(be sure to short the capacitor legs together before each test)
Advanced Arduino

RobRothman

Sorry for my ignorance, but I'm new to this:  Where would I put the capacitor (across the rails or in series with one of them), and what would this test tell me?  Also, any ballpark suggestions for the value of the cap to use?

I also realize that there are two facts which I neglected to mention in my earlier post:

   1.  The perfboard contains 2 shift registers in addition to the 17 resistors, and
   2.  The strange behavior occurs whether the main power switch is turned on or off.

Thanks.

Rob Rothman

fungus


Sorry for my ignorance, but I'm new to this:  Where would I put the capacitor


Just a capacitor. On the table. Bigger capacitor values work best.


what would this test tell me?


A lot. (hopefully)

Advanced Arduino

CrossRoads

You will see a momentary low resistance as the caps on the board go from discharged to a charged state from current injected by the meter.  I would expect that design would eventually get up towards 10s of Ks of resistance.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

You should also add 0.1uF cap from Vcc pin to Gnd of each shift register.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

fungus


You will see a momentary low resistance as the caps on the board go from discharged to a charged state from current injected by the meter.  I would expect that design would eventually get up towards 10s of Ks of resistance.


Spoiling the surprise...

Advanced Arduino

RobRothman

Quote
Posted by: CrossRoads

You will see a momentary low resistance as the caps on the board go from discharged to a charged state from current injected by the meter.  I would expect that design would eventually get up towards 10s of Ks of resistance.


And what would this imply as to why I am getting the momentary continuity without the capacitor?  Or would it suggest that the momentary short is not really a problem?

Quote
Posted by: CrossRoads

You should also add 0.1uF cap from Vcc pin to Gnd of each shift register.


I had tried this in the breadboard stage.  What I found was without the caps, it worked fine; when I added them, thigs started generally behaving very strangely.  So I took the "Don't fix it if it ain't broke" approach.

Rob Rothman

DVDdoug

#8
Sep 09, 2014, 10:50 pm Last Edit: Sep 09, 2014, 11:05 pm by DVDdoug Reason: 1
Quote
IAnd what would this imply as to why I am getting the momentary continuity without the capacitor?  Or would it suggest that the momentary short is not really a problem?
It's NOT a problem.  That's the way capacitors work...  In series, they tend to "pass" AC and changing voltages and they "block" DC.    A "sudden" connection of the Ohmmeter is a "change" and current flows as the capacitor charges-up.    If you look-up the formula for inductive reactance (impedance) you'll find it's inversely proportional to frequency.

Quote
I had tried this in the breadboard stage.  What I found was without the caps, it worked fine; when I added them, thigs started generally behaving very strangely.
Connecting small capacitors between power & ground should never cause a problem...  Maybe something was connected wrong or something was shorted?

Quote
So I took the "Don't fix it if it ain't broke" approach.
That philosophy is OK to a point, and if your circuit is working you may not need them..    But, the lack of bypass capacitors can often cause random/strange/unpredictable problems.   If you go "into production" (or if you just build a 2nd identical circuit) you might find that only half of your boards work, or that 90% of them work, or that 90% of them fail, etc.

...If you remove half of the bypass capacitors on your computer's mother board, it will probably still work fine.   But its proper engineering practice to put a bypass capacitor on every chip...  Or on every power pin if you have a high density chip with multiple power-pins.   

P.S.
It's normal to get an "inrush" of current when you first switch-on a power supply or first connect a circuit with capacitors.    It's possible to do something "bad" like connect one of those 1 Farad (1 million microfarad) capacitors that they use with high-power car stereos to a small power supply.    In that case you might get too much current for too long and damage the power supply.

RobRothman

Thanks.

I took the plunge and powered the circuit up.  The good news is nothing seems to have been fried.  The bad news is that it is behaving oddly (and not entirely consistently).  Basically, when I first power it up (without hitting the "roll" button), some of the LEDs (not always the same ones) light up.  When I then hit the roll button, nothing happens.  So it looks like the first thing to try, as per the suggestions that have been made, is to add some capacitors between power and ground of the shift registers.  All I have to do is figure out how to fit them onto the board while keeping them pretty near the registers and not accidently having the leads touch something they shouldn't.  I guess I would have been better off adding them originally, when I could have planned for them when laying out the board -- but I guess that's why the process is called learning. :smiley-red:

Rob Rothman

dave-in-nj

Code: [Select]

..... so that I can follow the tutorials available without knowing what I am doing...


copied from a different post.  thought you might enjoy it here.

MarkT

Inconsistent behaviour might be due to:

Failure to debounce button inputs.
Lack of supply decoupling (but the board doesn't have any chips, so unlikely).
Bug in code.

Perhaps you could take the hint about
Code: [Select]
// posting code here
to help sort things out.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

RobRothman

Happy to include the code (it's attached to this post), but since it worked fine on the breadboard I'm confident the code is not the explanation.

I didn't see debouncing as an issue, since it shouldn't affect the functioning if a single button press is read as multiple presses -- it just means that it will run the routines for generating random numbers and displaying the appropriate pips multiple times (but the only one that matters is the last one).  If anything, that simulates a physical die roll, where the dice bounce around a bit before reaching their final resting position.

There are two shift registers on the board, so, as has been suggested, I will add caps to decouple the power supply to those.

Thanks.

Rob Rothman

RobRothman

Well, I win the idiot of the year award!

In examining the board to see how I might fit in the capacitors, I realized that I made a much more fundamental error.  When I soldered the connections to the sockets for the shift registers consistent (I thought) with the pinout diagram, I was looking at the bottom of the board (where the solder connections are) rather than the top (which is how the diagram is oriented).  Thus, every connection to the chips is on the wrong side!

Unfortunately, desoldering all of these connections and redoing them correctly will probably wind up being more difficult than building the board was originally.

Duh! :smiley-sad-blue:

Rob Rothman

Paul__B


Well, I win the idiot of the year award!

Well, we all knew something was badly wrong with your wiring when you claimed that adding the bypass capacitors caused it to malfunction.  Basically, that can never happen, so it really gave the game away.

Go Up