Pages: [1] 2   Go Down
Author Topic: atmega328 glitching on and off  (Read 1293 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi there i have made a control board for a heating system that i work with on a regular basis was in the process of fine tuning my code to work correctly so all hardware seemed to be working ok but just recently it seems like the processor is switching on and off continously. hardware:
8va transformer 24v output
KBP005M rectifier
16uf capacitor changed for 33 and then 1000 still no different
L7805 Voltage Regulator  was changed no different
16uf capacitor changed for 33 and then 1000 still no different
atmega328 works fine in the arduino board and has been replaced aswell
the 2 capacitors and crystal have been changed still no difference

when i changed the two capacitors either side of the voltage regulator to 1000uf when you turn the board off it suddenly seems to work for a split second just before the capacitors discharge 

any ideas?
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

just had another play and just ran two temporary leads picking up the pos and neg from te board and linking them to the 5v out on the arduino programming board it appears to work fine then bit hard to exactly say as some of the componenets will not work as they need higher voltages so i presume my bridge rectfier needs replacing or the voltage regulators im using are a load of crap?? but seem to test out ok on the multimeter
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 498
Posts: 19060
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The meter won't show everything. An oscilloscope might.

Try some decoupling capacitors.

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
Logged


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
some of the componenets will not work as they need higher voltages

If the 328 works with a separate 5V on it, but not when running off the 7805,
then it sounds like some of the other components in the circuit may be crowbarring
the 7805.
Logged

Bute, Scotland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just a thought about voltages in your circuit.
Your transformer will give a peak voltage of 1.414 x 24 volts ( 33.936 ) at the rated output. If you are drawing less current, which seems likely, the peak voltage will be higher. The spec for a 7805 is maximum input 35 volts, your rectifier will drop a few volts but it might still output more than 35 volts so it might keep shutting down.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote

The meter won't show everything. An oscilloscope might.

Try some decoupling capacitors.

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

thanks for that information just tryed that and still seems to make no apparent difference

Quote
If the 328 works with a separate 5V on it, but not when running off the 7805,
then it sounds like some of the other components in the circuit may be crowbarring
the 7805.

disconnected them from circuit no difference unfortunatly

Quote
Just a thought about voltages in your circuit.
Your transformer will give a peak voltage of 1.414 x 24 volts ( 33.936 ) at the rated output. If you are drawing less current, which seems likely, the peak voltage will be higher. The spec for a 7805 is maximum input 35 volts, your rectifier will drop a few volts but it might still output more than 35 volts so it might keep shutting down.

oh yes with no load i have 40v off the bridge rectifier so yeah your probably correct that the voltge regulator is shutting down due to over voltage does anybody have any recommendations for a regulator what will handle the higher input voltages?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use a switching supply, or lower the voltage, or add your own winding for a low voltae tap
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote

or add your own winding for a low voltae tap

what so add an external winding? any information on this?
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well it would depend on the type of transformer you have and if you can take it apart to add a winding, its not too hard if there's space and if the transformer comes apart, toriodal transformers are the easiest, other really depend on how well its assembled, sometimes the EI transformers are just two pieces of core together, other times its a whole lot of individual laminated layers, which is. Real pain and I wouldn't try, did one and cut myself, not so fun
but if there's room wrap enamel wire around the other wires basically until you getthe voltage you need, which I would suggest testing that while its under a similiar sized load
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

o ok i understand what you meen now unfortunatly the transformer is molded into a plastic case so can not get to the windings
i did have a look for voltage regulators with higher input voltages but the only ones i found were variable ones was looking at this  LM317AHVT for a quick fix what do you think?
but for future boards i think i will have to pick just the one 12v output from the transformer and run two rectifiers one for atmega328 and the other for the other components on the board
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunetly dropping from 40 to 5v means wasting 8times the power and 8x the heat
so a 30ma draw at 5v would have the regulator dropping the 35v and using 1W of power(maximum without a heatsink assuming a cool surrounding), where only .15W is actually doing work the rest is heat
you need a switching power supply to effectively drop that within practicality
so unless your drawing less than 30ma you'd need a largish heatsink, which will get you a little farther but not too much
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2925
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a "No-Brainer", Really simple. However remember that an 8VA transformer has a secondary current capability of .3A and 300 mA can quickly be used if the transformer supplies other things.
One other thought is that If the transformer is used for other control it's secondary must not be common to your ground or negative PSU terminal.

Solution #1 use a 150 ohm 10 watt resistor from the HV to ground... Load it down to the equivalent RMS voltage.
Solution #2 use a half wave rectifier and 2200uF cap on the output of the diode. 1/2 of 24 V
Solution #3 is the transformer Center Tapped? if so use a halfwave bridge or tweo diodes cathodes common and + output... - output is the CT.
               or connect the bridge rectifier from one side of the secondary and the center tap... 12V Ac... now 1/2 of the transformer secondary is used
Solution #4 Connect a 12Volt 1 watt or better Zener diode in Series with the HV PSU cathode pointed to the HV side of the PSU... anode to the regulator.
                Polarity of the diode is important here the diode will work connected either way however only the way I mentioned will give you more than the
                nominal .6V diode drop. The Zener is used as a level shifter.
Solution #5 Get a 12V transformer... or see Solution #3 and find a 24V transformer with a center tap.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe the half wave idea wouldn't work effectively unless it was a constant predictable load, the halfwave rectifier would simply make it a larger ramp up time of the capacitor, if there's no load it will go up to the full voltage
I think a switching regulator is the best option, the rest re kinda wasteful, they actually make drop in switching replacements for the to220 7805 tho they are a few bucks
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2925
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Winner you are DEAD WRONG the half wave rectifier has been successfully used without the strange effects you describe for nearly a hundred years, it's only drawback is the requirement for a large input filter.
I've used it for 50 years my self... Very successffully... When I was a WORKING PROFESSIONAL ENGINEER, You?

Docedison
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im sorry I haven't that experience nor tried it, I just never heard about that and thought that it would only cause alot more ripple because it only charges the capacitor half of the cycle, still it would charge it so long as the capacitor is at a lower voltage than the ac peak voltage, which if there was no load would charge it to the ac peak
If it was only ac output then I could see it effectively cutting the rms voltage in half, but then again im not that experienced and there's a million things I don't know yet
Logged

Pages: [1] 2   Go Up
Jump to: