Max7219 and 7 segment display, soldered version is failing!

so, i have the almost perfect version working fine on the breadboard. all the buttons work and the 7 segments are running a count from 0 to 8.

after I’ve spent hours soldering and testing connections, the soldered version is almost done… except, its just not quite right.

the buttons, leds, are all working… but i can’t recreate the failure on the breadboard and everything seems to be wired correctly.

am i missing something obvious?

video

#include "LedControl.h"

//data, clock, load, 1 max7219
LedControl lc=LedControl(4,6,5,1);

#define BUTTON1 3 
#define BUTTON2 8 

#define REDLED 9 
#define GREENLED 11
#define BLUELED 12

#define LED1SINK 2
#define LED2SINK 10

#define FACTION 7 

int i = 0;

int faction = 'RES';

byte brightness = 8;

void setup(){
  Serial.begin(9600);
  lc.shutdown(0,false);  // The MAX72XX is in power-saving mode on startup, we have to do a wakeup call
  lc.setIntensity(0,brightness);  // Set the brightness to a medium values
  lc.clearDisplay(0);  // and clear the display

  pinMode(BUTTON1, INPUT);
  pinMode(BUTTON2, INPUT);
  digitalWrite(BUTTON1, HIGH);       // turn on pullup resistors
  digitalWrite(BUTTON2, HIGH);       // turn on pullup resistors

  pinMode(FACTION, INPUT);
  digitalWrite(FACTION, HIGH);       // turn on pullup resistors
  
  pinMode(REDLED, OUTPUT);
  pinMode(GREENLED, OUTPUT);
  pinMode(BLUELED, OUTPUT);

  pinMode(LED1SINK, OUTPUT);
  pinMode(LED2SINK, OUTPUT);
  digitalWrite(LED1SINK, LOW);  
  digitalWrite(LED2SINK, LOW);  
}

void loop(){
      //show i on the digits
      lc.setDigit(0,0,i, false);
      lc.setDigit(0,1,i,false);
      lc.setDigit(0,2,i,false);

      // small delay for testing
      delay(100);

      // 
      Serial.print(" button1: "); Serial.print(digitalRead(BUTTON1));
      Serial.print(" button2: "); Serial.print(digitalRead(BUTTON2));
      Serial.print(" FACTION: "); Serial.print(digitalRead(FACTION));
      Serial.print(" faction: "); Serial.print(faction);

      // turn the leds on
      digitalWrite(LED1SINK, LOW);
      digitalWrite(LED2SINK, LOW);
      
  // choose the colour
  if (digitalRead(FACTION) == 0) faction = 'RES';
  if (digitalRead(FACTION) == 1) faction = 'ENL';
  
      if (faction == 'RES') {
        digitalWrite (BLUELED, HIGH);
        digitalWrite (GREENLED, LOW);
        digitalWrite (REDLED, LOW);
      }
      if (faction == 'ENL') {
        digitalWrite (GREENLED, HIGH);
        digitalWrite (BLUELED, LOW);
        digitalWrite (REDLED, LOW);
      }

  //increase i and return to 0 if too high
  if (i<9) i++;
  if (i>8) i=0;
    Serial.print(i);  
      Serial.println();

}

Works on breadboard, doesn’t work on soldered prototype board.
Blame the construction/artist. :wink:

Show us a good schematic & image(s) of your circuit.
Posting images:

larryd:
Works on breadboard, doesn’t work on soldered prototype board.
Blame the construction/artist. :wink:

Show us a good schematic & image(s) of your circuit.
Posting images:
http://forum.arduino.cc/index.php?topic=519037.0

100% agree...!

as the design has "evolved" over time, ill put together a schematic. :slight_smile:

kelvinmead:
am i missing something obvious?

Yes, you missed posting your schematic!

Your description of the problem is a little ambiguous. Why did you start soldering if you had a failure on the breadboard? Or have I misread that?

Can I check: did you add the two caps to the soldered board, the 0.1uF and the 10uF? They should be as close as you can get them to the power pins on the max chip.

If your power supply is good, the 10uF may make no apparent difference, but you should still have it.

The 0.1uF is also critically important. But stray capacitance on breadboards can sometimes make it appear unneccessary, until you come to solder up the circuit, and then...

PaulRB:
Yes, you missed posting your schematic!

Your description of the problem is a little ambiguous. Why did you start soldering if you had a failure on the breadboard? Or have I misread that?

Can I check: did you add the two caps to the soldered board, the 0.1uF and the 10uF? They should be as close as you can get them to the power pins on the max chip.

If your power supply is good, the 10uF may make no apparent difference, but you should still have it.

The 0.1uF is also critically important. But stray capacitance on breadboards can sometimes make it appear unneccessary, until you come to solder up the circuit, and then...

hey, the breadboard works fine, and i had enough bits to create without destroying the breadboard version.

the caps are on the breadboard, and "were" on the soldered, although i have removed them to see if they were the issue (they weren't) I've also dremelled off the old max chip and resoldered a new one on, to see if that fixed it (it didn't...)

If the caps were faulty, removing them probably would not help. You need to replace them with good ones to see any improvement.

A good tip for beginners to soldering is to always use chip sockets. This reduces the risk of damaging the chip with heat during soldering, enables easilly replacing the chip if it is faulty, and removing the chip to test voltages and continuity checking the circuit.

I don't see any series resistors for your RGB LEDs.

You should post some well-lit, well-focussed close-up pictures of both sides of the board.

That schematic is missing a common ground between the nano and the rest of the components.