pcmanbob
Posts: 2020
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: L293D troubleshooting for IR camera cut control

Tue Nov 14, 2017 1:43 pm

Yes you are correct with the change of pin number.

from what I can see you code should work but I don't use gpiozero so I am not familiar with its use.

one point to be aware of you don't have a ground connection from the relay board control side back to the pi, now it may be grounding back through your power bank, but if you change that things might change, so just be aware you may need to add a ground connection.

Image
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help

physis
Posts: 7
Joined: Sun Oct 29, 2017 7:41 am

Re: L293D troubleshooting for IR camera cut control

Tue Nov 14, 2017 5:33 pm

Ah great. I will try to figure out if the code could work making a new post in a different section of the forum. Thanks for your help. :)
After having everything working properly I will post here the final circuit and the code.

Just a last thing, I’m not sure if I understand why do a I need to ground the relay to the Pi. Do you mean, ground it just in the case I change the configuration to supply energy to the IR Light System from a separate source? If I reproduce the circuit I show you in the real world everything will work proper, right? Or do I need ground the relay from Pi anyway?

pcmanbob
Posts: 2020
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: L293D troubleshooting for IR camera cut control

Tue Nov 14, 2017 7:35 pm

You need an earth return because the signal high/low goes from the gpio out pin to the relay and has to get back to its source via the ground.
Now while you may have a ground via you power bank you may not and you might not if you changed things.
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: btidey and 25 guests