@Anticimex I do agree. It CAN be used, but it is just a bad choice as the ethernet libraries do not leave much space for much else.
ENC28J60 in that aspect is worse than the W5100.
I tried it more like a proof of concept and it does work pretty well just passing data, but I put everything on an ESP8266. OK, WiFi rather than Ethernet but thats OK for me
Posts made by Ed1500
-
RE: 💬 Building an Ethernet Gateway
-
RE: Gas Meter Reading Using a Magnetometer
@dynamite yes i do not see a problem in measuring the amplitude. I am not sure if, when measuring current through a CT, the frequency will change, as that is just the grid frequency, but probably you were referring to its use in measuring gas flow.
My idea to use a dedicated attiny is simply so the ESP will be freed of the burden of calculation/measuring, as this will be a rather continuous process. The code will probably fit an attiny13, but I have never tried i2c on an attiny13, but I have on an attiny85, so i am pretty sure it will work on the 25 and 45 as well. The 13 I still have to try
-
RE: Gas Meter Reading Using a Magnetometer
@dynamite indeed, that is why i was looking at yr code. On the other hand, if the frequency is known and you know the amplitude, you can make a calculation.... but then again, in order to know the amplitude you need a series of measurements.
Thats why i was thinking to let a dedicated attiny do that: all it needs to do is to measure and put the result in its I2C registers. The esp8266 then can do a hoist of other things and just pull the powerparameters when needed -
RE: Gas Meter Reading Using a Magnetometer
@Yveaux yes, As a matter of fact I looked into that one, I think they can be had for 60cts, but the 'problem' is they need a galvanic connection to the grid and to the esp as well. I want it to be completely isolated from the grid
-
RE: Gas Meter Reading Using a Magnetometer
@dpcr thanks, indeed, I am using a CT as well, adding a dc bias, still balancing between just measuring the amplitude of the sinus, or measuring all along the sinus. I think i will have an attiny 25 or ideally an attiny13 do this as a dedicated I2C slave and have that read by an ESP8266. Ofcourse there is the sonoff Touch, but thats a tadd too much to put on a large number of devices.
-
RE: Gas Meter Reading Using a Magnetometer
@dpcr Thanks, yes i read how you did it with locating the sweet spot, but I was thrown off by the 'no magnet' statement.
'connecting' my meter is also still in the cards, no idea if it has a magnet or not (in which case i may use a Hall sensor), otherwise i may try the magnetometer -
RE: Gas Meter Reading Using a Magnetometer
@dynamite thanks, i know pretty well how the magnetometer works, but I guess i was thrown off by the statement 'no magnet', but I guess it must be weak magnetization of the various parts then
-
RE: Gas Meter Reading Using a Magnetometer
@dpcr very interesting, I may use some of your sine measuring approach in a powermeter i make.
Nevertheless, i have a question: you say you have no magnet in yr meter, so what is it the magnometer is actually picking up?
-
RE: My Ethernet Gateway Board (W5500)
@jpaulin OK, thanks. Just seemed like a rather long antenna in the picture.
I am using this antenna, with very good results. Better than the 1/4 wavelength whip -
RE: My Ethernet Gateway Board (W5500)
@jpaulin Thanks, that is good to know. I have the RFM69 HW running with a W5100/Promini. W5100 module needed a bit of a hardware tweak for SPI, but works well. Now I probably would have opted for the 5500 as well.
I just use it to communicate between two properties at some 500 meter distance, most sensors I use are attached to ESP8266Seems like a rather long Antenna on yr module. What frequency are you on?
-
RE: 💬 Soil Moisture Sensor
@RobKuipers sensible, good sketch. Truthfully, with just the very short reading alone (I do say a milisecond or less per 4 hours), the sensor hardly corrodes. I have two galvanized nails that I have in the soil for 4 seasons. Yes, not silky smooth anymore but really no trace of electrolysis, even one made from a clotheshanger that still is doing well
-
RE: 💬 Soil Moisture Sensor
@rollercontainer That is definitely a good solution too, but I think gardenbot approaches it a bit too complicated from the software side when he points out that you get two readings with different values that 'need to be smoothed'
I'd say do this:
Both pins LOW when you are not taking a reading. That restperiod can be hours.
When you are ready to take a reading:
make one pin HIGH, take a reading and discard that one
Flip the voltage, take another reading (to balance the time) and use that one
Both pins LOW again -
RE: 💬 Building an Ethernet Gateway
@fifo Most W5100 modules have a 5-3.3V regulator so if you connect the Vcc to 3V3 the chip just doesnt get enough juice
-
RE: 💬 Building an Ethernet Gateway
@scalz A very late reply, but someone else might be helped with it.
Hardware SPI is working.
The onnly thing is that on W5100 shield it will work without any problem but with most 5100 modules you need a small modification fixing w5100 problems -
RE: 💬 Soil Moisture Sensor
The greatest problem with these sensors is electrolysis and subsequent oxidation, due to the DC current flowing through the sensor in a humid environment.
There are some solutions: Most of the circuits that supposedly feed the sensor with A are bogus as it is apulsed DC at best..
One could try a capacitive sensor...... in theory very good but in practice plagued by issues.What I have done is to remove constant current from the sensor by feeding it from a transistor that I can switch on and off. I take a measurement every 2-6 hrs and switch the current off in between. Makes a huge difference
-
RE: DARPA - Sensor lifetime lengthened from weeks to years
@NeverDie That' s what theywant you to think
-
RE: 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
@betonishard Good to know. I was thinking about trying Tasmota for regular Sonoff, but I will keep slowness in mind
-
RE: 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
@gohan ah ok. Sometimes I lose track of who is reacting to who. Must be old age
-
RE: 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
@warmaniac you might have solved yr problem already. Anyway, I use the github/computourist software for the SonOff. have been using it for many months. very stable
-
RE: 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
@gohan The only time you would need to connect a serial device is I guess when you are flashing the software. There is no needTheThe only time you need to connect a serial device is when you are flashing the software. There is no need to connect it to the mains grid then. Whether it would damage anything i do not know but it is unnecessary and therefore absolutely not recommended to do it. Avoid working on anything that is connected to mains, especially if there is no need to have it connected
-
RE: 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
@betonishard ESPeasy I am not sure, but supposedly Tasmota does
-
RE: 💬 Door, Window and Push-button Sensor
@joseyapor Yes no problem. 8 digital I/O. One of them a bit problematic as input (used for program mode)
-
RE: 💬 Building an Ethernet Gateway
@Toni-Ramos Glad you got it solved. apologies I had not seen yr earlier reply yet, but thats no longer relevant.
Always good to check the joints -
RE: 💬 Building an Ethernet Gateway
@Toni-Ramos Sorry to hear that. Are you using Soft SPI or hardware SPI for both?
Can you get any connection if you just use it as webserver without the NRF24? -
RE: 💬 Building an Ethernet Gateway
@Jonathan-Caes I did, with an RFM69HW an arduino pro mini and a funduino Ethernetmodule. Used the setup from computourist in github https://github.com/computourist/RFM69-MQTT-client
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie Oh that is good to know, thanks
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie The unforgettable "guy with the swiss accent" videos
Though very useful information, not so applicable to me as I am using 5,5V capacitors on a regulated 3V3 line -
RE: MH-Z19 with Arduino R3 0 outputValue
@douma-rahma yes, I am using determining the Pulsewidth.
can use TTLUART (like you) and analog I think but I found measuring pulsewidth easiest -
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie interesting. May get one too
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie I have used Attiny's mainly for their size. Pricewise, compared to a pro mini clone it is a bit foolish, unless you use the smd versions.
I had an attiny+ 433Mhz transmitter built in one of those garden lamps with a moisture sensor at the base where it sticks in the soil. Worked well, Not ideal, but it was nice to play around with -
RE: MH-Z19 with Arduino R3 0 outputValue
@douma-rahma
I am using a simpeler code:
Your calculation seems a bit complex.
I do it as follows:
The CO2 concentration = 2000 x (TH-2ms)/(TH+TL-4ms)As the total cycle is always 1004 ms, only need to read TH and can simplify the formula to Cppm=2x(TH-2ms).
{
int ppm = pulseIn(CO2Pin, HIGH);
ppm = (2 * (ppm - 2));
return ppm;
}There might be many reasons why you want to do it by reading the registers, but at least could use the code above to see if your sensor is OK.
Are you giving it enough power (minimally 150mA) -
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie ah yes it does, but the RFM is usually connected to a microcontroller So that is limited choice
i wonder if 1.8 Volt would seriously affect the range of the RFM69 (running mine from 3.3) -
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie 10F now we are talking. But yes I very well understood yr request to share experience. I acn only say thet the 1.5 F's i had performed well and with an RC network thrown together, they seemed in the right ballparc... but apparently seller now sells 1F and I cant vouch for those
The supercap is still a very viable alternative for smaller devices, so I will probably buy more in future and thus interested in which ones are good or not
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie indeed. but 2.7 Volt is a just a bit of a difficult value to work with and putting them in series makes the capacity drop, but I think one could run the attiny 13-25-45-85 from 1.8V so that might be a good combo
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie Oh dont worry, plenty of local online shops here for electronic components plus distributors for adafruit and similar.
However, I can order in china and have it delivered to my door often for less money than just the gas would cost me to drive to a local store, or to have it delivered from a local webstore.
The only thing is that sometimes I have to wait 2-3-4 weeks -
RE: Powering mote 24/7 using only a supercap and solar
@gohan yes, saw those. please keep us informed abt yr experience with those
-
RE: Powering mote 24/7 using only a supercap and solar
@gohan seen those for 15 USD/10 and for 6USD/5
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie Actually I had expected that for DigiKey Europe as well... but it says 'all shipping from USA'
Well, China also has Banggood -
RE: Powering mote 24/7 using only a supercap and solar
@Nca78 Wow. I guess you are a loyal Aliexpress customer
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie realise though it is 2.7 Volts
sure, 3.65 is peanuts if you order a bunch.
I see they have a branch in Netherlands as well. I would pay 1.81 euro for that capacitor.. but I would pay an unbelievable 18 euro shipping? Apparently because they still ship it from the USA. Also, need to answer a bunch of question what I am going to use it for, will i resell it etc. ... So I guess DigiKey is not a viable option for me -
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie 10F for 1.95 is definitely not bad... but not sure what the shipping would be
-
RE: Powering mote 24/7 using only a supercap and solar
@Ed1500 Yep, rechecked mine. 1.5 Farad, but the 'my orders' link now points to 1 Farad caps
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie I have 5.5V 1.5F Supercaps from Aliexpress. Forgot which supplier but they do well.
I put them in an RC circuit to measure and though that might not be totally reliable, they were above 1 Farad
Ah, found them. Although. It was a year ago, the ones I have say 1.5 F but seems they now sell 1Farad
These: https://www.aliexpress.com/item/2Pcs-Ultracapacitor-1-5F-5-5V-super-capacitor-1-5Farad-farad-capacitor-5-5V1-0F/32632431698.html -
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie It was indeed more of a concept test 'can I do this with one of those lamps'. I first tried to just use the power to the LED with the nicad in place but the NiCad just won't last long coz of the continous recharge, so I took it out and put supercaps in there. Store enough charge to get through the night. Supercaps also do better in the cold than Nicads , though I admit I brought them inside when it started freezing.
But those lamps are just great little boxes for a contained attiny 13/25/45/85 project -
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie indeed, I just put a line of silicone sealant around the edge of the PV. That stopped a lot already
-
RE: Powering mote 24/7 using only a supercap and solar
@NeverDie actually I have done that, feeding an attiny85 and also an Atmega328 ("barebones" arduino) 2x1.5F capacitors. all on a 6 volt solar cel and a low drop regulator
The gardenlamp is quite handy as well, but better put some sealant on the edges of tha small solarcell as they do tend to leak. You will find everything has rusted inside after using it a season. Nevertheless, have been able to run an attiny on it
-
RE: 💬 Building an Ethernet Gateway
@hiddenuser I understand. Not sure if that is possible through a W5100/arduino, I guess it is but might not be easy
-
RE: 💬 Building an Ethernet Gateway
@hiddenuser Your code seems OK apart from the fact it doesnt seem to do anything. Randomly missing data when using an nrf24 could be due to data just not arriving over the link although with shot distance that is rare. Nevertheless you could disconnect the w5100 and check a serial.print for a while to see if data is still missing.
I dont have much experience using the soft spi, only using hardware SPI. You may want to consider Gohan' s suggestion -
RE: 💬 Building an Ethernet Gateway
@hiddenuser That is too bad.
I must say I find your sketch somewhat confusing. What is the purpose of the ifndef confif_h followed by a config_h?your config.h seems to just define the configuration. Why not just do an #include "config.h"
The large amount of ifdefs make the sketch a little bit hard to read.
If you are a beginner (we all have been) and make a sketch primarily for yourself, many of those ifdes are not really necessary and at least you are not losing track.
Anyway, not trying to criticize you, but error tracking also for yrself would be easier.
Also... you are using a soft SPI. For the ENC28J60 that is not really necessary. (not necessary for w5100 either with a little adaptation).
So... I am afraid that at this point I cant say anything sensible about yr sketch, but I can say the ENC28J60 works, even with a shared SPI bus.
Have you tried a working W5100 sketch with simply changing Ethernet.h into UIPEthernet.h? -
RE: 💬 Building an Ethernet Gateway
@Mitja-Blazinsek Is your problem solved now Mitja?
connecting stand alone W5100 to ethernet should be solved by the delay i advised. I guess it should work with rfm69 if you set up the software SPI as described, but if you want to use hardware SPI a slight modification is necessary, which i described earlier -
RE: 💬 Building an Ethernet Gateway
@Mitja-Blazinsek I went back to what I have done to get that module to work and I remember the only thing I had to do was add a delay in the setup, as most problems with that funduino board seem to be because of a Reset problem:
with this setup It works for me:void setup() {
// setup ethernet communication using DHCP
delay(250); /// <-------- THAT ONE, BEFORE your ethernet.begin statement
if (Ethernet.begin(mac) == 0) {
//Serial.println(F("Unable to configure Ethernet using DHCP"));
for (;;);
}Forget about "changing the 510 resistors" that is something that is valid for some shields, not for the Funduino module.
I only have the Miso,Mosi,SCK and NSS connected (and Vcc/ground ofcourse). NOT the RST. Besides, if you connect RST you cannot upload sketches as your Arduino will continuously reset -
RE: 💬 Building an Ethernet Gateway
@Mitja-Blazinsek exactly the same module I have. Funduino right? Is working here
-
RE: 💬 Building an Ethernet Gateway
@Mitja-Blazinsek can you check your lineresistors? It is the spider like, 8 legged rrsistor array as in this picture https://arduinodiy.files.wordpress.com/2017/04/w5100bug2.png?w=768&h=332
what is the value? -
RE: 💬 Building an Ethernet Gateway
The reason why the 5100 module has problems sharing the SPI interface is because it lacks some hardware compared to the W5100 shield.
On (most of) the module(s) the SEN (SPI Enable) pin is pulled HIGH with a resistor, whereas on the W5100 shield it also receives the inverted CS signal.
That means that when the chip is deselected (CS=HIGH), the SEN pin receives a LOW and the SPI is switched off.
Apparently the state of the SS pin through the CS signal is not enough to Switch off the W5100 SPI: the MISO remains active, the SEN pin neds to be addressed too to shut off SPI completely.
If it works with a virtual SPI connection, great, but if you want to "fix" the hardware SPI, all you need to do is to invert the CS signal with a 74xx14 or maybe even a 74xx04 and feed that to the SEN pin of the chip.
https://arduinodiy.wordpress.com/2017/04/12/the-w5100-bug/