DevMiser / Bird-Sweeper

The Bird Sweeper chases birds away but does not hurt them. It is an effective and humane bird deterrent.
MIT License
17 stars 1 forks source link

the scheme of bird sweeper #1

Open DimaNi4BlackMetal opened 2 weeks ago

DimaNi4BlackMetal commented 2 weeks ago

Hi. I have a couple a questions corresponding to your wonderful project of Bird-Sweeper. In your breadboard you show the connections of sensor and relay are connected with black and and red wires. Is red of the sensor should be the same potential as the red of the relay and the same for the black wire and actually the Raspberry Pi Model 3 A+ ? Because as it seems from the breadboard connections it looks like there is no connections between them. The orange connections of the sensor- is this output connection? As I understand the red connection from the Raspberry it's 3.3V and the black its a ground, right?

Screenshot from 2024-10-08 21-49-29

However other connections from Raspberry looks confusing according the description and according your writings; according the connection diagram : green wire connection-pin N12, orange wire- N15 and the violet is N22; but according the description is not the same.

And the Power Bank connection. Can I use another power bank to power up the Arduino? is that necessary 24800mAh?

Thank you very much.

Do you think this sensor is good enough? https://www.aliexpress.com/item/1005005140420875.html?spm=a2g0o.productlist.main.9.54d05ATf5ATfwK&algo_pvid=f5abf0b4-6203-40ba-817a-07866e0fe987&algo_exp_id=f5abf0b4-6203-40ba-817a-07866e0fe987-4&pdp_npi=4%40dis%21ILS%213.73%213.73%21%21%210.96%210.96%21%402140fc6217284065453203283e6d51%2112000031823233088%21sea%21IL%21168900973%21X&curPageLogUid=ZjC8g85gpJ67&utparam-url=scene%3Asearch%7Cquery_from%3A#nav-specification

And the servo? I guess this is the same one... https://www.aliexpress.com/item/1005007558164952.html?spm=a2g0o.productlist.main.9.3d235960ZwPoYg&algo_pvid=b7013acc-d963-469a-8d2b-4c2c7de019e4&algo_exp_id=b7013acc-d963-469a-8d2b-4c2c7de019e4-4&pdp_npi=4%40dis%21ILS%2147.07%2147.07%21%21%2112.13%2112.13%21%40214100e417284143162494276e654c%2112000041287035487%21sea%21IL%21168900973%21X&curPageLogUid=33xGniQTsfcC&utparam-url=scene%3Asearch%7Cquery_from%3A

and relay module? https://www.aliexpress.com/item/1005005800865458.html?spm=a2g0o.productlist.main.9.783860f9lcLM21&algo_pvid=c436e125-e930-4801-9638-38cfb6f3d6d4&algo_exp_id=c436e125-e930-4801-9638-38cfb6f3d6d4-4&pdp_npi=4%40dis%21ILS%211.63%211.55%21%21%210.42%210.40%21%40210133e517284108962428747e345c%2112000034397510016%21sea%21IL%21168900973%21X&curPageLogUid=2wwZFjA1r4GA&utparam-url=scene%3Asearch%7Cquery_from%3A

DevMiser commented 2 weeks ago

Hi and thank you for your questions. You are correct that the red wires are positive (3.3v) and the black wires are ground. The way a breadboard works is that the two top rows and the two bottom rows in between the blue and red lines are connected across the entire horizontal length of the breadboard. So they are indeed connected as you would expect. You are also correct that the orange wire from the sensor is the sensor output. On a breadboard, the other columns are connected vertically. That means the two orange wires are connected to each other, as are the two purple wires and two green wires. The breadboard shows the wiring, but if you make this you can just connect the wires directly instead of using a breadboard. You can use any compatible Power Bank - just note that you are connecting it to a Raspberry Pi instead of an Arduino. The mAh of the Power Bank will impact how long you can run the Raspberry Pi before recharging. The parts in the links you provided look like they should work, but I cannot know for sure since I have not used those exact parts. Enjoy the build!

DimaNi4BlackMetal commented 2 weeks ago

Thank you very much. I still have a questions about the servo,relay and sensor connections. Green in your description (servo_pin=22) is connected to pin 12, orange (senor_pin=18) to 15 and violet (relay_pin=25) to 22. Screenshot from 2024-10-09 10-30-41_1

So what is the right connections? GPIO Pin Nos.: is not the same as depicted in picture with the breadboard.

Thank you.

DevMiser commented 2 weeks ago

You are welcome. There is a difference between pin numbers and GPIO (General Purpose Input/Output) numbers on a Raspberry Pi. GPIO numbers are most often use in the Python code to interact with the pins. If you look at the diagram of the Raspberry Pi you provided in your first message, you will see for example that the physical pin 22 (the number in the circle) is also labeled right next to it as GPIO 25. The purple wire you labeled above as 22 is the physical pin number and the GPIO number is 25. GPIO 25 controls the relay in my Python program. Of course, you can use other pins if you prefer and make the corresponding change in the code.

DimaNi4BlackMetal commented 2 weeks ago

Dear DevMiser,

Thank you very much for your patience and detailed explanations.

Now I guess I can do it. ;)

Thank you very much again.