Questions about the buttons test and my Gertboard


6 posts
by IridiumSnake » Mon Feb 04, 2013 1:46 pm
Hi! I've bought an assembled rev 2 Gertboard and I'm running the test software.
I read in the user manual that
The jumpers on the ‘out’ area of U3 (U3-out-B1, U3-out-B2, U3-out-B3) are optional: if they are installed, the leftmost 3 LEDs will light up to indicate the state of the switches.
But when I set up the jumpers and straps according to the wiring diagram figure 12 on page 18 in the manual and run the buttons program my raspberry pi registers the button presses, but no LEDs on the Gertboard light up.
When I look at the photograph of the wiring on page 18 I see the power jumper installed in header J7 like on page 10.
When I install that jumper all the LEDs on the board light up and button presses make the corresponding LED turn off instead of light up.
Is this working as intended or is something wrong?

I also wonder if I have to power down my raspberry pi when I change straps and jumpers. When I make changes or remove the board while powered on the raspberry pi often crashes.
Posts: 2
Joined: Mon Feb 04, 2013 12:55 pm
by andy33 » Mon Feb 04, 2013 2:31 pm
Yes the button program seems to be working as intended and it is always safer to power down your Pi although I don't always do this. You should also try out the python programs as these tend to be easier to understand than the c programs.

Andrew
Posts: 27
Joined: Fri Jul 06, 2012 12:42 pm
by gordon@drogon.net » Mon Feb 04, 2013 4:23 pm
IridiumSnake wrote:Hi! I've bought an assembled rev 2 Gertboard and I'm running the test software.
I read in the user manual that
The jumpers on the ‘out’ area of U3 (U3-out-B1, U3-out-B2, U3-out-B3) are optional: if they are installed, the leftmost 3 LEDs will light up to indicate the state of the switches.
But when I set up the jumpers and straps according to the wiring diagram figure 12 on page 18 in the manual and run the buttons program my raspberry pi registers the button presses, but no LEDs on the Gertboard light up.
When I look at the photograph of the wiring on page 18 I see the power jumper installed in header J7 like on page 10.
When I install that jumper all the LEDs on the board light up and button presses make the corresponding LED turn off instead of light up.
Is this working as intended or is something wrong?

I also wonder if I have to power down my raspberry pi when I change straps and jumpers. When I make changes or remove the board while powered on the raspberry pi often crashes.


It is correct that the LEDs turn off when you press a button! See the circuit diagram on page 12 of the manual to see why. Also note that the buttons read high/1 when not pressed, and low/0 when pressed. The "result" of the button is reflected in the LED not the buttons physical position.

The other LEDs are lighting due to stray capacitance affecting the inputs. Try this - put your thumb on a 0v pin, then touch the B pins on J3 ... You ought to be able to turn the all off - unless they're wired into the Pi that is!

I re-wire mine while powered up - just be careful. I don't plug it in or remove it under power though.

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by alexeames » Mon Feb 04, 2013 4:27 pm
If you're playing with the buttons programs, I've just uploaded a minor 'tweak' update to the python ones.

On the new board, all the leds are lit (pull-ups), and pressing a button switches them off. On the self-assembly kit, the leds were floating unless connected, so could behave a bit randomly if they weren't being used.

You shouldn't use the board without that power jumper in place or you risk straining the Pi's 3v3 regulator.
My Pi uses 2 watts - what what? ---- HiRes early production Pi photos RS Front Back | Farnell Front Back
User avatar
Posts: 2018
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by Gert van Loo » Mon Feb 04, 2013 4:36 pm
....the leftmost 3 LEDs will light up to indicate the state of the switches
....When I install that jumper all the LEDs on the board light up and button presses make the corresponding LED turn off instead of light up.
Is this working as intended or is something wrong?

If you press a switch the pin is pulled LOW (down) so the LED will go OUT which is a correct indication of the switch status.
User avatar
Moderator
Moderator
Posts: 1843
Joined: Tue Aug 02, 2011 7:27 am
by IridiumSnake » Mon Feb 04, 2013 4:46 pm
Thanks for the quick replies! :D
I misunderstood the way the LEDs indicate the button states. :oops:
Posts: 2
Joined: Mon Feb 04, 2013 12:55 pm