8x8x8 cube problem

Forum for posting topics and questions about anything.
BobBurton
Posts: 34
Joined: Sat Jun 06, 2020 3:11 pm

8x8x8 cube problem

Post by BobBurton » Sun Aug 09, 2020 8:49 pm

I have built the 8x8x8 cube but testing before doing the final assembly has revealed a problem

The problem :
With the double row of pins on the left and a single 8x8 LED grid plugged into the front mounting pins and the 8 layer (anode) pins connected then any pattern displayed on the bottom row of LEDs is also shown on the top row of LEDs at a reduced intensity.

This occurs which ever 8x8 LED grid is inserted, so I believe that the problem has nothing to do with the LED grids themselves. To test the system I am using the SetVoxel() and ClearVoxel() functions of the library to turn LED 0, 0, 0 on and off.

As a lower level test I have also tried setting Matrix_Buffer[0][7] to 0b10000000 which turns on the same LED, and the LED at Matrix_Buffer[7][7] (top row, left LED) also turns on at reduced brightness

All of the ICs are correctly seated in their sockets with no pins bent under and I have remade the solder joints on all of the ICs. Being suspicious of the 3 to 8 decoder and Darlington transistor array I wrote a small sketch to cycle A0, A1 and A2 through all of the possible 8 combinations and tested the output from the 3 to 8 decoder and the 8 lines of the Darlington array and all seems OK

The fact that the LEDs on the top row are showing at reduced brightness makes me think that the problem is a bad connection somewhere but I am not sure where else to look beyond what I have done already

Any ideas ?

andrew
Site Admin
Posts: 1376
Joined: Sun Aug 05, 2012 4:15 pm

Re: 8x8x8 cube problem

Post by andrew » Mon Aug 10, 2020 9:24 am

With the double row of pins on the left and a single 8x8 LED grid plugged into the front mounting pins and the 8 layer (anode) pins connected then any pattern displayed on the bottom row of LEDs is also shown on the top row of LEDs at a reduced intensity.
This occurs which ever 8x8 LED grid is inserted, so I believe that the problem has nothing to do with the LED grids themselves.
Being suspicious of the 3 to 8 decoder and Darlington transistor array
The fact that the LEDs on the top row are showing at reduced brightness makes me think that the problem is a bad connection somewhere

I agree with all of your above comments. I doubt very much it's anything to do with the LEDs and most likely a short or floating pin somewhere with the 3 to 8 line decoder being the most likeliest culprit.

Just to sanity check, does it do it when running the built-in demo sketch?

Also does it do it the other way around? I.e. if you turn on an LED on the top level do any LEDs on the bottom level, or for that matter any other level turn on?

While I wait for your answers I'll take a look at the schematics and the PCB layout to see if I can find a single point that could cause the behaviour and get back to you.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

BobBurton
Posts: 34
Joined: Sat Jun 06, 2020 3:11 pm

Re: 8x8x8 cube problem

Post by BobBurton » Mon Aug 10, 2020 9:38 am

Thanks for the quick reply

I will try what you suggest and get back to you later this morning

BobBurton
Posts: 34
Joined: Sat Jun 06, 2020 3:11 pm

Re: 8x8x8 cube problem

Post by BobBurton » Mon Aug 10, 2020 10:51 am

Just to sanity check, does it do it when running the built-in demo sketch?
It is more difficult to see what is going on but the problem is there when running the demo sketch
Also does it do it the other way around? I.e. if you turn on an LED on the top level do any LEDs on the bottom level, or for that matter any other level turn on?
Interesting results
Turning on a top level LED using say

Code: Select all

SetVoxel(0, 0, 7);
causes the corresponding LED on level 6 to glow dimly.

Code: Select all

SetVoxel(0, 0, 6);
causes the corresponding LED on level 5 to glow dimly and so on down until turning on level 0 makes level 7 glow dimly
most likely a short or floating pin somewhere with the 3 to 8 line decoder being the most likeliest culprit.
I agree and I will do another careful examination and solder reflow of that area but as I said in my original post I have driven A0, A1 and A2 through all 8 combinations and got the expected 1 of 8 outputs from the 3 to 8 decoder and Darlington array. I used an Arduino Nano to monitor the outputs so the current taken was very small which may be a factor, not that the LEDs take much current, of course

andrew
Site Admin
Posts: 1376
Joined: Sun Aug 05, 2012 4:15 pm

Re: 8x8x8 cube problem

Post by andrew » Mon Aug 10, 2020 1:44 pm

It is more difficult to see what is going on but the problem is there when running the demo sketch
Interesting results
Turning on a top level LED using say
causes the corresponding LED on level 6 to glow dimly.
I've attached an updated version of the library HC8x8x8Cube.cpp file to this post. Could you replace your current one (found in Documents\Arduino\libraries\HC8x8x8Cube) with this new one to see if makes a difference.

HC8x8x8Cube.cpp
You do not have the required permissions to view the files attached to this post.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

BobBurton
Posts: 34
Joined: Sat Jun 06, 2020 3:11 pm

