Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: September 18, 2013, 01:23:51 pm
Hi, by that time I have saved the circuit from post 15.
Here it is:


Can anybody help to solve this problem with a picture of the system working?
There is also this:
https://www.atlas-scientific.com/support.html

Thanks.
2  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: April 07, 2013, 06:27:23 pm
Hi there, any help please  smiley-red

Thanks
3  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: February 26, 2013, 09:48:38 am
Hi everyone, based on the design of the circuit that armeniki showed I have some doubts.
The capacitor C1 and C2 in 1 side takes 5v and on the other side takes ground and from that same side it goes to one pin of the 6N137. Is this correct? Also the RX and TX passes in the middle of those capacitor but they only have 2 points of contact, that RX and TX only crosses those capacitor psychically or is only because of space to drawing it?

Also the Arduiino RX must connect to stamp TX, and arduino TX must connect to stamp RX, but in the drawing the RX is connected to RX and TX connect to TX through 6N137 chips, is this correct?

Anyone can help for I be able to reproduce this solution?

Greetings.
4  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: February 06, 2013, 04:57:04 am
Hi armeniki,
thank you very much for your schematics. Right now I'm in search for those parts to buy them.
When I receive them all I will try to implement that.

Greetings smiley-wink
5  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: February 02, 2013, 03:03:53 pm
Hi now I understand how to use the mosfet. Whel I will try like dc42 said...

Quote
Hi everyone, as promised I am back reporting on what I've done with the results.

By the way, I'm not sure why you were told to get a MOSFET involved.. That's not necessary.

So, basically what I have done is take the +5VDC and GND from the arduino board to a dc to dc converter.  I used a Murata NME0505SC.

Then it's quite simple, take two 6N137 optocouplers and wire one to the RX and the other to TX. You'll need to use two resistors for each one, I just used 430R and then you need to put a .01 microfarad cap between pin 5 and 8 for each one per the datasheet. Obviously each of them will be on the separate ground/potentials.

Anyway, everything works perfectly now!! Yay! I have my readings stable and accurate with the probe circuit electrically isolated.

Can you post photos and the schematics of your design?
I will be really helpful, in case the mosfet don't work I can try this way!

Thanks you guys smiley-wink
6  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: February 01, 2013, 05:59:23 pm
Hi, sorry for the late answer.
It was because in the mean time I contacted Atlas Scientific about this issue. So this was the result:
Quote
Ok, this is what to do.
put a NPN mosfet on the ground line going into the E.C. circuit.
You will want to stop all GND from entering the E.C. circuit.
When you take your E.C. reading open the  NPN mosfet, take your readings then close the mosfet.
Your pH will still be a little off.
Recalibrate your pH with the E.C. probe in the pH calibration solution (the E.C. probe should be connected to the E.C. circuit and the GND line should be cut off with the PNP mosfet).
This has proven to be successful in fixing the pH / E.C. problem.

Quote
Put the NPN Mosfet at the ground line coming into the circuit.
You know, VCC and GND.
Cut the GND line that is powering the circuit not the ground line going to the probe.
 
As far as which mosfet to buy, there are 100’s.
Here is one that should work well for you: 2N7000_D26Z
 
Turn on the FET when you take an E.C. reading, turn it off when you are done taking readings.

Quote
Yes, place the mosfet between the Arduino and the ground line.
 
I am not 100% sure the 2N7000 will work .
However, I do believe it will work just fine.
It is a quality FET and that’s generally all you need.
 
If it were me, I would use it.

So, I'm a little lost where because I didn't understand very well ho to solve this. Anyone help?
In the mean time I bought 2N7000 mosfets:
http://www.fairchildsemi.com/ds/2N/2N7000.pdf

So my understanding I have to put this mosfet between the arduino and the Stamp in the ground line but i don't know how to connect it and use the mosfet.

Thanks for the welp!
7  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: December 10, 2012, 04:51:20 am
Hi what about this optocoupler:
http://arduino.cc/blog/2010/09/22/optocoupler-demystified/

Does it will work?
And I have to buy 2 of these, on for Rx and other for TX.

I also said that there are some RS232 IC's that do this isolation. Can you point me any that i can find on ebay?

Thanks.

Edit:
Fund this:
http://www.ebay.com/itm/1x-MAX251EPD-5V-Isolated-RS-232-2-Driver-2-Receiver-MAX251-/110753204175?pt=LH_DefaultDomain_0&hash=item19c967c7cf
8  Using Arduino / Sensors / Re: Arduino + PH probe in Aquarium. Ground Loop. Please help. on: December 09, 2012, 02:58:14 pm
Hi, first of all thank you very much for the answer.

My PH probe is this one:
http://www.marinedepot.com/American_Marine_Pinpoint_pH_Probe_pH_Replacement_Probes-American_Marine_Pinpoint_Monitors-AM1411-FITERPPH-vi.html

I think the cable and connectors are shielded so i don't think that's the problem...
So in your opinio I should power up the PH stamp with an  isolated DC-DC converter like that one you showed on ebay.
Second I should isolate the RX - TX that connects the arduino with the stamp with 2 optocouplers. Can you plese show-me a model available on ebay so that I'm able to buy it or the reference to search on my local store.
I also don't know how to connect the opctocupler but that will be another stage.

Thanks again.
9  Using Arduino / Sensors / Arduino + PH probe in Aquarium. Ground Loop. Please help. on: December 06, 2012, 05:14:32 pm
Hi, I'm making a project with arduino that monitor my reef aquarium. So one of the things that I have is PH monitoring.
To do that, I have the Atlas Scientific Ph Stamps:

http://atlas-scientific.com/product_pages/embedded/ph.html

My connection is like this:


When I mesure the PH inside a bottle or a glass it measures the PH very precise, but when I place the probe inside my aquarium it give me wrong values. I also noticed that when I turn off my watter pumps in the aquarium the reading is fine, but when I turn the pumps on the problem appears again.

I have read a lot about ground loops (http://www.all-about-ph.com/ground-loop-problems.html) and interference with pumps and noise that is inducted into the PH probe but I don't understand what I have to do/buy to solve this.

So for my understanding until now I have to buy  DC-DC power converter and an optical data isolator but I don't understand what chips to buy and how to connect them im my arduino conection like I showed.
For example this other controler show this:

http://www.splatco.com/sx10507.htm
Quote
This uses a transformer isolated DC-DC power converter, and an optical data isolator, to ensure there is no metallic (ohmic) connection between the pH probe and the controller. This isolation eliminates the interference that can be caused by ground loops.

Please give me some guidance about this. If what I think it is, is correct and how can I solve this issue.
Thank you vey much.
10  Using Arduino / Project Guidance / Arduino + PH probe in Aquarium. Ground Loop, galvanic isolation? on: November 27, 2012, 03:35:18 pm
Hi, I'm making a project with arduino that monitor my reef aquarium. So one of the things that I have is PH monitoring.
To do that, I have the Atlas Scientific Ph Stamps:

http://atlas-scientific.com/product_pages/embedded/ph.html

My connection is like this:


When I mesure the PH inside a bottle or a glass it measures the PH very precise, but when I place the probe inside my aquarium it give me wrong values. I also noticed that when I turn off my watter pumps in the aquarium the reading is fine, but when I turn the pumps on the problem appears again.

I have read a lot about ground loops (http://www.all-about-ph.com/ground-loop-problems.html) and interference with pumps and noise that is inducted into the PH probe but I don't understand what I have to do/buy to solve this.

So for my understanding until now I have to buy  DC-DC power converter and an optical data isolator but I don't understand what chips to buy and how to connect them im my arduino conection like I showed.
For example this other controler show this:

http://www.splatco.com/sx10507.htm
Quote
This uses a transformer isolated DC-DC power converter, and an optical data isolator, to ensure there is no metallic (ohmic) connection between the pH probe and the controller. This isolation eliminates the interference that can be caused by ground loops.

Please give me some guidance about this. If what I think it is, is correct and how can I solve this issue.
Thank you vey much.
11  Using Arduino / Sensors / Re: Arduino Mega 2560 + DallasTemperature DS18B20 doesn't work. Please help on: April 23, 2012, 07:16:27 pm
Hi, I also tried the one wire library, the latest version and it doesn't detect the adress of the Sensor:
Code:
#include <OneWire.h>

// OneWire DS18S20, DS18B20, DS1822 Temperature Example
//
// http://www.pjrc.com/teensy/td_libs_OneWire.html
//
// The DallasTemperature library can do all this work for you!
// http://milesburton.com/Dallas_Temperature_Control_Library

OneWire  ds(6);  // on pin 10

void setup(void) {
  Serial.begin(9600);
}


void loop(void) {
  byte i;
  byte present = 0;
  byte type_s;
  byte data[12];
  byte addr[8];
  float celsius, fahrenheit;
  
  if ( !ds.search(addr)) {
    Serial.println("No more addresses.");
    Serial.println();
    ds.reset_search();
    delay(250);
    return;
  }
  
  Serial.print("ROM =");
  for( i = 0; i < 8; i++) {
    Serial.write(' ');
    Serial.print(addr[i], HEX);
  }

  if (OneWire::crc8(addr, 7) != addr[7]) {
      Serial.println("CRC is not valid!");
      return;
  }
  Serial.println();
 
  // the first ROM byte indicates which chip
  switch (addr[0]) {
    case 0x10:
      Serial.println("  Chip = DS18S20");  // or old DS1820
      type_s = 1;
      break;
    case 0x28:
      Serial.println("  Chip = DS18B20");
      type_s = 0;
      break;
    case 0x22:
      Serial.println("  Chip = DS1822");
      type_s = 0;
      break;
    default:
      Serial.println("Device is not a DS18x20 family device.");
      return;
  }

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1);         // start conversion, with parasite power on at the end
  
  delay(1000);     // maybe 750ms is enough, maybe not
  // we might do a ds.depower() here, but the reset will take care of it.
  
  present = ds.reset();
  ds.select(addr);    
  ds.write(0xBE);         // Read Scratchpad

  Serial.print("  Data = ");
  Serial.print(present,HEX);
  Serial.print(" ");
  for ( i = 0; i < 9; i++) {           // we need 9 bytes
    data[i] = ds.read();
    Serial.print(data[i], HEX);
    Serial.print(" ");
  }
  Serial.print(" CRC=");
  Serial.print(OneWire::crc8(data, 8), HEX);
  Serial.println();

  // convert the data to actual temperature

  unsigned int raw = (data[1] << 8) | data[0];
  if (type_s) {
    raw = raw << 3; // 9 bit resolution default
    if (data[7] == 0x10) {
      // count remain gives full 12 bit resolution
      raw = (raw & 0xFFF0) + 12 - data[6];
    }
  } else {
    byte cfg = (data[4] & 0x60);
    if (cfg == 0x00) raw = raw << 3;  // 9 bit resolution, 93.75 ms
    else if (cfg == 0x20) raw = raw << 2; // 10 bit res, 187.5 ms
    else if (cfg == 0x40) raw = raw << 1; // 11 bit res, 375 ms
    // default is 12 bit resolution, 750 ms conversion time
  }
  celsius = (float)raw / 16.0;
  fahrenheit = celsius * 1.8 + 32.0;
  Serial.print("  Temperature = ");
  Serial.print(celsius);
  Serial.print(" Celsius, ");
  Serial.print(fahrenheit);
  Serial.println(" Fahrenheit");
}

and output:
Quote
No more addresses.
12  Using Arduino / Sensors / Arduino Mega 2560 + DallasTemperature DS18B20 doesn't work. Please help on: April 23, 2012, 05:12:16 pm
Hi everyone, I have the following setup:


And I have tried every simgle piece of tutorials on the web and no luck the device is never found. I have also read another problems with the Mega and the DS18B20:
http://forum.bildr.org/viewtopic.php?f=29&p=5471

But no solution.

The code I use is this:
Code:
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 12
#define TEMPERATURE_PRECISION 9

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);


int numberOfDevices; // Number of temperature devices found

