Forum Index > Projects > LED Pegboard and Matrix Projects
 peggy 2.1 issues
 |  Printable Version
By: lagomorph (offline) on Friday, April 24 2009 @ 08:57 PM PDT (Read 27443 times)  
lagomorph

I've recently finished a Peggy 2.1 that kinda works but it seems to lock up, freak out, and reset quite a bit. I have 625 red LEDs. I've tried powering from the 1A wall wart sold here as well as 3Ds with no noticeable difference. I measured current drain at about 350mA with the test program lighting all LEDs. Sometimes they'll all stay lit for a while but mostly they flash briefly over and over or most of one or two rows will light up brightly and stay that way. I noticed this also while testing as I was installing the LEDs row after row. I thought it might be because they were not all in even though I couldn't figure out why that would be the case. Apparently it wasn't the cause as they're all in now.

I've been able to load the life sketch and that actually runs better than the all lights on sketch (default loaded program). Sometimes it locks up though and I get most of a row lit up brightly. I notice that sometimes it appears to reset also possibly when there are a lot of LEDs lit up. It's just real inconsistent. Any ideas on what to check? Solder connections look good. I'm pretty careful.


Forum Apprentice
Apprentice

Status: offline

Registered: 04/24/09
Posts: 14

Profile Email    
   
By: Windell (offline) on Friday, April 24 2009 @ 09:58 PM PDT  
Windell

The behavior that you are seeing would all be explained by the board going into reset-- where the board goes black except for one or two lines (which go deadly bright) for a few seconds.

This certainly seems exactly like what I've seen on boards with a couple of bad solder joints-- it could also be caused by having the AVR microcontroller not fully seated in the socket. The board, when full of LEDs, is *very* heavy and tends to flex more than other circuit boards, which can make it a little more sensitive to iffy joints.

So... Make sure that the AVR is *fully* and securely in the socket, with no pins accidentally bent on the way in. Check to see if the same behavior occurs when the board is sitting on its own on a flat surface, or more often when you touch it-- that might give a hint about what's going on.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: lagomorph (offline) on Saturday, April 25 2009 @ 03:54 AM PDT  
lagomorph

Thanks Windell. I'll look again at the solder joints. I don't think the problem is due to board flex because I noticed odd LED behavior even when I had only two rows of LEDs in. I've reseated the chips including the AVR and the pins looked fine. It's weird that the life sketch is pretty reliable but not the simple all LEDs on sketch. It almost seems like the LEDs are drawing too much current and are causing the AVR to do weird things. I guess not since others are certainly running the same setup with no problems.


Forum Apprentice
Apprentice

Status: offline

Registered: 04/24/09
Posts: 14

Profile Email    
   
By: Windell (offline) on Saturday, April 25 2009 @ 04:01 AM PDT  
Windell

One thing that you can do is to "turn down" the LEDs to reduce the current and see if that helps. The big capacitor is there to help provide enough juice to drive the moderate current needed to turn all the LEDs on; if it's not seated correctly (or if backwards or otherwise broken) that could also be an issue. If you have a multimeter, you might also check to make sure that the system voltage isn't doing anything obviously funny.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: lagomorph () on Saturday, April 25 2009 @ 06:53 AM PDT  
Anonymous: lagomorph

Still not much progress. I resoldered the non-LED areas with no change. I reseated the chips. They are flush. I played with the pots. The pots were confusing me a bit because it looks like to add resistance you need to tighten vr1 and loosen vr2 because of how they are wired in. I can't say I noticed much of a difference in stability but they do dim and brighten the display. It's hard to say about improvement because the operation is so flaky. Sometimes it's hard to know if you changed something or are seeing more randomness. I certainly still get randomness even when the resistance is turned up pretty high.

Surprisingly I've had more consistency with the life sketch than the all lights on arduino sample (peggy2_minimal) although it will still reset. I can tell by speeding up the generations and letting it sit. After a little while the generation rate is back to the default. With the all lights on sketch, I often get no output or really brief flashes of what looks like all lights on or... complex patterns that eventually (like after minutes) light up the whole board. The top row is still a little bit brighter than the rest but that may be normal. At the moment the board has been all lit for about 5 minutes, a record. Confused

I don't see anything weird with the voltage. At first I thought it was probably a supply issue but when I measured it it stays around 5V. I can make it act up by touching the solder side of the board around the AVR which I'd almost expect but even when left alone it seems to have issues. I don't think it got any worse when flexing the board.

I was really hoping for some kind of reward this weekend for soldering in all those 625 LEDs! Big Grin





       
   
By: Windell (offline) on Saturday, April 25 2009 @ 01:46 PM PDT  
Windell

This is certainly atypical. When I've seen flakiness, it did not occur when the board was sitting still on its own.

It *sounds* like maybe your system voltage is periodically dropping out just long enough to trigger the on-board brownout reset-- caused when too high of a current is drawn for too long. That would explain why the Life sketch causes less of an issue-- it only occasionally lights all of the LEDs in a given row. This sort of thing should definitely be prevented by the big capacitor-- so I'd continue to suspect something wrong in that department. ( I wonder if a larger cap would help. )

However, if this is the cause, then it should certainly help to run the LEDs dimmer, or less often. If you run in peggy2_bounce-- and voltage dropout is the issue-- then it would *not* reset every few minutes. I've got a verison of that program that shifts the floor up by one unit when you press the off/select button-- that should make it clear if the program has reset. I'll try and attach it here-- not clear if our forum supports that right now! Oops!


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Windell (offline) on Saturday, April 25 2009 @ 01:49 PM PDT  
Windell

