Go Down

Topic: MSF reception interference while LED multiplexing (Read 594 times) previous topic - next topic

polhemic

So I've got an interesting problem that I'm looking for guidance on, because it involves RF and we all know that's a black art.

I'm building a simple LED clock, with an 8x8 matrix of blue LEDs and an MSF receiver module ( MSF is the UK version of the US WWVB and Germany's DCF ). The matrix is row select via a 74238 driving p-chan FET switches on the high side; and column data with a TLC5916 as the controlled current sink. The whole system is powered off a 6V unregulated supply into a 7805 regulator. The LEDs are driven off of the unregulated supply. The MSF module has an enable line (PON) and a data line (MSFDATA) hooked up to the arduino. Likewise, the TLC5916 has SDI, CLK, LE and _OE outputs from the arduino.

With the exception of the high side switching (so I'm just showing one row, but multiplexing for 8 ), I've got this hooked up on breadboard as an initial test of the TLC5916 code and LED brightness. The MSF receiver board has a SMD LED showing the bit train as it comes in. Unfortunately, when I started driving the LEDs at their 100mA pulse, I noticed that the received signal goes to garbage and starts blinking all over the place.

With some experimenting, I've discovered that when driving the LED matrix with 30mA pulses the interference is greatly reduced. I also discovered that moving the ferrite antenna away from the TLC5916 made no difference, but changing the orientation so that it is perpendicular to the 5916 does make it better (not perfect). Changing the LEDs to be driven off the regulated supply also makes no difference.

When it comes to the final form factor, I'm not going to have the flexibility to move the boards around that much and, if anything, it may be worse as there will be wires (about 120 to be exact) going to each LED in a fairly constrained space, so this is not going to get easier.

So, the question is - what can I do to make this better?

Pol.

(I've included the code below, although I don't think it will shed much light on the problem).

Code: [Select]

// MSF Enable reception flag
const int PON=1;
// MSF data in
const int MSFDATA=2;

// TLC5817
const int SDI=3;
const int CLK=4;
const int LE=5;
const int _OE=6;

void setup()
{
  pinMode( PON, OUTPUT);
  pinMode( MSFDATA, INPUT);
  pinMode( SDI, OUTPUT);
  pinMode( CLK, OUTPUT);
  pinMode( LE, OUTPUT);
  pinMode( _OE, OUTPUT);

  digitalWrite( PON, LOW );
  digitalWrite( SDI, LOW );
  digitalWrite( CLK, LOW );
  digitalWrite( LE, LOW );
  digitalWrite( _OE, HIGH );
}

void writeWord( unsigned int data )
{
  unsigned int tempData = data;
  for (int idx=0; idx < 8; ++idx )
  {
    // Set the data flag to the LSB of the remaining data word
    if ( tempData & 0x01 )
    {
      digitalWrite( SDI, HIGH );
    }
    else
    {
      digitalWrite( SDI, LOW );
    }

    // Clock this into the shift register
    digitalWrite( CLK, HIGH );
    digitalWrite( CLK, LOW );

    // Shift the remaining data right one bit
    tempData = tempData >> 1;
  }

  // Send the newly shifted data to the latches
  digitalWrite( LE, HIGH );
  digitalWrite( LE, LOW );

}

int counter=0;
int wordout=0;

void loop()
{
  writeWord(wordout);


  if ( counter == 0 )
  {
    ++wordout;
    digitalWrite( _OE, LOW );
  }
  else
  {
    digitalWrite( _OE, HIGH );
  }
  ++counter;
  counter = counter %8;
  delayMicroseconds(1250);
}


Go Up