hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Using the GPIO header

Sat Aug 22, 2015 5:23 pm

Hello all,

I'm a super newbie when it comes to the RPi, i dont even own on yet but I have two projects that I want to use a couple of Pis for (a network music player to replace my aging sqeeuzebox and an internet radio).

Naturally like any geek i research the hell out of all of it before i start spending money. I'm generally happy that i can crack on with both projects but I do have a question regarding the use of the GPIO and I2C pins.

This product https://www.adafruit.com/products/1115 says that it only uses the 2 I2C pins on the header but yet when i delved into the assembly instructions there is clearly a stage where you have to solder in a pin block that plugs into ALL of the PI's header pins?
Image

No is it just a case that the whilst all the pins on the LCD board are being plugged into the pi only the I2C ones are actually being used and the others are still able to be used?

Sorry if this is a daft question...as i said.. new to this :mrgreen:

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Using the GPIO header

Sat Aug 22, 2015 5:54 pm

You are correct. I guess it goes over all the expansion header to give structural support. It makes it difficult to get access to the GPIOs.

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Re: Using the GPIO header

Sat Aug 22, 2015 8:33 pm

Ah excellent so in theory I can just use jumper cables to connect the two I2C pins leaving me free to mount the PI and the LCD board separately?

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Using the GPIO header

Sat Aug 22, 2015 8:38 pm

hp1975 wrote:Ah excellent so in theory I can just use jumper cables to connect the two I2C pins leaving me free to mount the PI and the LCD board separately?
I should think so. Note that the expansion header contains the 5V, 3V3, and ground rails as well as GPIOs. The screen will be using the ground and power rails as well as I2C.

User avatar
davidcoton
Posts: 4908
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Using the GPIO header

Sat Aug 22, 2015 9:53 pm

The details for setting it up are here.

I can't see the circuit diagram or power requirements, so if you are using jumpers, you may need to work out which are actually used. Most likely it will be two I2C connections, ground (0V), and either 5V or 3V3. It's possible some other connections are used too. The power connections may possibly use more than one pin. The wires will always stay in the same order, as if plugged in directly -- as long as you always try connections like that, damage is unlikely. If in doubt, you need to ask Adafruit or find someone here with the same board.
Signature retired

jimmy0082
Posts: 1
Joined: Sun Aug 23, 2015 8:20 am
Contact: Website

Re: Using the GPIO header

Sun Aug 23, 2015 8:25 am

What are the default power requirements?
http://downloadfullmoviesfree.com

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Using the GPIO header

Sun Aug 23, 2015 9:13 am

jimmy0082 wrote:What are the default power requirements?
What are you refering to? Th Pi, the adafruit LCD board, or both together?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Re: Using the GPIO header

Sun Aug 23, 2015 11:43 am

davidcoton wrote:The details for setting it up are here.

I can't see the circuit diagram or power requirements, so if you are using jumpers, you may need to work out which are actually used. Most likely it will be two I2C connections, ground (0V), and either 5V or 3V3. It's possible some other connections are used too. The power connections may possibly use more than one pin. The wires will always stay in the same order, as if plugged in directly -- as long as you always try connections like that, damage is unlikely. If in doubt, you need to ask Adafruit or find someone here with the same board.

Ah, good point, as long as i still make the same connections with jumper cables, pin to pin, from the LCD header to to the Pi header then it should all still work?

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Using the GPIO header

Sun Aug 23, 2015 12:28 pm

hp1975 wrote:Ah, good point, as long as i still make the same connections with jumper cables, pin to pin, from the LCD header to to the Pi header then it should all still work?
You could ask on the Adafruit forum to find out what pins are necessary.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Re: Using the GPIO header

Sun Aug 23, 2015 1:41 pm

I'll do that , many thanks for the advice.

Rather than start an new topic, I'd like to ask a related question regarding power.

To drive the speakers in the radio i'm also going to use on of Adafruit's little amplifiers. It needs 5V and around 500mA depending on what speakers are attached. I had originally thought i could supply the Amp from one of the Pi's USB ports but reading the forums it is unlikely they will be able to supply enough current as I understand that you should not try and draw more than 100mA?

The only other peripheral that will be drawing any power is a wifi dongle (and of course the LCD screen discussed above), is the best solution therefore to use a mains powered USB hub that supplies the Pi (though the Micro USB power socket) AND the amplifier? There appear to be plenty of available hubs that will do this.

Cheers

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Using the GPIO header

Sun Aug 23, 2015 1:45 pm

Nonsense. A new B+ or Pi2 can supply 600 mA by default and that can be boosted to 1.2A with a config.txt change and a good 5V 2A power supply. You could try it, you won't break anything.
There are 10 types of people: those who understand binary and those who don't.

User avatar
JSingleton
Posts: 18
Joined: Fri Jan 16, 2015 12:10 pm
Contact: Website

Re: Using the GPIO header

Sun Aug 23, 2015 2:39 pm

If you're considering audio projects using a Pi then keep in mind that the built in audio quality (of all models) is not great. I found this out when trying to make a dedicated device for my favourite internet radio station.

You'll probably want a HiFiBerry, USB sound card or an IQAudIO. Which is what was used for this project: https://www.raspberrypi.org/blog/robert ... einvention
Computing4Kids.com
@shutdownscanner
unop.uk

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Re: Using the GPIO header

Sun Aug 23, 2015 2:40 pm

kusti8 wrote:Nonsense. A new B+ or Pi2 can supply 600 mA by default and that can be boosted to 1.2A with a config.txt change and a good 5V 2A power supply. You could try it, you won't break anything.
Ah, its possible I was reading something that related to an older model Pi....my misunderstanding then. Thats great news as I didnt really want to try and squeeze the hub in the enclosure as well.

