Peter_n - Hi and thank you for your detailed write up. I will provide some more detail and go thru this line by line below. Lets table my first post, it was for work and this project is for my house... which is far cooler on and gets priority
I have to disagree on the crisp signals. When SDA and SCL are in a flat ribbon cable, a pulse of the clock could inject into the data signal. That would destroy the I2C communication.
I cant tell if the data line on the Oscope from my last post picture looks good or not? Not to show my age, but im having trouble reading the phosphorus scope. Im accustom to the digital scopes at work My scope at the house was a free-be. Splitting the ribbon cable is a good test.
Are you sure that the sketch is locked up because of the I2C bus, or is only the display going haywire ?
There are 2 fail modes:
1 - the char issue ("haywire") as pictured does not always lock up the UNO and it seems as if its just garbage on the LCD... some times it clears and some times it sticks and trips the watchdog. I can not reproduce this... bummer
2 - LCD freeze, the HH:MM:SS stops and the Uno locks up for sure. No I/O operation and the watchdog in the sketch times out, with a reboot. I can reproduce this very easy by loading down the clk or data on the I2c with a 0.1 cap across A5 and A4.
More info - I have a few sections in my code were I used delay(500) and not a getmills type counter loop. When this executes, I do see the I2C go silent (as expected) and then come back up. Is this proper? or could that be causing issues?
Can you give a link to the display ?
Yes - its a cheap one link , this was just to get me off the ground. Now that im up and running. I would consider buying a better model if you know of one?
Is that an official Arduino Uno board ?
Yes sir, R3 UNO.
Split the wires of the flat ribbon cable to the display. It may be less pretty, but it is necessary.
wow- probably the best place to start. ill give that a try today.
I don't see 100nF decoupling capacitors at the 5V and 12V. You could add a few.
That was my first thought, but after probing with the scope, the 5 and 12 were clean. Good point & design practice. I added a few to the schematic (maybe take a look, rev3 attached)
The output of the Arduino Uno (Ctrl ARM Req, WD Ctrl) is not protected. A 100 ohm resistor would do.
Correct, but did you see the 1k Res on the Mega side? its part of the low pass filter. so i think im covered.
Is the voltage regulator on the Uno board getting hot ? You could use the OKI-78SR to power the Uno at the 5V pin. But you need a protection diode from 5V to VIN to protect the voltage regulator on the Arduino Uno against reverse voltage.
Its running cool, but I know what your saying. I may go that route in the end. See the Rev3 schematic PDF.
You could throw in a capacitor of 47uF or 100uF at the 5V pin of the Arduino and the 5V pin of the RTC. This may seem strange, but when there is a problem with capacitors on the board and in the modules, an extra capacitor does help a lot.
100% correct, I always do that in a PCB layout next to IC power pins ... I am actually embarrassed I did not do this here on the bread board. Guess I trusted the RTC designer had robust built in power filtering caps.
What kind of buzzer is it ? A piezo element (the round disc) ? You have to use a 120 ohm resistor to a piezo element.
its a piezo. For now im removing the buzzer to try and isolate my problem. Previously, I took a look at the A3 pin when it was on and off and did see some noise when active. So I put a resistor and cap on there. See the Rev3 schematic PDF.
The 12V from the adaptor is going into the wire without any filter. There can be a lot of electric noise that could cross-talk into the other signals. I would use a LC filter (capacitor + ferrite-with-coil + capacitor) at the incoming 12V at the Arduino Uno. And also a filter near the Arduino Mega 2560, before it is put onto the cable.
On Monday, I will try this if the problem still persist. the OKI-78SR does a nice job of cleaning up the power but that red cat5 is going right under the LCD which could be a problem.
thanks again for your help
AG
Alarm_r3.pdf (80.6 KB)