Okey, my misunderstanding. That’s a god way to make connections.
It looks like only the logic part of the relay modules are connected to that controller 5 volt. That’s okey.
I wish You could make a conventional wiring diagram. Magnifying Your Fritzing blurrs out the text. Fritzings are stuff used by sails people and use less for engineering.
You write “use the Pc supply”. What is that? Volt, Amps…
Okey, my misunderstanding. That’s a god way to make connections.
5VC on the power supply you know when the computer power supply has 3.3v , 5v and 12v
I use 12v from the computer power supply for the electromagnet and 5v for the output of the relay the input is from the arduino controller
Please use pen and paper and make a little drawing for the power lines. The poetry way is way to unclear, unprecise.
Feeding 12 volt to the controller and using the internal 5 volt converter is bad practise. Maybe You can pull 20 mA from that 5 volt pin, but not much more.
okay, I will try to use pen and paper, and do it precisely.
Even though most PC’s doesn’t enforce it, that’s actually with negotiation. 100mA what you should expect without.
Using the computer USB power supply is a good way to do some permanent damage or at the very least, crash your computer, especially when tinkering around with high currents or potential shorts.
Don’t rely on the computer innards to shut down gracefully.
If you can, supply external circuitry in the testing stage from a bench power supply where you can limit the current.
It’s not just the limit on individual output pins, but take into consideration the maximum load on the MCU as a whole.
If you are lucky, you get to burn out some tracks and components on the Arduino board.
Ideally, keep Arduino board away from external stuff with higher currents or higher voltages.
Check out Ruggeduino to see how to protect your boards.
let me explain first this part…
on the right side I have a power supply (from old computer 300-400W), I am taking a 12V output from the power supply and giving the supply to the relay COM port… Then I am giving a NO contact to the VCC contact of the Solenoid Lock, after that I take GND from the power supply and connect it with the GND of the Solenoid Lock…
then I put the SOURCE on PIN 12, then I connect both GND’s of the relay and the fingerprint scanner into a tile like the picture above with solder, then I solder also the 5V pins from the relay and the fingerprint scanner into a 5V pin from the arduino board, I connect RX pin on pin 3 and I connect TX pin on pin 2
so here’s the full thing…
RELAY USED ON THE PICTURE…
COM PORT to 12V (COMPUTER POWER SUPPLY)
NO PORT to VCC (SOLENOID LOCK)
GND (SOLENOID LOCK) to GND (COMPUTER POWER SUPPLY)
VCC PORT (RELAY) SOLDERED WITH VCC PORT (FINGERPRINT) IN 5V ARDUINO PIN
GND PORT (RELAY) SOLDERED WITH GND PORT (FINGERPRINT) IN GND ARDUINO PIN
SOURCE PORT (RELAY) IN 12 ARDUINO PIN
FINGERPRINT RX IN 3 ARDUINO PIN
FINGERPRINT TX IN 2 ARDUINO PIN
going to do the rest of the drawing.
second part is this, when I connect only the relays for the motor…
I am combining relay 1 and relay 3 with soldering the wires and then they go to arduino pin 11
also combining relay 2 and relay 4 with soldering the wires and then they go to arduino pin 10
combining the VCC from all 4 relays into one wire with soldering then connecting the wire to the VCC arduino pin
combining the GND from all 4relays into one wire with soldering then connecting the wire to the GND arduino pin
S → ARDUINO PIN 11
VCC → 5V ARDUINO PIN
GND → GND ARDUINO PIN
S → ARDUINO PIN 10
VCC → 5V ARDUINO PIN (COMBINED WITH VCC RELAY 1&3)
GND → GND ARDUINO PIN (COMBINED WITH GND RELAY 1&3)
Pc supply was a scrapped/reused one… I would never guessed that.
I think You mixed up the +5 and GND from the controller out to the other stuff. Never mind.
Please don’t write a lot of text, pins and voltages criss cross. It takes a lot of time and it forces me to make a drawing inside my head. How You use the stuff in the wiring, the logic, is secondary.
In my opinion the best is to wire all 5 volt lines from the power supply. Else You get “circles”, unnecessary currents being on a sea side trip.
I guess that the controller gets 5 volt somewhere and that should be shown in the wiring.
Your second picture was hit by the knife at the lower end.
I don’t find any obvious fault yet.
We’ll keep on.
You haven’t shown a 5 V power supply connected to power the relays themselves and the Arduino.
the way the pencil drawing is laid out, it looks like the relays get power from the 5V of the Arduino.
a picture of the relays would reassure us that you don’t have some 5v and some 12v relays.
also, you show relays, not relay modules.
your first schematic seems easier to follow with color lines, but that too shows the relay and 5v power from the Arduino.
this is dangerous as your Arduino could burn up from overload or kill a chip, or just not work.
the preferred ways is to use the external 5v from the power suppl to the relay board, power and ground.
then connect the Arduino ground and siganls to the relay modules.
Look like relay modules to me - three wires!
But the Arduino cannot supply 5 V power for relays! That’s why I asked - is he connecting 5 V power to the relays, and might as well use it to power the Arduino as well.
To make you code more readable, use pin names that describe their function,
int a=12; int b=11; int c=10;
int doorlatchPin=12; int dooropenPin=11; int doorclosePin=10;
Also in the IDE press CTRL T
It will auto format your code and make it easier to read.
THIS IS AN IMPORTANT BIT;
To add code please click this link;
You can also bump up the monitor speed too.
Third and last…
I am connecting Relay 3&4 COM to GND (Computer Power Supply) via connectors
I am connecting Relay 1&2 COM to 5V (Computer Power Supply) via connectors
I am connecting Relay 1 NO & Relay 3 NC to one pin of the motor (via soldering)
I am connecting Relay 2 NO & Relay 4 NC to another pin of the motor (via soldering)
Also the solution was… one of the relay wasn’t working quite good,I tried changing it and now it works… and about the arduino input its via 6 battery holder approximately 7.4v with the 1.2v batteries.
Thanks in advance to everyone trying to teach me new stuff, I am still young 18y/o… I can do it better next time with this help… when the project is fully I will do a short video about the work I’ve been doing.
Your drawing is not bad… obviously it helped the guys address your questions.
Try as hard as you can to expose the images properly, and if you want to move on in electronics design, read up on schematic layout.
Good practice has signal flowing from left-to-right, and current flow from top to bottom.
This as much for future repair & troubleshooting, as it is for initial development.
That’s a total disaster!
Any glitch in the relay operation will short out the 5 V computer power supply!
I didn’t look at it earlier, but that is a terrible blunder!
You need two relays, not four. The commons of the relays go to the two motor wires. The NC of both relays goes to ground and the NO of both relays goes to 5 V.
Please fix this mistake before going any further.
You can FWD/REV with two relays and safely so you cannot short the supply.
I hope this helps…
That’s a nice diagram - I’m saving that!