Grove 4 digiti display and RTC DS3231

Hello all, I'd just like to make sure my plan makes sense!

I need to add a real time clock and a 4 digit display to an Arduino Uno.

From what I have read it seems that the Grove can use any two digital pins, but usually uses pins 2 and 3.

And also the RTC module uses SCL SDA pins (which are present on Arduino Uno R3 but maybe not on earlier versions)

Just asking this question I've come up with the answer, I think.

Is the attached diagram correct?


I am not going to spend the time looking up the parts as you could have posted the links but it looks like it will work if the software is written properly.

1 Like

SDA is directly connected to A4, SCL to A5. The redundant SDA/SCL pins are a convenience when using boards that have the I2C pins on something other than A4/A5, such as the Mega, so that a shield designed for an UNO will work properly without having to run extra wires.

2 Likes

That would often be a waste, since pins 2 and 3 are the only ones that support external interrupts. Those displays are "bit banged", you can use any digital pins at all to drive them. Even, A0-A3 (you're already using A4, A5 as noted.

Don't forget the modifications (Google it) to the RTC if you run it on 5V, or the module will apply charging current to the non-rechargeable battery, which could start a fire.

1 Like

Thanks for all the replies, I did not realise all of these things. Luckily I posted a question I thought I'd answered, because I hadn't!

I got the connection to 5V from this page:

https://techzeero.com/arduino-tutorials/ds3231-rtc-with-arduino/

but looking at the product page it says 3.3V:

https://www.az-delivery.de/en/products/ds3231-real-time-clock

so thanks for warning me about that.

I'll connect the RTC to the 3.3V output of the Arduino. So a more correct solution as far as the power supply is concerned would be this:

?

Right about the power supply, but wrong about the I/O connections. If you do that, then you have mixed voltages on the I2C lines. The correct way is to either modify the RTC, or use a different RTC.

You need to remove either the resistor or diode here:
image

Hello. Arrg! Now I'm really lost. Could you explain why I should remove the diode/resistor?

The board was designed for rechargeable Lithium batteries. So it has a charging circuit, the diode and resistor. If you try to charge a non-rechargeable Lithium battery, it can heat up and explode. Most people don't use a rechargeable, can't even find or buy one. So it makes sense to modify the board.

The resistor will come off really smoothly, with a soldering iron with a dab of solder on the end. Or just break it off, but then it will be a permanent mod.

You have a 5V Arduino, you have to run the board on 5V so the I2C bus runs at 5V.

1 Like

Aha! Now I understand. But then this diagram from the user manual of AZ-Delivery is incorrect...

?

(The PDF arrived today. I was dead annoyed with them because they shout about a free manual but you have to give your credit card details to get it. When I complained they sent me the PDF.)

Yes, it's incorrect. It would be correct, for a 3.3V Arduino.
https://www.onetransistor.eu/2019/07/zs042-ds3231-battery-charging-circuit.html

1 Like

Just to be sure: I should take out the diode and/or resistor and use 5V power?

Yes, that is the simplest solution. I do this mod with any 5V processor I use with it.

Else, use it as-is with any 3.3V processor.

AZDelivery is not a technical service, it's a merchant. Don't get your information there.

1 Like

Oddly enough they talk about how good they are technically!

Thanks for all the help, it was very very useful.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.