PIR to Gemma v2?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
PIR to Gemma v2?
I'm a newbie. With Gemma v2 I can control Flora RGB Smart NeoPixels running with battery power. I want to initiate power to the NeoPixels with the adafruit PIR. Do I need to use a MOSFET? Or what? I tried to go battery to PIR to Gemma but it won't work so I'm guessing I need an additional component. I hope this makes sense. Thanks.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: PIR to Gemma v2?
The basic idea of using the PIR sensor:
https://www.adafruit.com/product/189
is to read it via a digital input. The output of the sensor is 3.3V, so you can connect it directly to one of the digital inputs of the GEMMA. However, it needs 5V power. You can get this off the VOUT pin if you're running from USB. For running off battery, VOUT will be the battery voltage, so need you'd need to figure out how to make that be 5V.
https://www.adafruit.com/product/189
is to read it via a digital input. The output of the sensor is 3.3V, so you can connect it directly to one of the digital inputs of the GEMMA. However, it needs 5V power. You can get this off the VOUT pin if you're running from USB. For running off battery, VOUT will be the battery voltage, so need you'd need to figure out how to make that be 5V.
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
Well, I haven't been able to understand/figure out how to get 5V out the VOUT running with batteries.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PIR to Gemma v2?
What kind of batteries are you using? A 3xAA pack is 4.5v, which is close enough to 5v for the PIR. If you are running from 3.7v LiPo, then you may need to use something like a PowerBoost 500. https://www.adafruit.com/product/1903
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
Thanks. I will order and try both. And then I'll be back to report (my success I hope).
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
From batteries regardless of 5v or 7v, the output of the PIR is 1.46 to the PowerBoost 500 that then ups the output to 2.46. Is that all I can expect? This still obviously won't drive the Gemma or Circuit Playground (which is what I'm trying to do). Help please. Thanks.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PIR to Gemma v2?
2.46v is a logic HIGH to a 3.3v processor like the Gemma. So that should work fine.
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
I should not have said "obviously" as nothing is obvious to me in this domain. Thanks for that. Now I see that I can get power to the Gemma as the green light is on. My new problem is not being able to provide enough power to a NeoPixel from the Gemma; I only get 1.86 out of the Gemma.
It seems the problem I'm facing is the low output from the PIR even with the Powerboost. Is there something else I should be doing to the PIR output to get more power? Will a simple shortening of the wiring help? I'm using alligator clips now. Or what?
With my very limited understanding, I'm about to give up. I can provide the necessary power to the Gemma directly via battery. I simply thought inserting the PIR in between battery and Gemma would be easy. Woe is me. Thanks again.
It seems the problem I'm facing is the low output from the PIR even with the Powerboost. Is there something else I should be doing to the PIR output to get more power? Will a simple shortening of the wiring help? I'm using alligator clips now. Or what?
With my very limited understanding, I'm about to give up. I can provide the necessary power to the Gemma directly via battery. I simply thought inserting the PIR in between battery and Gemma would be easy. Woe is me. Thanks again.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PIR to Gemma v2?
Are you trying to power the Gemma from the PIR? That will not work. The output of the PIR is a logic signal. It is not a power source. You need to connect the PIR output to a digital pin on your Gemma and read it in your program.I simply thought inserting the PIR in between battery and Gemma would be easy.
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
OK. Well, I wish I knew that; I don't know enough to have known that. I'll look into the "digital pin" solution and how I can "read that into" my program. If there is an easy pointer to this, I'd appreciate that. Otherwise, I'll try to bumble my way through. Thanks again.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PIR to Gemma v2?
Here are the Gemma pinouts. You can connect it to D0, D1 or D2 - whichever is free.
https://learn.adafruit.com/introducing-gemma/pinouts
And this is how you read a signal from a digital pin.
https://www.arduino.cc/reference/en/lan ... gitalread/
If you provide us with more information like the code you are using and a photo showing all your connections, we can probably offer more specific advice.
https://learn.adafruit.com/introducing-gemma/pinouts
And this is how you read a signal from a digital pin.
https://www.arduino.cc/reference/en/lan ... gitalread/
If you provide us with more information like the code you are using and a photo showing all your connections, we can probably offer more specific advice.
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
Thanks for the pointers. At this point, I don't have a program as I'm stuck at trying to power up the Gemma to light up Neo Pixel. If/when I get to that point after digesting your pointers, I'm sure I'll be back. Thanks again.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PIR to Gemma v2?
Just connect it to your battery. Then write a program to read the PIR signal and light up the Neopixels when it turns on.I'm stuck at trying to power up the Gemma to light up Neo Pixel.
- btrnuthatch
- Posts: 18
- Joined: Fri Sep 01, 2017 6:13 pm
Re: PIR to Gemma v2?
Sorry, I meant "stuck trying use the PIR to power up the Gemma to light up NeoPixels." I can make the Gemma work with NeoPixels without the PIR. Sorry if my post was confusing.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: PIR to Gemma v2?
The PIR is not a power switch, so it can't power up anything like the Gemma without additional circuitry. You could use the PIR output to turn on a transistor to switch power to the Gemma.
Please be positive and constructive with your questions and comments.