I'm new and have some questions before buying materials!

Hello all :slight_smile:

I'm new to Arduino world, and more generally to electronic, at least I know how to code...I did most of my works using the PAWN language, it's similar enough to the language Arduino is using so I'm not lost... for now :slight_smile:

So I have a project, that will ideally require:

  • Some sensors.
    A DHT22 for temperature and humidity.
    A waterproof temperature sensor

  • A 8 relays board
    To turn ON/OFF things like lights, fans, pumps, heater resistor...

  • A bidirectional, wireless if possible, communication with my PC (windows)
    From PC to Arduino, to upload/update the program and maybe to remotely turn ON/OFF some of the relays.
    From Arduino to PC, to transmit sensors values for monitoring.

  • A touchscreen
    For setup of some relays ON/OFF periods, and other variables of the program.
    For displaying sensors values, and probably also date and time.
    That screen also include a SD card slot.

  • A real time clock module, if necessary.

  • And an Arduino Mega 2560 (coming with the touchscreen)

But before I blindlessly spend my money, I have some questions about the hardware part:

  • I noticed the touchscreen use a lot of the available Arduino pins... Will I have enough pins remaining for all my other needs, and even enough for additional sensors if necessary?

  • What could I use for bidirectional communication, knowing that I have a WIFI PCI card in my PC, as well as a Bluetooth USB dongle? Ideally, I would like communicating with the Arduino through internet, would be really cool for monitoring when I'm at work...

  • Do I really need a real time clock module? Can't I just syncronize the time on my PC with some values in the Arduino program, and increase those values in the program when the PC is turned OFF?

Also please tell me everything that come into your mind, is my project feasable, what problem I might encounter, possible solutions, alternatives, etc etc... I'm really interested of learning from you. Don't forget I'm a very beginner but I'm really willing to put time and effort (but not so much money!) into this project.

Thank you in advance and sorry if my english is bad, I'm french.

:slight_smile:

Welcome to the forum.

Start by updating your profile so folks can make geographically correct referrals for material - doesn't do you much good to know that everything you need is in a surplus store in California for instance.

Mega has 69 IO pins. Your list doesn't appear to need that many. The touchscreen does use a few. Looking at the pictures it appears that at least 32 pins are not committed at all. If your other components needs I2C or SPI access, you may have to add some jumper wires to bring the two I2C pins and the three SPI pins to an accessible point.
Or make the touchscreen cards the last thing on your stack of parts.

Your sketch can include a clock program, may drift a very little bit, you can update it when connected to the PC as suggested.

You can connect to the internet with an Ethernet shield. Probably get the time there too.

You can get Wifi, bluetooth, 315/434 MHz, 2.4GHz, all kinds of ways to connect wireless to your PC.

Unless I am missing something, the kit in the link is just a display, not a touchscreen.

The simplest wireless link would be a wireless UART or wireless RS232 link. It will look like a serial port on the PC and you can communicate via Serial.read()/Serial.write() on Arduino. It can be done with Bluetooth or WiFi, but it will require a little more knowledge on both ends (Arduino and PC).

Steve

CrossRoads:
Welcome to the forum.

Start by updating your profile so folks can make geographically correct referrals for material - doesn't do you much good to know that everything you need is in a surplus store in California for instance.

Mega has 69 IO pins. Your list doesn't appear to need that many. The touchscreen does use a few. Looking at the pictures it appears that at least 32 pins are not committed at all. If your other components needs I2C or SPI access, you may have to add some jumper wires to bring the two I2C pins and the three SPI pins to an accessible point.
Or make the touchscreen cards the last thing on your stack of parts.

Your sketch can include a clock program, may drift a very little bit, you can update it when connected to the PC as suggested.

You can connect to the internet with an Ethernet shield. Probably get the time there too.

You can get Wifi, bluetooth, 315/434 MHz, 2.4GHz, all kinds of ways to connect wireless to your PC.

Thanks, I updated my profile.

I would like some infos about shields. For example with ethernet shield + touchscreen shield, how am I supposed to plug those, if they both need same pins? How arduino can route to the correct shield? I don't understand.

Also, on the "adapter shield" (the thing between the screen shield and the arduino), you see there are pins at the sides, I think I've read that they are unused: are they just used as supports for the weight?

sdturner:
Unless I am missing something, the kit in the link is just a display, not a touchscreen.

The simplest wireless link would be a wireless UART or wireless RS232 link. It will look like a serial port on the PC and you can communicate via Serial.read()/Serial.write() on Arduino. It can be done with Bluetooth or WiFi, but it will require a little more knowledge on both ends (Arduino and PC).

Steve

