O
O
Oleg2017-05-08 21:00:10
Arduino
Oleg, 2017-05-08 21:00:10

How to diagnose Arduino power problems?

I'm using a Chinese Arduino Duemilanove (Atmega328p) with Optiboot firmware. Various modules are connected to it via i2c, as well as directly to the pins of the LCD Keypad Shield (LCD1602) and the OMRON solid state relay module. The relay controls the motor starter. In the code, a watchdog is activated for 1 second, which is proven to work. Powered by an external Chinese 9V impulse block.
Two problems arise:
1) When the starter is turned on several times, the LCD starts to behave very strangely. At each familiarity, characters from the character generator change very quickly. Through this flickering, it is clear that the program-derived text is also trying to be displayed and the program is being executed (the relay is working).
All this goes away if you connect USB in parallel with the power supply.
2) The most serious problem: sometimes the relay does not turn off the starter. I looked at the code, it is quite large, but I did not see any problems. Plus, in the event of a freeze, the watchdog should work, but this does not happen.
And here I have a question: can power interference violate the state of memory? And how to catch them, and where? at the output of the power supply? I'm not very good with electronics. Tell me, please, how to diagnose and what actions can be taken so that everything works stably?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
n12eq3, 2017-05-08
@n12eq3

1) Andrunna's power supply must be completely isolated from high-current circuits. when using a different rank-junk - it is not even desirable to be included in the "same outlet" or even on the same line with a powerful consumer (starter). for the test, you can power it from an external battery or just a crown - enough for a while.
2) if item 1 does not help, you can try to hide the andrunna + all the available "logic" inside the iron box, you can paste over the cardboard box with foil - it may be suitable for tests. "isolation" in the form of SSR for this case is generally insufficient, because in the vicinity of large power consumers, "isolation" in the field of EMR becomes very important - various kinds of braids for cables, metal cases, ferrites for long wires.
3) without the use of an oscilloscope in any of its versions or without obvious work experience - it is possible to reliably diagnose, for example, diarrhea. the rest is unlikely.

K
kalapanga, 2017-05-09
@kalapanga

The main drawback of someone else's code is that it will either work right away, which means you are lucky, or it will not work and you will have to deeply understand it, until you clearly understand each of its lines. I mean, the problems may not be from food at all. And from "rather large" code and "different modules".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question