RGB Matrix Hat for PI and buttons

Ideas and questions about MintyBoost kits

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

RGB Matrix Hat for PI and buttons

Post by bujones »

inttest.txt
(1.54 KiB) Downloaded 302 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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RGB Matrix Hat for PI and buttons

Post by adafruit_support_rick »

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?

User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

Post by bujones »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RGB Matrix Hat for PI and buttons

Post by adafruit_support_rick »

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

User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

Post by bujones »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RGB Matrix Hat for PI and buttons

Post by adafruit_support_rick »

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

User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

Post by bujones »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RGB Matrix Hat for PI and buttons

Post by adafruit_support_rick »

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

Can you post some pictures?

User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

Post by bujones »

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

User avatar
adafruit2
 
Posts: 22111
Joined: Fri Mar 11, 2005 7:36 pm

Re: RGB Matrix Hat for PI and buttons

Post by adafruit2 »

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.

User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

Post by bujones »

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

User avatar
bujones
 
Posts: 14
Joined: Wed Jun 03, 2015 9:32 am

Re: RGB Matrix Hat for PI and buttons

Post by bujones »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RGB Matrix Hat for PI and buttons

Post by adafruit_support_rick »

Yes, 10A should be enough for everything.

Locked
Please be positive and constructive with your questions and comments.

Return to “MintyBoost”