I intend to integrate a Tilt/Acceleration sensor having SPI output with a processor that is capable of features mentioned in the details
below:
1- Memory option SD card to store the sensors data on-board
2- able to be programmed to send data over Ethernet port explain a bit how is it possible
3- able to be programmed to send data over serial port explain a bit how is it possible
I came across Arduino, I am looking to stack UNO board with Ethernet shield with integrated SD card slot. However ethernet board will use the SPI ports on the UNO to connect to it and my sensor's output is also SPI, so how wud I connect to UNO board?
Please let me know if you have better ideas to achieve the above mentioned tasks!
Can I use this Board (http://arduino.cc/en/Main/ArduinoBoardEthernet) to achieve my intended task. This Board seems to meet all of the requirements. It has the on-board SD card slot and has SPI pins which I can use to connect to my sensor. Then I can program the controller to send data over Ethernet as well as serial pins. Please comment on this.
I was wondering I don't have enough SPI ports!sensor need s to connect to UNO through SPI, Ethernet shield also needs to connect to UNO board through SPI and SD card also uses SPI ports to connect to any other shield. How is it possible to use all these shield together to achieve my task (to take in data from sensor and store it on SD card, send it serially through USB port to PC and make it available on Ethernet port also). Please comment on this!
You have one. You need one. How is that not enough?
sensor need s to connect to UNO through SPI, Ethernet shield also needs to connect to UNO board through SPI and SD card also uses SPI ports to connect to any other shield. How is it possible to use all these shield together to achieve my task
Each SPI device needs a chip select pin. The Ethernet shield uses pin 10. The SD card uses pin 4. SPI itself uses 11, 12, and 13. That leaves digital pins 2, 3, 5, 6, 7, 8, and 9 and all 6 analog pins. How many sensors are you planning to connect? More than 13?
How is it possible to use all these shield together to achieve my task
I do not think he understand how SPI works.... he's thinking all the signals are going to be flooding at once and interfere with each other..
Each shield will be connected to the Arduino via an individual GPIO (digital )pin. Using that pin line, the Arduino signals which device it would like to communicate with.(since there is no addressing like with I2C) This signal is called slave select/chip select (SS/CS) or slave transmit
enable (STE). The Arduino functions as the master and provides the clock signal. The connected shields are the slaves and do as they are told lol
and the transimission is done after the Arduino sets the level of the chip select signal (the pin ) to its original state .
I think you people misunderstood my Q, my question is if I connect SPI pins of my sensor to SPI pins on UNO board then how wud I connect ethernet shield to UNO board? As far as I know ethernet shield can connect to UNO board using SPI pins and that are already in use by the sensor!
Am I right?
Am I right to say that, I will have to activate the CS pins for each shield one at a time to achieve the intended communication task.
Like first of all I activate the sensor's CS pin and take in data then I will activate the Ethernet shield's CS pin to transmit sensor's data to Ethernet Port and finally I will activate the CS pin for SD card to write the sensor's data to SD card.
Is it possible?
Plz suggest!
I intend to take in data from sensor and then pass it to ethernet port as well as log it on a SD card also!
my question is if I connect SPI pins of my sensor to SPI pins on UNO board then how wud I connect ethernet shield to UNO board?
then DONT connectect the sensor on the UNO board because then you will not be able to connect anything on top of it! connect it to the shild!
I mean look at your shield doesnt it have the SAME EXACT available connection as the UNO board it self??
Or i must really be miss understanding your question....
Am I right to say that, I will have to activate the CS pins for each shield one at a time to achieve the intended communication task.
Yes, you are right (except that should be device, not shield). The SD card device is on the same shield as the Ethernet device. Your sensor is not a shield, either.
Like first of all I activate the sensor's CS pin and take in data then I will activate the Ethernet shield's CS pin to transmit sensor's data to Ethernet Port and finally I will activate the CS pin for SD card to write the sensor's data to SD card.
Is it possible?
Yes and yes.
Some functions (activateEthernet(), activateSD(), and activateSensor()) will make switching devices foolproof, because each function will first turn off the other devices.