All times are UTC + 8 hours




Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Mar 16th, '13, 13:18 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Hi

I have start a separate thread here so that anyone looking at using an Arduino Mega R3 for data logging can have some where to find the details or at least hopefully get an idea or two from my experience.

This is my first attempt at using an Arduino, a so called refresher programming with C++. I normally use Rad Studio and so have not used this much C++ in a very long time so please those proficient in C++ be kind to me.

I was lead to the Arduino platform by a post from Erbey "Arduino Datalogger" http://www.backyardaquaponics.com/forum/viewtopic.php?f=50&t=11072 thank you for the push.

It just so happens that when I purchased my items on line it was a Mega so here we are.

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
    Advertisement
 
PostPosted: Mar 16th, '13, 13:46 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Board : Arduino Mega 2560 R3 2012 ATMEGA16U2

Ethernet shield : Arduino W5100 Ethernet Shield SD PoE Ready

RTC : Arduino I2C RTC DS1307 AT24C32 Real Time Clock Module

Temp Probes : Waterproof Digital Thermal Probe or Sensor DS18B20

LCD : Freetronics 16x2

one Freetronics prototype board to locate the RTC and resistor for the probes and probe terminals.

Currently the system logs the results from 4 temperature probes to the serial port, SD card and LCD screen.

The data to the serial port can be turned off and is used for testing only.

Data written to the SD card is in a separate file for each day with the file name made up from the year, month and day of the recording. The first recording after midnight will generate a new file name.

Each record has a datetime stamp then data from probes 1 to 4 laid out like a csv file to look like :-
"16/03/2013 15:45:26,19.31,19.19,18.31,18.44"

The LCD screen shows the datatime stamp from when the last probe reading was taken on row one. With row 2 rotating the name and results from the 4 probes one at a time in 5 sec intervals. This rotation of the results keeps on going with the datatime stamp and results updated at the next probe read.

Timing for the probe readings and LCD display is by using a future set datetime as a trigger so that the system can respond to other inputs while waiting for the correct time to read the probes or update the LCD.

The reason for this is so that I use the built in web server to allow one of my real servers to poll for the data to insert it into a database. But this is yet to happen... Stage 2

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 16th, '13, 22:00 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Attachment:
File comment: Arduino Mega R3 and Ethernat Shield with SD
_MG_0463.JPG
_MG_0463.JPG [ 131.78 KiB | Viewed 14738 times ]


This next one has the RTC clamped to the Ground and 5V terminals on the right.
The red wire is the SDA pin 20 and the brown wire is the SCL pin 21 on the Mega.

On the left is the 4.7K resistor pined between 5v and the data line of the probes. The green wire is the probe data line to pin 22 on the Mega.
Attachment:
File comment: Freetronics Prototyping board
_MG_0461.JPG
_MG_0461.JPG [ 219.68 KiB | Viewed 14738 times ]


Nicely stacked on top of the Mega and Ethernet shield.
Attachment:
_MG_0464.JPG
_MG_0464.JPG [ 131.33 KiB | Viewed 14738 times ]

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 16th, '13, 22:08 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
With the LCD I had to remove pin D4 as it was in conflict with the SD on the Ethernet shield.
I then added a jumper to D4 on the LCD so that it could be placed into the D2 screw terminal on the Prototyping shield below it.
Attachment:
_MG_0465.JPG
_MG_0465.JPG [ 122.1 KiB | Viewed 14739 times ]

Attachment:
_MG_0466.JPG
_MG_0466.JPG [ 149.42 KiB | Viewed 14739 times ]


The SDA pin 20, SLC pin 21 and temperature lead to pin 22 on the Mega.
Attachment:
_MG_0472.JPG
_MG_0472.JPG [ 140.41 KiB | Viewed 14739 times ]

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 16th, '13, 22:09 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Finally a running display.
Attachment:
_MG_0493.JPG
_MG_0493.JPG [ 197.92 KiB | Viewed 14739 times ]

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 16th, '13, 22:13 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
The sketch as it is currently running. it is just over 34K in size at present.

#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include "RTClib.h"
#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>
#include <LiquidCrystal.h>

// Pins in use
// 20 21 RTC - SDA - SLC
// 3 2 5 6 7 8 9 LCD
// 22 ONE WIRE BUS
// 10 11 12 13 53 ETHERSHIELD
// 4 SD

//...........................................................
// defines
//...........................................................
// LCD
//#define BUTTON_ADC_PIN A0 // A0 is the button ADC input
#define LCD_BACKLIGHT_PIN 3 // D3 controls LCD backlight
//some example macros with friendly labels for LCD backlight/pin control, tested and can be swapped into the example code as you like
#define LCD_BACKLIGHT_OFF() digitalWrite( LCD_BACKLIGHT_PIN, LOW )
#define LCD_BACKLIGHT_ON() digitalWrite( LCD_BACKLIGHT_PIN, HIGH )

// do we print to serial
#define ECHO_TO_SERIAL false

// Data wire is plugged into pin 10 on the Arduino
#define ONE_WIRE_BUS 22

// RTC
RTC_DS1307 RTC;

// LCD
LiquidCrystal lcd( 8, 9, 2, 5, 6, 7 ); //Pins for the freetronics 16x2 LCD shield. LCD: ( RS, E, LCD-D4, LCD-D5, LCD-D6, LCD-D7 )

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

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

// Assign the addresses of your 1-Wire temp sensors.
// Working Probes
//DeviceAddress Probe01 = { 0x28, 0xD2, 0xCD, 0xE6, 0x03, 0x00, 0x00, 0xDE };
//DeviceAddress Probe02 = { 0x28, 0xA8, 0xCD, 0xE6, 0x03, 0x00, 0x00, 0x89 };
//DeviceAddress Probe03 = { 0x28, 0xB2, 0xBB, 0xE6, 0x03, 0x00, 0x00, 0xEC };
//DeviceAddress Probe04 = { 0x28, 0x99, 0xD0, 0xE6, 0x03, 0x00, 0x00, 0xC3 };

// test Probes
DeviceAddress Probe01 = { 0x28, 0x82, 0xBF, 0xE6, 0x03, 0x00, 0x00, 0x1E };
DeviceAddress Probe02 = { 0x28, 0xB1, 0xCB, 0xE6, 0x03, 0x00, 0x00, 0xD8 };
DeviceAddress Probe03 = { 0x28, 0xF3, 0xC9, 0xE6, 0x03, 0x00, 0x00, 0x40 };
DeviceAddress Probe04 = { 0x28, 0xEB, 0xD5, 0xE6, 0x03, 0x00, 0x00, 0xE7 };

// Initialize the Ethernet server library
// with the IP address and port you want to use
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,50,40);

// (port 80 is default for HTTP):
EthernetServer server(80);

//...........................................................
// general variables
//...........................................................
// SD Card
// for the ethernet shield, we use digital pin 2 for the SD cs line
const int chipSelect = 4;
// interval for logging
const int LogInterval = 900; // 15 minutes
const int LCDInterval = 5; // 5 sec

//...........................................................
// general variables
//...........................................................
// log file
File logFile;
char CurrentLogName[] = "00000000.txt";
char LastLogName[] = "00000000.txt";
String DataTimeStamp;
unsigned long NextRun = 0;
unsigned long NextRunLCD = 0;

// probe descriptions
char Probe01N[10] = "Tank";
char Probe02N[10] = "Sump";
char Probe03N[10] = "GBed";
char Probe04N[10] = "OutSide";

// probe results
double ProbeR01, ProbeR02, ProbeR03, ProbeR04;

// rotating lcd display
int nextprobe = 0;

