Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Something wrong with my circuit

Status
Not open for further replies.
eblc1388 said:
In so doing you have forgotten to include the current limiting resistor for the LCD backlight. The resistor value= (5-LED_V) / backlight_current, where LED_V & current depends on color of backlight and is given by LCD datasheet.
I think I need to go back to school.

eblc1388 said:
You have the zener diode connected backwards in your schematic. Why 12V so high? You would only need to drop about 6V.
I misunderstood what a zener diode does. I thought it restricted the voltage to it's breakdown voltage, but now I have read more about them and understand it causes a voltage drop of it's breakdown voltage. My bad.

eblc1388 said:
You have to try out the new design to see how it performs with inductive loads.
I will do a lot of testing this time before I get anything made up.

I just have 1 more question and then I'll leave everyone alone .... I promise :p Someone else told me I should not connect AREF to AVCC and that I should put a 0.1uf cap from AREF to GND. The way I read it the voltage reference can be external, or if I put a cap to GND I can change it to AVCC internally by setting REFS0 in the ADMUX register. Is there any difference? Which would be better?
 
Chris_P said:
Someone else told me I should not connect AREF to AVCC and that I should put a 0.1uf cap from AREF to GND. The way I read it the voltage reference can be external, or if I put a cap to GND I can change it to AVCC internally by setting REFS0 in the ADMUX register. Is there any difference? Which would be better?

The Mega16 AVR AD converter reference voltage arrangement allows it to tap the voltage off one of the three sources. They are AVCC, internal 2.56V ref and external reference, selectable via REFS0 and REFS1 bits in the ADMUX register.

There is really no need to connect the AREF pin directly to AVCC as it can be done via setting bits in ADMUX register. Only a capacitor to 0V is required for noise filtering on the AREF pin.

Problem arises when internal 2.56V reference is selected, by user or by mistake in code, making the pin internally 2.56V. If AREF pin is connected externally to AVCC manually, then you have effectively shorting external AVCC(5V) to internal 2.56V.
 
Chris,
You should separate the mains voltage circuitry and the low voltage circuitry by a minimum of 6mm. This is called creepage distance. Using smooth bends in your PCB traces also helps suppress EMI.
You can also use a guard trace between the mains voltage circuitry and the low voltage PIC circuitry. The following document has some additional info that may be useful to you:
https://www.electro-tech-online.com/custompdfs/2007/04/AN2321.pdf
 
kchriste said:
Chris,
You should separate the mains voltage circuitry and the low voltage circuitry by a minimum of 6mm. This is called creepage distance. Using smooth bends in your PCB traces also helps suppress EMI.
You can also use a guard trace between the mains voltage circuitry and the low voltage PIC circuitry. The following document has some additional info that may be useful to you:
https://www.electro-tech-online.com/custompdfs/2007/04/AN2321-1.pdf
Thanks kchriste, that is a really good document. Exactly what I need to study.
 
Me again. :eek: Looks like my quick fixes didn't work. My friend is sending it back again. It switched the solenoid 5 times and then locked up. I enabled the BOD but I think I set the voltage level wrong so that may have something to do with it locking up. But it also sounds like the flash memory has been corrupted as it didn't start up again when powered down and up. I will get it back in the next day or so to have a look at. He is also sending me the solenoid valve he is using so I can at least test it myself.

eblc1388 said:
I would have advised you to use an optical TRIAC MOS3020 to drive a 240V coil AC relay directly if you want the go the full optical route. Doing it your way with 4N28 does not give much advantage against interference.
I think I would like to go this route with my design. I have been reading the specs of the MOC3020 but I am confused. Can I drive it straight from the AVR I/O pin or do I need a transistor? And can it switch my relay coil directly or does it need a TRIAC as well? The specs on my relay says it will consume 2.0VA for a 240V coil.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top