What to do when there are no pins left

  • Thread starter Thread starter perplexabot
  • Start date Start date
AI Thread Summary
The discussion centers around the challenge of using the Enocean Pi 902 with a Raspberry Pi, which occupies all GPIO pins, leaving no pins available for additional components. Suggested solutions include using a shift register or another microcontroller with Wi-Fi capabilities, though both options present their own complexities and costs. Participants discuss the potential of using I2C or SPI protocols for daisy chaining, as well as the possibility of utilizing an unmounted header on the Raspberry Pi to gain extra GPIO pins. The conversation highlights the importance of understanding communication protocols and the availability of inexpensive microcontrollers like PICs for expanding I/O capabilities. Overall, the thread emphasizes collaboration and knowledge sharing to solve technical challenges in projects.
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 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 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:
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...

Similar threads

Back
Top