No the screen is touchscreen, they probably forgot to mention it! Look this ebay link (I apologize if I'm not allowed to post ebay links just tell me and I remove) and this library

About wireless (that I prefer over ethernet, for this project), is wireless UART or RS232 bidirectional?

Can someone answer these questions please:

I would like some infos about shields. For example with ethernet shield + touchscreen shield, how am I supposed to plug those, if they both need same pins? How arduino can route to the correct shield? I don't understand.

Also, on the "adapter shield" (the thing between the screen shield and the arduino), you see there are pins at the sides, I think I've read that they are unused: are they just used as supports for the weight?

What is the typical wire diameter that I must use? And what type of wire, eg for plugging into pins, do I need "full wire" or can I use a "wire with many fibers"? And can I use the same type of wire for plugging into pin and soldering?

I'm waiting for those answers so I can finally buy, without making a mistake (I hate wasting money). Sorry if I sound stupid, I'm beginner and french.

guix:
Can someone answer these questions please:

I would like some infos about shields. For example with ethernet shield + touchscreen shield, how am I supposed to plug those, if they both need same pins? How arduino can route to the correct shield? I don't understand.

The shield concept just passes all the pin signals vertically up through how many shields might be attached. And it is a real problem if multiple shields utilize the same I/O pins, that is a conflict that no arduino board nor software can solve. One just has to research careful each shields documentation about I/O pin usage to see if there will be a conflict with the ones you want to combine into a single application or project. Also one has to research how much current each shield requires such that their combined current consumption doesn't exceed what the arduino board can safely supply. Sometimes there is also a 'I must be the top shield' problem where you can't stack two or more together because of mounted displays or user switches, etc. The shield concept as defined and used in arduino is really not a well thought out system usable for larger projects, it really works best when you are dealing with just an arduino board and a single shield board.

Also, on the "adapter shield" (the thing between the screen shield and the arduino), you see there are pins at the sides, I think I've read that they are unused: are they just used as supports for the weight?

I haven't researched an 'adapter shield', so can't pass on any information.

What is the typical wire diameter that I must use? And what type of wire, eg for plugging into pins, do I need "full wire" or can I use a "wire with many fibers"? And can I use the same type of wire for plugging into pin and soldering?

The shield connectors were designed to interface with .025" square pins. Solid conductor ('full wire') of the proper size is the best wire to use. Stranded wire ('wire with many fibers') is a bad choice as the ends spread out over time and reuse and can cause accidental short circuits. There are also prefab 'jumper wires that are popular for wiring from arduino shield pins to solderless breadboards. Example: Jumper Wires Standard 7" M/M - 30 AWG (30 Pack) - PRT-11026 - SparkFun Electronics

I'm waiting for those answers so I can finally buy, without making a mistake (I hate wasting money). Sorry if I sound stupid, I'm beginner and french.

You don't sound stupid, just rather new to the hobby. Few like to waste money, but I wouldn't waste too much time ( which you never get back) on the lower cost buying decisions, we all learn by experiance and making purchasing mistakes now and then is part of that.
But so sorry about the French part, can't help you with that. :smiley:
Lefty

Thank you Lefty :slight_smile:

I have buyed only the MEGA2560 + touchscreen + adapter shield (that you can see in the first post) for now. For less than 50$ shipping included, I think I made a good deal so I lose nothing anyway, in case I can't get touchscreen + sensors + real time clock all together due to lack of pins.

I have another question about power supply, but I will ask in the french section.

Can someone confirm, that I can use this IDE HDD male to female cable, to connect the screen away from it's adapter shield:

Down face of screen:

The cable:

Upper face of adapter shield:

It's ok you think?

Yes that looks fine as it appears to be the older style 40 wire and 40 pin IDE cables. Newer type IDE cables carry ground wires between each signal wire and are not truly 40 independent connections, but rather assume you are going to have a common ground connection wired to many of the 40 pin connector pins. This bit me once when using a '40 pin' IDE cable as a jumper cable between my 5x5x5 led cube and the electronic board that interfaced to it.

Good luck;

Lefty

Ok, yes it's 40 wires not 80 :slight_smile:

Now some more serious questions, I plan to buy a 16 opto-isolated relays board from Sainsmart. But obviously with my sensors, touchscreen, sd card... I guess I ran out of pins on the arduino already.

  1. Can I use this instructable about multiplexing for controlling each relays:
  • individually,
  • or simultaneously (for example: the 10 relays [1, 3, 4, 5, 6, 9, 11, 12, 13, 15] turned ON)
  • or all at once

Or maybe using "daisy-chaining" like in this tutorial ?

  1. I don't think I really understand multiplexing yet, but I think in the first link (instructable), it's only possible to control 4 leds simultaneously (so in my case, 4 relays), correct?

  2. Last thing, can I use the multiplexing for reading values of many sensors (temperature, etc)? I probably don't need that, but maybe! :slight_smile:

EDIT: I have posted new topic here: http://arduino.cc/forum/index.php/topic,123906.0.html , I will probably have more views :slight_smile: