0

I2C .56/.54 backpack pulsing issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I2C .56/.54 backpack pulsing issue

by JakeConhale on Sun Feb 18, 2018 1:04 pm

Hello. I'm working on my own variant of the BTTF time circuits, partially inspired by the Great Scott! project posted on Adafruit.

Run into an odd problem and hoping someone could tell me what's wrong or at least why it's occurring.

I have a collection of .54" alpha displays and .56" numeric displays with backpacks, selected to ease wiring. I've connected them and started testing code when I noticed that if I have more than say one of them connected at a time, the digits "pulse", that is each digit grows dim and intensifies in a pattern either left-to-right or right-to-left.

One alone doesn't seem to pulse, but add more, they do it. Not always the same speed or direction, I've seen the same display pulse left-to-right and then right-to-left after swapping out other displays.

My code is dead simple, right now it just sends a different number to each I2C address to demonstrate which device is being communicated with, but this occurs just once in the setup portion of the program.

Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_MCP23017.h"
#include <Keypad.h>

Adafruit_AlphaNum4 tres = Adafruit_AlphaNum4();
//Adafruit_AlphaNum4 dos = Adafruit_AlphaNum4();
Adafruit_AlphaNum4 uno = Adafruit_AlphaNum4();
Adafruit_7segment dos = Adafruit_7segment();

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);

  uno.begin(0x70);
  dos.begin(0x71);
  tres.begin(0x72);

  uno.writeDigitAscii(0,'8');
  uno.writeDigitAscii(1,'8');
  uno.writeDigitAscii(2,'8');
  uno.writeDigitAscii(3,'8');
  /*dos.writeDigitAscii(0,'2');
  dos.writeDigitAscii(1,'2');
  dos.writeDigitAscii(2,'2');
  dos.writeDigitAscii(3,'2');*/
  dos.print(99.99);
  tres.writeDigitAscii(0,'3');
  tres.writeDigitAscii(1,'3');
  tres.writeDigitAscii(2,'3');
  tres.writeDigitAscii(3,'3');

  //uno.clear();
  //dos.clear();
  //tres.clear();

  uno.writeDisplay();
  dos.writeDisplay();
  tres.writeDisplay();
}

void loop() {
  // put your main code here, to run repeatedly:

}


So, any ideas? Does this relate to the I2C protocol somehow? Is it that my Uno isn't providing sufficient current? I plan on running 9 alphanumeric backpacks, 3 numeric backpacks, and a few other things but I couldn't find any information on power draw so not sure if an Uno with +5v through a USB adaptor would be sufficient.

Thanks!

JakeConhale
 
Posts: 4
Joined: Sun Feb 18, 2018 12:51 pm

Re: I2C .56/.54 backpack pulsing issue

by adafruit_support_bill on Sun Feb 18, 2018 1:27 pm

One possibility is that you are seeing a 'beat frequency' of the display refresh rates.
The displays are multiplexed and each HT16K33 has its own independent clock. If they are not 100% in sync, you can get a beat where they are alternately in and out of sync. The beat frequency will be equal to the difference in the two refresh frequencies. And if your power supply is marginal - or there is too much resistance in your wiring, you might see momentary dimming when they are in sync.

adafruit_support_bill
 
Posts: 69241
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C .56/.54 backpack pulsing issue

by JakeConhale on Sun Feb 18, 2018 7:23 pm

So, then, I should wire in a dedicated wall-connected +5V power supply rather than relying on the Uno?

Are there any technical specs on the power requirements of the quad and alphanumeric backpacks? I know they have the specs for the base displays, but I'm curious what the backpacks add to it. Would also help me plan out my design.

JakeConhale
 
Posts: 4
Joined: Sun Feb 18, 2018 12:51 pm

Re: I2C .56/.54 backpack pulsing issue

by adafruit_support_bill on Mon Feb 19, 2018 7:10 am

The backpack it self draw only about 2mA. Current draw for the display will depend on how many segments are lit. Each segment will be about 20mA, so a '1' will draw about 40mA and an '8' will draw about 140mA. The display is multiplexed, so only one digit at a time is lit.

If powered by USB, the 5v pin of the Arduino can supply about 500mA. If you will have more than 3 displays, you should consider a dedicated supply.

adafruit_support_bill
 
Posts: 69241
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C .56/.54 backpack pulsing issue

by mrtexasfreedom on Tue Mar 13, 2018 2:26 pm

adafruit_support_bill wrote:The backpack it self draw only about 2mA. Current draw for the display will depend on how many segments are lit. Each segment will be about 20mA, so a '1' will draw about 40mA and an '8' will draw about 140mA. The display is multiplexed, so only one digit at a time is lit.

If powered by USB, the 5v pin of the Arduino can supply about 500mA. If you will have more than 3 displays, you should consider a dedicated supply.


Bill,

Thank you for this detailed information. I was encountering an identical behavior to that described by JakeConhale in this thread and wanted to know if the problem might be solved by stronger power than the USB is providing. I am using two 1.2" 7-segment displays with the Adafruit backpacks and also two HC-SR04 distance sensors and the pulsing was quite noticeable in the 7-segment displays. The complete project will entail another two HC-SR04 sensors and (hopefully) a small 2-line LED display.

I'll round up a 5v wall plug and see if I can reduce the pulsing in the displays.
Attachments
IMG_2844.jpg
IMG_2844.jpg (175.67 KiB) Viewed 207 times

mrtexasfreedom
 
Posts: 13
Joined: Wed Mar 05, 2014 7:04 pm

Re: I2C .56/.54 backpack pulsing issue

by adafruit_support_bill on Tue Mar 13, 2018 3:08 pm

The standard HC-SR04 needs about 15mA. But from what I understand, some of the clones draw quite a bit more. It is possible that a stronger supply would help. But I would look at the wiring first. The combined resistance of the jumper wires and breadboard contacts may be causing some voltage drop at the displays.

adafruit_support_bill
 
Posts: 69241
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C .56/.54 backpack pulsing issue

by mrtexasfreedom on Tue Mar 13, 2018 3:21 pm

adafruit_support_bill wrote:The standard HC-SR04 needs about 15mA. But from what I understand, some of the clones draw quite a bit more. It is possible that a stronger supply would help. But I would look at the wiring first. The combined resistance of the jumper wires and breadboard contacts may be causing some voltage drop at the displays.



Hmmm... Thank you for drawing my attention to the wiring. I need to set two of those HC-SR04 devices 100' away and was going to use cat6 ethernet wire to transmit the power and signals out there. Do you think this that length of cable will challenge the power draw and increase the pulsing on the displays? The finished project will feature all-soldered connections on the wiring-- no breadboard.

Thanks again for your assistance with these backpack displays.

mrtexasfreedom
 
Posts: 13
Joined: Wed Mar 05, 2014 7:04 pm

Re: I2C .56/.54 backpack pulsing issue

by adafruit_support_bill on Tue Mar 13, 2018 3:37 pm

Long wires for the sensors should not cause problems for the displays. You will just need to make sure that you have good low-resistance power wiring to the displays to avoid voltage drops that can cause dimming.

For the sensors, 100' of 26 AWG wire will have about 4 ohms of resistance. So, if your sensor is pulling 15mA, the voltage drop at the sensor will be about 60 millivolts. Probably not an issue.

adafruit_support_bill
 
Posts: 69241
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.