Help On New Project!!

I need some help on the following project!!

I want to make a device that detects reading from sensors and acts on those readings (A really Primitive Brain)

How many sensors can an arduino mega 2560 + sensor shield Handle
How can i Code All of the sensors to read and display in the PC

Attached is the basic layout

Help Please!!!

Photo0004.jpeg

Tell us more about your project. With this little info you will only get vague answers. For instance:

How many sensors can an arduino mega 2560 + sensor shield Handle

To get an answer that is better than "Some", you have to consider that I depends on the kind of sensor and how you are wiring them. For instance: are they digital, analog, SPI, I2C, etc. And in case you run short of pins, you might use solutions like multiplexers.

Start with something easy, connect one sensor at a time to the Arduino and make it work. look at the Playground, and if you have further doubts, keep asking here. Displaying the values in a PC via USB/Serial is quite easy.

Well They are all 3 pin sensors so Im guessing they are analog?? (Mind you i am a total newbie to this the most I’ve done is LED’s) I’m just wondering how many sensors can the mega sensor shield handle and if I just copy and paste all the different codes together it wont look like a bunch of jibberish on the screen I would love for the final output to look like this on screen:

“Temperature: 30 C / Humidity: 45 / Light Intensity: 30 / Object Distance: 30 CM / Motion Detected: Yes / Vibration Detected: Yes / Co2 Concentration: Low / Methane Concentration: Low / Other Gasses : Low / EM Field: Weak”

In the future I would also hope to include a graphical representation of the values using a program like processing

Any help on this will definitely be appreciated!!

The mega should be plenty for that.

Start off by getting an LCD. Most of the 16x2 or 20x4 work with arduino. Make the Lcd print a message, like "Hello world, my name is Orleymtnez". Then hook up ONE sensor, say the temperature sensor. Make it output the results to the lcd. "Orleymtnez the temperature is 23C"

Work up from there.

"Temperature: 30 C / Humidity: 45 / Light Intensity: 30 / Object Distance: 30 CM / Motion Detected: Yes / Vibration Detected: Yes / Co2 Concentration: Low / Methane Concentration: Low / Other Gasses : Low / EM Field: Weak"

Hum... It look you project is very close to a "Star-Trek Tri-Corder" ... Interessting ;)

I think he's building a ghost hunting box :)

An interesting project. What I will do, I will program to read one sensor at a time. So you will use Processing later, than I will program like :

read sensor 1 send data wait for command read sensor 2 send data wait for commend and so on

Because you have a lot of sensors, they have to be read in sequence and data send in sequence or like this :

sensor1data-sensordata2-sensordata3-....and so on.

The project is not for beginer, but make it step-by-step, it is possible. Also I will do, make small programs to test each sensor. Example : temp sensor program and see if it work just fine. And than combine them together. The Mega board can do the job. Also you can use an UNO to test each sensor ( one at a time ) and to display or send to a computer for Processing.

when you say wait for command does that mean I would have to press a key in order for the next sensor to read?? I think I can program it like that but with a variation like

Read Sensor1 Display Sensor Data 1 If-Then statement (for example if temperatureoutput = high then .....) Wait 1 sec Read Sensor2 Display Sensor Data 2 If-Then statement Wait 1 sec

The purpose of the sensory module is to let the computer "feel" or know what its going on around it and then the purpose of the motor control module (mega 1280 + sensor shield) is to either move a camera with the servos or a robotic arm made out of servos or the entire unit based on the sensor readings for example when it detects a high temperature it moves away until it finds a lower temperature or when it detects an object closer than 30 cm it will point the camera at the location of the object.

This is an extremely complicated project but it deals with most of the disciplines of the arduino all at once so I'm very exited to learn it thanks for all the help from all of you! Let me know if you have any more thoughts on this!!

when you say wait for command does that mean I would have to press a key in order for the next sensor to read??

In the mid-1990, I did a tech project. It was incomplete. It was a explorer robot. With sensors to tell temp, speed, tilt, voltage battery condition, current comsuption. The command I was talking about, it was instructions for the robot to take, like : go left, check this place , ect...

Anyway, it is your project, but I still insist you test / code a sensor with a UNO just to see if the circuit/code is working, what to do with the data - if the data make sense. Testing with a mega is fine to use too.

Just thinking here ---> Making a small robot, explore the backyard, send data via radio-wave, check the temp outside ( winter -20 C or summer 40 C ) or check others things, and you are in the comfi of your home.

Orleymtnez:
Read Sensor1
Display Sensor Data 1
If-Then statement (for example if temperatureoutput = high then …)
Wait 1 sec
Read Sensor2
Display Sensor Data 2
If-Then statement
Wait 1 sec

Why the wait 1 sec, a good chunk of eternity at 16 MHz, unless you are using sleep mode to save power?

Even if you don’t need data more often you could be getting 100 to 1000+ samples per second and averaging them while throwing out flukes and like.