|
Re: Noise on Voltage/Current analog read
You could also bracket the analogRead() and averaging code so it runs at a fixed interval largely independent of the MCU frequency, etc. Below is for 1 Hz samples in which case you would probably
You could also bracket the analogRead() and averaging code so it runs at a fixed interval largely independent of the MCU frequency, etc. Below is for 1 Hz samples in which case you would probably
|
By
Howard Dutton
·
#401
·
|
|
Re: Noise on Voltage/Current analog read
To do this well you'd probably want to change some code from WebAjax:
#if STAT_DC_CURRENT_ANALOG != OFF
f = toDCAmps(analogRead(STAT_DC_CURRENT_ANALOG));
strcpy_P(temp1,htmlInnerStatusDCA);
To do this well you'd probably want to change some code from WebAjax:
#if STAT_DC_CURRENT_ANALOG != OFF
f = toDCAmps(analogRead(STAT_DC_CURRENT_ANALOG));
strcpy_P(temp1,htmlInnerStatusDCA);
|
By
Howard Dutton
·
#400
·
|
|
USR-ES1 W5500 Lose IP
I installed the USR-ES1 ethernet adapter, it has W5500 chip, works well but i have a little issue with it when conected to any router in DHCP mode (i use "Ethernet.begin(m);" instead of
I installed the USR-ES1 ethernet adapter, it has W5500 chip, works well but i have a little issue with it when conected to any router in DHCP mode (i use "Ethernet.begin(m);" instead of
|
By
rad112g@...
·
#399
·
|
|
Noise on Voltage/Current analog read
Hello Howard, im getting very different values for voltage and current reading, im using 2k2 and 220 Ohm for voltage and ACS712 20A (0,1V/A), some instant measurements differs in about 1V/1A from
Hello Howard, im getting very different values for voltage and current reading, im using 2k2 and 220 Ohm for voltage and ACS712 20A (0,1V/A), some instant measurements differs in about 1V/1A from
|
By
rad112g@...
·
#398
·
|
|
Re: Problems after implementing weater functions
Good morning
Thank you Howard for your answers.
I will slow down the I2C bus. Can I go down as low as 10 or 20 Hz ? is there a minimum frequency specified ?
Good morning
Thank you Howard for your answers.
I will slow down the I2C bus. Can I go down as low as 10 or 20 Hz ? is there a minimum frequency specified ?
|
By
Laurent HOUSSAYE
·
#397
·
|
|
Re: Problems after implementing weater functions
Sorry, glitched on that, it's 20000 Hz.
Sorry, glitched on that, it's 20000 Hz.
|
By
Howard Dutton
·
#396
·
|
|
Re: Problems after implementing weater functions
I2C speed 10000, is in Hz.
Weather stuff updates at 32 second intervals. Log entries every 30 seconds are from running averages read from sensors every 2 seconds. Data is pulled from sensors as
I2C speed 10000, is in Hz.
Weather stuff updates at 32 second intervals. Log entries every 30 seconds are from running averages read from sensors every 2 seconds. Data is pulled from sensors as
|
By
Howard Dutton
·
#395
·
|
|
Re: Problems after implementing weater functions
One problem resolved ! The Weather Charts are now correctly displayed once I have cleared the browser (Firefox) cache...
Now it is time to tackle the I2C bus sensors problem !
Thanks a lot Howard for
One problem resolved ! The Weather Charts are now correctly displayed once I have cleared the browser (Firefox) cache...
Now it is time to tackle the I2C bus sensors problem !
Thanks a lot Howard for
|
By
Laurent HOUSSAYE
·
#394
·
|
|
Re: Problems after implementing weater functions
An interesting extract from a forum :
"The insane sounding lengths like 10, 25, and 100m are perfectly possible, and I use the method often (with UART not I2C, but the method stands) when I need to
An interesting extract from a forum :
"The insane sounding lengths like 10, 25, and 100m are perfectly possible, and I use the method often (with UART not I2C, but the method stands) when I need to
|
By
Laurent HOUSSAYE
·
#393
·
|
|
Re: Problems after implementing weater functions
I forgot to join a picture :
I forgot to join a picture :
|
By
Laurent HOUSSAYE
·
#392
·
|
|
Re: Problems after implementing weater functions
Goodnews !!! I opened OCS web page from another computer in my home and Weather chart is OK !!!! software is Firefox on both computers... I will clear the cache tomorrow morning on the "faulty"
Goodnews !!! I opened OCS web page from another computer in my home and Weather chart is OK !!!! software is Firefox on both computers... I will clear the cache tomorrow morning on the "faulty"
|
By
Laurent HOUSSAYE
·
#391
·
|
|
Re: Problems after implementing weater functions
Now... did you ever clear the browser cache?
This is specifically designed so the OCS doesn't need to send that big file every time a page is loaded, so a bad copy in the web browser cache can keep it
Now... did you ever clear the browser cache?
This is specifically designed so the OCS doesn't need to send that big file every time a page is loaded, so a bad copy in the web browser cache can keep it
|
By
Howard Dutton
·
#390
·
|
|
Re: Problems after implementing weater functions
I2C rates?
See Weather.ino near the bottom...
// slow down i2c so long distances work, still plenty fast for our little data being moved around
Wire.setClock(20000);
I2C rates?
See Weather.ino near the bottom...
// slow down i2c so long distances work, still plenty fast for our little data being moved around
Wire.setClock(20000);
|
By
Howard Dutton
·
#389
·
|
|
Re: Problems after implementing weater functions
Oh yes it does have content, I see 225K size is present. It's all spaces " " and data is positioned by line
OCS is writing the file and SD is working.
Btw:
Size = exactly 80 bytes per line x 2
Oh yes it does have content, I see 225K size is present. It's all spaces " " and data is positioned by line
OCS is writing the file and SD is working.
Btw:
Size = exactly 80 bytes per line x 2
|
By
Howard Dutton
·
#388
·
|
|
Re: Problems after implementing weater functions
That's longer than I'd ever consider using. Google it.
That's longer than I'd ever consider using. Google it.
|
By
Howard Dutton
·
#387
·
|
|
Re: Problems after implementing weater functions
I have run the following sketch to test the SD card communication (copied from internet) :
#include <SPI.h>
#include <SD.h>
File myFile;
String buffer;
String filename = "test";
void setup() {
I have run the following sketch to test the SD card communication (copied from internet) :
#include <SPI.h>
#include <SD.h>
File myFile;
String buffer;
String filename = "test";
void setup() {
|
By
Laurent HOUSSAYE
·
#386
·
|
|
Re: Problems after implementing weater functions
I have inserted another SD card (8 Gb reformatted) with Chart.js placed in the root directory, but no change : Weather charts are empty.
New : I now have a file written on the SD Card :
But if I open
I have inserted another SD card (8 Gb reformatted) with Chart.js placed in the root directory, but no change : Weather charts are empty.
New : I now have a file written on the SD Card :
But if I open
|
By
Laurent HOUSSAYE
·
#385
·
|
|
Re: Problems after implementing weater functions
The length of the I2C cable is more around 30 m...
The length of the I2C cable is more around 30 m...
|
By
Laurent HOUSSAYE
·
#384
·
|
|
Re: Problems after implementing weater functions
I have inserted a 16 Gb SD card. May be it is to much ? Up to now, no file is written on the SD card, which only contains Chart.js.
Also what is the maximum length of cable for the i2c bus ? Can the
I have inserted a 16 Gb SD card. May be it is to much ? Up to now, no file is written on the SD card, which only contains Chart.js.
Also what is the maximum length of cable for the i2c bus ? Can the
|
By
Laurent HOUSSAYE
·
#383
·
|
|
Re: Problems after implementing weater functions
Check the SD card contents to see that the log files are being written. They are plain text files, you can open them in notepad on a PC.
Read up on the Arduino SD card support, what works and what
Check the SD card contents to see that the log files are being written. They are plain text files, you can open them in notepad on a PC.
Read up on the Arduino SD card support, what works and what
|
By
Howard Dutton
·
#382
·
|