multiple spi devices (thermocouple)?
#1
Posted 09 October 2011 - 08:17 PM
#2
Posted 10 October 2011 - 03:53 AM
#3
Posted 10 October 2011 - 05:55 AM
Welcome to the community.Ideally I would like to monitor 4 thermocouples, from what I can see these are either analog or spi interfaced, spi seems simpler to me but it seems that the netduino only has 1 spi interface, could this be easily multiplexed as I would be logging multipl hours it would not be an issue to not get simultaneous readings, although when talking in the ms realm compared to the duration and pause between measurements they would effectively be simultaneous.
I think can have multiple SPI devices connected to the Netduino even with only one SPI interface. The algorithm would look something like this:
Create and SPI config for Device 1 - config1
Create and SPI config for Device 2 - config2
Create and instance of the SPI interface using config1
Main program loop:
Set the config for the SPI interface to the desired device (config1 or config2)
Do stuff with the device
Loop
As Mario pointed out, you will need a different ChipSelct pin for each device you wish to connect.
You would also need to make sure that the configs and SPI instance are available where needed.
Hope this helps,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#4
Posted 10 October 2011 - 07:42 AM
I also had troubles with that, so I wrote a helper class for that:You would also need to make sure that the configs and SPI instance are available where needed.
http://netmftoolbox....rdware.MultiSPI
You can create multiple instances of the MultiSPI class with different configurations.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#5
Posted 10 October 2011 - 11:07 AM
#6
Posted 10 October 2011 - 12:16 PM
For suppliers in the UK, have a look at the following:Analog: http://www.sparkfun.com/products/306
Digital: http://www.sparkfun.com/products/307
Proto-Pic
SK Pang
Cool Components
If you want basic components then I'd look at BitsBox - postage is only £1.50 and all of the orders I've placed before 1pm have been delivered by first class post the next day. I always check this site out first as they often supply parts at the best price for the small volumes I use.
There are some thermocouple devices on Proto-Pic - this site looks like a UK version of SparkFun although not the full range.
Hope this helps,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#7
Posted 10 October 2011 - 08:40 PM
so i would like to take and store (possibly display at a later stage) temp readings from upto 4 sensors, these would first be read over usb I suppose if easier, or stored somewhere for retrieval via usb or on SD card for reading in via the pc. SD would probably be perfect as its safe if power is lost and I assume i will want this to run on batteries eventually. I can then take the values and plot vs time to see the temp curve of the oven. Not mission critical but I think fairly interesting to know if you plan to bake bread in the oven also (I do).
If you have any plans to display the temp in real time, you have a couple of easy options. You can get a serial LCD "backpack" from SparkFun for around $25. Another much cheaper option (while more complicated) is to use 74HC595 shift registers and 7 segment LEDs. Each '595 will do 8 bit serial-in, parallel-out and they can be chained together. You could also use a STP16C596 which does 16 bits. This will allow you to display the temp using only 3 lines on the Netduino.
-dan
#8
Posted 11 October 2011 - 06:20 AM
http://www.dealexcel...eter_p4083.html
This doesn't log on it's own but if you connect it to a laptop or a pc it will log.
Edit:
Just in case the link above goes dead, it is a CENTER-304 4-channel RS232 Thermometer that costs US$119.64 with free shipping.
Edited by Mike P, 11 October 2011 - 06:22 AM.
#9
Posted 13 October 2011 - 01:35 PM
#10
Posted 13 October 2011 - 08:33 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users