Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

amplifier issues? (MAX31855)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Wed Jul 29, 2020 2:33 pm

adafruit_support_bill wrote:
I checked one amplifier with the CAT 5 at 16 feet and got a reading of 27 degrees celcius.

That's a good sign. Was that outside of the conduit? If so, it suggests that there may be some interaction with other things in the conduit.

I have a stepper motor that is fed by 16 AWG stranded conductors 4 of them to be exact. Those conductors run through the conduit with the CAT5. Are these conductors interfering with the CAT 5 cable? Since a stepper motor does have an electromagnetic field EMF.

Motors and their wiring are common sources of interference. If you temporarily disconnect the stepper, does it help your thermocouple readings at all?

It was outside the conduit.
Disconnected the 4 16 AWG wires from the driver but still left the driver on and am still getting zero. Anymore ideas?

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Wed Jul 29, 2020 2:51 pm

So I ran two cables of CAT 5E through the conduit and soldered them making the same connections as before but with CAT 5.

Did you make one wire of each pair a ground wire?

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Wed Jul 29, 2020 2:56 pm

adafruit_support_bill wrote:
So I ran two cables of CAT 5E through the conduit and soldered them making the same connections as before but with CAT 5.

Did you make one wire of each pair a ground wire?


So there are 4 twisted pairs per cable. I use one pair for DO and say CS then those two wires get connected to inputs on the Arduino. Are you saying that I should of used 4 pairs for every two connections? One part of the pair goes to ground and the other goes to the controller or amplifier?

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Wed Jul 29, 2020 3:01 pm

All signals are measured relative to ground. By tightly twisting your signal wires with the ground wires, you help insure that any interference is picked up equally by both, so it cancels out in the end.

As I suggested in my earlier post: Use one pair for DO and GND. One for CS and GND and a third for CLK and GND. If you like, you could use the 4th pair for VIN and GND.

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Wed Jul 29, 2020 3:07 pm

adafruit_support_bill wrote:All signals are measured relative to ground. By tightly twisting your signal wires with the ground wires, you help insure that any interference is picked up equally by both, so it cancels out in the end.

As I suggested in my earlier post: Use one pair for DO and GND. One for CS and GND and a third for CLK and GND. If you like, you could use the 4th pair for VIN and GND.


So essentially what I did was exactly the same as before? Even with the Cat 5 with it not wired properly there is no difference

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Wed Jul 29, 2020 3:09 pm

Pretty much. The twist in the wire doesn't help unless you are twisting the signal wire with what it is being measured against.

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Wed Jul 29, 2020 3:21 pm

adafruit_support_bill wrote:Pretty much. The twist in the wire doesn't help unless you are twisting the signal wire with what it is being measured against.


Well time to rip everything out again learning lots I suppose. Thanks for the help. But one thing the solderable boards that I have are just like breadboards. How do I make the connect to the + and - rings? Do I use two pairs so one pair goes to + then ground then the other goes to ground and ground?

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Wed Jul 29, 2020 3:52 pm

Not sure I understand the question. Can you post a photo or diagram showing how you want to connect things?

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Thu Jul 30, 2020 9:58 am

adafruit_support_bill wrote:Not sure I understand the question. Can you post a photo or diagram showing how you want to connect things?


So I actually just got another amplifier and had the signals run through 16 feet of wire to another arduino still nothing. I also decided to do what you wanted for the grounding so I used one cable as follows
VIN , GND
D0 , GND
CS , GND
CLK , GND

doing this I still get zero at 16 feet.

I have another question could increasing the wire size help with the interference Im experiencing maybe using regular 18 AWG wire instead of the 24 AWG that is in the CAT 5 cables?

The chip uses SPI, am I going to far to use SPI?

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Thu Jul 30, 2020 10:39 am

Increasing the wire size would not help. The current levels are very low, so any voltage drop due to resistance is negligible.

SPI was designed as a short-distance protocol. For longer runs, things like noise and capacitance start to cause problems. Noise interferes with the signals and capacitance slows them down.

Using twisted pair helps to keep out the noise. To deal with capacitance, you can try slowing down the clock rate on the bus. That involves changes to the library.

If you look at lines 45 to 71 of Adafruit_MAX31855.cpp, you will see 2 places where it calls Adafruit_SPIDevice. In each case it passes in a frequency value of 1000000 (1 Megahertz). If you replace the 1000000 with 500000, that will cut the clock speed in half.

