Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: Utilizing the GPIO Pins.  (Read 4115 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Utilizing the GPIO Pins.
« on: December 28, 2020, 11:08:11 AM »

Like many that use the PiX10Hub image I just wanted a winning solution to AHP.

The fact that a simple inexpensive low power computer would fit inside a CM15A was A bonus for me and I had no desire to utilize the GPIO pins.
Times have changed!
There are so many small modules, sensors and things that will work from these pins with little coding to make them perform.
I created this section so users could share their Ideas and projects.
These can be stand alone projects, created to work with Home Genie(HG), or integrated into your Home Automation setup some other way.
 HG has some code already for the GPIO pins found in the Package manager however some work is required to get these to work with newer versions of HG and newer Pi Boards.
If your running any of those programs I'm sure others would be interested what your using them for.
Please start a new thread for each GPIO Project!
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Utilizing the GPIO Pins.
« Reply #1 on: December 28, 2020, 08:29:36 PM »

Just a suggestion, but have you checked out the Raspberry Pi forums yet?  There are a ton of projects posted there with a very active community.  I imagine you would get a lot of ideas just by perusing the list of projects!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #2 on: December 29, 2020, 07:25:38 AM »

I have checked out a few different projects that sounded interesting. In creating this section my intent was for others to show off what they did for their Home Automation. Maybe how they utilized one of the many projects for their own use.
 Utilizing the GPIO pins is far easier then most would think especially if your board has the pins already soldered on the board .(all my ZeroW boards do not). :-[
 Things you can add to the pins are almost endless. Some can be very complicated using resistors and a bread board while others don't require those.
I could post several projects that could be used in a HA project but since I've not done them I couldn't comment on them. Others may think of uses for some I dismissed think the project couldn't be used in a HA setup.
 I have several DHT11,22 and other sensors I'm currently playing with however currently not using them in my HA setup. Once I do I'll post a separate thread showing them off.
 
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Utilizing the GPIO Pins.
« Reply #3 on: December 29, 2020, 02:32:35 PM »

Without header pins, all you have to do is turn on your soldering iron and add them.  They aren't required if you are creative either way.  I have a few Arduino and sensor boards that I've used various methods to test by adding either jumpers held at an angle or spring loaded clips to attach.  Of course, the easiest method is to just solder the header on and use a combination of bread board, jumper wires, and whatever components are required (resistors, sensors, etc).  FWIW, most of the basic projects that have resistors are usually used for pull-up/down and are not required for the RPi so long as you set the internal pull-up/down resistor appropriately.  I'd actually counter that a breadboard is the way to make a project LESS complicated rather than more-so.

And as for the DHT sensors, if you don't have headers, how are you intending on hooking those to your Zero?  It is possible that they could line up with the GPIO header such that power, ground, TX, RX are all in a row, but the reality is that they probably won't.  When I was testing with mine, I used a breadboard and some jumpers to get everything hooked up.  Granted that was with an Arduino, so it should be possible to do with 4 direct jumpers to GPIO on RPi.  Keep in mind that the DHT sensors have tiny/flimsy connectors and don't like working with either jumpers or a breadboard.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #4 on: December 29, 2020, 02:48:28 PM »

Without header pins, all you have to do is turn on your soldering iron and add them.  They aren't required if you are creative either way.  .
And as for the DHT sensors, if you don't have headers, how are you intending on hooking those to your Zero? 
I've soldered male to female jumper wires to the PI and plug the sensor into the female ends.
Quote
It is possible that they could line up with the GPIO header such that power, ground, TX, RX are all in a row, but the reality is that they probably won't.  When I was testing with mine, I used a breadboard and some jumpers to get everything hooked up.  Granted that was with an Arduino, so it should be possible to do with 4 direct jumpers to GPIO on RPi.  Keep in mind that the DHT sensors have tiny/flimsy connectors and don't like working with either jumpers or a breadboard.
The DHT sensors have 4 pins but only 3 are used with a Pi. My DHT11 & 22 sensors are ones already mounted to a small board that has the resistors added similar to this. The pins are much heavier.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #5 on: December 30, 2020, 07:01:45 PM »

I've about 5 GPIO pin projects now in my bucket list.
A couple are simple adds like a power button and and LED light to easily see if my Pi is Powered up. These could be incorporated into one project using a lighted button. ;)
A couple others are gas sensors which I started to look into last spring when I ordered my DHT22 sensors.
I've yet to order these sensors.
The biggest project I have in my list I suspect will be a weather station for my off grid place. However I probably will do the power button project for all my Pi boards I just have to find a button I like. rofl
« Last Edit: December 30, 2020, 07:03:31 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Utilizing the GPIO Pins.
« Reply #6 on: December 30, 2020, 08:04:37 PM »

Power button with a light:
https://www.canakit.com/raspberry-pi-switch.html
I've used a switch like this built into a power supply and it's a nice option that just plugs right in.

Not sure about the type of gas sensor you are talking about, but if it's a CO/CO2/Methane detector type, then that's a specialty sensor. 

LP: https://www.dfrobot.com/product-684.html
CO: https://www.sparkfun.com/products/9403
CO2: https://store.arduino.cc/usa/gravity-analog-co2-gas-sensor

If you are talking about a device that can detect gas meter usage, that is a type of device that I've looked into in the past in connection to a ESP type setup.
http://seductiveequations.com/2015/11/09/water-meter.html

Weather stations are very popular for the SBC crowd.  I get it, it's easy to make a small computer with GPIO read sensors and make a database.  But the real issue is, where is that computer located.  If you want to know the weather on your work bench, these are AWESOME!  If you want to know the weather outside, you have to come up with a device that runs off of a battery and/or solar.  You also have to come up with a weatherproof case.  Oh, and it has to wirelessly communicate with a data logger.  Save yourself a lot of effort and just pick something that's compatible with rtl_433 and move on...

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #7 on: December 30, 2020, 08:38:57 PM »

I actually have most of the stuff for a weather station already to do the wind & rain readings and since my solar array already has a solar battery setup for turning one of my arrays, the pi 3B+ can be powered from it.
I'm not interested in creating a data base, it would be more for current readings.

The gas sensors I was thinking about were for CO2 and hydrogen never thought of LP. I did see one that did several gasses but at the time I was more interested in the DHT sensors as HG had programs already available. (little did I know they didn't work with the current HG/OS combination.) ::) :'
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #8 on: December 30, 2020, 08:43:40 PM »

I'm a little leery on the https://www.canakit.com/raspberry-pi-switch.html, isn't that just like pulling the power wire? (not good for the OS or board.)
What I'm looking at does a safe shutdown before you cut the power.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Utilizing the GPIO Pins.
« Reply #9 on: December 30, 2020, 09:52:21 PM »

Oh my days of solder beads are nearing an end  rofl Dropped solder beads, burnt finger tips, bread boards etc. Nah. The Sense Hat will put an end to all that. https://www.deviceplus.com/raspberry-pi/raspberry-pi-sense-hat-led/ Hopefully my latest Arduino project, an EEPROM programmer needed in a hurry to read the EEPROM firmware on my alarm panel will be my last.

Personally I’d use an Arduino with its analogue sensors and interface it to the RPI and HG via Serial Port program. You can extract any reading you want and send it to a HG widget with a bit of basic coding. The old DHT sensors wouldn’t be my first choice of sensor. Problematic and quite dated at this stage. Still work with what you have.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #10 on: December 31, 2020, 07:16:42 AM »

My Soldering days are also nearing an end. My eye sight is no where near what it was.
If I had even a sight inkling I would have been using GPIO pins I would have ordered them pre soldered on my Zero W boards.
Using bread boards I still can't see myself doing so some projects I'd like to do just won't get done. ::) :'
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Utilizing the GPIO Pins.
« Reply #11 on: December 31, 2020, 02:29:47 PM »

It takes 3 minutes to just solder the headers on (a few more if the iron isn't already hot).  Then you don't have to solder again.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Utilizing the GPIO Pins.
« Reply #12 on: December 31, 2020, 02:59:48 PM »

It takes 3 minutes to just solder the headers on (a few more if the iron isn't already hot).  Then you don't have to solder again.
Yes, however since where my Zero W boards are (inside the CM15) room is limiting. Luckily I have only few GPIO projects planed for these boards. The Pi 3B+ has the header pins so it makes it easy to test from it then setup on a Zero W. >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Utilizing the GPIO Pins.
« Reply #13 on: December 31, 2020, 04:56:57 PM »

Well, one solution would be to extracate the RPi from the CM15A and install it in a small case of it's own.  My brother has one that has a small display hat that plugs in which makes a very nice package for a variety of projects. I believe that setup was intended to monitor pine wood derby races.

From my memory of the size of the CM15A battery compartment, I'm surprised you wouldn't be able to fit the board with headers on it since the headers are around 1/2" tall and the box is taller than a battery (3/4" or so).  Seems it would be easy to use as is or remove the CM15A cover and cut a slot for the GPIO wires to exit.  The wires have to get out to the sensors or whatnot anyway.

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Utilizing the GPIO Pins.
« Reply #14 on: December 31, 2020, 10:51:20 PM »

If you’re into minimalism you could bury this little gem from Gene into your CM15. It’s an embedded X10 solution and the project looks fairly straightforward and would solve all your problems as it’s based on the ESP 8266 board and gives plenty of expansion options including GPIO and other features https://github.com/genielabs/homegenie-mini
Logged
Pages: [1] 2
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.