Pages: 1 ... 4 5 [6]   Go Down
Author Topic: max6675+ethernet+sd card  (Read 7036 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
No Luck
No sd card and no IP.

José
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is the best I can do. That should have worked if it was just the long wire runs. It seems like it is your MISO line may not release on the 6675.  smiley-sad

You can try reducing the wire lengths, but I'm not sure that will help after these tests.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just remember I have an arduino duemilanove and tomorow I will try to use it next to the sensor do avoid the wire being so long.
I will post the results then.

José
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I forgot to mention one thing you might check. Insure you are getting the correct voltage on the Max6675 CS pin on the device itself. The connection may have broken somewhere.

edit: Also check there are no devices (logic level converter or similar) between the 6675 SO pin and the Arduino.

It appears the max6675 is working ok, but not releasing the MISO line. Either of these conditions would cause this problem.
« Last Edit: November 10, 2012, 09:28:01 am by SurferTim » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
Sorry for my silence but my litle girl is not been so well.
Today I checked the cable, there is a connection in the meadle, and the results were the same.
Tomorow I will check the board. It was me you made the connections to the MAX6675 IC and there may be a short circuit somewhere.
I will  check the voltage as you sugested.

José
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hope your little girl is doing better.

Do you have an o-scope? If so, I would check the MISO line with the max disconnected, then connected.

If not, I would use a voltmeter and a 1K resistor to determine if the max is releasing the MISO line. Connect the voltmeter to measure voltage at SO on the max, and connect the CS line to 5v. The MISO pin on the max should be high impedance at this point.

Then use a 1K resistor in series from the SO line on the max to GND, then 5v. The voltage on the SO should change according to the voltage applied to the resistor. If it doesn't, it is not releasing the MISO line.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not sure if I understand what you mean.
I do not have an o-scope its on my shopping list. By the way may you sugest a good o-scope for a beginner ?
Quote
Connect the voltmeter to measure voltage at SO on the max
Between the So and ground right ?

Quote
connect the CS line to 5v
Directly or with the resistor ?

Quote
The MISO pin on the max should be high impedance at this point.
What do yo mean by high impedance ?

José

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
With the code from post #63 I have 3.24v between so and ground. Is this ok ?

José

Ps. For further testing I will have to completly disconnect the max and because is already night here I have to wait for the weekend.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With the CS pin is HIGH (5v), the SO pin should be high impedance. That means it doesn't try to drive the MISO line HIGH or LOW. It becomes like an input. That way other devices, like the w5100 and SD, can drive the line too, but only when that device slave select (CS) line is LOW. That is why it is important that only one SPI device is enabled at a time.

Connect CS pin to 5v, then SO pin like this:
GND --- 1K resistor --- SO pin
SO pin voltage should be 0v.

Then this:
5v --- 1K resistor --- SO pin
SO pin voltage should be 5v.

If the max is not releasing the MISO line, one of those SO voltages will not be like it should.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
Sucess

I removed the board from the box where I had instaled it and all connections to it.
Then connected directly to the mega and with the code from post #63 I get

Starting SD..ok
Starting w5100..192.168.1.96
Setup complete
23.50
23.25
22.50
...

So here are the possibilities for the problem I was having.
-Long wires
-Some wire bronken since the cable was not new.
-Some interference from the DS18S20 sensor.
-Something else...

But now I can move foward and with trial and error find out what I was doing wrong.

Back to my early posts to use all three SPI devices together, I need to disable the other two in order to use one .
Am I right ?
To connect the max I have to use these ports or can I use any port I want ?

José
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If that probe is at room temperature, that looks good. If it is at 250 degrees Celsius, then I blew it!

The reactance (combination of capacitance/inductance) of a circuit that long can cause problems with high frequency transfers.

Each SPI device requires the slave select set LOW to start a SPI transfer, and set HIGH to end it. How convenient!  smiley
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the prob is at room temp, next to the mega.

Looking at the code from post #63 I noticed that you disable the we 5100 after you start it, but you dont do that for the pin from the sd card. Then you start mesuring the max values. Shouldn't youu disable the sd card pin first in order to use the SPI bus for the max ?

José
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok
Using the cable again I get bad results.
Do you think the problem is because I am using cat5 network cable ?
Could the twisted pairs explain my strange behaviours ?

Jose
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 148
Posts: 6105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the prob is at room temp, next to the mega.

Looking at the code from post #63 I noticed that you disable the we 5100 after you start it, but you dont do that for the pin from the sd card. Then you start mesuring the max values. Shouldn't youu disable the sd card pin first in order to use the SPI bus for the max ?
You caught me! I'm a cheater!  smiley-wink

I disable the w5100 SPI, then disable the max6675 SPI, and the only device remaining is the one I am about to initialize. I know the SD.begin() function returns with the SD SPI disabled (D4 HIGH). That means at that point, they are all disabled.

Ethernet.begin() is only function that returns with the SPI enabled (bug), so you must set D10 HIGH after that call. Now, once again, all the SPI interfaces are disabled.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
I am back to testing.
I am using a cat5 cable to monitor the burning chanber.
Not just for the max6675 but also two DS18S20, one rele and one servo motor.
The cables i was using for the max were:
+5V-Green
Ground- Green and white
SCK- Orange
CS- Orange and white
SO- Blue
With this configuration the code from post #63 was not running.
Today I exchange the Blue and the Orange/White wires and I got this result
Code:
Starting SD..fail
Starting w5100..192.168.1.96
Setup complete
14.0
13.50
14.0
...

So i belive the problem is the twisted wires inside the cat5 cable.
Could this be the reason ?
If i use only one wire from each twisted pair could this solv my problem ?

Jose
Logged

Pages: 1 ... 4 5 [6]   Go Up
Jump to: