element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum First Arduino Project
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 16 replies
  • Subscribers 391 subscribers
  • Views 1240 views
  • Users 0 members are here
  • nano
  • lcd
  • dht22
  • real_time_clock
  • rtc
  • servo
  • mega2560
  • servo_motor
  • arduino
  • relay
  • servo_control
Related

First Arduino Project

dukeofmarshall
dukeofmarshall over 10 years ago

So I got my first Arduino (Mega 2560) two weeks ago. I've been playing around with it and learning the basics and what not. I have decided on a useful project and have been thinking through it and researching out the parts. The parts have been ordered and on the way. So I decided for the mean time I would go ahead and do a wiring diagram of how I think it will eventually go all together. But since this is my first project I thought it would be prudent to have the wiring diagram reviewed by those of you who know what you're doing already.

 

My project consists of:

  1. 20x4 LCD Module
  2. An RTC Module
  3. 2 9g Servo Motors
  4. A DHT22 Temperature and Humidity Sensor
  5. A 4 Channel Relay Shield to Control a 120 volt line and a 12 volt line

 

My plan is to provide a 5v line for the Arduino itself, a 5v line for the other 5v components, a 12v line, and a 120v line. I plan on using an Arduino Nano in the project so my Mega will still be available afterwards.

 

So if anyone has the time and is willing to look over the wiring diagram real quick, I'd sure appreciate any feedback or suggestions for improvement. Thanks.

 

image

  • Sign in to reply
  • Cancel

Top Replies

  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago +3
    Double check your connections for SDL and SCL to the RTC, you may find it should be A4 and A5 (On an UNO and many other arduinos), then on the mega typically pin 20, 21, not A0, A1 here is a great pinout…
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago +2
    SAFETY ISSUE HERE !!! DANGER The Arduino Sheild is NOT ment to handle mains voltages. Like so many other projects we have helped with or provided feedback on this community, the use of a Sheild to directly…
  • Workshopshed
    Workshopshed over 10 years ago in reply to Robert Peter Oakes +2
    A very valid point Peter, I agree, don't use that shield for mains voltages. There's lots of exposed metal on the shield which would be in close proximity to the Arduino (and user). The design of the board…
Parents
  • Workshopshed
    Workshopshed over 10 years ago

    Hi Todd,

    Some observations. You mention you are using a Mega but the schematic uses the Nano. I don't know what schematic tool you are using but there's some libraries over on the Eagle section of this site if that's what you are using. Your I2C port for the RTC does not seem to be connected up to the standard pins, see

    http://www.pighixxx.com/test/portfolio-items/mega/?portfolioID=314

     

    The servos can be attached to any digital pin on the Mega and it will easily handle 2. So they are ok.

    http://playground.arduino.cc/Code/MegaServo

     

    You'd need to include a link to the datasheet for your LCD module and specific relay shield to let us know if that's wired correctly. For example does the LCD need 8 data pins attached? Also not all relays can handle 120v (AC?) so that's something you'd want to check with the data sheet.

     

    Cheers,

     

    Andy

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Workshopshed
    Workshopshed over 10 years ago

    Hi Todd,

    Some observations. You mention you are using a Mega but the schematic uses the Nano. I don't know what schematic tool you are using but there's some libraries over on the Eagle section of this site if that's what you are using. Your I2C port for the RTC does not seem to be connected up to the standard pins, see

    http://www.pighixxx.com/test/portfolio-items/mega/?portfolioID=314

     

    The servos can be attached to any digital pin on the Mega and it will easily handle 2. So they are ok.

    http://playground.arduino.cc/Code/MegaServo

     

    You'd need to include a link to the datasheet for your LCD module and specific relay shield to let us know if that's wired correctly. For example does the LCD need 8 data pins attached? Also not all relays can handle 120v (AC?) so that's something you'd want to check with the data sheet.

     

    Cheers,

     

    Andy

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • dukeofmarshall
    dukeofmarshall over 10 years ago in reply to Workshopshed

    I plan on using the Nano in the final version of the project. I plan on continue to use this device for quite some time and didn't want to tie up my Mega.

     

    Here is the relay shield I'm going to tie into. I tried to make sure it would handle the voltage and from everything I've looked up on this, our should be able to handle that much voltage. If I'm reading that incorrectly please let me know. Sure don't want to burn anything down.

     

    http://www.ebay.com/itm/200984268296?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

     

    And here's the LCD Module I have ordered.

     

    http://www.ebay.com/itm/131373850431?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

     

    The wiring I learned about for this HD44780 interface is from here:

     

    http://m.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

     

    Sorry for the wiring diagram as well. This was also my first schematic in eagle and had to create a few of the components that I couldn't find libraries for. The relay shield was one of them. I did get the Nano component from the element 14 library I find.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago in reply to dukeofmarshall

    Ah yes, just read the data sheet, the HD44780 has a switchable 8bit and 4bit data bus so you can connect that up with just 4 data lines.

    The HJR-4102-L 5V relays are rated high enough and you've got thick traces on the shield. Just be aware that the screws will be live when it's connected up so don't stick a screw driver into one of the holes unless you are certain the power is off. You'd want to box up your project for similar reasons.

    The schematic is fine, I was just a bit confused by your comment about the mega and then the Nano in the diagram. One of the key things to watch for on these arduinos (particularly when adding lots of accessories) is that not all of the pins have the same capability and sometimes they are shared (SCL/SDA on the Uno is a class for that). That's why the Pighi diagrams can be useful

    http://www.pighixxx.com/test/portfolio-items/nano/?portfolioID=314

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube