Nice work. Do you fancy doing a Pull Request for your changes in github?
Can try, but I have never done it before and do not know how it worksā¦
hi, @stuart
Thinking out aloud about this section of code - iām probably wrong but i will try.
At the beginning of main.cpp you instantiate a request queue of 30.
And the section of code that you highlighted to Leo appears to slow down the insertion of requests to minimize the likelihood that the queue is always full - possibly to prevent interactive/lazy_tasks requests from being starved by the full queue.
The problem maybe whenever you are running at the higher speeds the request queue is emptied very quickly and periodically the 8 seconds module timeout is breached. This is more likely to happen when there is no user interaction and no balancing is happening as balancing would result in more additional background requests.
Maybe a better approach to the delay section at the top of āenqueue_taskā is for the initial call to vTaskDelay be adaptive based on current queue fullness as opposed to number of modules.
e.g.
prg.queueLength <= 5 ⦠delay very small
prg.queueLength >5 <=20 ⦠delay medium
else delay large (to allow queue to naturally shrink)
Unfortunately the above doesnāt really go anyway to explaining why the issue seems to be worse when Leo goes beyond 16 modules.
In short the issue maybe the queue is empty long enough that 8 second module timer breaches. And if this is so a different approach maybe to adjust the delays at the top on enqueue_task and to a lesser extent the repeating 6500 delay within lazy_tasks to be adaptive based on runtime queue length.
Thoughts ?
I used something like this: https://smile.amazon.com/XHF2018-Adhesive-Holders-x19-5mm-HS-101S/dp/B07M69LK65/
I found them at our local Lowes in a 25 or 50 count package.
Sounds reasonable for me.
Since my test setup is not yet ādisasembleā and put back in normal operation, I can test it if necessary.
Thatās certainly a possibility. To be fair you want the queue to be as empty as it can be, which means the system is operating in near real-time.
When first powered up, the controller sends out a lot of requests and the queue will definitely be full at that point. However the requests block until the queue has a slot free (that was the basis of the last release).
I decided to do it in a minimalist style =) one line only
// Ensure we service the cell modules every 4 seconds.
//To prevent the queue overflowing for every request in the queue additional 200ms delay is added (max 10s)
vTaskDelay(pdMS_TO_TICKS(4000 + prg.queueLength()*200));
Works fine: no errors, send Q lenght stays at 0 or near 0 values, if more requests generated (module balancing) send q length rises for short time but fast returns to 0.
fwiw (OK, not muchā¦) I used @Yar_Leo code and for the last 24h system has not crashed/rebooted. Used to reboot when charging and balancing for over a couple of hours. And thatās a test setup with 4S2P 18650.
Donāt know if you can make anything out of it, just stating it.
will try the one liner now
V.
I like your solution - āsimple is betterā.
Of the stupid thing i could doā¦in equalizing cellsā¦i accidentily had to high voltage on a moduleā¦now leds light up, all three, but i am not seeing the module the controllerā¦
Have i killed the cell module, or merely popped a fuse on it?
Have not been in a position to remove the module from the cabinet yetā¦
Difficult to know without removing the module. Try reflashing the code to it, it might still be alive.
I disassembled all the modules from the 16 board and Iām testing them one by one.
They are V4.4 modules with 16 resistor board
Iām trying to configure with a single module
I have observed a curious thing, in the standard communication they go well, but when I program at 9k6 the modules only start to communicate with the controller from a voltage of 3.8V below that voltage the communication is lost.
Questions.
What can be causing this, defective or broken Attiny?
Anything else?
While I receive some answer from you, Iām going to take one of these modules that works badly and Iām going to change the ATTiny for a new one of guaranteed origin
Very strange. Can you check the voltage at the pins on the attiny using a multimeter?
Did you install the same crystal as in the BOM?
I think yes .
At attiny 1 and 14 pins the voltaje as the same as the batery (source Power in this case)
a video link test module v4.4 - YouTube
Other video more detailed MoreTest V 4.4 - YouTube
result of any of the tests performed.
As I mentioned, the modules do not manage to synchronize when the voltage is less than 3.8V. I have replaced the resonator of one of these boards with another resonator of an abandoned board (the ones that have been sent to me due to burnt Attiny or polarity cable accidents) well with the change the problem has not been solved, but I have appreciated that with this other resonator the minimum voltage that the board needs to establish communication at 9k6 is only 3.6 instead of the previous 3.8, I suspect that the problem may be in that set of resonators or in the set of 16 modules that something has been degrading the resonator, perhaps making it lose precision at lower voltages, does what I say make any sense to you?
@stuart or anyone who can helpā¦
just started using the esp32 controller that i build over 6months ago.
no matter what ive tried i can not get the controller to communicate with the cell modulesā¦
the cell modules just flashes a green led .***, **, **, ****, **, , , , (NO BLUE)
the esp32 controller blink green every 5 sec and twice randomly
the lcd just shows āstabilizingā and the dashboard show nothing⦠if i connect the rx and tx together the āignored requestsā counts up steadly
i have flashed both the esp32 and cell modules with the latest firmwareā¦
im going crazy⦠ANY IDEAāS?
Which modules do you have? If itās the 4.4, what Comms speed did you program?
Did you pick the right Comms speed in the web interface?
Verify that you have it connected correctly. Iāve seen this if I connected the wires backwards.
hello all,
potentially silly question (I also asked in victron forumā¦)
testing my proper lifepo4 bank of 304Ah, however my victron kit still thinks itās a 8Ah bank as I had it configured when I was testing with 4S2P 18650 cells.
Now for the life of me, I cannot find where Iāve put this 8 in the diyBMS interface, could someone please help?
Thought it was in Settings, but there isnāt something there!
and:
cheers
V.
If its the value in diybms, its in the current monitor settingsā¦