Ckt problem after moving to PCB

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,072
Need some advice on this one, as I am stumped. Question is, why does this 85 reboot on PCB ?

I have this atmega85 (adafruit trinket 5v) ckt that works fine on breadboard but will not when I move it to a PCB. This was my 2nd go at it and I still have the same issue. The only issue is the wake pin.

Pin2 is configured as a input_pullup and the code uses this pin as interrupt ("wake") during sleep mode via pin state change. On my breadboard when I take pin2 to gnd the 85 comes out of sleep and resumes. However, on the PCB when I do the same thing the 85 reboots.

Notes: its 9v batt. A pFet feeds the Trinket, and the 1M/220uF is a timer, essentially cutting power after about 7min, if that cap is dumped out to gnd then it stays running (via switches on toy, etc). The pixel ring power on both sides (+ and gnd path) are controlled via p/n Fet pair, because if you don't do it this way and only pull +V from ring the ring still allows mA to flow. So in essence, pin3 is used to control power to the ring (pin 3 off when 85 goes to sleep, on when 85 wakes). I do it this way because this a AA batt powered toy, and it will go onto the shelf when kid is done playing with it, no on/off switches, hence to save batt power I do it this way, etc.

Also, using my basic DMM I cannot see any voltages dropping too low (batt or the +5v output), so the reboot appears to be inside the 85 itself. I thought perhaps the 85 was choking on the nFet gate charge when pin3 turns back on, but gates are just 11nC each, and I put a 100ohm in series with that and still same issue.

Board & schematic:
excuse the paper drawing, round two so I figured to trace out every wire on bboard and put it on paper, then build that on PCB, etc.


 

Alec_t

Joined Sep 17, 2013
14,330
Your drawing shows the reset pin floating. I'm not familiar with the Trinket, but with most micros that's a no-no.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,072
Your drawing shows the reset pin floating. I'm not familiar with the Trinket, but with most micros that's a no-no.
inputs can be in a mode called "pullup" which has ~50k ohm pullup to +5v
but the issue is, works ok on bboard, not ok on PCB
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,072
The only other reason I can think of is that there's a wiring-error/solder-bridge on the pcb.
thats what i thought the 1st time. the 2nd time i made very sure to wire/solder it over a few days, verifying each step, hence why that schematic has green lines, as i marked it as i went along. i looked at the soldering under my hands-free board holder magnifier, i dont see anything wrong with the soldering/wiring.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Do you have an oscilloscope? Can you try watching the battery voltage, 5V supply, and reset pins during a wake cycle?

If not, I'd try investigating the floating reset pin and stray capacitance theories with a little trial and error:
  • Try a stronger pull up resistor on reset pin to ensure it's not doing something strange.
  • Small, fast cap (0.1 to 1uF ceramic?) decoupling 5V line.
  • Similar small caps anywhere else that a little bit of capacitance might make a difference.
None of the ideas quite make sense to me, but if it works on a bread board, and if you're sure you transferred the circuit to perf board correctly, there's not much left to do except start doing some empirical testing.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,072
i cant change the internal pullup, its cut into the die of the atmega 85, etc. "input_pullup" is an internal function "mode" that activates the pullup, etc.

however, i can try the pin as a std input with external 1500ohm pullup and see what happens.

i do have a scope, just havent used it yet on this problem.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,072
well, i dont think any added caps helped, but i changed the pin mode and did a external pull down.

i did add .047uF ceramic and 0.1uF electrolytic to the output of the regulated +5v
i also added the 10k ohm pull down and a 10pF to ground on the wake pin.

now it works. why? i dunno yet, but i am in a rush to get this item shipped.

 
Last edited:
Top