Hello,
I wrote a few days ago about my difficulties choosing an Arduino for my bachelor-thesis in which I want to store temperature data in an SD-Card or per WiFi in my Computer. I chose to go with the SD-Card with an Arduino Uno and an MicroSD card breakout board+ (from Adafruit).
My problem is I don´t really understand what most of the pins are for, so I am having a bit of trouble there.
I need to use thermocouples (typ R, S or B most probably) and for each one I need three pins (because of the amplifier). For the SD-card I need 5, as I saw in Adafruit the connections would be: GND to ground, 5V to 5V, CLK to pin 13, DO to pin 12, DI to pin 11, and CS to pin 10. This means I still have the digital pins 0-9 (that would mean three thermocouples and one pin left). I still have seven analog pins, that means two more thermocouples and one pin left. (Five thermocouples and two pins left in total until now)
Now the pins I don´t understand are the ones left. That would be, on the left side, IOREF, RESET. 3,3V, 5V, GND,GND, Vin.
From these I need Vin, and GND for the batterie to power the Arduino. On the opposite site, on the right, where the digital pins are, there are the AREF, GND and two more pins above. Can I use all of these except for the ones for the batterie for my thermocouples too or do they have a specific use? I yes I could use eleven more pins. With these extra pins I could connect three more thermocouples, if I counted correctly. That means eight thermocouples in total.
I would like to ask you to explain this to me in simple words as electronical is not my mother language ![]()
DiegoHG:
That would be, on the left side, IOREF, RESET. 3,3V, 5V, GND,GND, Vin.
Those pins can only be used for their specific purposes. They are not I/O pins.
Also, don't use pins 0 and 1 as they are used for Serial communication,
The analog pins A0 to A5 can also be used as digital I/O pins.
Post a link to the datasheet for the thermocouple amplifiers. I wonder if they can share some of their pins?
...R
Two extra pins next to AREF on UNO R3 are SDA, SCL (they have label on bottom side) and they are the same as A4, A5 so it is same if you will use A4,A5 or these. It is I2C bus. The reason why they are on two places is just to have same position for I2C on each board even with different MCU.
Post a link to the datasheet for the thermocouple amplifiers.
This is the link to the amplifier -> Adafruit Universal Thermocouple Amplifier MAX31856 Breakout : ID 3263 : $17.50 : Adafruit Industries, Unique & fun DIY electronics and kits
This one for the teccnical details -> Downloads | Adafruit MAX31856 Universal Thermocouple Amplifier | Adafruit Learning System
Two extra pins next to AREF on UNO R3 are SDA, SCL (they have label on bottom side) and they are the same as A4, A5 so it is same if you will use A4,A5 or these. It is I2C bus. The reason why they are on two places is just to have same position for I2C on each board even with different MCU
I don´t know what I2C means (or MCU). Does this mean I can use them as an I/O pin?
I2C is a bus for communication with devices like LCD...
MCU = microcontroller ~ like ATmega328P on Arduino UNO
Yes you can use as I/O (SDA, SCL) but they are the same as A4,A5.
As Robin wrote, any of pins 0-13 and A0-A5 can be used as digital I/O. Pins like AREF, IOREF... have different purpose.
Ahh thanks, I understand. They are not extra pins, just the same pins on two sides.
The MCU's I/Os have frequently more than just one functionality. Prior is digital I/O but they can be switched to different mode like analog input for ADC (A0-A5), some kind of bus like I2C (A4,A5 or SCL,SDA). If the different functionality is used on the pin, then it cannot be used as digital. Just one functionality at time is possible.
DiegoHG:
Ahh thanks, I understand. They are not extra pins, just the same pins on two sides.
...on two places. But yes. ![]()
If you want to connect multiple MAX31856's to one microcontroller, have them share the SDI, SDO and SCK pins. Then assign each one a unique CS pin.
So, if you Connect the SCK pin to Digital #13 , Connect the SDO pin to Digital #12 ,Connect the SDI pin to Digital #11.
then you can have pin 10 for your SD card and 14 thermocouples.
DiegoHG:
This is the link to the amplifier -> Adafruit Universal Thermocouple Amplifier MAX31856 Breakout : ID 3263 : $17.50 : Adafruit Industries, Unique & fun DIY electronics and kits
Those amplifiers use SPI so they will also connect to pins 11, 12 and 13 (MOSI, MISO and SCK) and will need one extra I/O pin each for CS
You should be aware that the Arduino 3.3v pin cannot provide much current and if you have several 3.3v devices you may need a separate 3.3v supply. That could be provided using an LD1117 voltage regulator connected to the Arduino 5v pin.
...R
Thanks for your replies. I just noticed thatI messed it up. The amplifier I used in my question is not the one from the link. The one from the link is the correct one though.
So, if you Connect the SCK pin to Digital #13 , Connect the SDO pin to Digital #12 ,Connect the SDI pin to Digital #11.
then you can have pin 10 for your SD card and 14 thermocouples.
But now I am confused. If I do it like this, I just can use one amplifier. Or is there a way to connect all of the amplifiers to these same pins? If yes, how? I'm sorry if the questions are stupid, but I feel I'm in the darkness.
You should be aware that the Arduino 3.3v pin cannot provide much current and if you have several 3.3v devices you may need a separate 3.3v supply. That could be provided using an LD1117 voltage regulator connected to the Arduino 5v pin.
But I need pin 5 for the SD card. Or, again, is it possible for the pins to share the lines? If not, is there another 5v pin?
I'm really thankful for your replys.
DiegoHG:
Or is there a way to connect all of the amplifiers to these same pins? If yes, how?
All of the amplifiers and the SD Card use MOSI MISO and SCK. And each of them also needs its own CS pin so that the Arduino can signal which one it wants to communicate with.
But I need pin 5 for the SD card
I did not say Pin5. I said the 5v (5 volt) pin.
...R
All of the amplifiers and the SD Card use MOSI MISO and SCK.
Yes, I understand that is so. But I don't understand if it is possible for all the amplifiers to connect to the same three pins. I'm sorry but I am really confused.
I did not say Pin5. I said the 5v (5 volt) pin
I meant the 5v pin, sorry, I must have forgotten it.
I will try to sum it up. My amplifiers all need to be connected to OSI, MISO and SCK. As you said I can connect CK pin to Digital #13 , the SDO pin to Digital #12 ,the SDI pin to Digital #11. But this only for one amplifier. How do I do it with all the others?
For my Arduino to have the 3.3v supply I will need an LD1117 voltage regulator connected to the Arduino 5v pin. But my SD-card also needs to be connected to the 5v pin. How can I use both if I have only a 5v pin?
A thousand times thank you for your patience with me
DiegoHG:
As you said I can connect CK pin to Digital #13 , the SDO pin to Digital #12 ,the SDI pin to Digital #11. But this only for one amplifier. How do I do it with all the others?
You will need to make some sort of wiring harness. Or temporarily use a solderless breadboard to make the connections. When you know it works get out your soldering iron.
But my SD-card also needs to be connected to the 5v pin. How can I use both if I have only a 5v pin?
Likewise.
...R
As you said I can connect CK pin to Digital #13 , the SDO pin to Digital #12 ,the SDI pin to Digital #11. But this only for one amplifier. How do I do it with all the others?
Look there, right the first picture clarify the problem: Multiple SPI Slaves. Common MOSI, MISO, SCK and an extra SS for each slave.
- SCK - This is the SPI Clock pin, its an input to the chip
- SDO - this is the Serial Data Out / Master In Slave Out pin, for data sent from the MAX31856 to your processor
- SDI - this is the Serial Data In / Master Out Slave In pin, for data sent from your processor to the MAX31856
- CS - this is the Chip Select pin, drop it low to start an SPI transaction. Its an input to the chip
You will need to make some sort of wiring harness
I can do that using this: First link
Or this: Second link
Do both accomplish the same function?
Look there, right the first picture clarify the problem: Multiple SPI Slaves. Common MOSI, MISO, SCK and an extra SS for each slave.
Thanks, the image did help. So I need the MISO, MOSI and SCK pins for the SD card and every single one of the amplifiers, plus one of the I/O pin for the CS pins of these elements. That means, pins 11, 12, 13 for MISO, MOSI and SCK and pins d0-d10 and a0-a5 for the SD-Card (one of the pins) and for the amplifiers (sixteen).
Thank you so much!
DiegoHG:
I can do that using this: First link
Or this: Second link
Do both accomplish the same function?
I presume you realise that the second one requires soldered connections and the first one does not.
I would NOT use that sort of board for your soldered connections as each hole is separate and you want to connect things. Some stripboad (veroboard is one brand) would be better as it has connections between the holes.
...R
Please don't use D0 & D1, or you may not able to write the program to Arduino.
I would NOT use that sort of board for your soldered connections as each hole is separate and you want to connect things. Some stripboad (veroboard is one brand) would be better as it has connections between the holes.
Thank you, I wouldn't have known it. I guess you mean something like this? ->Veroboard
Please don't use D0 & D1, or you may not able to write the program to Arduino.
If you tell me not to do it, then I won't, but why is that?
I'm not sure about the link in your Reply #18
This link is what I have in mind. See how it has long strips of copper.
Pins 0 and 1 are used for Serial data (Rx ad Tx) and re used for uploading programs.
...R
