-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will it be possible to use the RFM69 in packet mode with the expansion module? #4
Comments
Hello @brandon3055 yes both have the limit as you observe and the 12 channels would need to be split. Robert Wall is developing new firmware for the emonTx4 from scratch to try to cater for the wider set of requirements, both single and 3 phase, plus up to 12 channels, it's likely to be available further down the line. Id be interested to hear how you get on expanding to 12 channels with the existing firmware though! |
Success! https://github.com/brandon3055/emontx4/blob/main/firmware/EmonTxV4CM/EmonTxV4CM.ino I spent way too long trying to figure out how I broke the calibration command only to discover that EmonLib's EmonLibCM_ReCalibrate_IChannel simply does not work correctly when using this many channels. I do have one question. It relates to my post on the forum. https://community.openenergymonitor.org/t/avr-db-emontx-v4-new-hardware-in-progress/20209/171 |
Great to see the above @brandon3055, impressive! and I like the 3d printed fascia. Did you see my commit here relating to EmonLibCM_ReCalibrate_IChannel? I had not mapped these correctly Nice work with the loop based approach! Is saving to EEPROM working for you? Regarding noise, how do your zero current readings compare between the two types? Do you notice any difference if the CT is clipped around the wire (with no load) or on the work bench? The difference may not be significant enough to make it worthwhile your effort to change? |
Ahh! I wondered if it might be that. Good to know! Saving to EEPROM works fine. The only thing stopping it from working in the existing firmware is the fact that As far as noise. I'm not sure how i missed it before but i do see current readings fluctuating between around 20 and 400ma. |
Great thanks, happy to send you the CT extender PCB, I have a few spare (all partially assembled). If that's useful feel free to send me a PM via the forum. It's great having your input testing this! |
Got the EEPROM to work here. I had to make the following changes to the emonEProm library to get it to work. Is there a chance it wasn't actually saving for you? openenergymonitor/emonEProm@ce8aa27 I've also put together a little web-serial tool to make configuration easier, this is going to be nice! :) It requires a web-serial compatible browser e.g Chrome |
It's all good. I have already ordered new boards. It's so nice being able to just order 5 professionally made PCBs for like $10 delivered! Once those and my extra CTs arrive I can do more testing. When prototyping you never order just enough components for one board so I ended up building a second monitor for a friend and a third just to play with.
Dont know what to tell you. Its definitely working for me without those chances. All I had to do was uncomment the load_config line. My firmware is based on the old The config for my emonMicro is based on the same code and I didn't notice any issues with those either.
That looks nice! I can't wait to test it out! Edit: Just took a quick look at the configurator. I definitely like the look of it! Sending commands does not seem to work though I suspect that's just because it's a WIP. |
How strange, I was getting all sorts of issues due to an E2END not being anything like the right value. The EEPROM format would then just clear the signature with the overflow.. Might be interesting to check what the value of E2END is on your system? Perhaps we are running different versions of DxCore or something..
The phase calibration only becomes noticeable on loads with large phase differences between voltage and current. The power supply on my heat pump controller board is a good example or connecting up one of these unloaded: https://www.screwfix.com/p/carroll-meynell-3000va-intermittent-isolation-transformer-230v-230v/320hv
It should work, it's working here for me on Chrome.. can you see anything in the serial window? is it loading the config values from the emontx into the input boxes?
Im sure it will be something people will want, though I expect most will use the standard values. Il probably do a custom entry in the dropdown that then provides a input box.. |
On my system It seems the console does work. Bit it does not let you send +++ to enter config mode. |
Oh... I know why config works.... EmonTxV4CM does not use emonEProm. It just writes a config struct using the arduino EEPROM lib. |
Aha, ok that's useful to know. Are you staying on EmonTxV4CM for compatibility with existing devices? |
Thanks I get the same here. |
Actually, now that I think about it. It's possible the reason I initially avoided rfm69n was that I couldn't get the config working. |
E2END returns 1023 for the ATmega328 It's defined for the avr128db48 in the file: #define EEPROM_END (EEPROM_START + EEPROM_SIZE - 1) though EEPROM_START and EEPROM_SIZE definitions above it seem to be commented out... |
Sorry, it took me a while to get back to this. I have done some testing with the new board and I am still noticing some odd behaviour. But only on channel 12. So I did some more testing. Due to the new board no longer pulling the CT pin to the ground when a CT is disconnected. You can remove a CT and the channel will remain active. The result should be the same as having a CT connected with no load. But also no chance of interference. Turns out I still see the random 100-300ma readings even with no CT connected to channel 12. Or any channel for that matter. It actually seems the interference is somehow coming from the v-sense board because disconnecting that and running on USB only completely stops the random readings. These are some of my readings. I don't really have time to continue digging into this right now but I thought I would let you know what I found. The other thing that is obvious from my readings is every channel has a 15ma offset. Though I think this is easy to explain. My one relatively cheap meter that can read 3.3 volts with three digits of precision shows that my VCC is 3.306v |
Thanks @brandon3055 Does reducing the sample rate perhaps: ADC0.CTRLC = ADC_PRESC_DIV32_gc; or ADC0.CTRLC = ADC_PRESC_DIV64_gc; make any difference? adusting timing in the EmonLibCM_setADC(12,sample_time); appropriately do you have one-wire temperature sensing enabled? what happens if you turn that off? |
Disabling temperature had no noticeable effect. |
Good Afternoon.
I have been experimenting with adding an expansion module to my DIY emontx4. But I quickly discovered that the existing rfm_send function
https://github.com/openenergymonitor/emontx4/blob/main/firmware/EmonTxV4CM/EmonTxV4CM_rfm.ino#L122
has a maximum payload size of 56 bytes which is far exceeded when trying to expand to 12 channels.
I would just like to know if this is something that can be fixed. or do I need to switch to the RFM69 native format if I want 12 channels?
Edit: on further investigation, it seems rfm69nTxLib has the same 56 Byte limit. Is it even possible to expand this limit?
I think for now I will just try splitting the data across two separate node ids.
The text was updated successfully, but these errors were encountered: