User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Sense HAT - free GPIO pins

Sun Oct 11, 2015 7:03 am

Hello,

I thinking about buying the Sense HAT for my metal detector robot project.
But I do not understand the schematics which GPIO's are free / could be used to control the motor driver etc.

I found this drawing:
https://www.raspberrypi.org/wp-content/ ... T-V1_0.pdf

Could somebody please help me and explain which GPIO's are used by the Sense Hat.

This is one of my robots in action:
https://youtu.be/WmPvRoaFHHQ

Thank you very much,

ByteYourLife
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

gordon77
Posts: 3863
Joined: Sun Aug 05, 2012 3:12 pm

Re: Sense HAT - free GPIO pins

Sun Oct 11, 2015 8:07 am

Looks to me like it uses gpios 2,3,8,9,10,11,23,24,25 and the ID pins
Attachments
IMG_20151011_101057.jpg
IMG_20151011_101057.jpg (40.22 KiB) Viewed 11548 times

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Sun Oct 11, 2015 10:13 am

Hi gordon77,

okay, cool then I will order one Sense HAT and build a new robot with it.
The Sense HAT makes things easier to me.

Thank you very much for your answer,

ByteYourLife
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Sense HAT - free GPIO pins

Mon Oct 12, 2015 10:38 am

gordon77 wrote:Looks to me like it uses gpios 2,3,8,9,10,11,23,24,25 and the ID pins
Hmm,
It seem that they are using:

Pin 1 for 3V3 power - (so it is still available for use).
Pin 2 & 4 for 5V power - (so it is still available for use).
Pin 6, 9, 14, 20, 25, 30, 34 & 39 for Gnd - (so they are still available for use).
Pin 3 & Pin 5 for i2c - (so still available for other i2c devices to connect, some i2c addresses will have been used by the HAT).
Pins 16, 18 & 22 (no longer available for use).
Pins 19, 21, 23 & 24 as SPI (so 19, 21, 23 & 26 would be available to use as the 2nd SPI on CE1).
Doug.
Building Management Systems Engineer.

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Fri Jan 22, 2016 7:07 pm

Hi BMS Doug,
Today I started playing around with my Sense Hat. I was a little bit busy the last months to prepare my booth at the MakeMunich maker festival.

I mounted the Raspberry Pi Sense Hat on top of my Raspberry Pi 2. But then I saw the problem, that I am not able to connect my motor driver to the GPIO pins any more. I thought I could use female to male jumper cables. The picture below shows the problem with the GPIO header.

Image

I was now thinking about soldering some additional pins on top of the Sense Hat or to buy an USB to I2C module.

But maybe someone here has a good idea how to solve the lost GPIO pins problem with the Sense Hat. I need 6 GPIO pins to connect my L298N motor driver to control my robot.

Visit my blog to see my tiny robot: Raspberry Pi - robot
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

gordon77
Posts: 3863
Joined: Sun Aug 05, 2012 3:12 pm

Re: Sense HAT - free GPIO pins

Fri Jan 22, 2016 8:05 pm

Hard to the exact problem from the picture, is it that the pins don't extend through the sense hat connector?

Is this any use?
http://www.modmypi.com/raspberry-pi/gpi ... extra-tall

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Fri Jan 22, 2016 8:28 pm

Hi gordon77,

you are right. I hope the new picture will show the Sense Hat and the GPIO header better.

Image

But I think it is not possible to connect something on the left over GPIO's. As mentioned by BMS Doug the free GPIO pins are placed to ground.
At the moment I have no idea how to carry on.
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

gordon77
Posts: 3863
Joined: Sun Aug 05, 2012 3:12 pm

Re: Sense HAT - free GPIO pins

Fri Jan 22, 2016 8:41 pm

Can't you put the extended connector l linked to and then use GPIOS on pins 29,31,33,35,37 and 40?

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Fri Jan 22, 2016 8:48 pm

Yes I think so but as shown in the pdf they are placed to ground. I think if the GPIO's are placed to ground by the Sense Hat I can not use them to control my motor driver.
Sense-HAT-V1_0.pdf
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

Pithagoros
Posts: 580
Joined: Wed Nov 12, 2014 8:16 pm

Re: Sense HAT - free GPIO pins

Fri Jan 22, 2016 9:02 pm

Would it be possible to trim the pins so they don't go into the sense hat connector, and then take wires from the back of the PCB?

A robot metal detector is one of the best ideas for a project that I've ever heard of.

gordon77
Posts: 3863
Joined: Sun Aug 05, 2012 3:12 pm

Re: Sense HAT - free GPIO pins

Sat Jan 23, 2016 6:43 am

ByteYourLife wrote:Yes I think so but as shown in the pdf they are placed to ground. I think if the GPIO's are placed to ground by the Sense Hat I can not use them to control my motor driver.
Sense-HAT-V1_0.pdf
I don't think they goto gnd, that isn't what the diagram shows. I would expect them available.


Gordon

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Sat Jan 23, 2016 8:16 am

Hi Gordon,

you are right, tonight I connected the Sense Hat with 9 female to male jumper wires and it works for the first test.

Image

The motor driver with the six female to female jumpers is as well connected to the Raspberry Pi and works fine.

@Pithagoros the metal detector robot is designed to find treasures as well in the future for people living in war zones to detect monition in the ground from a safe distance. I got the idea by watching TV and all the war pictures I saw...
You will find some information and videos about the Metal detector robot here: Discoverer remote controlled robot with a Raspberry Pi

ByteYourLife
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

Pithagoros
Posts: 580
Joined: Wed Nov 12, 2014 8:16 pm

Re: Sense HAT - free GPIO pins

Sat Jan 23, 2016 11:13 am

ByteYourLife wrote: @Pithagoros the metal detector robot is designed to find treasures as well in the future for people living in war zones to detect monition in the ground from a safe distance. I got the idea by watching TV and all the war pictures I saw...
You will find some information and videos about the Metal detector robot here: Discoverer remote controlled robot with a Raspberry Pi

ByteYourLife
I've looked at the web site for the project and I like it very much.
Does it use the 4 wheel smart car chassis? I found where to buy them, they are very inexpensive?

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Sat Jan 23, 2016 2:01 pm

Hi Pithagoros,
The Discoverer uses four 12V DC gear motors and normal RC car 1:10 wheels. The yellow smart car motors are good for indoor robots. I use the smart car motors for my prototyps which are running inside to test the sensors and the software.
As a single power supply I use two 7.2V 5000 mAh RC car accu packs. Instead of the 12V I am running my dc motors with 14.4V and they work fine…
ByteYourLife
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

Pithagoros
Posts: 580
Joined: Wed Nov 12, 2014 8:16 pm

Re: Sense HAT - free GPIO pins

Sat Jan 23, 2016 4:10 pm

ByteYourLife wrote:Hi Pithagoros,
The Discoverer uses four 12V DC gear motors and normal RC car 1:10 wheels. The yellow smart car motors are good for indoor robots. I use the smart car motors for my prototyps which are running inside to test the sensors and the software.
As a single power supply I use two 7.2V 5000 mAh RC car accu packs. Instead of the 12V I am running my dc motors with 14.4V and they work fine…
ByteYourLife
Thanks for the information. I have ordered a Smart Car chassis so I can have a tinker.

Do you build your own chassis for the outdoor robots?

User avatar
ByteYourLife
Posts: 73
Joined: Wed Jul 23, 2014 3:04 am
Location: Germany
Contact: Website

Re: Sense HAT - free GPIO pins

Sun Jan 24, 2016 9:20 am

Hi Pithagoros,

Yes, I build the Discoverer chassis out of PVC pipes and a storage box from the local construction market (HomeDepot). The PCV pipe whith whom you normally route electrical cables are very cheap and easy to cut.
The DC motors are mounted beneth the storage box. All electronics are inside the box.

ByteYourLife
My project I am working on: An autonomous driving car with the Raspberry Pi and a lot of sensors.

Stoop
Posts: 13
Joined: Wed Feb 11, 2015 1:09 am

Re: Sense HAT - free GPIO pins

Sat Jul 02, 2016 11:46 pm

I am still a little unsure after reading this thread. Can you or can you not access GPIO pins that are not used by the Sense Hat, and if so does anyone have a list of the free pins?

User avatar
bensimmo
Posts: 3883
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Sense HAT - free GPIO pins

Sun Jul 03, 2016 7:57 am

Yes you can
A simple method, that I've been using since it came out, us to pull/prize the big black connector block out and change it for a long pin variant, this then gives you all the pins sticking out the top of the hat and can mount it direct to the Pi.
Or use the method in the 'car' above

https://pinout.xyz has the info on lots of HATs including the SenseHat

https://goo.gl/photos/yDG5e9JAV2cK7Q8M9
https://goo.gl/photos/rqPc7GkEwtJRnBi57
for a pic of the pins out the top

Stoop
Posts: 13
Joined: Wed Feb 11, 2015 1:09 am

Re: Sense HAT - free GPIO pins

Thu Jul 28, 2016 3:06 pm

That was very helpful, I have installed extended headers to make the GPIO pins available above the installed Sense Hat.

However I still think it is an unanswered question as to what GPIO pins are available (unused by the Sense Hat).

According to http://pinout.xyz/pinout/sense_hat only pins 3 & 5 are in use, but above we see a couple of different ideas:

