0

RGB Matrix Hat for PI and buttons
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RGB Matrix Hat for PI and buttons

by bujones on Wed Dec 30, 2015 2:54 pm

inttest.txt
(1.54 KiB) Downloaded 189 times
I am working on a project to build a speaker timer for a real estate club. I purchased a 32x64 matrix, Pi 2, and RGB Matrix hat. Put it all together and everything works great. I modified the text-example code to create a timer no issues to this point. The next phase of the project is to add buttons to set the minutes and seconds with a reset button and a mode button. I wired the buttons into the hat using GPIO pins 18,19,24,& 25 for input. I then wrote a python script to test the functioning of the buttons and changing the color of the display.

When I run the script and press a button sometimes it works sometimes it triggers the reset code as if I pressed the reset button. All the buttons are set for falling edge detection with internal pull-up resistors. I tested the same script on a bare Pi and they work perfectly.

I am powering the hat and the Pi with separate power supplies. 5V 4A for the hat and 5V 2A for the Pi.

I have attached the Python script.

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by adafruit_support_rick on Thu Dec 31, 2015 11:50 am

4A is not necessarily enough for a 32x64. Those could draw up to 8A, depending on how many pixels you have lit and how bright they are.

Do you have these problems if you dim the pixels, or reduce the number of lit pixels?

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: RGB Matrix Hat for PI and buttons

by bujones on Thu Dec 31, 2015 12:20 pm

I have been doing further testing and I have the same problem if I just try to read the buttons without doing anything with the Matrix. Planning to hook up an Arduino to monitor the pins to see if the voltage drops since I don't have an oscope. Will keep testing.

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by adafruit_support_rick on Thu Dec 31, 2015 6:15 pm

Seems like it must be a brownout of some kind. can't think of why it happens, though.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: RGB Matrix Hat for PI and buttons

by bujones on Mon Jan 11, 2016 4:40 pm

After further testing I do not see any drop in voltage below 3.2v. All solder connections look good. Never see a drop in voltage when all less are on.Not sure where to go from here.

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by adafruit_support_rick on Mon Jan 11, 2016 7:28 pm

The only other thing I can think of is a short-circuit. If you disconnect the HAT, then you don't get the resets?

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: RGB Matrix Hat for PI and buttons

by bujones on Mon Jan 18, 2016 4:29 pm

Removed HAT and verified buttons work with the PI. Tested HAT on a different PI with same results. Checked and verified all solder connections are solid with no shorts. Any other thoughts?

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by adafruit_support_rick on Tue Jan 19, 2016 11:06 am

I don't know. You have the buttons wired to ground?

Can you post some pictures?

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: RGB Matrix Hat for PI and buttons

by bujones on Wed Jan 20, 2016 12:45 pm

Here are pictures of the connections.
Switch Connections.JPG
Switch Connections.JPG (637.72 KiB) Viewed 1051 times

Hat Connections.JPG
Hat Connections.JPG (581.45 KiB) Viewed 1051 times

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by adafruit2 on Wed Jan 20, 2016 1:56 pm

thats...pretty weird. its almost certainly something in the matrix scanning code that doesnt let you also access the buttons outside the program.

one solution that isnt *great* but will work if you can spare the arduino, connect the buttons to the arduino and have it spit out the button number pressed on the Serial port, then you can use pyserial on the Pi to read the number pressed.

adafruit2
Site Admin
 
Posts: 17493
Joined: Fri Mar 11, 2005 7:36 pm

Re: RGB Matrix Hat for PI and buttons

by bujones on Wed Jan 20, 2016 2:03 pm

Thanks, that is along the lines I was thinking. I just wanted to make sure I was not missing something.

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by bujones on Fri Feb 12, 2016 2:31 pm

Project is going well. I had an Arduino Pro Mini which opened up more possibilities for the project. I attached a 2x16 LCD display to the arduino and have a nice menu for the different functions of the timer/clock. It communicates well with the Pi and I can control everything I want. So now I want to put it all together. Could I use a 5v 10A PS to power all the devices? Can I create a power buss and distribute the power to each device to make a single power connection to the Pi, Arduino, and the Hat?

bujones
 
Posts: 7
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

by adafruit_support_rick on Sat Feb 13, 2016 10:34 am

Yes, 10A should be enough for everything.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.