Arduino Forum

Using Arduino => General Electronics => Topic started by: Moris526 on Oct 06, 2020, 12:48 am

Title: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 06, 2020, 12:48 am

Hi.

I made a 32 Adafruit Neotrellis units large board. Conected i2c with Arduino Mega.

At large speed of data tranfer it freezes or misses steps. It doesnt happen if I use half the boards, for example.

My question is : Would it help if I make multiple conections of the SCL and SDA cables at differente point

around the board?

(https://forum.arduino.cc/index.php?action=dlattach;topic=707867.0;attach=384295)
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: PerryBebbington on Oct 06, 2020, 05:21 am
I like the board but I don't understand the question.
Please provide a drawing to illustrate what you mean.
Or, better still, why are you ever asking? What is stopping you from just trying it?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Wawa on Oct 06, 2020, 06:19 am
Each module has level shifters with 10k pull up resistors, plus the one from the Mega,
that's a combined pull up of ~300 ohm...

My question is : Would it help if I make multiple conections of the SCL and SDA cables at differente point
More wiring is more wire capacitance, so I think a bad idea.

What speed is the TWI at. default 100kHz or high-speed 400kHz.
Does the code allow you to lower the I2C speed.
Leo..
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 06, 2020, 07:51 am
I2C Pullup Resistor Calculation (https://www.ti.com/lit/an/slva689/slva689.pdf)

Quote
A strong pullup (small resistor) prevents the I2C pin on an IC from being able to drive low
What happens to the pullup value when you put 32 of them in parallel ?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Watcher on Oct 06, 2020, 07:55 am
I2C Pullup Resistor Calculation (https://www.ti.com/lit/an/slva689/slva689.pdf)

Very useful. Thank you!
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Wawa on Oct 06, 2020, 08:25 am
The Mega should be able to pull 300 ohm low enough.

Try adding this at the end of setup()

Wire.setClock(50000); // half speed

Leo..
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 06, 2020, 08:44 am
Quote
The Mega should be able to pull 300 ohm low enough.
Not sure how that relates.

The standard I2C pullup (I2C is open collector) is 4.7k ohms.

RT=1/[(1/4700ohms) *32)]
    RT  = 146.875 ohms  

(1/4700= 2.127659e-4)
,(2.127659e-4*32=0.0068085)
1/0.0068085= 146.875 ohms

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Wawa on Oct 06, 2020, 09:05 am
The 32 boards OP is using have 10k pull up resistors, plus a 10k set on the Mega.
That's 10000/33 = 303 ohm = 16.5mA.

Default I2C is 100kHz/400pF/3mA.
A 5volt Arduino can do the newer FM+ (FastMode) I2C standard, which is 400kHz/4000pF/30mA.

Rise times might be compromised by bus capacitance, so OP should try lowering the default I2C speed first.
Leo..
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Paul__B on Oct 06, 2020, 05:03 pm
Remove three quarters of the pullups!
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 06, 2020, 05:10 pm
Quote
Remove three quarters of the pullups!
I2C is open collector. I don't think you want to short the collector directly to the SCL & SDA lines do you ?

That doesn't souind like a good idea .

Quote
Open collector outputs require a pull-up resistor (R in the image above) for the output to be able to properly "output high". The pull-up resistor is connected between the output pin and the output voltage (Vcc in the image above) that is desired for a high state.Nov 9, 2017
LINK (https://www.google.com/search?client=firefox-b-1-d&q=do+open+collector+outputs+require+pullup+resistors+%3F)
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 06, 2020, 06:19 pm
Thanks for the answers.

I tried adding Wire.setClock(50000);  to Setup with no luck.

Give you more info.  I send data from Max/MSP. Im sure this part of the proyect is not the problem because

I try already sending data directly from the arduino code with the same result.


The problem its either with the Arduino code ( I think the code is pretty clean) or the comunication whit the

boards.

It at high speed when I press a button the data seems to be messed up, changing colours and missing steps.

I leave the Arduino code and attach a video with the behaviour.


Code: [Select]
#include "Adafruit_NeoTrellis.h"


#define Y_DIM 16
#define X_DIM 32
#define INT_PIN 10



Adafruit_NeoTrellis t_array[Y_DIM/4][X_DIM/4] = {

  

 { Adafruit_NeoTrellis(0x35), Adafruit_NeoTrellis(0x3A), Adafruit_NeoTrellis(0x4A), Adafruit_NeoTrellis(0x33),Adafruit_NeoTrellis(0x4B), Adafruit_NeoTrellis(0x45), Adafruit_NeoTrellis(0x4C), Adafruit_NeoTrellis(0x42) },
 
{ Adafruit_NeoTrellis(0x4D), Adafruit_NeoTrellis(0x3E) , Adafruit_NeoTrellis(0x40), Adafruit_NeoTrellis(0x38),Adafruit_NeoTrellis(0x31), Adafruit_NeoTrellis(0x3D), Adafruit_NeoTrellis(0x3B), Adafruit_NeoTrellis(0x49) },

{ Adafruit_NeoTrellis(0x2F), Adafruit_NeoTrellis(0x2E), Adafruit_NeoTrellis(0x3C), Adafruit_NeoTrellis(0x47),Adafruit_NeoTrellis(0x32), Adafruit_NeoTrellis(0x36), Adafruit_NeoTrellis(0x48), Adafruit_NeoTrellis(0x3F)  },

  { Adafruit_NeoTrellis(0x34), Adafruit_NeoTrellis(0x44), Adafruit_NeoTrellis(0x39), Adafruit_NeoTrellis(0x41), Adafruit_NeoTrellis(0x30), Adafruit_NeoTrellis(0x37), Adafruit_NeoTrellis(0x43), Adafruit_NeoTrellis(0x46) }
,
};


Adafruit_MultiTrellis trellis((Adafruit_NeoTrellis *)t_array, Y_DIM/4, X_DIM/4);


TrellisCallback blink(keyEvent evt){
  
  if(evt.bit.EDGE == SEESAW_KEYPAD_EDGE_RISING)
  
     Serial.println (evt.bit.NUM);

      
  else if(evt.bit.EDGE == SEESAW_KEYPAD_EDGE_FALLING)
    
   Serial.println(evt.bit.NUM + 1000);

    
 
  return 0;
}

inline uint32_t rgbColor(uint32_t r, uint32_t g, uint32_t b)
{
  return ((r << 16) | (g << 8) | b);
}
  
  
const byte numChars = 32;
char receivedChars[numChars];
char tempChars[numChars];      
      

int a = 0;
int b = 0;
int c = 0;
int d = 0;

boolean newData = false;
  
  
////////////////////////////////////////////////////////
  
  
   void setup() {
  Serial.begin(9600);
  

  Wire.setClock(50000);

  pinMode(INT_PIN,INPUT);
  
  
  !trellis.begin();
  
  
  for(int y=0; y<Y_DIM; y++){
    for(int x=0; x<X_DIM; x++){
      
      trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_RISING, true);
      trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_FALLING, true);
      trellis.registerCallback(x, y, blink);
  
    }
  }
    
/////////////////////////////////////////////////////////////////////////////////

}

void loop() {
 

  if(!digitalRead(INT_PIN)){
    trellis.read();
  }
  
 

  recvWithStartEndMarkers();
    if (newData == true) {
        strcpy(tempChars, receivedChars);
            
        parseData();
        
        newData = false;
    }

  

}

    
/////////////////////////////////////////////////////////////////////

void recvWithStartEndMarkers() {
    static boolean recvInProgress = false;
    static byte ndx = 0;
    char startMarker = '<';
    char endMarker = '>';
    char rc;

    while (Serial.available() > 0 && newData == false) {
        rc = Serial.read();

        if (recvInProgress == true) {
            if (rc != endMarker) {
                receivedChars[ndx] = rc;
                ndx++;
                if (ndx >= numChars) {
                    ndx = numChars - 1;
                }
            }
            else {
                receivedChars[ndx] = '\0';
                recvInProgress = false;
                ndx = 0;
                newData = true;
            }
        }

        else if (rc == startMarker) {
            recvInProgress = true;
        }
    }
}

///////////////////////////////////////////////////////////////////

void parseData() {

    
    
    
    char * strtokIndx;

    strtokIndx = strtok(tempChars," ");    
    
  
    
  
    a = atoi(strtokIndx);    

    strtokIndx = strtok(NULL, " ");
    b = atoi(strtokIndx);    


    strtokIndx = strtok(NULL, " ");
    c = atoi(strtokIndx);    

    strtokIndx = strtok(NULL, " ");
    d = atoi(strtokIndx);    

      
  
  
   trellis.setPixelColor(a,  rgbColor(b,c,d));
    

  trellis.show();  
  
    
      
    
    
    

  
}




     
     
     
     
     
     
     

 

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 06, 2020, 07:47 pm
Did you debounce the button ?
If not you're probably seeing button bounce
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 06, 2020, 08:59 pm
Did you debounce the button ?
If not you're probably seeing button bounce
But with a smaller board the behaviour is normal.

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 06, 2020, 09:25 pm
Do you know what debouncing is and how it relates to buttons ?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Wawa on Oct 06, 2020, 09:29 pm
How long/messy is the wiring between I2C master and LED board.
Leo..
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 07, 2020, 05:58 pm

Thank you for you time.


Do you know what debouncing is and how it relates to buttons ?

I have a vague idea of what debouncing is. I had that problem with econders. Im not discarding your sugestion.

Is it posibble to have that effect with the only difference of loading more individual boards on the arduino code,

But still having no change in the fisical board? If you think so, I will dive into it.

How long/messy is the wiring between I2C master and LED board.
Leo..
From Arduino Mega 2560 to the boards just SDA, SCL, Ground and Interrupt wires. The arduino is conected via

usb.  The Board is connected by a 5v 10amp power supply, at 6 different points around the edges.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 07, 2020, 06:10 pm
Do you know what debouncing is and how it relates to buttons ?

How long/messy is the wiring between I2C master and LED board.
Leo..
Another data is I dont have any capacitor... (dont know if its relevant)
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 07, 2020, 07:10 pm
I don't see any schematic so I don't know what a 'button' has to do with this post.
Post a schematic that shows the button and then we can discuss debouncing.
The fact that you are not clear about debouncing and why it is necessary is a red flag
that may indicate it is relevant to your issue. Without seeing the schematic of the
button circuit I can neither confirm or deny that it is.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 07, 2020, 08:22 pm
I don't see any schematic so I don't know what a 'button' has to do with this post.
Post a schematic that shows the button and then we can discuss debouncing.
The fact that you are not clear about debouncing and why it is necessary is a red flag
that may indicate it is relevant to your issue. Without seeing the schematic of the
button circuit I can neither confirm or deny that it is.
Sorry. Not following you. I have 16 buttons on each individual board...

I attached a zip with a video showing the behaviour.

https://www.adafruit.com/product/3954

The boards are connected with SDA, SCL, Ground and Interrupt wires to Arduino Mega 2560

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 08, 2020, 03:06 pm
The only way to isolate th problem is disconnect
the I2C boards from the bus ( ten at a time)
until the issue disappears and then you'll have some data to use to determine if it is a timing issue or a pullup resistor issue. If it turns out to be a pullup resistor issue then you'll have to replace all the pullups with a higher value (15k to 20k).
If it is a timing issue then you have to use a
slower bus speed. (I don't know how to change that)
We are assuming you did your due diligence measuring power supply voltage and current.
Title: Multiple SCL-SDA connections
Post by: Paul__B on Oct 08, 2020, 04:04 pm
If it turns out to be a pullup resistor issue then you'll have to replace all the pullups with a higher value (15k to 20k).
Or as I pointed out, simply remove three out of every four pullups.  :smiley-roll:

Much easier and more practical approach.  You only - arguably - need pullups at each end of the bus run.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 08, 2020, 05:04 pm
Quote
Or as I pointed out, simply remove three out of every four pullups.
On second thought, that does make more sense. but before doing that the OP needs to know how many boards he has to take offline to eliminate the issue. This is a QUANTITATIVE ANALYSIS that yields vital information on
how to implement the solution. (3 out of 4 may be right but truthfully , how could you possibly know this is
the right ratio ? There's nothing wrong with pulling an answer out of your arse if it is correct. I do it all the time.
Almost everyone does. It's called a SWAG (Scientific Wild Ass Guess)
I just think it makes more sense to just take 10 or 20 boards offline until it works properly and then start adding
them back until it doesn't until you arrive at the correct number for how many boards work with no modifications. It it turns out to be 3 out of 4 then all the better but the correct procedures is:
1. test
2. collect data
3. propose solution
4. test solution
5. modify solution as needed
6 implement solution

as opposed to :
1. Propose solution
2. Implement solution

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 08, 2020, 10:48 pm

I run the test.

More than 6 borads makes the issue appear.

But I did not disconnected the boards from the circuit. I just modified the Arduino code to ignore them......make senses?

One more thing.

When you says ¨remove the pullups¨ you mean desoldering them from the board?  I think bit more than i could chew
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Paul__B on Oct 08, 2020, 11:43 pm
But I did not disconnected the boards from the circuit. I just modified the Arduino code to ignore them......make senses?
It implies your code is the fault.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 09, 2020, 12:57 am
You need to remove 80% of your pullup resistors
(or maybe try ten first) and rerun your software
test. If the workable number goes up from six
remove another ten and rerun the test. Continue
that until they all work. If removing ten doesn't help then you need to configure them for a slower
transmission speed.
AFAIK
Title: Re: Multiple SCL-SDA connections
Post by: Paul__B on Oct 09, 2020, 01:39 pm
But note he said
But I did not disconnected the boards from the circuit. I just modified the Arduino code to ignore them......make senses?
That is telling you it is not a pull-up matter as he has not altered the pullups in any manner!  :smiley-eek:

Just code!

How do you propose that the number of instances of the "Wire" code opened in the sketch could affect pull-up behaviour?  :smiley-roll:
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 09, 2020, 02:00 pm
The boards not run in the code will be essentially
"High-Z", so the pullups will be connected at the
Vcc end but the other end will be connected to
collectors of 'dead' transistors not being commanded to turn on and thus NOT completing
a path to GND. Despite that, there is  no question
that those same collectors are connected to SDA and SCL so those pullups are STILL in parallel
with the ones connected to 'live' transistors
executing code, so while they don't pull DOWN
if they're dead, they remain just as in parallel
BETWEEN SDA and Vcc and SCL and Vcc.
Right ?

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Paul__B on Oct 09, 2020, 02:09 pm
Any and every I2C board that is not at the moment partaking in a transaction will be "High-Z", and to the best of my knowledge there is no provision in I2C for either simultaneous communication with more than one master and slave, nor is there any "open" or "closed" connection state.

There is a Start condition followed by data transfer and a Stop condition, following which neither master nor slave is in any different condition in terms of the protocol to before the transfer.   :smiley-roll:
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 09, 2020, 03:04 pm
slavery was abolished
"https://electronics.stackexchange.com/questions/115577/how-does-multimaster-i2c-work-and-its-significance"
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 09, 2020, 10:31 pm
Thanks again for your time.

Yes, looks like a code issue.

More data here. 4 Cases

1- Original case.  I sent and received data via serial (button presses and led position and colour) and then parse the data in the loop section (with interrupt pin). Wierd that code is not efficient since it was on Serial Basics posted by Robin..
Behaviour : I reach the speed I need but when press a button it skips steps and lights wrong colours.

2- Original case without Interrupt pin
 Behaviour :  Worse than original

3- Then I try triggering the sequence from the Arduino code without interrup

Behaviour:  Here I have the behaviour I want,  no stoping of the sequence when a button is pressed, nor changing colour, but I can´t make the sequence go as fast as i want. No matter how low I go with the Dealy at the bottom of the code there is a limit to the loop speed....

4- Same as 3 but with interrupt 

Behaviour:  It doesnt messes with the data and reaches any speed, but stops for a few millisecods when I press a button and then contiues. And sometimes after pressing a button slowsdown to the speed limit of case 3.

SCL and SDA Is one way comunication at a time?



   




Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 10, 2020, 01:14 am
Sounds lije you need a faster MCU
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 10, 2020, 02:32 am
Sounds lije you need a faster MCU
That would be a straight foward problem to solve.
Last question.
Communication via i2c is only one way at a time right?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 10, 2020, 03:12 am
It's bidirectional but not duplex (not simultaneously bidirectional)

I know it's too late but when you decided to run
32 of those boards you should have asked yourself "Hey, is this even possible ? And if so, what kind of issues will this cause ? Is an Arduino even fast enough ?
I would have emailed the manufacturer with your
proposal to do a feasibility study which is the
first step of any engineering project.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 10, 2020, 03:46 am
It's bidirectional but not duplex (not simultaneously bidirectional)

I know it's too late but when you decided to run
32 of those boards you should have asked yourself "Hey, is this even possible ? And if so, what kind of issues will this cause ? Is an Arduino even fast enough ?
I would have emailed the manufacturer with your
proposal to do a feasibility study which is the
first step of any engineering project.
I know.
I pay the price for my axiety. The boards have 32 posible adresses, so I asumed It was ok to jump in.
This is my first engineering project and Im learning by the minute.


Thanks for the help!!! I`ll let you know if i succede !!
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 10, 2020, 03:50 am
Quote
The boards have 32 posible adresses
Don't tell me you have them all running with the same address !
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 10, 2020, 04:02 am
Don't tell me you have them all running with the same address !
:D  Haha . No, no. I learnt a few things along the way.
MCU Speed seems to be a fitting candidate for an answer to all the evidence.  I will try with Arduino Due. Plus, i can make use of the 2 i2c ports. I have the large 32 units main board, and a 1 unit control board, so I was using an Arduino Mega and an Arduino uno. Not the neatest proyect you will see....but im wiser now.
Now Im diving in using both ports work at the same time
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 10, 2020, 04:08 am
Quote
The Raspberry Pi Zero and Zero W use the same Broadcom (http://"http://\"https://www.bing.com/search?q=Broadcom&filters=sid%3a3ef7165d-e70e-ce2e-1f13-6ca2da33f974&form=ENTLNK"") BCM2835 SoC as the first generation Raspberry Pi, although now running at 1 GHz (http://"http://\"https://www.bing.com/search?q=Hertz&filters=sid%3a47226801-c0ab-3791-8639-80a182fef0e6&form=ENTLNK"") CPU clock speed.
Quote
MCU Speed seems to be a fitting candidate for an answer to all the evidence.
I still think your resistor pullups are borderline. 
Quote
Each module has level shifters with 10k pull up resistors, plus the one from the Mega,
that's a combined pull up of ~300 ohm...

Quote from: Moris526 on Oct 05, 2020, 10:48 pm (http://"https://forum.arduino.cc/index.php?msg=4756732")

Quote
My question is : Would it help if I make multiple conections of the SCL and SDA cables at differente point
More wiring is more wire capacitance, so I think a bad idea.

What speed is the TWI at. default 100kHz or high-speed 400kHz.
Does the code allow you to lower the I2C speed.?
You need the 400kHz speed. Read up on how to do that.
Then get a screaming fast MCU.
You know, something like they use in the Sidewinder air to air missile.


Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 10, 2020, 04:42 am

Wait!

Dont you think Arduino due is fast enough?? Is 5 times faster than Mega....

I already bought one !!! haha Told you about my axiety right?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 10, 2020, 04:51 am
Really ?
The Rasoberry Pi is 62.5 times faster.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 10, 2020, 05:04 am


Crap...

Its much smaller too.

But I already kind of get the Arduino IDE and code... And its a little bit more expensive......

damn doubt



Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 10, 2020, 12:07 pm
Get an Arduino Zero (48Mhz )
"https://forum.arduino.cc/index.php?topic=347425.0"
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 11, 2020, 01:25 am

The link is corrupt.

What is in that link doesnt work with Arduino Due? I canceled the purchase, not decided yet.

Thank you for the atention. Really appreciate it. 

What is your name? 

Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 11, 2020, 05:43 am
Sorry, I'm not sure what you meant.
You have a Mega but haven't teied 400kHz I2C yet?
You ordered a Duo ?
Have you isolated the problem ? (yes/no) (to either I2C, MCU Clock Speed, or Pullup Resistor issue ?
If you haven't configured the Mega for 400 kHz I2C communication then you really don't know what the issue is.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 11, 2020, 06:49 pm
Sorry, I'm not sure what you meant.
You have a Mega but haven't teied 400kHz I2C yet?
You ordered a Duo ?
Have you isolated the problem ? (yes/no) (to either I2C, MCU Clock Speed, or Pullup Resistor issue ?
If you haven't configured the Mega for 400 kHz I2C communication then you really don't know what the issue is.

I try 400khz i2c with the mega with no luck.
Im pretty sure is MCU speed...
Question:  When I press a button on the grid, the data going to Arduino is just of that button state?  or of the state at that moment of all the buttons?

If Arduino recives all the states, that would explain why the bigger the board, the bigger the issue.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 11, 2020, 07:34 pm
Large Button document (http://"https://cdn-learn.adafruit.com/downloads/pdf/adafruit-neotrellis.pdf?timestamp=1602433250")

Neo-Trellis Overview (https://learn.adafruit.com/adafruit-neotrellis)

According to Adafruit, everything should work perfectly with your current setup.
Did you try the Adafruit Support Forum ?

Did you follow the Adafruit PDF document ?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 11, 2020, 09:25 pm
Large Button document (http://"http://\"https://cdn-learn.adafruit.com/downloads/pdf/adafruit-neotrellis.pdf?timestamp=1602433250"")

Neo-Trellis Overview (https://learn.adafruit.com/adafruit-neotrellis)

According to Adafruit, everything should work perfectly with your current setup.
Did you try the Adafruit Support Forum ?

Did you follow the Adafruit PDF document ?
Of course I try with the forum but I got no answer.
It is the MCU speed.
Thanks again.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 11, 2020, 10:55 pm
Quote
Of course I try with the forum 
You didn't answer the question about following the Adafruit PDF document.
Did you use that code ?
Did you read the entire document ?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 11, 2020, 11:54 pm
You didn't answer the question about following the Adafruit PDF document.
Did you use that code ?
Did you read the entire document ?

Large Button document (http://"http://\"https//cdn-learn.adafruit.com/downloads/pdf/adafruit-neotrellis.pdf?timestamp=1602433250"")  link is broken

I read all the Adafruit info and use their code and Robin`s code from Serial imput basic.  I think the code its pretty clean.
About going up to 400khz i2c I have a doubt..
I did   

Code: [Select]
#include <Wire.h>[/color]

void setup(){

Wire.begin();         
Wire.setClock(400000);
}



But I dont think it makes any difference since the board works with



Code: [Select]
"Adafruit_NeoTrellis.h"

void setup() {

 !trellis.begin();
}



Im doubting about MCU speed.
I just try it a low speeds and the same thing happens at button press (not that frequent) it freezes, Arduino keeps receiving from serial but doesnt send for a few seconds, and the board freezes.


I think the key piece of evidence is this.

If I load just 4 boards to the arduino code (4 of any of the 32). It works perfect. I can go to speeds much higher than needed with perfect response to button press.
All being equal, the more boards i add the more frequent the issue...


:smiley-confuse:


Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 12, 2020, 12:30 am
Have tried disconnecting ten boards ?
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 12, 2020, 12:46 am
Have tried disconnecting ten boards ?
I was leaving that for last option.
Every board has at least 5 joints, and I am not a soldering expert. 
That would tell me if is a pullup issue? and would have to phisically remove them?  I have to check how hard is that.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 12, 2020, 01:13 am
yes and as many as necessary
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: raschemmel on Oct 12, 2020, 01:14 am
resistors, not boards

According to Adafruit it should work with 32
boards without removing resistors but I
don't know what else to try.
You could try a faster MCU before removing resistors.
Title: Re: Large button/led board. Multiple SCL-SDA connections
Post by: Moris526 on Oct 12, 2020, 02:36 am

Thank you man/woman.
Appreciate it.