"Houston, we have a problem"...
Just as an aside, and before I try to provide some answers, I should tell you I am really NOT very keen on troubleshooting project designs and blog posts that people drag into this forum. I think @joan's comment above reflects a similar sentiment. Why do I say this - why do I feel this way? I feel that if you're following a project recipe that someone has taken the time to build and post in their blog, the author of that recipe/blog should be your first stop for questions.
That said, I have partially read through the article/blog post you referenced, and my intuitive (aka System 1) reaction is that it's a waste of time. But again, this is my intuitive/System 1 response, with very little System 2 resourcing applied. I base my opinion on the following, all gleaned from the article/blog post:
- The author writes, "I’m no expert in electronic engineering, but nothing has caught on fire yet so I think it’s doing good enough for a prototype..." Hmmm...
- RPi GPIO pins are rated at 3.3v, but the solenoids used in the project are 5v
- The author mentions he adapted the design from one done for an Arduino (and Arduino does have 5V IO IIRC)
- A fritzing diagram is used instead of a proper schematic (Note - I don't like fritzing diagrams, but this is a personal bias)
So, this is the basis for my snap judgment. Again, no offense meant to the author, or anyone else, it's just my opinion. And the circuit may actually work after a fashion, but that doesn't mean it's a sound design.
To answer your questions:
I don't think it's generally a good idea to source power for a project like this from the RPi's 5V pin - so yeah,
scary would cover that.
The solenoids appear to be driven by the 3.3V GPIO pins, which is odd since they're 5V solenoids. I didn't see any specifications on the solenoids, so I can't say how their current requirement compares with GPIO limits. Also note that the absence of any specifications for the solenoids may have something to do with the fact that the author is offering to sell them on his website. I don't care for this sort of marketing (again, a personal bias).
And finally wrt your question re powering "a very small (3V) solenoid directly off the RPi (using a diode for safety, of course)?":
I'm not sure I get your question exactly... I think you could power a 3V solenoid directly from a RPi GPIO pin as long as you placed an appropriate current limit on the pins (individually and collectively). When you mention the protection diode though, are you thinking of arranging it as a "freewheeling diode" to eliminate the
L*di/dt "inductive kick" from turning the solenoid "OFF"? If so, then "Yes" again.
In summary then, I'm not at all sure the project you've found is a good one to start with. It's a very nice idea, but IMHO, seems to be lacking in execution of the design. That said, if you're keen on doing a project like this, we're happy to help. My suggestion is to break it down into smaller steps, experimenting as you go, and asking specific questions on points that aren't clear (like your question re the solenoid).
P.S. Here's a link to what seems to be a decent summary of RPi's GPIO system. You may wish to read it as you ponder your path ahead.