Looking for advice on attached Fritzing diagram please

Hi everybody, just to forewarn you all, complete beginner here... still have to google the definitions of things like capacitors, transistors and transformers just to remember the differences... ::slight_smile:

I have just completed my first Fritzing diagram on my way to starting my first Arduino project, which will be an automated chicken coop and I was just hoping to get a knowledgable set of eyes on it to warn me if I've done something really wrong and to hopefully answer a few more specific questions. I've borrowed a lot of this from someone else who was kind enough to share their work and have been working at modifying it to suite my needs. If it is helpful or appropriate I can post the website, not sure what the etiquette is for that, so please just let me know...

In the attached diagram I've got two 2 relay modules side by side... in reality I've got a 4 relay module, but I couldn't find a Fritzing part diagram for that so I used the two double modules, which is why you'll see only one ground and 5v input. Anyways, I've never really used relays before and since i'm using them to control 120v AC devices, I was just hoping somebody could let me know if i've got everything right. One area that I'm especially unsure of is whether or not it is ok to have 3 of the relays controlling 120V AC and the fourth relay controlling 12V DC? Also, I don't fully understand what the JD-VCC terminal is for and whether or not I should be using it since i'm controlling two different power supplies (12V DC and 120V AC)?

Another concern I have is whether or not I should be using inline fuses and/or diodes and if so, where? or pull up or pull down transistors?

You'll also notice I've used a dual H bridge L298N motor controller in the diagram, I've only done this because that was the product used in the project I'm attempting to work off of and I haven't purchased it yet so I was hoping someone might let me know if I should be looking for a different controller or if this is appropriate for this project. It operates a small 12v DC motor that will turn one direction to lift open a small door and then reverse to let it drop, thus closing the door.

A future goal will be to add wireless functionality so that i can monitor the systems from my smartphone. I've got the ethernet shield, but have been busy just trying to learn the basics to get me started, so I haven't researched that aspect much yet. I just wanted to mention this in the event that something in the current plan might cause issues for phase 2 and maybe someone would be kind enough to bring that to my attention so that i can have a better shot of getting it right the first time!

Also, I'm still very new (as of this am) to Fritzing, and it's telling me that there is still 1 connection left to be routed, but I can't see it and when i click on that message, it says "there are no unrouted connections in this view" is this normal? Does it have anything to do with the relay modules not being diagramed totally correctly? I tried connecting the empty pins to the breadboard, but no change...

And finally, I spent the better part of the morning researching power supplies as my first thought was i could use 12V to power the Arduino and the rest of my 12V devices, but the impression I got from everything I read seemed to advise using a separate 9V supply for the Arduino. So you'll see a separate 9V supply for the Arduino in the diagram and I was just hoping someone could confirm that I've interpreted things correctly and this is a better route to go... The 12V devices are a small motor (from China) that is: Rated Current : 0.02A ( no load ), and a small water pump (also from China) that is Max rated current: 400mA. The 12V DC power adapter I have says it outputs up to 2A and the power supply for the Arduino is actually a multi adapter that says it outputs 12VDC x 500mA... interestingly this adapter has different setting options so I could select 3, 4.5, 6, 7.5, 9, or 12 Volt output... I don't know if that is helpful info or not, but I thought I'd throw it in just in case. Sorry that this tuning into a short novel! Those are all the questions I have and I very much appreciate any advice.

I just discovered the Fritzing diagram is not a supported file type so I've attached a jpg... it still seems pretty readable if you zoom in though.

Thanks so much,
Joe