Thanks for setting me straight.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Using the GPIO header

Sun Aug 23, 2015 2:58 pm

It only uses SDA and SCL on the RPi, plus ground and power. You can use individual jumpers, or you can purchase a stacking header with extra long pins to replace the header provided with the kit. Adafruit carries the long pin stacking headers. That would give you all the pins extended through the top of the LCD board if you wanted to plug in an IDC connector/cable for a T-Cobbler or plug into the individual pins.

User avatar
davidcoton
Posts: 4908
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Using the GPIO header

Sun Aug 23, 2015 4:15 pm

JimmyN wrote:It only uses SDA and SCL on the RPi, plus ground and power...
Yes, but which power? 5V or 3V3? And which specific pins -- power is available on several?
Signature retired

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Re: Using the GPIO header

Sun Aug 23, 2015 5:14 pm

JSingleton wrote:If you're considering audio projects using a Pi then keep in mind that the built in audio quality (of all models) is not great. I found this out when trying to make a dedicated device for my favourite internet radio station.

You'll probably want a HiFiBerry, USB sound card or an IQAudIO. Which is what was used for this project: https://www.raspberrypi.org/blog/robert ... einvention
Mmm.... i was aware of that and I do intend to use the IQAudio DAC for my other project to replace my Squeezebox but as this radio is just going to be replacing a cheap mono DAB radio in the kitchen i figured the audio from the Pi would be 'good enough', I'm not looking for HiFi. I'd also heard that USB Sound Cards didnt work well on the Pi introducing 'pops' into the audio though this may well have been referring to the older Pi model? Are there some USB sound cards that come recommended for the RPi and is it a case of plug and play (i'll be using Raspian).

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Re: Using the GPIO header

Mon Aug 24, 2015 9:10 am

One final question, I want to add a pot as a volume control on the input to the amplifier. I'm generally happy with that and how to wire it up but then I saw this diagram, is it just me or are the outputs from the wiper pins the wrong way round for a volume control?

https://learn.adafruit.com/assets/3730

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Using the GPIO header

Mon Aug 24, 2015 9:46 am

That diagram looks fine to me.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

User avatar
rpdom
Posts: 17029
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Using the GPIO header

Mon Aug 24, 2015 10:09 am

Jednorozec wrote:That diagram looks fine to me.
It looks to me like the Left channel from the plug is connected to the R+ on the amp, and the Right channel on the plug is connected to the L+ on the amp :o

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Using the GPIO header

Mon Aug 24, 2015 10:29 am

yes, you are right but that wasn't the error hp1975 was asking about, wiper connections are quite fine. :mrgreen:

hp1975
Posts: 26
Joined: Sat Aug 22, 2015 5:09 pm

Loop Re: Using the GPIO header

Mon Aug 24, 2015 12:02 pm

Yeah sorry, I probably explained it wrong, I was confused as it shows left going to right and vice versa. Thanks for confirming my suspicion. I assume for normal volume control it would be left - left and right- right?

User avatar
davidcoton
Posts: 4908
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Loop Re: Using the GPIO header

Mon Aug 24, 2015 8:01 pm

hp1975 wrote:Yeah sorry, I probably explained it wrong, I was confused as it shows left going to right and vice versa. Thanks for confirming my suspicion. I assume for normal volume control it would be left - left and right- right?
Yes, under almost all circumstances.
Signature retired

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Using the GPIO header

Tue Aug 25, 2015 12:26 am

but you could always simply swap the position of the speakers.... :mrgreen:

User avatar
Burngate
Posts: 6290
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Using the GPIO header

Tue Aug 25, 2015 8:42 am

mahjongg wrote:but you could always simply swap the position of the speakers.... :mrgreen:
.... or turn your head round ....
There was some confusion about the ... handedness? ... of the audio socket on pre-B+ Pi's. Perhaps Adafruit were trying to correct that?

User avatar
JSingleton
Posts: 18
Joined: Fri Jan 16, 2015 12:10 pm
Contact: Website

Re: Using the GPIO header

Tue Aug 25, 2015 2:19 pm

hp1975 wrote:
JSingleton wrote:If you're considering audio projects using a Pi then keep in mind that the built in audio quality (of all models) is not great. I found this out when trying to make a dedicated device for my favourite internet radio station.

You'll probably want a HiFiBerry, USB sound card or an IQAudIO. Which is what was used for this project: https://www.raspberrypi.org/blog/robert ... einvention
Mmm.... i was aware of that and I do intend to use the IQAudio DAC for my other project to replace my Squeezebox but as this radio is just going to be replacing a cheap mono DAB radio in the kitchen i figured the audio from the Pi would be 'good enough', I'm not looking for HiFi. I'd also heard that USB Sound Cards didnt work well on the Pi introducing 'pops' into the audio though this may well have been referring to the older Pi model? Are there some USB sound cards that come recommended for the RPi and is it a case of plug and play (i'll be using Raspian).
The analogue sound quality on the original pi was bad. I was hoping for better with the B+ and v2 but alas it's still bad. I'm not an audio buff but it just wasn't something I could listen to for any length of time. It's OK for sound effects but not music in my opinion. You might find it acceptable though.

Apart from the HATs mentioned previously some cheaper options are USB and HDMI. This £12 HDMI to VGA converter has analogue audio out. Here's a USB adapter for £5. USB is probably your best option. Not sure if these require an amp (the HATs do). N.B. I haven't tested any of these and I have no affiliation to Pi Supply.
Computing4Kids.com
@shutdownscanner
unop.uk

Return to “General discussion”