What to do when there are no pins left

  • Thread starter perplexabot
  • Start date
In summary, the Enocean Pi 902 uses all of the pins on the Raspberry Pi when it is plugged in. There are two possible solutions to this problem: using a shift register or using another microcontroller with wifi capabilities. The problems with these solutions are that they require work and are expensive.
  • #1
perplexabot
Gold Member
329
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
  • #2
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.
 
  • #3
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?
 
  • #4
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
  • #5
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
  • #6
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:

What should I do when there are no pins left?

1. Why are there no pins left?

There could be multiple reasons why there are no pins left. It could be due to high demand and low supply, or it could be that the pins have been discontinued.

2. Can I use something else instead of pins?

Yes, you can use alternative materials such as paperclips, bobby pins, or even toothpicks as temporary substitutes for pins.

3. How can I prevent running out of pins in the future?

You can stock up on pins by purchasing them in bulk or keeping a spare set in your workspace. Additionally, you can recycle and reuse pins to prolong their lifespan.

4. What can I do if I need a specific type of pin that is no longer available?

You can try reaching out to the manufacturer or search for similar pins from other brands. You can also consider using a different type of fastener that serves the same purpose.

5. Are there any alternatives to using pins for my project?

Depending on your project, there may be alternative methods such as sewing, gluing, or using adhesive tape. Consider the materials and purpose of your project to determine the best alternative.

Similar threads

  • Electrical Engineering
Replies
18
Views
7K
  • DIY Projects
Replies
5
Views
2K
  • Electrical Engineering
Replies
7
Views
14K
  • Electrical Engineering
Replies
10
Views
5K
Replies
1
Views
1K
  • Electrical Engineering
Replies
4
Views
2K
Replies
5
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
13K
Replies
2
Views
1K
Back
Top