//...........................................................
// setup
//...........................................................
void setup() {
// start serial port
#if ECHO_TO_SERIAL
Serial.begin(9600);
#endif

digitalWrite( LCD_BACKLIGHT_PIN, HIGH ); //backlight control pin D3 is high (on)
pinMode( LCD_BACKLIGHT_PIN, OUTPUT ); //D3 is an output
//set up the LCD number of columns and rows:
lcd.begin( 16, 2 );
lcd.setCursor( 0, 0 ); //top left
lcd.print( "LCD READY.." );
lcd.setCursor( 0, 1 ); //top left
lcd.print( " " );

Wire.begin();
RTC.begin();
RTC.sqw(1); //0 Led off - 1 Freq 1Hz - 2 Freq 4096kHz - 3 Freq 8192kHz - 4 Freq 32768kHz
if (! RTC.isrunning()) {
#if ECHO_TO_SERIAL
Serial.println("RTC is NOT running!");
#endif
logFile.println("// RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}

// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// Note that even if it's not used as the CS pin, the hardware SS pin
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
// or the SD library functions will not work.
// disable w5100 SPI while starting SD
pinMode(53,OUTPUT);
digitalWrite(53,HIGH);

#if ECHO_TO_SERIAL
Serial.print("Starting SD...");
#endif

if(SD.begin(chipSelect) == 0) {
#if ECHO_TO_SERIAL
Serial.println("SD failed");
#endif
}
else
{
#if ECHO_TO_SERIAL
Serial.println(F("ok"));
#endif
}

#if ECHO_TO_SERIAL
Serial.print(F("Starting w5100..."));
#endif

lcd.setCursor( 0, 0 ); //top left
lcd.print( "Starting w5100..." );

// start the ethernet card
Ethernet.begin(mac, ip);
server.begin();

#if ECHO_TO_SERIAL
Serial.println(Ethernet.localIP());
Serial.println("Ethernet Ready...");
#endif

// lcd.setCursor( 0, 0 ); //top left
// lcd.print( "Ethernet Ready..." );

if (! startlogfile()) {
#if ECHO_TO_SERIAL
Serial.println("failed to write to card!");
#endif
}
}

//...........................................................
// startlogfile
//...........................................................
// this where we set the log files up
boolean startlogfile()
{
generatedatetimecodes();

for(int x = 0; x < 11; x++) {
LastLogName[x] = CurrentLogName[x];
}

logFile = SD.open(CurrentLogName, FILE_WRITE);
// if the file opened okay, write to it:
if (logFile) {
// the file existed so write a new header then close the it
logFile.print("DateTime,");
logFile.print(Probe01N);
logFile.print(",");
logFile.print(Probe02N);
logFile.print(",");
logFile.print(Probe03N);
logFile.print(",");
logFile.println(Probe04N);
logFile.flush();
logFile.close();
return true;
}
else {
return false;
}
}

//...........................................................
// generatedatetimecodes
//...........................................................
// we format the two types of time codes required
void generatedatetimecodes()
{
DateTime now = RTC.now();
int temp;
String SYear, SMonth, SDay, SHour, SMin, SSec;

SYear = (String)now.year();

temp = now.month();
if (temp < 10) {
SMonth = ("0" + (String)temp);
}
else {
SMonth = (String)temp;
}

temp = now.day();
if (temp < 10) {
SDay = ("0" + (String)temp);
}
else {
SDay = (String)temp;
}

temp = now.hour();
if (temp < 10) {
SHour = ("0" + (String)temp);
}
else {
SHour = (String)temp;
}

temp = now.minute();
if (temp < 10) {
SMin = ("0" + (String)temp);
}
else {
SMin = (String)temp;
}

temp = now.second();
if (temp < 10) {
SSec = ("0" + (String)temp);
}
else {
SSec = (String)temp;
}

// log file name
// Year
for(int x = 0; x < 4; x++) {
CurrentLogName[x] = SYear[x];
}

// Month
for(int x = 0; x < 2; x++) {
CurrentLogName[x + 4] = SMonth[x];
}

// Day
for(int x = 0; x < 2; x++) {
CurrentLogName[x + 6] = SDay[x];
}

// log date time stamp
DataTimeStamp = SDay;
DataTimeStamp += "/";
DataTimeStamp += SMonth;
DataTimeStamp += "/";
DataTimeStamp += SYear;
DataTimeStamp += " ";
DataTimeStamp += SHour;
DataTimeStamp += ":";
DataTimeStamp += SMin;
DataTimeStamp += ":";
DataTimeStamp += SSec;
}

//...........................................................
// printTemperature
//...........................................................
// read our Dallas Temperature probes DS18B20
double printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
return 0;
}
else {
return tempC;
}
}