(At the time of writing, the picture hasn't come through due to the 5 min limit for newbies)

Without even seeing the diagram I can tell you not to use Fritzing. If you can't find the correct prt to show us what you actually have then you are wasting everyone's time. Use a proper program like Eagle. It's free too.

Thanks MorganS, I'll look into Eagle right away! In the meantime though, if the attachment ever shows up the main concern is if my "logic" is correct in terms of the 120V AC and the 12V DC.

Thanks,
Joe

Even a hand drawn schematic is better than Fritzing.

jremington:
Even a hand drawn schematic is better than Fritzing.

Yep, and it doesn't have the steep learning curve of 'Eagle'.

@jbaich, you'll need to try again - that attachment isn't going to suddenly appear now. Maybe it was too big.
(And as mentioned, a schematic would be far better. Fritzing is fairly useless by comparison.)

Hey all, thanks for the replies. I’ve tried to upload the image again with this post, since I already have it done and after a brief look at Eagle, I figure it’ll take me about 10 years to figure out how to redo this in that program :slightly_frowning_face:

Any thoughts on my question regarding the etiquette of linking to the site that started me on this project? would it even be helpful to see where i’m trying to get to?

Thanks again,
Joe

Here’s the actual relay module that I have if this is helpful at all…

relay module.png

jbaich:
I've tried to upload the image again with this post, since I already have it done and after a brief look at Eagle, I figure it'll take me about 10 years to figure out how to redo this in that program :slightly_frowning_face:

It's a very good example of why none of us like Fritzing diagrams. No pin labelling, hard to follow, some components aren't even connected and there are obvious errors. One end of one of the resistors isn't even connected to anything. Perhaps that's the "still 1 connection left to be routed" that you mentioned.
Actually, one end of each of two resistors isn't connected to anything.

I for one won't even try to figure it all out. If 'Eagle' is too steep a learning curve right now, why not take our advice and hand-draw a schematic diagram, clearly labelled so we can see what's going on? You've totally ignored suggestions to do this. Not everything has to be done using software.
Having said that, I personally use MS Paint for my schematics, but not everybody has the patience for that.

Any thoughts on my question regarding the etiquette of linking to the site that started me on this project? would it even be helpful to see where i'm trying to get to?

There are no rules restricting links to external sites. That's why there's an "Insert a link" button at the top of the "Reply" window.

Edit: I just noticed that one of the reed switches has both ends connected to ground. I suspect that it might not work like that. :slight_smile:

jbaich:
after a brief look at Eagle, I figure it'll take me about 10 years to figure out how to redo this in that program

I found ExpressSCH muuuuuch simpler.

But as others have said, nothing wrong with pencil, paper and cellphone camera.

sorry about the confusion, I haven't intentionally ignored your suggestions, it took me hours to do that Fritzing thing and that was with most of it already there for me to drag and drop...I literally don't know how to draw a schematic from scratch with all the symbols and stuff... I thought my initial sentence in the first post was good heads up about my limited knowledge and experience in this field.

I looked at some of the tutorial examples in eagle and its a total foreign language at the moment. I'll keep at it though. Thanks JimboZA for the suggestions on ExpressSCH, I'll check that out too.

Here's a link to the project I'm attempting to build off of... Arduino chicken coop

I actually did label most of the pins, but that doesn't show up in a jpg... I had expected Fritzing diagrams to be a little more relevant and uploadable. Anyways, thanks everyone for looking and have a great night.

Cheers,
Joe

jbaich:
sorry about the confusion, I haven't intentionally ignored your suggestions, it took me hours to do that Fritzing thing and that was with most of it already there for me to drag and drop...I literally don't know how to draw a schematic from scratch with all the symbols and stuff... I thought my initial sentence in the first post was good heads up about my limited knowledge and experience in this field.

I looked at some of the tutorial examples in eagle and its a total foreign language at the moment. I'll keep at it though. Thanks JimboZA for the suggestions on ExpressSCH, I'll check that out too.

Here's a link to the project I'm attempting to build off of... Arduino chicken coop

I actually did label most of the pins, but that doesn't show up in a jpg... I had expected Fritzing diagrams to be a little more relevant and uploadable. Anyways, thanks everyone for looking and have a great night.

Cheers,
Joe

Sorry Joe. I've been looking for this page and only just found it. It should help you with schematic drawing:-
How to Read a Schematic

Also if you Google "schematic symbols" you'll get heaps of results.

Here is a bit more on schematics.

Ok, here we go… question attempt number 2 with first ever attempt at a schematic instead of a fritzing diagram… see attached.

Basically the same question… I feel like this configuration will be the foundation of the project and I will be attempting to add more stuff from here such as wireless network functionality, LCD display, and I’m hoping to add some LED indicator lights that let me know what the status of the systems attached to the relays are, but I need to do some more research to figure out how to do that with 120V AC running through the relays… But for right now, can anyone spot anything catastrophically wrong with what I’ve got so far? Should I be adding fuses and/or diodes anywhere for safety reasons?

Also, if there are issues with this schematic (it is my first try…) please let me know and I will try not to repeat mistakes in the future.

Thanks,
Joe

jbaich:
… after a brief look at Eagle, I figure it’ll take me about 10 years to figure out how to redo this in that program :slightly_frowning_face:

I guess you fancy yourself a fast learner !

jbaich:
Ok, here we go... question attempt number 2 with first ever attempt at a schematic instead of a fritzing diagram... see attached.

Basically the same question... I feel like this configuration will be the foundation of the project and I will be attempting to add more stuff from here such as wireless network functionality, LCD display, and I'm hoping to add some LED indicator lights that let me know what the status of the systems attached to the relays are, but I need to do some more research to figure out how to do that with 120V AC running through the relays... But for right now, can anyone spot anything catastrophically wrong with what I've got so far? Should I be adding fuses and/or diodes anywhere for safety reasons?

Also, if there are issues with this schematic (it is my first try...) please let me know and I will try not to repeat mistakes in the future.

Thanks,
Joe

There are a couple of things that stand out, Joe.
The first is that you have the output from the LM34 temperature sensor going to a digital pin. It has an analogue output, so you'll need to connect it to an analogue input pin and read it using 'analogRead()'.
The second is a labelling error. You have the output of the ambient light sensor connected to 5V, and the Vcc pin connected to the Mega's A0 pin. They should be the other way around, of course.

I assume that the relay current ratings are suited to the current draw of the devices you plan to connect.

Regarding fuses, that's always a good idea, especially with the mains equipment.

S1 and 2 should be revisited.
DC motor water pump should have a kickback diode across its terminals.
.

LarryD:
S1 and 2 should be revisited.

Larry, do you mean the 220 ohm resistors? I assumed they were intended as series protection resistors, and that he planned to use internal pullups along with them. Or did you have something else in mind?

DC motor should have a kickback diode across its terminals.

I forgot to mention this in terms of the 12DCV water pump, but assumed that the L298 board had 4 on-board diodes. (A single diode wouldn't be any good on the DC motor if it needs to run in both directions.)

Larry, do you mean the 220 ohm resistors? I assumed they were intended as series protection resistors, and that he planned to use internal pullups along with them. Or did you have something else in mind?

There is no path to ground so inputs will always be HIGH.
The 12v may damage the internal input diode should be limited to 2 ma.
But as is, they need a pull down.

The bottom right hand motor would need the diode.
.

One thing I picked up from this "ratsnest":
If you connect 9volt to the relay module, as in your diagram, you will backfeed 9volt into the 5volt pin of the Arduino, and blow it up.

The multi-voltage adapter mentioned in post#0 could be transformer based (old/heavy).
That could be bad. They could output 30-50% more than what's on the switch.
Leo..

LarryD:
There is no path to ground so inputs will always be HIGH.
The 12v may damage the internal input diode should be limited to 2 ma.
But as is, they need a pull down.

S1 and S2 switch the Mega inputs to ground, not to 12V. (That's the problem with these over-sized Fritzing schematics - they're hard to read because they need to be zoomed to see the labels.)

The bottom right hand motor would need the diode.

Yep, that's the one I meant to mention but forgot. :smiley: