Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
High and low drain cells mixed
#91
(09-12-2019, 07:33 PM)completelycharged Wrote: Wolf, you have an issue with the values of t1 in the graph data lining up, minor issue, no real problem..

Very cool analysis and brilliant use of the data!!

completlycharged, you sure it was or is t1 not t5? t1 is ambient temp and t5 was on 10s not 5s as the rest, my oversight.

I have corrected it.

Wolf
completelycharged likes this post
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply
#92
Just had another look at the source file, when the file is exported from the web chart the second temperature series seems to be logged every second with random gaps of 1+ seconds.

Some other issues were caused by the way I turn the data (approx 14,600 rows) into a table format so that all of the discharge intervals line up in a table so that a column is then the same relative time period within the 3 minute window. Gaps of missing values made the sequencing shorter than expected for an interval so the data did not quite linee up right. I could correct it by using a time offset rather than a counter if it was critical for the results, so just removed the data.

Within the sketch, for the (x) min on/off would it be possible to add a separate counter (Z) whcih increments each time the discharge is switched on and a separate counter (X) which resets to zero each time the discharge switches on ?

This would then allow a chart to be created, which then filters the data based on counter (X) and always take say interval 1 and then order the results by (Z), which would then give say the first instance of discharge current in all of the 3 minute discharge samples. Just a thought, not all the values you store in the database are for direct display....

I have learnt a few things about the packs playing with the data. I find it really difficult to explain some things, so this is where the charts replace a lot of bad communication and frustration, lol.
If you can't quantify how much they cost, it's a deal, I'll buy 5 of them for 3 lumps of rocking horse ......
Reply
#93
(09-12-2019, 10:00 PM)completelycharged Wrote: Within the sketch, for the (x) min on/off would it be possible to add a separate counter (Z) whcih increments each time the discharge is switched on and a separate counter (X) which resets to zero each time the discharge switches on ?
Here is the code for the mosfet timing.
As you can see the interval between turning on and off is 180000 milliseconds.
I do believe I can set a flag to print the currentmillis at the on time and again at the off time. Is that what you are looking for?
Mind you this will be millisecconds since the ESP32 was booted or rebooted.
Wolf



Code:
const int MPin = 33;                             // the number of the MOSFET pin
int MState = LOW;                                // MOSFET State used to set the MOSFET
unsigned long previousMillis = 0;                // will store last time MOSFET was updated
const long interval = 180000;                    // interval at which to turn the MOSFET on and off (milliseconds)180000 = 3min

void loop(){
/* check to see if it's time to turn the MOSFET on; that is, if the difference
    between the current time and last time you turned the MOSFET on is bigger than
    the interval at which you want to turn the MOSFET on.*/
  unsigned long currentMillis = millis();

  if ((currentMillis - previousMillis >= interval) && (V >= 3.0))
  {
    // save the last time you turned on the MOSFET
    previousMillis = currentMillis;


    if (MState == LOW)                                   // if the MOSFET is off turn it on and vice-versa
    {
      MState = HIGH;
    } else
    {
      MState = LOW;
    }
    digitalWrite(MPin, MState);                          // set the MOSFET with the MState of the variable
  }
  if (V < 3.0)                                           // if voltage fall below 3V do not turn MOSFET back on   {
    digitalWrite(MPin, LOW);
  }
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply
#94
Add in something like this

Extra variables to use in the code
Code:
int cycleno = 0;
int lastcycle = 0;
int intervalno = 0;