//...........................................................
// displaylog
//...........................................................
void displaylog()
{
sensors.requestTemperatures();

ProbeR01 = printTemperature(Probe01);
ProbeR02 = printTemperature(Probe02);
ProbeR03 = printTemperature(Probe03);
ProbeR04 = printTemperature(Probe04);

generatedatetimecodes();

// if the new log file name does not match the last one
// ceate a new one with headers.
if (strcmp(LastLogName, CurrentLogName)) {
startlogfile();
}

#if ECHO_TO_SERIAL
Serial.print(DataTimeStamp);
Serial.print(",");
Serial.print(ProbeR01);
Serial.print(",");
Serial.print(ProbeR02);
Serial.print(",");
Serial.print(ProbeR03);
Serial.print(",");
Serial.println(ProbeR04);
#endif

// log the data to file
logFile = SD.open(CurrentLogName, FILE_WRITE);
// if the file opened okay, write to it:
if (logFile) {
// the file existed so write a new header then close it
logFile.print(DataTimeStamp);
logFile.print(",");
logFile.print(ProbeR01);
logFile.print(",");
logFile.print(ProbeR02);
logFile.print(",");
logFile.print(ProbeR03);
logFile.print(",");
logFile.println(ProbeR04);
logFile.flush();
logFile.close();
}
}

//...........................................................
// main
//...........................................................
void loop() {
// data logging
// we check if we are at our future time yet
// if so we display the logs and set a new future time
// get the current time
DateTime now = RTC.now();
unsigned long CurrentTime = now.unixtime();
if (CurrentTime >= NextRun) {
// set the next run time
NextRun = (now.unixtime() + LogInterval);
displaylog();
}

// lcd display to show temps
// we check if we are at our future time yet
// if so we display probe results in sequence and set a new future time
if (CurrentTime >= NextRunLCD) {
// set the next run time
NextRunLCD = (now.unixtime() + LCDInterval);
lcd.setCursor( 0, 0 ); //top left
lcd.print(DataTimeStamp);

switch (nextprobe) {
case 1:
lcd.setCursor( 0, 1 ); //bottom left
lcd.print(" Tank : ");
lcd.print(ProbeR01);
break;
case 2:
lcd.setCursor( 0, 1 ); //bottom left
lcd.print(" Sump : ");
lcd.print(ProbeR02);
break;
case 3:
lcd.setCursor( 0, 1 ); //bottom left
lcd.print("M G-Bed : ");
lcd.print(ProbeR03);
break;
case 4:
lcd.setCursor( 0, 1 ); //bottom left
lcd.print("Outside : ");
lcd.print(ProbeR04);
break;
}
// index our nextprobe couter and if we are over 3 the reset to 0
nextprobe ++;
if (nextprobe > 4) nextprobe = 0;
}
}

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Last edited by Johny5 on Mar 16th, '13, 22:22, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mar 16th, '13, 22:21 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Unfortunately the formatting on the above code has been lost in the posting. :)

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 17th, '13, 21:07 
Offline
Bordering on Legend
Bordering on Legend

Joined: Mar 3rd, '10, 12:09
Posts: 431
Images: 0
Gender: Male
Are you human?: yes
Location: Brisbane, QLD
you can place in inside [code][/code] blocks to keep formatting

_________________
My system in Brisbane viewtopic.php?f=18&t=7129


Top
 Profile Personal album  
Reply with quote  
PostPosted: Mar 18th, '13, 05:52 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
thank you orcy2010

I will use the [code][/code] next time I post the updated code.

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 18th, '13, 06:39 
Offline
A posting God
A posting God
User avatar

Joined: Dec 10th, '11, 15:03
Posts: 2089
Gender: Male
Are you human?: What is human?
Location: Perth Hills
Good to see some more dataloggers in the works Johny5 :)

Maybe if you sent a pm to one of many wonderful mods they could chuck the code into the code tags for you and get the formatting correct :)

_________________
Aquarium System
IBC System
Blog


Top
 Profile  
Reply with quote  
PostPosted: Mar 18th, '13, 11:42 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5276
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
I'd re-indent it, but It might end up looking like my code, and you really, really don't want that :)

If you care, you can PM me a text file with correct formatting, and I'll replace it.