"Looks to me like it uses gpios 2,3,8,9,10,11,23,24,25 and the ID pins"

"Hmm,
It seem that they are using:

Pin 1 for 3V3 power - (so it is still available for use).
Pin 2 & 4 for 5V power - (so it is still available for use).
Pin 6, 9, 14, 20, 25, 30, 34 & 39 for Gnd - (so they are still available for use).
Pin 3 & Pin 5 for i2c - (so still available for other i2c devices to connect, some i2c addresses will have been used by the HAT).
Pins 16, 18 & 22 (no longer available for use).
Pins 19, 21, 23 & 24 as SPI (so 19, 21, 23 & 26 would be available to use as the 2nd SPI on CE1)."


Anyone have the definitive answer - or suggest a way to test each pin. I'm happy to get the mulitmeter on each pin but not sure what it would show if the Sense Hat is connected to a pin but there is no program running to use it, would that pin just pass thru unmolested and show as being available?

User avatar
bensimmo
Posts: 3883
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Sense HAT - free GPIO pins

Thu Jul 28, 2016 3:31 pm

I think the SPI is only used to reprogrammed the ATMEL chip if you so wanted
Pin 27&28 [gpio(bcm)0/1] should be in use to ID the HAT if I read the specs correctly?

First list is BMC/gpio pins and detailed list it's physical pins?

No idea which of the team designed it for you to ask


https://github.com/raspberrypi/hats


https://www.raspberrypi.org/blog/buy-th ... -in-space/

Stoop
Posts: 13
Joined: Wed Feb 11, 2015 1:09 am

Re: Sense HAT - free GPIO pins

Thu Jul 28, 2016 6:19 pm

Well with a wee bit of trial and error I have my Sense Hat fitted and I can access the pins I need for the Raspberry Pi - Amazon Alexa project.

Image

Here I am using:
Pin 39 for Ground
Pin 38 (GPIO20) for + coming off the button
Pin 36 (GPIO16) for the Blue element of the RGB LED
Pin 26 (GPIO7) for the Green element of the RGB LED

Next thing I have to do is eliminate the external mini breadboard completely and use the Sense Hat joystick ENTER as the button and some LEDs on the Matrix instead of the RGB LED.

naresh_nano
Posts: 3
Joined: Mon Dec 03, 2018 11:26 pm

Re: Sense HAT - free GPIO pins

Fri Dec 14, 2018 9:21 pm

bensimmo wrote:
Sun Jul 03, 2016 7:57 am
Yes you can
A simple method, that I've been using since it came out, us to pull/prize the big black connector block out and change it for a long pin variant, this then gives you all the pins sticking out the top of the hat and can mount it direct to the Pi.
Or use the method in the 'car' above

https://pinout.xyz has the info on lots of HATs including the SenseHat

https://goo.gl/photos/yDG5e9JAV2cK7Q8M9
https://goo.gl/photos/rqPc7GkEwtJRnBi57
for a pic of the pins out the top
HI,
I am looking for a similar kind of thing where I am planning to attach additional sensors to my RPI along with sense hat. Your images are very helpful and give us an idea how to extend the GPIO pins with an extended header.
Can you please point me to a link where exactly I can purchase the extended GPIO header with extra taller pins like in your pictures?
Thanking you in advance and your help is much appreciated.

Thanks

User avatar
bensimmo
Posts: 3883
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Sense HAT - free GPIO pins

Sat Dec 15, 2018 1:53 pm

I can't do it exactly as the site eBay page isn't there anymore.
But loads of places do them now, incl AliExpress, eBay, various Pi shops etc .
https://www.google.com/search?client=ms ... pin+header

Try and avoid the ones with the extra spacers in them
E.g. don't buy these
https://shop.pimoroni.com/products/gpio ... 1086334437
As getting the spacers off is a pain.

Much easier without
https://shop.pimoroni.com/products/2x20 ... 1132812269
Just using them as an example, they may be cheaper elsewhere or nearer yourself.
(Though they are a nice shop)

There are more people selling now than a few eBay shops when I was looking (shortly after the SenseHAT came out).

alphanumeric
Posts: 1688
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense HAT - free GPIO pins

Thu Jan 17, 2019 8:16 pm

What I did was put a Proto Hat with a stacking header between my Pi and Sense Hat. On that I mounted my DS3231 RTC and some male headers for other i2c devices. Then connected the other i2c breakout boards to the Proto Hat with female to female jumpers.
https://1drv.ms/f/s!AjOYwiwlwDtpgq8_0VrdS3_H5xL_AA

alphanumeric
Posts: 1688
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Sense HAT - free GPIO pins

Thu Jan 17, 2019 8:19 pm

The Sense Hat pinout is here, https://pinout.xyz/pinout/sense_hat#

Return to “Astro Pi”