I’m trying to use a serial 7-segment display over I2C with Arduino UNO R3, both at 5V. As shown in the hookup guidance I only connected 5V/GND and SDA/SCL, with no other components. I was having trouble with dropped commands on the display. I saw discussions about I2C needing 4K7 pullup resistors. When I tried that the display showed garbage and became unresponsive. So what’s the story? Does the Atmel on the S7S already enable pullups, because they aren’t in the schematic? And if so, why would adding more pullups hurt? Maybe it enables pulldowns, and I was defeating them? When I removed the pullups it worked better, but is still dropping commands occasionally.
It depends on the device. The guide for the s7s doesn’t note any and I don’t see any when viewing the .brd file so I imagine they are likely not required. The issue superfluous ones can cause is too much resistance on the i2c bus, causing start/stop errors (hard to determine the differentials)
You might try messing around with delay timing and/or increasing the i2c bus speed
The UNOR3 does NOT have pull-up resistors as the SDA / SCL are the same pins used for analog measurement on A4 and A5. Any pull-up will impact correct measurement if the pins would be used for analog reading. As TS-Russell points out they are neither on the S7S AT328 pins. The S7S firmware does not show either that pull-ups are set.
Adding pull-up of 4k7 - 10K resistors from BOTH SDA and SCL to 5V should not result in more garbage. Actually in my mind they should be added for correct working. Make sure to keep short cable ( < 30 CM). longer cables will impact as capacitors. If you plan to use longer keep the resistors and reduce the Wire speed.
Thanks for your responses. I tried upping the speed to 400000, but the UNOR3 wasn’t having it. I lowered it to 10000, and it worked but no better, still dropping transmissions. I tried putting a delay(1) after every transmission, and that didn’t change anything. I tried adding 4K7 and 10K pullups and that didn’t change behavior. I’m still in breadboard mode and using 6” jumper wires to connect things together, so I don’t think cable length is an issue. It could just be a matter of noisy connections, and might improve when I solder it all together. Fortunately, this is just a display for a count-down timer, and if it’s not always right it’s not a big deal. At least everything else works correctly, i.e. the start, count down, and stop. But it’s a little disappointing.
might improve when I solder it all together.
I2C need a solid connection, I’m certain you will see much improvement after soldering.
Next to solder the connections, maybe it is worth a try with an external power supply to the S7S instead of UNO.
Sparkfun mentions the AT328 current (14mA) but does not show the LED current in the documentation. From internet How to Use 7-Segment Display (4 Digit) YOUNGSUN: Pinouts, Specs, and Examples | Cirkit Designer
Key Technical Details
-
Operating Voltage: Typically 3.3V to 5V
-
Forward Current: 10-20 mA per segment
-
Peak Forward Current: 100 mA
-
Reverse Voltage: 5V maximum
-
Luminous Intensity: 80-100 mcd per segment
-
Wavelength: 655-660 nm (for red color)
When connecting external supply ( e.g. from a wall wart), make sure to connect GND’s together (common ground).
One more thing to note is the delays usually needs to be something like 50 (ms)