Code: Select all | TOGGLE FULL SIZE
/**************************************************************************/
/*!
    @brief  Instantiates a new Adafruit_MAX31855 class using software SPI.
    @param _sclk The pin to use for SPI Serial Clock.
    @param _cs The pin to use for SPI Chip Select.
    @param _miso The pin to use for SPI Master In Slave Out.
*/
/**************************************************************************/
Adafruit_MAX31855::Adafruit_MAX31855(int8_t _sclk, int8_t _cs, int8_t _miso) {
  spi_dev = Adafruit_SPIDevice(_cs, _sclk, _miso, -1, 500000);

  initialized = false;
}

/**************************************************************************/
/*!
    @brief  Instantiates a new Adafruit_MAX31855 class using hardware SPI.
    @param _cs The pin to use for SPI Chip Select.
*/
/**************************************************************************/
Adafruit_MAX31855::Adafruit_MAX31855(int8_t _cs) {
  spi_dev = Adafruit_SPIDevice(_cs, 500000);

  initialized = false;
}

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Fri Jul 31, 2020 11:56 am

adafruit_support_bill wrote:Increasing the wire size would not help. The current levels are very low, so any voltage drop due to resistance is negligible.

SPI was designed as a short-distance protocol. For longer runs, things like noise and capacitance start to cause problems. Noise interferes with the signals and capacitance slows them down.

Using twisted pair helps to keep out the noise. To deal with capacitance, you can try slowing down the clock rate on the bus. That involves changes to the library.

If you look at lines 45 to 71 of Adafruit_MAX31855.cpp, you will see 2 places where it calls Adafruit_SPIDevice. In each case it passes in a frequency value of 1000000 (1 Megahertz). If you replace the 1000000 with 500000, that will cut the clock speed in half.

Code: Select all | TOGGLE FULL SIZE
/**************************************************************************/
/*!
    @brief  Instantiates a new Adafruit_MAX31855 class using software SPI.
    @param _sclk The pin to use for SPI Serial Clock.
    @param _cs The pin to use for SPI Chip Select.
    @param _miso The pin to use for SPI Master In Slave Out.
*/
/**************************************************************************/
Adafruit_MAX31855::Adafruit_MAX31855(int8_t _sclk, int8_t _cs, int8_t _miso) {
  spi_dev = Adafruit_SPIDevice(_cs, _sclk, _miso, -1, 500000);

  initialized = false;
}

/**************************************************************************/
/*!
    @brief  Instantiates a new Adafruit_MAX31855 class using hardware SPI.
    @param _cs The pin to use for SPI Chip Select.
*/
/**************************************************************************/
Adafruit_MAX31855::Adafruit_MAX31855(int8_t _cs) {
  spi_dev = Adafruit_SPIDevice(_cs, 500000);

  initialized = false;
}


I went into the library and changed those two lines of code and grabbed a MAX31855 wired it up with a thermocouple and uploaded the code. I got a value of 27 degrees C outside and the value changed accurately. This was using 15 feet of CAT5E cable. So slowing down the speed worked. Then I tried to upload the reduced frequency code into the Arduino that controls the fixture and I still get zero. Ive checked all my wiring everything. Now I have tried to reproduce the board experiment and cant get any value again even when reducing the frequency.. The chip seems to be very unpredictable I cant figure out what Im doing wrong. Any other ideas?

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Fri Jul 31, 2020 12:44 pm

You could try reducing the speed even further to 250000. But also double-check all your connections and solder-joints. You may have a marginal connection somewhere that is dropping out.

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Fri Jul 31, 2020 5:52 pm

adafruit_support_bill wrote:You could try reducing the speed even further to 250000. But also double-check all your connections and solder-joints. You may have a marginal connection somewhere that is dropping out.


If I do a continuity check between digital out and chip select I get a reading of close to 0 ohms looks like something may be shorting on the board. What do you think?

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Re: amplifier issues? (MAX31855)

by adafruit_support_bill on Sat Aug 01, 2020 8:00 am

That does sound like a possible short. If you disconnect one of those wires, you should be able to determine whether the short is on the board or somewhere in the wiring.

adafruit_support_bill
 
Posts: 78230
Joined: Sat Feb 07, 2009 10:11 am

Re: amplifier issues? (MAX31855)

by FARMHANDYO on Mon Aug 03, 2020 4:26 pm

adafruit_support_bill wrote:That does sound like a possible short. If you disconnect one of those wires, you should be able to determine whether the short is on the board or somewhere in the wiring.


So what I have ended up doing is moving the Arduino closer to the thermocouple amplifiers and using one wire connected to the Mega's TX pin and the nextion's RX pin. By having the sensors closer to the Arduino using short wire less than 1 foot I am now able to read the temperatures on the LCD.

FARMHANDYO
 
Posts: 18
Joined: Fri Jul 24, 2020 11:22 am

Please be positive and constructive with your questions and comments.