What to do when there are no pins left

  • Thread starter Thread starter perplexabot
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the challenge of using a Raspberry Pi with the Enocean Pi 902, which occupies all GPIO pins, leaving no pins available for additional components. Participants explore potential solutions, including the use of shift registers and additional microcontrollers, while considering the implications of each approach.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant suggests using a shift register (parallel in serial out) to free up GPIO pins but expresses concern about the added complexity and the need for a clock.
  • Another participant proposes using a second microcontroller with Wi-Fi capabilities, noting it may be overkill and costly compared to the task at hand.
  • A later reply questions the feasibility of daisy chaining components if the Enocean Pi uses I2C or SPI protocols, suggesting that these could allow for additional connections.
  • One participant mentions the possibility of using a microcontroller with many I/O pins as a port expander, emphasizing the need to understand the Enocean software's interaction with GPIO resources.
  • Another participant shares their lack of familiarity with communication protocols and expresses interest in learning about I2C and PIC microcontrollers, considering them as potential solutions.
  • Concerns are raised about the Enocean Pi's usage of all P1 header pins on the Raspberry Pi, with uncertainty about whether it monopolizes GPIO resources logically as well as physically.

Areas of Agreement / Disagreement

Participants express differing views on the practicality and necessity of using additional microcontrollers versus simpler solutions like shift registers. There is no consensus on the best approach, and the discussion remains unresolved regarding the most effective method to address the pin limitation.

Contextual Notes

Participants note limitations in their understanding of communication protocols and the specific functionalities of the Enocean Pi, which may affect their proposed solutions. There is also uncertainty about the logical resource allocation of GPIO pins when the Enocean Pi is in use.

perplexabot
Gold Member
Messages
328
Reaction score
5
Hello all! Let me get straight to the point. I will be using the Raspberry Pi and the Enocean Pi 902 along with some other components.

My problem is due to the fact that the Enocean Pi 902, when plugged to the Raspberry Pi, completely uses all the pins. If I only wanted to use the Enocean Pi this would not be a problem. But I need at least one pin for other purposes! The way I see it there are two solutions:

  1. Use a shift register (parallel in serial out)
  2. Use another microcontroller (mc) with wifi capabilities to communicate with the original microcontroller.

The problems with these solutions:
  • Using a shift register
    • I feel like this may require a bit of work. Everyone knows, less work is better : )
    • I would need to introduce a clock (if I am not mistaken) and this will add complexity
  • Using another mc
    • It would be overkill (too much computing power for my needs).
    • Costly! Too expensive when compared to the job it will be doing (assuming I buy another RaspPi and a wifi dongle).

Does anyone have any suggestions or ideas? Are there any mc's that are simple, inexpensive and have the ability to connect to wifi?

EDIT: This may be kind of off topic and for that I apologize. If I do get an answer, regarding what I will ask in this edit, I will open a new thread specifically for it. Has anyone used an Enocean pi (Because I have a couple of questions)? Believe it or not, I tried to go to the enocean forums and it turns out you need a paid membership in order to post! This is wrong in so many ways. Nice job restricting the proliferation of knowledge enocean!
 
Last edited:
Engineering news on Phys.org
I think it comes down to how many thousand you need to manufacture. Maybe it is time to stop playing with educational toy blocks and actually engineer an economic solution.
 
Baluncore said:
I think it comes down to how many thousand you need to manufacture.
Manufacture? I am using this for a senior design project!

Baluncore said:
Maybe it is time to stop playing with educational toy blocks and actually engineer an economic solution.
Educational toy blocks? This is for educational purposes!


I sincerely thank you for your time and effort that went into this reply; however, I can't help but feel that your answer contains no practical suggestions or ideas.

Is this your way of trying to win that $75 gift card?

Anyone else have any suggestions?
 
Do you have a spec sheet for the enocean? If it uses I2C or SPI then you may have a way out. Those protocols can be daisy chained.

Do you have a lab with a Pic programmer? You can get a fast Pic12 for like 2 bucks. The nice thing about RPi is that you can install the I2C functionality for its Linux version then send commands to an mc using command line scripts in linux. You just open a linux shell in your program (Java or C) and you'll have a way to communicate.

Another possibility would be to get an mc with lots and lots of I/O pins. Pretty much any mc would have the I2C interface. You could use it like a port expander.

This all depends on what the Enococean software does inside the RPi. If it grabs the entire GPIO resource and doesn't share then I wouldn't be sure how to get around it.

An mc solution really isn't overkill. They're cheap and there's plenty of free IDE's to program them. You can get code samples to use as a starting point. The main holdup would be the programmer and programming circuit. The Pic programmer runs about $60 US. You can build a programming circuit on a breadboard.

Did I mention that I like Pic's? They're pretty neat. They generate the clock internally. That means you hardly need any components at all. You need a pull up resistor for each I2C pin, a few decoupling capacitors, programming resistors (optional for in-board programming), and you're done.

By the way, I've worked with the RPi before. Are you already using the P5 header? There's an unmounted header there that you can solder underneath the board. It will give you 4 more GPIO pins or one I2C interface and 2 GPIO pins.
 
Last edited:
  • Like
Likes   Reactions: 1 person
perplexabot said:
Manufacture? I am using this for a senior design project!


Educational toy blocks? This is for educational purposes!


I sincerely thank you for your time and effort that went into this reply; however, I can't help but feel that your answer contains no practical suggestions or ideas.

Is this your way of trying to win that $75 gift card?

Anyone else have any suggestions?

He was just trying to be helpful -- you did not state in your OP what your goal was. My company is starting to use the R-Pi for a moderate-volume application, for example, so I had a similar response to your OP until I saw your "school project" reply.

Can you use the USB connection for an IO expander?
 
  • Like
Likes   Reactions: 1 person
Sorry for the late reply! Have been googling some of the info in the previous replies!
Wooow! So much information. Thank you!

Okefenokee said:
Do you have a spec sheet for the enocean? If it uses I2C or SPI then you may have a way out. Those protocols can be daisy chained.
I am not too familiar (if at all) with communication protocols. Yes, I do have the data sheet (along with the user manual). I believe it uses UART as the serial protocol

[EDIT: actually after a bit of reading I think the protocol is something called ESP3! stands for enocean serial protocol 3. Just wanted to clarify!].

I did some research on daisy chaining and this technique seems pretty cool! I don't think this will work however, I may have needed to state that the components that need the extra pins are not mc's but components such as solenoid valves and leds (not so sure what such types of components are called, maybe passive components?). Either way I now know about daisy chaining and that is awesome.

Okefenokee said:
Do you have a lab with a Pic programmer? You can get a fast Pic12 for like 2 bucks. The nice thing about RPi is that you can install the I2C functionality for its Linux version then send commands to an mc using command line scripts in linux. You just open a linux shell in your program (Java or C) and you'll have a way to communicate.
I have no experience with PIC whatsoever. It wasn't until now that I found out that this is a mc! How embarrassing. Are you saying I can daisy chain the PIC mc with the enocean PI (assuming it is I2C or SPI)? I guess that would be a cheaper approach and probably more practical, the down side being I have no experience with I2C communication protocol.

Okefenokee said:
Another possibility would be to get an mc with lots and lots of I/O pins. Pretty much any mc would have the I2C interface. You could use it like a port expander.
I am not so sure I can use another mc (unless hacks are use) since the enocean pi is made specifically for the RPI.

Okefenokee said:
This all depends on what the Enococean software does inside the RPi. If it grabs the entire GPIO resource and doesn't share then I wouldn't be sure how to get around it.
I am not so sure. Physically, yes, it does use all the P1 header pins on the RPI. Logically, I am no so sure, I assume that since it attaches to all the pins, it does use all of them (not sure though).

Okefenokee said:
An mc solution really isn't overkill. They're cheap and there's plenty of free IDE's to program them. You can get code samples to use as a starting point. The main holdup would be the programmer and programming circuit. The Pic programmer runs about $60 US. You can build a programming circuit on a breadboard.

Did I mention that I like Pic's? They're pretty neat. They generate the clock internally. That means you hardly need any components at all. You need a pull up resistor for each I2C pin, a few decoupling capacitors, programming resistors (optional for in-board programming), and you're done.
I guess you are right. I was thinking it was overkill if I got another RPI and a WIFI dongle. But your PIC mc along with the I2C protocol suggestion seems to be pretty well balanced for the job. The problem with this though is that I have no experience with PIC or I2C. I would love to learn about them (and I hope I will in my spare time), but with the 10weeks I have to complete this project and the lack of man power (only I am working on this project), this approach is scary! I am not so sure I will be able to complete all the project.

Okefenokee said:
By the way, I've worked with the RPi before. Are you already using the P5 header? There's an unmounted header there that you can solder underneath the board. It will give you 4 more GPIO pins or one I2C interface and 2 GPIO pins.

NOWAY! I DID NOT KNOW ABOUT THIS! This may have fixed all my problems. So simple!
Thank you so much, you have helped me in so many ways! I now know about daisy chaining, PICs and a little about I2C and SPI. AMAZING!


berkeman said:
He was just trying to be helpful -- you did not state in your OP what your goal was. My company is starting to use the R-Pi for a moderate-volume application, for example, so I had a similar response to your OP until I saw your "school project" reply.

You are right. I am sorry for my rude reply Baluncore : ( I thought you were trying to be offensive...

berkeman said:
Can you use the USB connection for an IO expander?
I just researched USB IO expander! WOW! I didn't know these things existed. I wonder how they are used? I will need to research these in my free time. Definitely good to know! Thank you Mr.Berkeman, as always.

Physics forums is awesome (this is no surprise).
 
Last edited:

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 18 ·
Replies
18
Views
9K
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
15K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 11 ·
Replies
11
Views
8K
  • · Replies 4 ·
Replies
4
Views
5K