And from memory, I think the code block thinggy doesn't like tabs.

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
Reply with quote  
PostPosted: Mar 18th, '13, 11:58 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Thanks BullwinkleII

I will be uploading the new code with the web server soon so I might as well just wait for that since I have it running and am just seeing what else needs to be done while I am at it.

When work does not get in the way that is.

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 18th, '13, 12:02 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5276
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
You mentioned being new to Arduino, but have you made anything with other platforms? ie pic or PICAXE?

I'm looking for comparisons.

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
Reply with quote  
PostPosted: Mar 18th, '13, 14:29 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
I am afraid that commercial windows programming with very little c is it until now. Mind you I did start in the dark ages of only having a cassette tape recorder to backup the program and data. No hard drives.

For me (and I may change my mind later) the Arduino does the job. Its low over heads are looking good. I was surprised at how quickly it can return simply html code while still logging data to the LCD and SD card.

But as I said, later on I may need to look at something with more grunt.

I have six snake cages that will be changed over to IR heat lamps and that will require zero crossing control of their power supplies. I will see how the Arduino goes with that. That is for later in the year.

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
PostPosted: Mar 26th, '13, 18:12 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: Feb 9th, '13, 15:36
Posts: 423
Images: 0
Gender: Male
Are you human?: Yes
Location: Gawler South, South Australia
Hi every one.

I can finally post the final version of the system.

Since the last post I have made a few changes

Added the probe results into arrays. Yes each one has its array own as I could not get a multidimensional array to work for me in C. But it works.

The arrays allow for the accumulation of the last two hours readings. No need to read data back from the SD card.

Added the ethernet interface. It simply sends back the last two hours worth of readings on each request in name/value pairs.

eg."Probe1:22.22"

No other information is sent in the page.

Also added two more probes for testing water temps in experiments.

The results shown on the LCD are now in real time with only the results from every 15 minutes going into the arrays.

The Mega and LCD are both located in the lid of the enclosure. This way I just need to unplug the power and ethernet cables, then undo the three screws terminals holding the power and sensor lines for the probes and the whole thing can come inside for a reprogram. The rest of the wiring can stay in the enclosure.

Attachment:
_MG_0499.JPG
_MG_0499.JPG [ 258.53 KiB | Viewed 14632 times ]


The back of the enclosure.

Attachment:
_MG_0501.JPG
_MG_0501.JPG [ 208.71 KiB | Viewed 14630 times ]


Completed and ready to go into service.

Attachment:
_MG_0503.JPG
_MG_0503.JPG [ 149.96 KiB | Viewed 14630 times ]


There is an oops to go with this. The extra five holes you can see next to each bolt is where I first located the Mega board, to only find that one of the shields when fitted was outside of the box as it was wider that the Mega board.

So make sure that you put all the shields together before you try to locate your board mounting position. (Too much of a rush to see it actually installed and logging).

One more point not visible in the above photos is that when I added the extra two probes none of the probes would return any results. After a long day trying out power supplies including independent supplies for the probes and Mega board I found a simple fix.

But before that I was thrown a curve ball as my test probes inside when added to the two extra probes worked fine. The only difference between my test probes and the working probes is the 4m long cables.

So it looks like the probe telemetry does not like six 4m long cables. It does work with four 4m cables quite fine. The fix is to duplicate the 4.7K resistor for the extra probes but still using the same sense cable on pin 22.

Just to be clear both 4.7K resistors share the same cable to pin 22. Both setups have their own 5v and ground supplies from the common power supply line on the Mega.

I also changed the 1/4 resistor in the photo to a 2w version for both.

As this was an easy fix once discovered I have no reason to look further into the problem but perhaps it is asking too much of the single 4.7K resistor to pull six probe data lines high. I did not like the idea of changing the resistor value to one that worked, only to have a cable break and the remaining probes fried due to the wrong value resistor for the remaining probes.

All the documentation indicates caution with the resistor value and that the one resistor should be OK for all the probes. I guess that they must have had short leads for their testing.

_________________
Bernhard

System MKII
System thread

Datalogger

220L system II


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group
Portal by phpBB3 Portal © phpBB Türkiye
[ Time : 0.168s | 20 Queries | GZIP : Off ]