Go Down

Topic: Hardware robustness... (ADC & RESET)... (Read 10862 times) previous topic - next topic

Nicko

Hi,

I work in a high-EMI environment. A couple of small changes to the standard Arduinos would ease matters for those like myself:

1. Add in a low pass filter for the AVCC pin - a simple LC filter (15uH, 10nF) as recommended by Atmel - this will also enable more accurate ADC readings...

2. read AVR040 & AVR042 - it's not commonly known that the /RESET pins on most AVRs is not ESD-protected in the same way as all other I/O pins - its almost impossible to find this out in the data sheets - its very obtuse indeed. A small diode (1N4148) with a 4k7 resistor to VCC, and a 4n7 cap to ground would help greatly (assuming you're not using HV programming). In addition, leaving space for a small zener between GND & /RESET would allow it to be easily added in very high noise environments.

Probably only a few cents to add, but these are simple changes that are recommended by Atmel that would, IMHO, greatly improve the robustness of these boards.

Cheers

Nick

jluciani

Both of these changes are implemented on all of my boards.
http://www.wiblocks.com

1. I use a 10uH, 0.1uF low pass filter.
2. For the reset I have a 1N4148 from the reset pin to Vcc. I also include
   a position of a 0.1uF cap from /RESET to GND. (NB If you use the
   0.1uF from /RESET to GND the /RTS on close reset will not work
   reliably).

(* jcl *)
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks

retrolefty

Quote
it's not commonly known that the /RESET pins on most AVRs is not ESD-protected in the same way as all other I/O pins - its almost impossible to find this out in the data sheets - its very obtuse indeed.


I believe that is so it can be set-up for high voltage programming where (I think) +12vdc is wired to the reset pin. Perhaps the datasheet section covering HV programming might explain the reset pin functions better. Obviously the normal clamping diodes from Vcc to pin wouldn't work for this pin.

Nicko

Quote
I believe that is so it can be set-up for high voltage programming where (I think) +12vdc is wired to the reset pin. Perhaps the datasheet section covering HV programming might explain the reset pin functions better. Obviously the normal clamping diodes from Vcc to pin wouldn't work for this pin.
As I stated in point 2 of my OP, HV programming precludes the use of the full ESD protection, but Arduinos don't use that so can take advantage of the optional additional protection. Even if empty  pads were left for optinal extra components, that'd be good and at no extra cost to the dev board.

Cheers

Nick

laxman

Hi,

I work in a high-EMI environment.its very....good programming

Vlado

This is it guys.    :o I think I have found an answer. I am using Atmega 328P in a race data logger installed on a go-kart, due to the kart size it can not be moved far from an engine. I am having problem with constant Arduino resets (see here http://forums.adafruit.com/viewtopic.php?f=25&t=17567&sid=55c5d8cac4efe47909381ca83679a297
My three inputs which connected to sensors external to the box a already have low-pass filters, but resets still occur.
After reading this topic, I am suspecting the RESET pin to be cause of this, so EMI resets the processor via reset pin.
I didn't quite understand the point 2 of the first post, how to protect the reset pin from EMI? Would directly connecting the reset pin to Vcc help?

Secondly, is there way to completely disable the reset function?

madworm

#6
Oct 18, 2010, 03:22 am Last Edit: Oct 18, 2010, 03:29 am by madworm Reason: 1
You can disable RESET by programming the FUSE bits.

But be warned, this is quasi permanent. ISP programming won't work as well anymore. Only a HV programmer can revert this.

You can read the cause of a reset from a status register. Something similar to this or this (english).
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Coding Badly

Quote
due to the kart size it can not be moved far from an engine

Is it close to any part of the ignition system?

wortelsoft

Don't know if its related but on the Twentyten the serial pins are biased

http://www.freetronics.com/products/twentyten

RX pin biased
The issue with an Arduino sometimes not booting in noisy environments has been corrected, the RX pin is now biased to prevent the bootloader freezing if it gets electrical noise on startup.


Vlado

Thanks guys for hints in solving this puzzle.  ;)
The ignition is part of the engine, which is at the back of the go-kart and my logger is at the front, sitting behind nassau panel, but i guess the EMI from the ignition is still quite strong there. I am certain it is the ignition noise causing the reset, as the logger would run for hours until engine starts. How do I know it had been reset? it would create a new file on SD card less then second after it stoped writing to last file. The timestamps from the GPS show that.
I wouldn't change FUSE to disable RESET it is still useful feature. After I have studied AVR40 & AVR42 I understand better how to implement EMI protection. I have had a close look at the PCB itself and the Pin 1 (reset) on the chip wired all over the place! :o and its connected to a pin on ISP connector sticking out like an aerial! No wonder it will pick up EMI very well. So idea for now is to cut the ISP pin 1 and place a diode to Vcc and 0.1u capacitor to the ground, as close as possible to the Atmel 328 pin 1.
Regarding the RX biased on twentyten. Well I have GPS output wired to RX pin, so on restart of Atmega, gps would still be sending data to RX pin. Would that cause it to freeze? I think I had couple of times when something like that happened.

Grumpy_Mike

Quote
How do I know it had been reset?

Put something in the setup() to flash an LED. Then you will see it flash every time it resets.

However note that the reset function is only activated when this pin is low, to improve noise immunity on this simply change the value of the pull up resistor to say 1K.

ESD protection will not stop the processor pin from resetting it will only prevent damage in the case of a large voltage being present on the pin.

Vlado

I did connect LED with 5000ms delay in the setup() and it comes on everytime I rev the engine high.
Now, I am connecting the pull up resistor and capacitor as  recommended in diagram below.
The R value is 4k7 , capacitior C 0.1u and 1N4148 diode.

http://www.atmel.com/dyn/resources/prod_documents/doc1619.pdf
on Page 15. Sorry can't upload the picture itself.

Grumpy_Mike


Vlado

I will be testing this solution this weekend. Will keep you posted.

PaulNoel

I probably is necessary for you to shield the box and wires associated with your aduino controller in this high EMI environment.  A solid steel box made of roofing tin may help though the "big guys" use Mu Metal shielding for such boxes.  Ground this shield to the frame of the vehicle.  You may want to do two layers of steel box if you use the cheaper material.
If you need to shield the box you probably need to opto-isolate or use circuit drivers such as ULN2003A chips to protect your box.  This last item is just an industrial standard for automotive use.   Shielding your input power lines is achieved by using DC-DC converters and all sorts of filtering as discussed in other discussions on this thread.  

This sort of shielding is required because all of those nice pins that make an arduino shield are great antenna for the collection of EMI.  

The really bad problem of your cart is that it probably uses a really noisy generation system and your power supply is unstable altogether.  Solving this is a matter of doing several layers of power supply conversion with large caps at each layer to avoid the momentary current flow changes.   I work on really big trucks and we have the same sort of problems.  Typically we put a DC-DC converter that takes the 12VDC or 28VDC (our Case) and convert it to 12VDC.  This is buffered with some big caps and then we DC-DC convert down to 5VDC or 3.3VDC as required.   If we need 12VDC again for some use we actually take the 5VDC and kick it back up again using Buck Boost.  

Power supplies of motor vehicles are just noisy as can be and you get all sorts of problems.   USB lines have to be ringed on both ends with ferrites.  

Hope this helps 8-)

Go Up