DeviceAddress tempDeviceAddress; // We'll use this variable to store a found device address

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
  
  // Grab a count of devices on the wire
  numberOfDevices = sensors.getDeviceCount();
  
  // locate devices on the bus
  Serial.print("Locating devices...");
  
  Serial.print("Found ");
  Serial.print(numberOfDevices, DEC);
  Serial.println(" devices.");
  

  // report parasite power requirements
  Serial.print("Parasite power is: ");
  if (sensors.isParasitePowerMode()) Serial.println("ON");
  else Serial.println("OFF");
  
  // Loop through each device, print out address
  for(int i=0;i<numberOfDevices; i++)
  {
    // Search the wire for address
    if(sensors.getAddress(tempDeviceAddress, i))
{
Serial.print("Found device ");
Serial.print(i, DEC);
Serial.print(" with address: ");
printAddress(tempDeviceAddress);
Serial.println();

Serial.print("Setting resolution to ");
Serial.println(TEMPERATURE_PRECISION,DEC);

// set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
sensors.setResolution(tempDeviceAddress, TEMPERATURE_PRECISION);

Serial.print("Resolution actually set to: ");
Serial.print(sensors.getResolution(tempDeviceAddress), DEC);
Serial.println();
}else{
Serial.print("Found ghost device at ");
Serial.print(i, DEC);
Serial.print(" but could not detect address. Check power and cabling");
}
  }

}

// function to print the temperature for a device
void printTemperature(DeviceAddress deviceAddress)
{
  // method 1 - slower
  //Serial.print("Temp C: ");
  //Serial.print(sensors.getTempC(deviceAddress));
  //Serial.print(" Temp F: ");
  //Serial.print(sensors.getTempF(deviceAddress)); // Makes a second call to getTempC and then converts to Fahrenheit

  // method 2 - faster
  float tempC = sensors.getTempC(deviceAddress);
  Serial.print("Temp C: ");
  Serial.print(tempC);
  Serial.print(" Temp F: ");
  Serial.println(DallasTemperature::toFahrenheit(tempC)); // Converts tempC to Fahrenheit
}

void loop(void)
{
  // call sensors.requestTemperatures() to issue a global temperature
  // request to all devices on the bus
  Serial.print("Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");
  
  
  // Loop through each device, print out temperature data
  for(int i=0;i<numberOfDevices; i++)
  {
    // Search the wire for address
    if(sensors.getAddress(tempDeviceAddress, i))
{
// Output the device ID
Serial.print("Temperature for device: ");
Serial.println(i,DEC);

// It responds almost immediately. Let's print out the data
printTemperature(tempDeviceAddress); // Use a simple function to print out the data
}
//else ghost device! Check your power requirements and cabling

  }
}

// function to print a device address
void printAddress(DeviceAddress deviceAddress)
{
  for (uint8_t i = 0; i < 8; i++)
  {
    if (deviceAddress[i] < 16) Serial.print("0");
    Serial.print(deviceAddress[i], HEX);
  }
}[/quote]


Bu I allways get:
[quote]Dallas Temperature IC Control Library Demo
Locating devices...Found 0 devices.
Parasite power is: OFF
Requesting temperatures...DONE
Requesting temperatures...DONE

If anyone could help I be very greatfull.
Greetings.
13  Using Arduino / Sensors / Re: Lilypad accelerometer returning weird symbols on: March 09, 2012, 05:51:33 am
I had also that on a serial connection. That problem was that i didn't connected the GROUND cable to arduino.
14  Using Arduino / Sensors / Re: Arduino Mega 2560 + Detect Power Outage whit 3V-DC adapter on: March 09, 2012, 05:50:14 am
Hi thank you very much for reply. i didn't tested the DC-3V adaptor because I'am afraid that it has fluctuations in voltage and pumps more then 5v.
How can I protect arduino from energy spikes form de DC-3V adapater? A resistence in the midle or one opto-isolator?
The problem is that I don't know how to use those things. Anyone knows?

Greetings.
15  Using Arduino / Sensors / Re: Arduino Mega 2560 + Detect Power Outage whit 3V-DC adapter on: March 06, 2012, 11:22:04 am
Hi, thanks for the explanation.
So my connection of the DC-3V adapter is well made? With the positive of the DC Adapter connected to a Arduino analog pin and the ground connected to Arduino ground?
And then on the code I just have to make analoRead() to the Analog Pin that I connect.

Pages: [1] 2