Not sure on the correct equivalent syntax for cycleno = cycleno +1
Increment the cycleno when each discharge starts and reset the interval counter
Code:
    if (MState == LOW)                                   // if the MOSFET is off turn it on and vice-versa
    {
      cycleno++ 1;
      intervalno = 0;
      MState = HIGH;
    } else
    {

Somewhere else, on each second sample point increment the interval no. Perhapse within the section where if (V < 3.0) to then see if it is the next interval there if you don't have a separate timer interval.

Another thought, does the code not allow for code timers, i.e. timer that calls a function at a given interval rather than a separate user loop of constant checking ?

To reduce processing the typical approach would be to calculate the nextMills value and then compare direct against currentMills rather than perform a subtraction every test.
If you can't quantify how much they cost, it's a deal, I'll buy 5 of them for 3 lumps of rocking horse ......
Reply
#95
(09-13-2019, 12:32 PM)completelycharged Wrote: Another thought, does the code not allow for code timers, i.e. timer that calls a function at a given interval rather than a separate user loop of constant checking ?

To reduce processing the typical approach would be to calculate the nextMills value and then compare direct against currentMills rather than perform a subtraction every test.

Completlycharged,


LOL you are talking to a complete rank ameture here that has glued all this code together and am honestly surprised it has worked at all and does a pretty good job at it.

I will see what I can accomplish with my limited programing knowledge.

Wolf
completelycharged likes this post
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply


Who read this thread?
72 User(s) read this thread:
EnergyOasis (09-10-2019, 12:29 AM), stok (09-12-2019, 12:30 PM), piglet (Yesterday, 11:44 AM), smileypete (09-03-2019, 10:07 AM), mackoffgrid (09-13-2019, 03:56 AM), Emiel (09-13-2019, 10:09 AM), foamovercast (08-30-2019, 01:49 PM), drbacke (09-11-2019, 08:49 PM), juanjo57 (09-13-2019, 02:19 PM), Doin it (Yesterday, 11:54 PM), 100kwh-hunter (09-03-2019, 01:28 PM), winny (09-13-2019, 08:51 AM), intra (09-10-2019, 12:26 AM), OffGridInTheCity (09-13-2019, 04:01 PM), kevinjaye (09-11-2019, 09:07 PM), ajw22 (09-03-2019, 10:10 PM), madmike (08-27-2019, 09:48 AM), metalorn (08-29-2019, 12:31 PM), 7h0r (09-01-2019, 05:15 AM), Whiteraven1386 (09-09-2019, 07:10 AM), Eduardo Kang (09-12-2019, 05:59 PM), donnib (09-05-2019, 01:18 PM), James-w (09-12-2019, 08:29 PM), hschlech (09-08-2019, 07:03 AM), chad (09-06-2019, 02:27 AM), diib (08-23-2019, 04:03 AM), MBard (08-27-2019, 06:30 AM), Cobra_Phil (09-02-2019, 03:07 AM), berthfield (08-22-2019, 03:17 AM), dragonfly (08-25-2019, 05:36 AM), LPG (09-06-2019, 01:40 AM), drnickriviera (Today, 12:27 PM), 3xtr3m3 (09-03-2019, 01:20 PM), Otakar (08-25-2019, 08:23 AM), Jonisingt35r (09-02-2019, 11:11 PM), stevelectric (08-29-2019, 12:00 PM), Generic (09-11-2019, 04:11 AM), Oz18650 (Yesterday, 09:10 PM), ChrisD5710 (09-12-2019, 04:41 PM), Grumplestiltskin (08-29-2019, 03:34 AM), Jon (08-26-2019, 06:41 PM), SWEwall (09-11-2019, 07:44 PM), Geek (09-13-2019, 12:15 AM), Hanssing (09-12-2019, 11:39 PM), jesusangel (09-11-2019, 06:13 PM), watts-on (09-06-2019, 03:50 PM), jdeadman (09-13-2019, 12:53 PM), Franky Beuselinck (09-09-2019, 01:59 PM), PAF (09-13-2019, 06:13 AM), A + A (09-11-2019, 09:40 AM), Korishan (09-12-2019, 12:21 PM), mike (09-03-2019, 10:32 PM), Sean (09-03-2019, 12:16 PM), djuro (09-04-2019, 05:50 AM), jm1 (09-09-2019, 12:50 AM), Freedom3737 (08-30-2019, 03:29 PM), Wolf (09-13-2019, 07:07 PM), OhmGrown (08-23-2019, 07:15 AM), clupton (09-01-2019, 03:36 PM), jaeger-audiodesign (09-11-2019, 02:17 PM), emuland-metroman (09-06-2019, 05:09 PM), chuckp (09-13-2019, 12:37 PM), Jim Jr. (08-31-2019, 02:33 PM), Riplash (09-11-2019, 03:01 AM), Bubba (09-13-2019, 10:49 PM), avm131 (08-23-2019, 05:52 PM), Zvonko000 (09-13-2019, 07:04 PM), Ibiza (09-13-2019, 05:34 PM), completelycharged (09-13-2019, 02:47 PM), Crimp Daddy (09-11-2019, 01:13 AM), Chablis_m (08-24-2019, 01:15 AM), daromer (09-11-2019, 06:24 PM)

Forum Jump:


Users browsing this thread: 1 Guest(s)