Re: 8x8x8 cube problem

Post by BobBurton » Mon Aug 10, 2020 2:31 pm

OK. Library file replaced and code recompiled and it has made a difference

Running this sketch

Code: Select all

#include <HC8x8x8Cube.h>

void setup()
{
  Serial.begin(115200);
  CubeInit();
  CubeClearBuffer();
}

void loop()
{
  unsigned long currentTime = millis();
  static unsigned long periodStart = currentTime;
  unsigned long period = 2000;
  static int level = 0;
  if (!GetVoxel(0, 0, level))
  {
    SetVoxel(0, 0, level);
  }
  if (currentTime - periodStart >= period)
  {
    ClearVoxel(0, 0, level);
    level++;
    if (level > 7)
    {
      level = 0;
    }
    periodStart = currentTime;
  }
}
turns on/off 1 LED in each layer in turn. The LED on layer 7 no longer dimly mirrors that on layer 0 but the LED on layer 0 is on dimly at all times apart from when it is on fully when it should be when level equals 0

I have examined the area of the PCB around the 3 to 8 decoder and Darlington array and can see nothing obviously wrong. The ICs are firmly seated in their sockets with no bent pins and I have reflowed the solder on all of the pads of the ICs to no avail.

My feeling is that either the 3 to 8 decoder or Darlington array are misbehaving, possibly damaged. I am using croc clip leads to connect the anode (layer) pins during testing and it would have been trivially easy to short the layer 7 pin at the back/left of the board to one of the LED foot pins in that area at some time. Normally I would connect/disconnect layers with the power turned off but I know that has not always been the case so the Darlington driver output may have been shorted to the foot LED pins at some time.

andrew
Site Admin
Posts: 1376
Joined: Sun Aug 05, 2012 4:15 pm

Re: 8x8x8 cube problem

Post by andrew » Tue Aug 11, 2020 8:19 am

turns on/off 1 LED in each layer in turn. The LED on layer 7 no longer dimly mirrors that on layer 0 but the LED on layer 0 is on dimly at all times apart from when it is on fully when it should be when level equals 0

This is exactly what I expected to happen after trying the modified file. I'm starting to think that what you're seeing maybe a normal quirk of the cube. Because of the way the cube works there always has to be one layer powered up at any one time. The cube steps though each layer in sequence very quickly to make it look like all 8 layers are on at the same time and the LED drives just control whichever layer is currently selected. This means that when data for the next row is pushed into the LED drivers there's a split moment where it is visible on the current layer before it quickly moves on to the next layer. However on a normal working qube this ghosting effect should be very minor. This is a bit subjective but In a normal lit room it should be practically invisible and only noticeable in a darker room.

Could this be what you are reporting, or is what your seeing more noticeable than what I've just described?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

BobBurton
Posts: 34
Joined: Sat Jun 06, 2020 3:11 pm

Re: 8x8x8 cube problem

Post by BobBurton » Tue Aug 11, 2020 11:25 am

Thanks for the reply

It is very difficult to say whether the cube is behaving as expected. I can certainly see the ghost LEDs lighting in normal room lighting.
Because of the way the cube works there always has to be one layer powered up at any one time
Sorry, but I don't understand this. If this is how it is meant to work then I am disappointed.
Surely it would make sense to disable all of the layer pins whilst the data is shifted through the shift registers

I have reverted to the original library

andrew
Site Admin
Posts: 1376
Joined: Sun Aug 05, 2012 4:15 pm

Re: 8x8x8 cube problem

Post by andrew » Tue Aug 11, 2020 2:59 pm

Sorry, but I don't understand this. If this is how it is meant to work then I am disappointed.
Surely it would make sense to disable all of the layer pins whilst the data is shifted through the shift registers
Although it seems logical to do that in practice it doesn't work well as then the LEDs spend to much time in the off state and look too dim. As I said, in a well lit room you should be noticeable. In fact you'd have to shade the LED with your hand to see it. The YouTube video may help. You can see the normal ghosting effect in some of the animations but keep in mind that this was filmed in a dark room:




If what you're seeing is worse then it could still be that something is wrong with your cube. Although at the moment I'm not sure what it would be.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

BobBurton
Posts: 34
Joined: Sat Jun 06, 2020 3:11 pm

Re: 8x8x8 cube problem

Post by BobBurton » Tue Aug 11, 2020 3:52 pm

After you explained that the ghosting was to be expected I looked closely at the video of the demo and can see it happening, particularly when stepped frame by frame. Having checked, checked and checked again and run some diagnostic sketches as previously described I doubt that there is anything actually wrong with the hardware but I am going to swap the 3 to 8 decoder and Darlington driver for different ones to see whether it has any effect.

I would like to try disabling the layers during a refresh, but I will leave that for the future when I am feeling brave (or foolhardy) enough to hack the hardware and the library to implement it. Actually, it does not look too difficult to do.

For the moment I will put all 8 LED sections in the cube and connect the levels to the driver pins and see what I think

Post Reply

Return to “General Discussion”