Okay, no luck there-- please e-mail me and I'll send it to you that way. Wink


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: lagomorph () on Saturday, April 25 2009 @ 02:10 PM PDT  
Anonymous: lagomorph

Thanks. I emailed you. Another oddity is that once I can get peggy2_minimal to light all LEDs it generally sits there nicely lit for quite a while. The top row is a little brighter than the rest but all other LEDs are consistently the same brightness. Getting it to light like that though generally requires a bunch of power off/power ons. Often on a power cycle it displays a sort of random pattern with a couple of lines moving from left to right in a predictable way. After a minute or so it sometimes lights all the LEDs and is relatively stable then. All LEDs will remain lit for many minutes. That doesn't seem right to me if it's a current issue.

Peggy2_Cube generally runs for 20-30 seconds or so, sometimes longer. It often appears to reset and run again but eventually all LEDs will go out and not come back. I need to power cycle it to get it to run again. Very odd.





       
   
By: Anonymous: lagomorph () on Saturday, April 25 2009 @ 03:52 PM PDT  
Anonymous: lagomorph

Windell,

Your modified peggy2_bounce has been running here for over an hour with the ball on the 2nd step. It's been real stable so you're probably on to something with the voltage drop theory. I'm not sure why I can get peggy2_minimal to work for long periods of time (after many, many tries to start though) but maybe there's less current draw in that sketch since the column data from row to row is not changing.

I wonder if a super stiff 5V power supply would eliminate the issue. I have a very beefy 12V supply but not a 5V. I wonder also why it's not a common problem since I'm using components (wall wart and LEDs) that I'd think everyone else would be using. Maybe the big cap is bad. I could also try replacing that. Thanks again for the help.





       
   
By: Windell (offline) on Saturday, April 25 2009 @ 04:25 PM PDT  
Windell

Okay-- that's useful data; it certainly gives a good alibi for your soldering work!

If you have another big cap (6.3V+ rating, 1000 uF+), I'd suggest adding it in parallel across C5, right at the AVR. That should do the best possible job of decoupling that-- perhaps also a 10 uF (or so) tantalum as well. If that were to solve the issue, we could add components like that in future kits to help prevent this sort of problem. (And certainly send some to you first!)


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: lagomorph () on Saturday, April 25 2009 @ 05:27 PM PDT  
Anonymous: lagomorph

Sweet! I added a 2200uF 6.3V across Vcc and GND on the 168. That seemed to prevent me from programming (DOH!) but removing it, programming, then putting it back seems to work great. I am able to run peggy2_minimal reliably and it starts right up. In fact, the LEDs are now very uniform. I no longer have the slightly brighter top row.

Perhaps there is some happy medium value that will allow reliable programming and reliable runtime. For now I'm going to put a switch on the cap and play around a bit.

I can still cause some havoc on the display by fingering around behind the 168 but I suspect that's normal. Perhaps it's capacitance that causes that.

Thanks again for the troubleshooting help Windell!





       
   
By: lagomorph (offline) on Monday, April 27 2009 @ 07:33 AM PDT  
lagomorph

Just to correct something I said earlier, the pots actually are wired to act the same way when turned the same direction. I wasn't following the board traces correctly when trying to figure out which way to turn them. I should have just watched the LEDs. Smile Turning either of them clockwise brightens the display and counterclockwise dims the display. If I turn them both clockwise until the resistance goes to 0 (max brightness) the board still seems to work fine (with the additional cap). I have to remove it to program but it seems to run programs well with it. I plan to experiment with different value caps and see if I can find one that works well in both modes.

Oh, I also forgot to keep the leads short on the additional cap. I had several inch long wires running to a wireless breadboard with cap so I could remove the cap easier for programming. The cap stopped being effective. I shortened the wires to less than two inches and it started being effective again. I suppose I should test with the cap actually soldered close to the AVR pins.


Forum Apprentice
Apprentice

Status: offline

Registered: 04/24/09
Posts: 14

Profile Email    
   
By: Windell (offline) on Monday, April 27 2009 @ 09:16 AM PDT  
Windell

I'm very glad that your board is working.

I've still been unable to reproduce the problem here. I wonder if the fundamental issue is that your big cap was somehow damaged, or if it's something else entirely. In any case, it would be nice if I could *see* and *fix* the problem to be sure that it's licked for good.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: lagomorph (offline) on Monday, April 27 2009 @ 10:10 AM PDT  
lagomorph

I'll see if I can find a similar cap laying around and replace it, the 1000uF one.


Forum Apprentice
Apprentice

Status: offline

Registered: 04/24/09
Posts: 14

Profile Email    
   
By: lagomorph (offline) on Monday, April 27 2009 @ 06:14 PM PDT  
lagomorph

Well, shoot. I don't think it's the 1000uF cap. I replaced it with the 2200uF 6.3V cap (closest value I had) that I was using across Vcc and GND on the 168 and it doesn't seem to change anything. I get the same erratic behavior as with the 1000uF. With the 1000uF back and the 2200uF across the 168 it's fine again.

I also tried slowly adding capacitance across the 168. First I tried only a flat 104 cap (.1uF I think) with no real change. Then I replaced that with a 1uF electrolytic which improved some sketches but peggy2_minimal was still erratic. It's again fine when I replace that with the 2200uF whopper. I suspect I could do with less but I don't have too many other caps to try.


Forum Apprentice
Apprentice

Status: offline

Registered: 04/24/09
Posts: 14

Profile Email    
   



 All times are PDT. The time is now 01:58 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?