the 328n is driving me crazy
the 328n is driving me crazy
I have over 15 328n's and it looks like they are all bad. I have built the program board 3 times and checked every connection many times. I have had the 328n and program boards built. and they work but only once or twice. I put a new one in and it comes up and says HI then I program it and it works good for about 2 times and then it starts not verifying after programing and strange characters start appearing. I have used the zx-24 with the same program and everything fine. It's like the 328n is to sensitive. This last one it came up and programed and verified. then I changed one bit on the program and it programmed but won't verify and I never moved it . My voltage comes from my PC into a 7805 which outputs about 4.8v. I will send these in as you suggested and I appreciate it if you look at them. I haven't because I keep buying more hoping it will be me. Now I'm going to be late on a contract with 15 bad 328n's. Is there something else to look at or can I re-flash these things or what? please advise
the 328n is driving me crazy
If you would show us your circuit/schematic we could look at it. Maybe fresh eyes will see something you don't.
If a 7805 is putting out 4.8V that suggests something is wrong. What/how are you connecting the 7805 to your PC? Is the 7805 warm?
On 3/3/2014 4:17 AM, ZBasic wrote:
If a 7805 is putting out 4.8V that suggests something is wrong. What/how are you connecting the 7805 to your PC? Is the 7805 warm?
On 3/3/2014 4:17 AM, ZBasic wrote:
I have over 15 328n's and it looks like they are all bad. I have built the program board 3 times and checked every connection many times. I have had the 328n and program boards built. and they work but only once or twice. I put a new one in and it comes up and says HI then I program it and it works good for about 2 times and then it starts not verifying after programing and strange characters start appearing. I have used the zx-24 with the same program and everything fine. It's like the 328n is to sensitive. This last one it came up and programed and verified. then I changed one bit on the program and it programmed but won't verify and I never moved it . My voltage comes from my PC into a 7805 which outputs about 4.8v. I will send these in as you suggested and I appreciate it if you look at them. I haven't because I keep buying more hoping it will be me. Now I'm going to be late on a contract with 15 bad 328n's. Is there something else to look at or can I re-flash these things or what? please advise
Re: the 328n is driving me crazy
You're welcome to also send one of your application boards. I'd be willing to spend some time looking at it but only if I also have schematics and some clear metrics for determining whether it's working or not.rdrive wrote:I will send these in as you suggested and I appreciate it if you look at them.
- Don Kinzer
Re: 328n's
I agree. That suggests you're drawing a lot of current - which should make the 7805 hot unless it's massively heatsunk. If you remove the 328n (is it socketed?), and other active devices, what happens to the 7805 output?If a 7805 is putting out 4.8V that suggests something is wrong...
Tom
there is no heat sink but I never noticed it being to hot but now i don't have a running program to test. I'm attaching the ckt . not sure how
- Attachments
-
- motcont1.pdf
- (386.1 KiB) Downloaded 367 times
I will study you circuit more later, but took a quick look.
What are the values of the two capacitors on either side of the 7805?
How much current does the motor take at each of the three speeds?
My guess is that the motor emf/spikes may be causing problems with the processor.
If you disconnect the motor from the circuit, will it program the chip?
A 0.1uf or larger capacitor across the motor may help, and a protection diode at the output of the regulator (cathode to +, anode to -) would be a good idea.
The 328n should also be isolated/filtered from the 5V since it shares the same supply as the motor. Something similar to the way the AVCC pin is filtered, but with different part values.
Tom W
What are the values of the two capacitors on either side of the 7805?
How much current does the motor take at each of the three speeds?
My guess is that the motor emf/spikes may be causing problems with the processor.
If you disconnect the motor from the circuit, will it program the chip?
A 0.1uf or larger capacitor across the motor may help, and a protection diode at the output of the regulator (cathode to +, anode to -) would be a good idea.
The 328n should also be isolated/filtered from the 5V since it shares the same supply as the motor. Something similar to the way the AVCC pin is filtered, but with different part values.
Tom W
A few observations:
- Motor powered from logic supply. Better powered from separate 5V - or 12V.
- Motor spike protection diode (can't be across reversable motor, so across high-speed FET).
- Reversing relay coil draws less than 20mA?
Also a few suggestions:
- PWM for speed (and direction) control.
- AVcc inductor necessary if no ADC use?
- Motor powered from logic supply. Better powered from separate 5V - or 12V.
- Motor spike protection diode (can't be across reversable motor, so across high-speed FET).
- Reversing relay coil draws less than 20mA?
Also a few suggestions:
- PWM for speed (and direction) control.
- AVcc inductor necessary if no ADC use?
Tom
From what you said, you have already made your circuit boards. Maybe these extra parts could be added to your board with not too much trouble.
Pardon my crude way of editing your circuit...
Attached is one way you could improve your circuit and probably stop blowing up the chips. Others may have additional ideas. Knowing the values of the capacitors and the part number of the relay would help too.
Let us know how it works or if you have any more questions.
Tom W
Pardon my crude way of editing your circuit...
Attached is one way you could improve your circuit and probably stop blowing up the chips. Others may have additional ideas. Knowing the values of the capacitors and the part number of the relay would help too.
Let us know how it works or if you have any more questions.
Tom W
- Attachments
-
- motcont2.pdf
- (197.64 KiB) Downloaded 378 times
328n
although the motor was disconnected when I was having problems. All your suggestions are very correct. I will separate the voltage from CPU, heat sink the motor reg. add protection diodes. and modify the board to accommodate. These are all sound things I will do. Unfortunately the only thing operating was the 328n's but I will do all these things and order more 328's and I'll let you know how it turns out .
Thank you all
Thank you all
the 328n is driving me crazy
The only other thing I question is the current the relay coil uses. It could be overloading the 328n's output pin. Maybe a transistor should be used to drive the relay coil.
On 3/5/2014 4:37 AM, ZBasic wrote:
On 3/5/2014 4:37 AM, ZBasic wrote:
although the motor was disconnected when I was having problems. All your suggestions are very correct. I will separate the voltage from CPU, heat sink the motor reg. add protection diodes. and modify the board to accommodate. These are all sound things I will do. Unfortunately the only thing operating was the 328n's but I will do all these things and order more 328's and I'll let you know how it turns out .
Thank you all
Also, is there a By-Pass capacitor from V+ to Ground, as close to the micro's pins as possible, (e.g. 0.1 uF)?
This is required for reliable operation, especially in a noisy motor control circuit.
Also, check you specific crystal's spec's. 27 pf might be a bit high for many crystals, especially if one factors in some capacitance for the PCB layout traces. If the Xtal / Clock isn't running, the chip will appear "dead".
JC
This is required for reliable operation, especially in a noisy motor control circuit.
Also, check you specific crystal's spec's. 27 pf might be a bit high for many crystals, especially if one factors in some capacitance for the PCB layout traces. If the Xtal / Clock isn't running, the chip will appear "dead".
JC