Author Topic: Greenworks 60v battery Ohm terminal  (Read 24777 times)

0 Members and 1 Guest are viewing this topic.

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Greenworks 60v battery Ohm terminal
« on: February 11, 2021, 01:58:48 am »
I got a Greenworks 60v snowblower that didn't have a battery. I'm on the DeWalt stack so I have several 60v DeWalt batteries. I 3D printed an adapter and went to test it out, but the snow blower will only run for 3 seconds then stops. Took it apart to see what was going on and found the electronics are potted :(

A Greenworks battery has 4 terminals and the snow blower uses 3 of them. The outter two are power and ground, the other one has an ohm symbol on it.  What precious little info I've found about that terminal indicates it is for "battery communication". The wire from the snow blower that would attach to the terminal in question produces 5v when I engage the snow blower and remains 5v for at least 3 seconds or until I disengage the snow blower.

I've tried putting various resistors across it to ground, but that hasn't worked.

Any thoughts? What does this wire do? How do I make it happy?
« Last Edit: February 11, 2021, 02:19:59 am by typoknig »
 

Offline aargee

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: au
Re: Greenworks 60v battery Ohm terminal
« Reply #1 on: February 11, 2021, 02:29:35 am »
I'm guessing that it is a thermistor. Mostly used by the charger but will also get warm if there is an excessive discharge through the pack.
How it is connected, I'm not sure. Mostly between that terminal and ground in packs I have.
Maybe about 10k would be worth a go or get a resistance wheel and experiment.

I don't *think* it would be as complex as some one-wire device for either temperature or ID of some sort.

I'd be interested to see your battery adapter though, I've been tempted to try something similar here for a DeWalt battery to a Black and Decker tool.
Not easy, not hard, just need to be incentivised.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #2 on: February 11, 2021, 02:59:16 am »
From my reading I also thought it might be a thermistor. I tried a 10k and 11k with no luck. I'll try some more in that range and see what happens.

I made the adapter in several parts. The one I'm using now was a "failure" in the sense that I neglected to account for some nooks and crannies of the Greenworks battery hole and had to take the Dremel to the adapter to make it fit. Printing a new one as we speak. Once I've verified my design I'll share it.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #3 on: February 11, 2021, 04:00:20 am »
Tried 10k to 11k in increments of 100 ohms with no luck.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #4 on: February 11, 2021, 11:27:08 pm »
Looks like the wire is expecting a PWM signal from the battery.

https://endless-sphere.com/forums/viewtopic.php?f=1&t=79384&start=100#p1559001

This Arduino code will apparently generate the correct pulse for a brushless 60V Greenworks tool. Based on the thread I linked to it seems 80V batteries have a different signal.

Code: [Select]
// written 5/26/2020
// Working battery interface signal from the "Omega" port
// of a Greenworks Pro 60V battery

#define PIN 6

void setup()
{
pinMode(PIN, OUTPUT);
}

void loop()
{

digitalWrite(PIN, HIGH);
//Delay 188,000us
for(uint8_t i = 0; i < 188; i++)
{
delayMicroseconds(1000);
}

digitalWrite(PIN, LOW);
delayMicroseconds(400);

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 9; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

// 5
for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
delayMicroseconds(100);

for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

digitalWrite(PIN, HIGH);
delayMicroseconds(1000);
digitalWrite(PIN, LOW);
delayMicroseconds(200);

for(uint8_t i = 0; i < 2; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
delayMicroseconds(100);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 2; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 2; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(200);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);


}

I don't have an Arduino so now I have to decide if I want to buy one or try port the above code to an ESP8266 (and buy a voltage regulation to get from 60V to 3.3V) or de-pot the electronics and try to circumvent the required signal.
« Last Edit: February 12, 2021, 12:12:58 am by typoknig »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #5 on: February 12, 2021, 01:19:55 am »
I bought a used Greenworks 60V Self Propelled mower (w/o batt) that I am working on converting also.

I have the same problem-Runs for 3 seconds then shuts off and beeps 3 times.

I found the posts about the Arduino and bought a Nano. Programmed one of them and the signal looks good on the scope.

I connected pin 6 to the Omega terminal on the mower and excitedly turned it on.

The result-it ran for about 3 seconds then shut off and beeped 3 times?

Not sure what to try next...I think the problem is still with the signal... Weird that typoknig said it puts out 5V but the other forum posts suggest it takes in a signal?


1172186-0
1172190-1
1172194-2





« Last Edit: February 12, 2021, 02:09:23 am by BradK »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #6 on: February 12, 2021, 05:02:24 am »
I really wish some of these companies would get together and develop a common battery standard that works across several brands. I have at least 5 different cordless tool battery standards and none of them work with each other. Wishful thinking I know.
 
The following users thanked this post: BradK

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #7 on: February 12, 2021, 05:08:23 am »
I solved that problem years ago.  I no longer use battery operated tools.  So if I have to run a power cord, no big deal.  Not only is it more efficient but will not die in the midst of use.  The cost is much less.  The tool longevity is better.
 
The following users thanked this post: BradK

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #8 on: February 12, 2021, 05:44:07 am »
I bought a used Greenworks 60V Self Propelled mower (w/o batt) that I am working on converting also.

I have the same problem-Runs for 3 seconds then shuts off and beeps 3 times.

I found the posts about the Arduino and bought a Nano. Programmed one of them and the signal looks good on the scope.

I connected pin 6 to the Omega terminal on the mower and excitedly turned it on.

The result-it ran for about 3 seconds then shut off and beeped 3 times?

Not sure what to try next...I think the problem is still with the signal... Weird that typoknig said it puts out 5V but the other forum posts suggest it takes in a signal?


(Attachment Link)
(Attachment Link)
(Attachment Link)

I think the tool (in my case the snow blower) is just pulling the pin high to 5v.  Once connected to the battery it could be pulled low and then have pulses generated on it as well.

As far as what to try next, that thread I linked to indicated that the 60v motors with and without brushes require different PWM signals. Maybe try a different one? Or if you have a Greenworks battery and the mower works with it, try hooking up the scope with it running and seeing what your signal is then program the Arduino as needed.
« Last Edit: February 12, 2021, 05:56:28 am by typoknig »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #9 on: February 12, 2021, 05:52:09 am »
I really wish some of these companies would get together and develop a common battery standard that works across several brands. I have at least 5 different cordless tool battery standards and none of them work with each other. Wishful thinking I know.

I hear ya.  In my research I found that that electrically Greenworks, Kobalt, Snapper, some Ryobi, and some Walmart brand (Proworks, Protools, or something generic like that) are all the same within their respective voltage ranges. The cases are different though. DeWalt is different animal it seems. DeWalt 60V tools have 6 pins tool side and 8 pins battery side. I hooked up the scope to it and did a few tests to see if any of its pins generated a PWM signal when the battery was under load. I found no such signal, but my tests weren't exhaustive.
« Last Edit: February 12, 2021, 06:33:14 am by typoknig »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #10 on: February 12, 2021, 06:44:18 am »
james_s

I agree. If I can't get a tool to run on my Ryobi batteries (which is all I have) I will get something else.
I converted a snow blower (Snowjoe ION18SB) a few months back to run on dual Ryobi batts and it works great.
That tool convinced me that I want a cordless lawn mower as well, just have to figure out how to make it work which is what brought me here.

typoknig

There are 3 different programs for the Arduino that I saw on the other forum. I have two of them. This first one they said did not work.
I will try the other tomorrow or this weekend and see what happens. Also, I am considering buying a brand new Greenworks 60V Mower with batt to see if I can catch the signal. I really want this to work, but if I can't get it I'll just try it with a different brand mower.
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #11 on: February 12, 2021, 06:58:51 am »
typoknig,

The picture in the above post is the snowblower I converted to run on dual Ryobi batts.
It's a 40V Snowjoe ION18SB. Got it on the local ads for $40, then sold the two batts and charger it came with for $150.
All I did was 3d print two cases, covers and some end clamps, then installed the cases/clamps on an aluminum bar I wrapped with black vinyl wrap.
The Ryobi 18V 4Ah batts have the same number of cells as the original Snowjoe batts and it works really well. I actually bought a second one on the local ads for $10 and converted it to run on a single 6Ah Ryobi batt for my mother in laws small driveway. Used a DC boost converter to get the voltage up. I have yet to test it though.

UPDATE: Forgot to mention the Snowjoe does not require a 3rd terminal on the battery, it will work with any batteries that provide 40V.
I removed the back cover, put ring terminals on the wires from the Ryobi batts and put them right on the existing terminals that I found under the back cover.
I have never had a gas snowblower so I may be biased but I am more than impressed with it. So much better than shoveling and now I actually want it to snow LOL.


« Last Edit: February 12, 2021, 07:10:20 am by BradK »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #12 on: February 12, 2021, 06:38:47 pm »
Tried a few different things today.

First I uploaded the other program to the Arduino, checked it on the scope and connected everything.
I tried it with the same results (powers on for 3 seconds then shuts off and beeps 3 times).

I then removed the Arduino connection to the Omega port on the mower side the took a voltage measurement.
I'm getting 2.8V between the Omega port and ground on the mower side?

I also considered that my Ryobi batteries BMS's might be cutting power from an overcurrent, but I ruled that out in a few different ways:
1. Manufacturer specs claims 60V 5Ah battery will run 60 mins so avg current draw will be 5 Amps.
2. My batteries are rated for 30A peak
3. If I don't turn anything on but just press the lever switch on the handle I still get the 3 beeps after about 3 seconds

Seems the Omega port is still the problem here (or my motor controller). For now I am at a loss, without an actual battery I can't see what I need to so I might just buy one in the future and go from there.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #13 on: February 12, 2021, 09:04:45 pm »
I went ahead and ordered an Arduino instead of porting the code to an ESP8266 and having to worry about a 3.3v to 5v level shift. Once I get it and try it out I'll post back.
 
The following users thanked this post: BradK

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #14 on: February 14, 2021, 08:39:18 pm »
Received the Arduino Nano in the mail to day and got it programmed and hooked up. I've tried the 3 Arduino "sketches" that were available on the website I linked to in my previous post to no avail.  I'll do some more hunting for other Arduino code, but I might have to breakdown and buy a battery unless someone has a battery and can scope out the signal.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #15 on: February 15, 2021, 01:16:13 am »
I reworked the code I found at https://endless-sphere.com/forums/viewtopic.php?f=1&t=79384&start=75#p1275544 to make it easier to pick between various pulse mappings.  I used a scope to verify the code is doing what I expect it to do, but neither of the pulse mappings are working for my 60V snow blower.  Maybe it will help someone though.  Just modify "SELECTED_BATTERY_TYPE".  I'll either find or buy a battery this week to get to the bottom of this mystery.

Code: [Select]
// Battery types
#define BATTERY_TYPE_60V 1
#define BATTERY_TYPE_80V 2

// Change SELECTED_BATTERY_TYPE to one of the battery types listed above
#define SELECTED_BATTERY_TYPE BATTERY_TYPE_80V

// Pin number to put signal on
#define PIN 6

#if SELECTED_BATTERY_TYPE == BATTERY_TYPE_60V

#define NUMBER_OF_PULSES 41

// All hold times are in microseconds
uint16_t pulse_low_hold_times[NUMBER_OF_PULSES] = {
  400,
  200, 200, 200,
  100, 100, 100, 100, 100, 100, 100, 100,
  200, 200,
  100, 100, 100,
  200, 200, 200, 200, 200,
  100, 100, 100,
  200,
  100,
  200, 200,
  100,
  200,
  100, 100, 100,
  200,
  100, 100,
  200,
  100,
  300,
  200
};

// All hold times are in microseconds
uint32_t pulse_high_hold_times[NUMBER_OF_PULSES] = {
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
  1000,
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
  189000
};

#elif SELECTED_BATTERY_TYPE == BATTERY_TYPE_80V

#define NUMBER_OF_PULSES 41

// All hold times are in microseconds
uint16_t pulse_low_hold_times[NUMBER_OF_PULSES] = {
    400,
    200, 200, 200,
    100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
    200, 200, 200,
    100, 100, 100, 100, 100,
    200,
    100,
    200, 200,
    100,
    200,
    100, 100, 100,
    200,
    100, 100,
    200,
    100,
    200
};

// All hold times are in microseconds
uint32_t pulse_high_hold_times[NUMBER_OF_PULSES] = {
    100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
    500,
    100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
    189900
};

#endif

void setup() {
  // set pin 6 to an output
  pinMode(PIN, OUTPUT);
}

void loop() {
  // Loop through all the pulse data
  for (uint8_t i = 0; i < NUMBER_OF_PULSES; i++) {
    // Pull pin low
    digitalWrite(PIN, LOW);

    // Hold pin low for required amount of time
    delayMicroseconds(pulse_low_hold_times[i]);

    // Pull pin high
    digitalWrite(PIN, HIGH);

    // If we aren't on the last pulse, assume hold time is small enough to be handled by the delayMicroseconds function
    if(i + 1 != NUMBER_OF_PULSES) {
      // Hold pin high for required amount of time
      delayMicroseconds(pulse_high_hold_times[i]);

    // If we are on the last pulse, assume hold time is too large to be handled by the delayMicroseconds function
    } else {
      // Split hold time into milliseconds and microseconds
      uint32_t milliseconds;
      uint8_t microseconds;
      milliseconds = pulse_high_hold_times[i] / 1000;
      microseconds = pulse_high_hold_times[i] % 1000;

      // Hold pin high for required amount of time
      delay(milliseconds);
      delayMicroseconds(microseconds);
    }
  }
}
« Last Edit: November 09, 2021, 10:16:22 pm by typoknig »
 
The following users thanked this post: BradK

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #16 on: February 15, 2021, 10:38:44 pm »
Typoknig,

Are you getting the same result as before (snowblower runs for 3 seconds then shuts off?

Seems no matter what I do it does the same thing.

I wonder if something weird is going on...Like the controller requires an initial full voltage (GW batts are actually 64V fully charged from what I have read) before it will allow operating on a freshly inserted battery?
« Last Edit: February 15, 2021, 10:56:27 pm by BradK »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #17 on: February 16, 2021, 04:39:07 am »
Yeah, I get the same results I've always got. I ordered a GW battery today and I should have it by Wednesday of next week. Then we will know for sure.
 
The following users thanked this post: BradK

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #18 on: February 20, 2021, 05:00:43 am »
Typoknig,

I just ordered the Logic Analyzer recommended on the Endless-Sphere GW thread. Still looking for a good deal on a battery.
I have been watching videos on Arduino programming and looking over the code to see if I can find any errors. I'll post any thoughts/findings here.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #19 on: February 22, 2021, 09:11:43 pm »
GW battery was delivered today.  Fully charged it is 60.53V and the DeWalt battery is 58.42V.  I wouldn't think that voltage difference would prevent it from running, but maybe?  The pulses generated were slightly different, but when I plugged them in I get the same result I had been getting.  I did notice in the waveform that the low pulses aren't pulled all the way to ground.  The low pulses that occur before the single 1000us high pulse are pulled down to 600mv and the low pulses that occur after the are pulled down to 200mv.  I wouldn't think that would be causing this issue either, but again, maybe?  I've attached a .wfm file generated from my Rigol MSO5074.
« Last Edit: February 22, 2021, 09:20:55 pm by typoknig »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #20 on: February 22, 2021, 11:43:29 pm »
Typoknig,

You mean with the GW battery your snowblower is still only running for 3 secs then shutting off?

Your 58V batt should work just fine. The GW battery I was looking at had a tag on it that said it was actually a 54V battery with a max of 60V. I also found out the 2Ah 60V batts have 15 cells in them.

Have you tried measuring both the GW battery signal and the Arduino signal at the same time then overlapping them to see if there are any differences other than the voltage offset?

I should be getting my logic analyzer this week but still looking for a good deal on a GW battery.

 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #21 on: February 23, 2021, 12:00:29 am »
You mean with the GW battery your snowblower is still only running for 3 secs then shutting off?

No, the snow blower works fine with the GW battery.  When I scope out the signal the GW battery generates and update the Arduino code to use those pulses, it still only runs for 3 sec with the DeWalt battery.

Have you tried measuring both the GW battery signal and the Arduino signal at the same time then overlapping them to see if there are any differences other than the voltage offset?

No, but I'm getting ready to set that up now.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #22 on: February 23, 2021, 04:27:04 am »
Didn't make any breakthroughs tonight.  The waveforms I was using where all really close to what the battery generates.  The pulses might actually be 92.6us, but we have 100us coded up.  I tried more exact pulse widths and it didn't change anything.  I am running my buck converter at 5v exactly and the snow blower pulls the Omega terminal high to 4.7V.  There are a bunch of little differences that I wouldn't think would matter, but apparently one or more of them do.  To summarize, the difference are:

1.) DeWalt battery is 58.X volts, GW battery is 60.X volts.
2.) Arduino pulls Omega terminal high to 5V (I can adjust my buck converter to make it match), snow blower only pulls it high to 4.7V.
3.) Highs and lows of pulses aren't exactly on 100us intervals.  Sometimes they are weird numbers like 92.6us for a low pulse, or 103us for a high pulse.
4.) All the pulses the GW battery pulls low before the 1000us high pulse are only pulled down to 600mv, not 0v.  After the 1000us high pulse the GW battery only pulls the low pulses down to 200mv.

I'll investigate these differences one at a time in an attempt to narrow down what is causing this battery to be such a pain.
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #23 on: February 23, 2021, 06:57:10 am »
Crap!

I was hoping this would be as easy as the users on Endless-sphere made it sound.
I sent one of the guys there (StinkyGoalieGuy) a PM and he replied with the following:

Quote
"This is the logic analyzer I used: https://www.amazon.com/gp/product/B077L ... UTF8&psc=1

Yeah, it wouldn't hurt to check that the Arduino output matches the code with a logic analyzer.

I'm using a battery I built from 18 a123 cells in series. They are 3.3v nominal, so ~59.4volts.

I used the logic analyzer on a Greenworks 60V battery to get the pulse pattern. Unfortunately, I don't have that battery anymore, otherwise I would check its voltage for you."

Great observations, Those all seem like very minute details but then again if its not working it must be something like that.

The other thing I have been wondering is if the pulses change with battery voltage....Perhaps the pulse pattern has to match the battery voltage ,at least initially to fool the controller?


 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #24 on: February 25, 2021, 04:04:38 am »
I've took some more samples and noticed that as the snow blower starts up, the signal is different for about 2 seconds.  There are several places where the "normal" signal (the one we have been replicating with an Arduino thus far) are mixed into the starting signal, but the starting signal is predominantly large pulses (in the ms range, not the us range).  This may be a coincidence, but there are exactly 41 of the larger pulses, the same number of us range pulses in the "normal" signal.  I was going to use my scope's built in function generator to try to feed the signal back into the snow blower while actually using the DeWalt battery, but my function generator's range is 2.5v to -2.5v, so that will not work.  I'll take a couple of more samples tomorrow and see if the staring signal is the same each time.  If it is I'll try to duplicate it with the Arduino.  I've attached a waveform that shows this if anyone else cares to analyze it.

I took more samples and never saw the "larger pulses" I mentioned above again, so I guess that was fluke generated by the GW battery?  The starting signal is slightly different though.  From here on I'll refer to a "pulse group" as a series of pulses separated by a large (relatively speaking) delay.  The first pulse group always happens 1.1 seconds after the Omega pin is pulled high and only has 40 pulses, not 41.  The first 5 pulse groups occur with only a 90ms delay between them, where all the pulse groups after than have a roughly 190ms delay between them.  I duplicated this, but the snow blower still only runs for 3 seconds.  Next, the first 5 pulse groups are have slightly different delays between the pulses.  I'm getting ready to duplicate that now.

I also spliced in the Arduino while using the GW battery so the Arduino was generating the signal for the Omega pin instead of the battery.  This tells me that the minor voltage difference between the DeWalt battery and the GW battery is no the cause of the problem.

I deleted the original wave I attached and I've attached a new wave recorded from my Rigol MSO5074 which show the start sequence and several seconds of the tool running correctly.
« Last Edit: March 01, 2021, 05:10:04 pm by typoknig »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #25 on: February 28, 2021, 11:45:02 pm »
Thanks for sharing.

I just bought a 60V 4Ah GW battery-should be here on the 8th. Once I get it I'll post the data from the logic analyzer as well.
I'm still confused how those on the other forum got it working and we did exactly what they mentioned with no luck? Hopefully we'll figure it out.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #26 on: March 01, 2021, 03:20:43 am »
GreenWorks: 1, Typoknig: 0

I have produced the signal within 2us of precision and used the 5 unique initialization pulse groups, but that is apparently not good enough.  I set up my scope to record both the GW battery Omega pin signal and the signal generated by the Arduino at the same time and had the Arduino start generating the signal at the same time (there was about a 50us delay for the Arduino starting because I was using the GW battery Omega pin signal as a trigger) and the wave forms are essentially on top of each other with only very minor differences that I'm unable to remove due to the precision of the Arduino.

I felt I had exhausted all possibilities trying do duplicate the signal without knowing more about the actual data.  I didn't think that GW would bang out their own protocol, so I took the battery apart to seen what was inside.  No surprise, it was potted just like the snow blower controller, but it wasn't nearly as thick.  There was one large chip that looked like it might be a controller, so I scraped off the potting material and found it is a Renesas R5F100ACA.  Datasheet from Mouser attached.  I'll dig into the datasheet this week to see WTF this chip wants from us, but the first thing I noticed is that it is a 32MHz chip compared to the Arduino Nano which is only 16MHz.  That could definitely cause a resolution problem.

Also attached is a spreadsheet of the pulses I recorded from my scope. The actual pulses were often a fraction, so I always rounded down to a whole number.
« Last Edit: March 01, 2021, 05:13:54 pm by typoknig »
 
The following users thanked this post: samocos191

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #27 on: March 05, 2021, 08:57:08 pm »
My GW battery arrived yesterday.

I looked at the signal on the scope and it looks exactly like the one I'm producing with the Arduino code.
I thought like you said it might be the voltage difference (+5V Arduino vs +2.3V GW batt) so I hooked up a POT and used it as a voltage divider to take the signal down to about 2.3V...Still didn't run (I used a 2k pot-perhaps it also needs a specific current?). I also noticed like you said the initial pulse group only went low to about 60mV and the 2nd pulse group went to about 20mV?

I will try connecting to my logic analyzer sometime this weekend but so far everything looks fine on the scope?

I guess if this doesn't work I'll just keep the GW battery and use my additional batts with it to give me a longer runtime.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #28 on: March 06, 2021, 03:30:25 am »
Don't give up!  That's what they want!  :)

I haven't had a chance to dive into the datasheet I posted.  That controller is complex enough that nothing was jumping out at me at first glance.  I also had to send my scope in for service so I'll be without it for a couple of weeks.

Here is one thing that give me hope though.  If this is a timing issue (which is still one of the most likely cases) here is post about producing sub microsecond accuracy.  I haven't had a chance to implement it yet, but I did notice that a lot of the pulses from the GW battery were XX.5us, so the method described in this post could help us get closer to that mark:

https://forum.arduino.cc/index.php?topic=96971.0
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #29 on: March 06, 2021, 08:54:30 am »
Hooked everything up to the logic analyzer tonight,

For some reason (probably me) I am only getting the signal from the Arduino to come up on the logic analyzer.
I have the signal from the Arduino adjusted to 2.3V. I have never used a logic analyzer so I'm sure its something I'm doing wrong...Perhaps the GW batt signal not going to 0V is the problem, I'll try a few different triggers tomorrow and see what I can get.
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #30 on: March 06, 2021, 09:40:44 pm »
Good news,

I found my mistake (grounding issue on the GW signal-logic analyzer) and captured both signals.
You can see many differences between them on the PDF screen capture (attached).
Channel 0  (top) is the signal from the Arduino, Channel 1 (bottom) is the GW battery.

Typoknig, like you mentioned there are some differences in pulse lengths etc.

Now the bad news, I know very little about 'decoding' the signals and changing the Arduino code to match it. The only thing I know how to do is put my cursor on each pulse and compare the measurements.

I tried attaching the file but it is not an 'Allowed File Type'.
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #31 on: March 06, 2021, 10:56:02 pm »
For anyone who wants the original file:

Download the free logic analyzer software @ https://www.saleae.com/downloads/

Send me a PM with your email and I will email you the .logicdata file.

UPDATE: So I have been going through the signals and found 26 mismatches on both High and Low pulse widths.
More to come...
« Last Edit: March 07, 2021, 02:03:41 am by BradK »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #32 on: March 08, 2021, 07:35:34 am »
Here's where I'm at:

Measured GW batt logic using a sample rate of 16Ms/s.
Compared High and low pulse lengths-noted mismatches.
Wrote a program for my nano, rounding the high and low pulse lengths to the nearest uS.

Signal looked good on scope, connected voltage divider to produce 2.3V peak and connected to mower.
   *Result: Beep beep beep!


Thoughts/troubleshooting:
1. Code not precise enough (although other forum users claimed theirs worked?)
2. Timing between applied power and signal needs to be precise (Right now I have my Arduino powered by a separate PS-I wonder if the Mower has to see the signal within ____mS of seeing 60V power?
3. GW pulse pattern LOWs do not go all the way to 0V as stated by Typoknig.

After this I looked over my Arduino code, made a few changes and found an error that I fixed and then uploaded the new program and tried it again. Result, Beep beep beep. I'm getting really tired of hearing those beeps, I feel like the mower is laughing at me.

Tomorrow I will connect the Arduino to the batteries in hopes of testing if the timing between applied power and the signal is the problem, but I am doubting it. Here's the Arduino code I wrote so far:

Quote
void setup()
{
pinMode(6,OUTPUT);
}

void loop()  {
digitalWrite(6,HIGH);
delay(189);

digitalWrite(6,LOW);
delayMicroseconds(411);

ditigalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH)
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(214);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(214);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(130);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(214);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(117);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(102);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(116);

digitalWrite(6,LOW);
delayMicroseconds(214);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(103);

digitalWrite(6,LOW);
delayMicroseconds(115);

digitalWrite(6,HIGH);
delayMicroseconds(526);

digitalWrite(6,LOW);
delayMicroseconds(204);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(104);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(204);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(204);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(104);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(205);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(105);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(105);

digitalWrite(6,HIGH);
delayMicroseconds(96);

digitalWrite(6,LOW);
delayMicroseconds(105);

digitalWrite(6,HIGH);
delayMicroseconds(95);

digitalWrite(6,LOW);
delayMicroseconds(206);

digitalWrite(6,HIGH);
delayMicroseconds(95);

digitalWrite(6,LOW);
delayMicroseconds(105);

digitalWrite(6,HIGH);
delayMicroseconds(95);

digitalWrite(6,LOW);
delayMicroseconds(106);

digitalWrite(6,HIGH);
delayMicroseconds(95);

digitalWrite(6,LOW);
delayMicroseconds(206);

digitalWrite(6,HIGH);
delayMicroseconds(94);

digitalWrite(6,LOW);
delayMicroseconds(106);

digitalWrite(6,HIGH);
delayMicroseconds(94);

digitalWrite(6,LOW);
delayMicroseconds(206);

digitalWrite(6,HIGH);
delayMicroseconds(94);

digitalWrite(6,LOW);
delayMicroseconds(206);
}   



If the timing test does not solve the problem I will probably look over the program a few more times, measure the GW sig at a higher sample rate and try to get more accuracy out ot it. If that does not work I'll probably give up and figure the problem is beyond my knowledge and just use the GW batt and my batts in parallel to at least double the run time.
« Last Edit: March 08, 2021, 03:13:10 pm by BradK »
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #33 on: March 08, 2021, 05:35:45 pm »

Today I connected everything to my batteries to see if the issue was timing.
Found out my 5V regulator circuit had a short in it and I overvolted my last Arduino Nano (+18V to +5V pin), CRAP!
I may order another Nano but right now this project has taken too much time from other projects.
I'm just going to wire up my existing setup to the mower and use it with the GW battery.

I am still confused how those on the other forum had success as their Arduino program did not even come close to matching what I am seeing coming from the GW battery???
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #34 on: March 09, 2021, 03:27:22 am »
This is just a guess, but I suspect some of the older GW tools were a bit looser on their timing requirements, so the microsecond precision signal generated by an Arduino worked. I suspect newer tools implement another Renesas chip and the timing requirements are now in the nanosecond range which the Arduino can't do reliability via the delay function.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 8951
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Greenworks 60v battery Ohm terminal
« Reply #35 on: March 09, 2021, 03:46:16 am »
This is just a guess, but I suspect some of the older GW tools were a bit looser on their timing requirements, so the microsecond precision signal generated by an Arduino worked. I suspect newer tools implement another Renesas chip and the timing requirements are now in the nanosecond range which the Arduino can't do reliability via the delay function.
My guess is that the line is a bidirectional bus (similar to 1Wire) and therefore imitating the waveform would only work if the playback starts at exactly the right time. Perhaps make a small inductive pickup to tell which end is driving the line while reverse engineering with the scope?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline BradK

  • Contributor
  • Posts: 17
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #36 on: March 09, 2021, 04:17:47 am »
Typoknig,

I think your right...Very annoying since most tools use 18650s yet the manufacturers act like their batteries are special.
So far I've converted a weed eater, snow blower, power supply, and a water pump to run on my Ryobi batts.

NiHaoMike,

I think that is something to look into.
Perhaps a DPST switch to turn on both Arduino and apply 60V signals at the same time then add the initial wait time to the Arduino code?
I just ordered a few more parts and will try again in a few weeks.
But I do think Typoknig may be right about the sub uS requirement.

UPDATE: Tonight I soldered in the wires for my Ryobi batts and tested it with the GW batt in parallel. Works great. Can't wait to actually try this mower out on real grass.
« Last Edit: March 09, 2021, 07:56:42 am by BradK »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #37 on: March 09, 2021, 07:59:06 am »
This is just a guess, but I suspect some of the older GW tools were a bit looser on their timing requirements, so the microsecond precision signal generated by an Arduino worked. I suspect newer tools implement another Renesas chip and the timing requirements are now in the nanosecond range which the Arduino can't do reliability via the delay function.
My guess is that the line is a bidirectional bus (similar to 1Wire) and therefore imitating the waveform would only work if the playback starts at exactly the right time. Perhaps make a small inductive pickup to tell which end is driving the line while reverse engineering with the scope?

Good thought. Bidirectional communication would also explain the two different levels of low pulses (600mv and 200mv).
 

Offline BornToRepair

  • Newbie
  • Posts: 2
  • Country: pl
Re: Greenworks 60v battery Ohm terminal
« Reply #38 on: May 28, 2021, 06:57:51 pm »
Quote
Good thought. Bidirectional communication would also explain the two different levels of low pulses (600mv and 200mv).
Definitely it is like you said.
I have bought Powerworks 60V mower cheap without battery.
My idea was to run it with 3x Makita 18V batteries which I have a lot.

To make it run I have modified Arduino sketch available on Endless sphere thread.
I simply removed second part of a script to check if the answer form mower will still appear on a bus. Indded it was.

Unfortunatley this was not enough for reliable opration. Mover turns off after 1-2 min of running with 6 loud beeps.

Reading carefull this thread and endless sphere theread I figure out that query frame is not the same all the time.
Dumb luck I was able to generate different random query and sitll receive answer from mower.

https://youtu.be/Y7Tlfim-A8w

I tried to alternate this query every 2sec. and to my surprise it works!
I was able to mow grass in my entire garden for ~60min.

https://youtu.be/ER4f0lgI0SA
 
Preliminarly I was worried about lack of power in battery powered mower.
Mower draws only ~5A continous, 10A max and this reflecs to only 300 - 600W of power, compared to 2-3kW gas powered mowers.
However it turns to be opposite - gas powered mowers seems to be overpowered for such simple task as grass cutting ;-).

BTW. to power Arduino form 5V you do not need separete DC/DC 60V to 5V converter.
5V is available at motor hall sensor harness!


Here is my working Arduino sketch:
Code: [Select]
// written 5/26/2020
// Working battery interface signal from the "Omega" port
// of a Greenworks Pro 60V batter


//20.05.2021 BornToRepair mod:
//reply frame removed
//pin6 input mode enabled beetween query frames
//query cycling each 2000ms

#define PIN 6

void setup()
{
pinMode(PIN, OUTPUT);
}

void loop()
{

for(uint8_t a = 0; a < 10; a++)

{
digitalWrite(PIN, HIGH);
//Delay 188,000us
for(uint8_t i = 0; i < 188; i++)
{
delayMicroseconds(1000);
}


pinMode(PIN, OUTPUT);

digitalWrite(PIN, LOW);
delayMicroseconds(400);

for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 10; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

// 5
for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
delayMicroseconds(100);

for(uint8_t i = 0; i < 2; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

pinMode(PIN, INPUT);
}



for(uint8_t a = 0; a < 10; a++)
{
digitalWrite(PIN, HIGH);
//Delay 188,000us
for(uint8_t i = 0; i < 188; i++)
{
delayMicroseconds(1000);
}
pinMode(PIN, OUTPUT);

digitalWrite(PIN, LOW);
delayMicroseconds(400);

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 9; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

// 5
for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
delayMicroseconds(100);

for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
pinMode(PIN, INPUT);
}
}

« Last Edit: May 28, 2021, 07:13:07 pm by BornToRepair »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #39 on: May 29, 2021, 12:41:03 am »
Maybe you can find a worn out battery to reverse engineer? Once a tool has been out for a while there should be some dead ones floating around.

Despite the hassles I do love my cordless tools and hate cords. I gave away all my corded electric tools except for my circular saw and miter saw. I gave away my gas lawnmower last year too, I have a small lawn and realized I was spending more time fussing with the carburetor than I was mowing.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #40 on: June 22, 2021, 08:52:52 pm »
Awesome!  It is hot AF in the Midwest right now, so this project has been on the back burner for me.  When we get closer to having snow again I'll give your mod a try.  It would be great to be able to do this with an Arduino and not have to upgrade to something faster.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #41 on: October 15, 2021, 01:33:51 am »
Quote
Good thought. Bidirectional communication would also explain the two different levels of low pulses (600mv and 200mv).

Definitely it is like you said.
I have bought Powerworks 60V mower cheap without battery.
My idea was to run it with 3x Makita 18V batteries which I have a lot.

To make it run I have modified Arduino sketch available on Endless sphere thread.
I simply removed second part of a script to check if the answer form mower will still appear on a bus. Indded it was.

Unfortunatley this was not enough for reliable opration. Mover turns off after 1-2 min of running with 6 loud beeps.

Reading carefull this thread and endless sphere theread I figure out that query frame is not the same all the time.
Dumb luck I was able to generate different random query and sitll receive answer from mower.

[url]https://youtu.be/Y7Tlfim-A8w[/url]

I tried to alternate this query every 2sec. and to my surprise it works!
I was able to mow grass in my entire garden for ~60min.

[url]https://youtu.be/ER4f0lgI0SA[/url]
 
Preliminarly I was worried about lack of power in battery powered mower.
Mower draws only ~5A continous, 10A max and this reflecs to only 300 - 600W of power, compared to 2-3kW gas powered mowers.
However it turns to be opposite - gas powered mowers seems to be overpowered for such simple task as grass cutting ;-).

BTW. to power Arduino form 5V you do not need separete DC/DC 60V to 5V converter.
5V is available at motor hall sensor harness!


Here is my working Arduino sketch:
Code: [Select]
// written 5/26/2020
// Working battery interface signal from the "Omega" port
// of a Greenworks Pro 60V batter


//20.05.2021 BornToRepair mod:
//reply frame removed
//pin6 input mode enabled beetween query frames
//query cycling each 2000ms

#define PIN 6

void setup()
{
pinMode(PIN, OUTPUT);
}

void loop()
{

for(uint8_t a = 0; a < 10; a++)

{
digitalWrite(PIN, HIGH);
//Delay 188,000us
for(uint8_t i = 0; i < 188; i++)
{
delayMicroseconds(1000);
}


pinMode(PIN, OUTPUT);

digitalWrite(PIN, LOW);
delayMicroseconds(400);

for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 10; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

// 5
for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
delayMicroseconds(100);

for(uint8_t i = 0; i < 2; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

pinMode(PIN, INPUT);
}



for(uint8_t a = 0; a < 10; a++)
{
digitalWrite(PIN, HIGH);
//Delay 188,000us
for(uint8_t i = 0; i < 188; i++)
{
delayMicroseconds(1000);
}
pinMode(PIN, OUTPUT);

digitalWrite(PIN, LOW);
delayMicroseconds(400);

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 9; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

delayMicroseconds(100);

for(uint8_t i = 0; i < 1; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

// 5
for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
delayMicroseconds(100);

for(uint8_t i = 0; i < 4; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}
pinMode(PIN, INPUT);
}
}



Finally got back to this project and still can't get the snow blower working with your latest code.  Just runs for 3 seconds then shuts off like before.  Looking at the pictures I see that our PCB units are different.  Mine is part number 362011483AC and looks identical one I found on ebay (part number 362011205AB) which is for an 80V snow blower (see attached).
« Last Edit: October 16, 2021, 01:15:18 am by typoknig »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #42 on: October 28, 2021, 04:38:41 am »
I rolled the dice and de-potted my PCB to try and figure out what was going on.  Tragically, the PCB no longer works, but I still hope now that I can see the components used that I can determine what the exact signal is this thing wants.  I may take a stab at fixing it too before I spend $60 on a new one.

The PCB uses an ON Semiconductor FAN7888 as 3 phase motor inverter driver.  It is the large 20 pin SOIC package IC in the middle of the attached picture.  Datasheet also attached.

The PCB also has a meter IC which I'm unable to identify.  It is the small 8 pin SOIC package IC in the upper right corner of the attached picture.  It has the following markings, but where I use the asterisk the IC actually shows the diode symbol oriented vertically (anode top, cathode bottom) as if it were a character:

Code: [Select]
I*RP948G
9019
F6216

Finally, and most importantly, the IC has a controller IC which I am also unable to identify.  It is the 32 pin QFP package IC and it has the following markings and also has the characters "H65" in a circle to identify the first pin.  I was thinking that H65 in a circle might be a manufacturer identifier, but I can't find anything on it:

Code: [Select]
C009B2
020FZ02

Any help identifying these ICs would be appreciated.
« Last Edit: October 28, 2021, 04:45:40 am by typoknig »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 8951
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Greenworks 60v battery Ohm terminal
« Reply #43 on: October 30, 2021, 03:50:30 am »
Perhaps consider replacing it with a generic BLDC ESC? A quick search finds quite a few 60V ESCs for scooters.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #44 on: October 30, 2021, 06:14:40 am »
That is a good idea. I did a quick search and I didn't see any that looked big enough. I'll check the motor specs tomorrow and try to find a good match. Still, I would like to find a solution that works without dismantling tools. I was hoping to be able to use all Greenworks tools with DeWalt batteries once I got this figure out. Didn't want a project each time, just wanted to put my frankenbattery in a tool and have it work.
« Last Edit: October 30, 2021, 06:18:25 am by typoknig »
 

Offline JunkPlusTools

  • Newbie
  • Posts: 1
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #45 on: November 19, 2021, 06:28:01 pm »
Great info in this thread. I have a GW 60V trimmer that I bought for parts, and can confirm that when powered from a 66V battery with just + and - terminals, it runs for ~3sec then powers off. No audible beeper.

This is the trimmer with motor down at the bottom of the shaft. The motor is an outrunner, direct drive to the trimmer spool, marked Globe 60VDC. It has no hall sensors, just the 3 motor phase wires. Motor has forced cooling, unlike most hobby outrunners. Motor bearings come with a slight bit of play from the factory (maybe I got a bad unit, but the play seems in the bearings themselves). Discovering that it is sensorless, and only runs for 3 seconds without GW battery authentication - I don't think it's ideal for my project.

Question for you folks - if I buy a dewalt 60V tool, will it run from a generic 60VDC source, or does it also try to 'authenticate' the battery?
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #46 on: November 23, 2021, 05:28:08 am »
Great info in this thread. I have a GW 60V trimmer that I bought for parts, and can confirm that when powered from a 66V battery with just + and - terminals, it runs for ~3sec then powers off. No audible beeper.

This is the trimmer with motor down at the bottom of the shaft. The motor is an outrunner, direct drive to the trimmer spool, marked Globe 60VDC. It has no hall sensors, just the 3 motor phase wires. Motor has forced cooling, unlike most hobby outrunners. Motor bearings come with a slight bit of play from the factory (maybe I got a bad unit, but the play seems in the bearings themselves). Discovering that it is sensorless, and only runs for 3 seconds without GW battery authentication - I don't think it's ideal for my project.

Question for you folks - if I buy a dewalt 60V tool, will it run from a generic 60VDC source, or does it also try to 'authenticate' the battery?

I'll check and report back.  May not be till after Thanksgiving though.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #47 on: November 29, 2021, 11:15:19 pm »
Great info in this thread. I have a GW 60V trimmer that I bought for parts, and can confirm that when powered from a 66V battery with just + and - terminals, it runs for ~3sec then powers off. No audible beeper.

This is the trimmer with motor down at the bottom of the shaft. The motor is an outrunner, direct drive to the trimmer spool, marked Globe 60VDC. It has no hall sensors, just the 3 motor phase wires. Motor has forced cooling, unlike most hobby outrunners. Motor bearings come with a slight bit of play from the factory (maybe I got a bad unit, but the play seems in the bearings themselves). Discovering that it is sensorless, and only runs for 3 seconds without GW battery authentication - I don't think it's ideal for my project.

Question for you folks - if I buy a dewalt 60V tool, will it run from a generic 60VDC source, or does it also try to 'authenticate' the battery?

I just checked to see if my DeWalt leaf blower (DCBL770) would run with only power and ground, and unfortunately it will not.  I didn't research any further, so making it work may be simple as jumping a few of the extra pins on the tool.
 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #48 on: January 21, 2022, 12:32:11 pm »
Hi there,
I have various Greenworks devices that I would like to use with other batteries.
I looked at the signal and wrote a small program based on it.
the program is designed in such a way that you can easily use other battery types.
unfortunately i don't have 60v and 80v batteries and can't reproduce the signal for them.

since the signal pauses are always the same length, i only need the pulse lengths and number of pulses, and what for battery and manufacturers.

like 1x400 3x200 13x102 .....

then i can include it in the program, maybe we can create a list with which manufacturers and battery types it works?

here the program
https://github.com/softwarecrash/OmegaFaker

by interesed, i think about a self learn function or a function to read out the battery and report the sequel by serial
« Last Edit: January 21, 2022, 12:44:04 pm by softwarecrash »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #49 on: January 21, 2022, 05:19:22 pm »
Hi there,
I have various Greenworks devices that I would like to use with other batteries.
I looked at the signal and wrote a small program based on it.
the program is designed in such a way that you can easily use other battery types.
unfortunately i don't have 60v and 80v batteries and can't reproduce the signal for them.

since the signal pauses are always the same length, i only need the pulse lengths and number of pulses, and what for battery and manufacturers.

like 1x400 3x200 13x102 .....

then i can include it in the program, maybe we can create a list with which manufacturers and battery types it works?

here the program
https://github.com/softwarecrash/OmegaFaker

by interesed, i think about a self learn function or a function to read out the battery and report the sequel by serial

Check the attachments in this post:

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3488428/#msg3488428

You can also look at the Arduino programs that I and others have posted which typically have tables of pin high/low hold times.

I hope you have better luck with the 60v Greenworks system than I've had.  The only Greenworks tool I have is the 60v snow blower.  The programs I've written for the Arduino and those I have tried from others have not worked.  I believe this is either because the Arduino can't produce pulses precise enough for the Renesas IC to consider valid (Arduino is 8 bit and 16 MHz and the Renesas R5F100ACA used by the Greenworks battery is 16 bit and 32 MHz), or because there is some logic that won't accept the exact same series of pulses over and over again.
« Last Edit: January 21, 2022, 05:33:21 pm by typoknig »
 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #50 on: January 22, 2022, 09:48:31 am »
Hi there,
I have various Greenworks devices that I would like to use with other batteries.
I looked at the signal and wrote a small program based on it.
the program is designed in such a way that you can easily use other battery types.
unfortunately i don't have 60v and 80v batteries and can't reproduce the signal for them.

since the signal pauses are always the same length, i only need the pulse lengths and number of pulses, and what for battery and manufacturers.

like 1x400 3x200 13x102 .....

then i can include it in the program, maybe we can create a list with which manufacturers and battery types it works?

here the program
https://github.com/softwarecrash/OmegaFaker

by interesed, i think about a self learn function or a function to read out the battery and report the sequel by serial

Check the attachments in this post:

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3488428/#msg3488428

You can also look at the Arduino programs that I and others have posted which typically have tables of pin high/low hold times.

I hope you have better luck with the 60v Greenworks system than I've had.  The only Greenworks tool I have is the 60v snow blower.  The programs I've written for the Arduino and those I have tried from others have not worked.  I believe this is either because the Arduino can't produce pulses precise enough for the Renesas IC to consider valid (Arduino is 8 bit and 16 MHz and the Renesas R5F100ACA used by the Greenworks battery is 16 bit and 32 MHz), or because there is some logic that won't accept the exact same series of pulses over and over again.

thanks for the link,

i have succsefull tested my version with a Greenworks 40V Leaf Blower, it runs over 20min with the faker

the point is clear, the atmega chips a little bit slow, thats not a problem when add 1-2µs to the pulse to give the chip time to switch the on or off the pin.
i will get another 40V battery and two 24V batterys to read them out. but it looks like a schematic in the pulse sequences, i have tried varius logic systems like hex,onewire etc... but no one matches the pulses.

so o think about a function for the arduino to read out the signal and print it to the serial console so that it can grab and put it in the code, unfortanly i dont have 60 or 80V baterys or devices, so for this idea i need the help of others.

can you short link me the code that you tried what dont work?
i have found two of them, but one is from a powerworks battery and have another pulse array.
the simplest way is when i can get a saleae capture from a 60V greenworks battery than i can make a sequence for you

Edit:
i have grabbed the signal from a 40V Greenworks battery without connected to a machine, the battery replay a low signal with 1x412µs and 24x105µs (pause high length 102) so i put this in my code and the leaf blower runs... what the... !?!
so now i think the variating of pulse length report the battery charging state or load percentage or whatever, but the leaf blower doesnt interesting that when it send the simple signal.
i will try it later with 24v systems.
i have addet the battery raw signal to the git for testing
« Last Edit: January 22, 2022, 02:37:51 pm by softwarecrash »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #51 on: January 24, 2022, 06:26:49 am »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #52 on: January 24, 2022, 10:15:13 am »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job
« Last Edit: January 24, 2022, 07:36:08 pm by softwarecrash »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #53 on: January 24, 2022, 11:44:29 pm »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job

Sure, I'll help you test.  Can you please tell me exactly what you want me to do?
 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #54 on: January 25, 2022, 06:16:53 pm »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job

Sure, I'll help you test.  Can you please tell me exactly what you want me to do?

thank you, here a test code, when it dont will run you can variate the first 412µs impulse a little bit lower
one important thing i have noticed, the connection from pin2 to the omega port of the device must be secured, loose cable will produce fails, so short cables ar good to.
actual tested with a 24v screwdriver without problems

Code: [Select]

#include <Arduino.h>
//-------------------------------------------------------------------
//* Greenworks, GW, and other battery type faker, to use non communication Batterys
//*
//* Written by softwarecrash [url]https://github.com/softwarecrash/OmegaFaker[/url]
//-------------------------------------------------------------------

//----------------------------SETTINGS--------------------------
const int pulseLength[][2] = {
    {1, 412},
    {24, 105},
};

//Select the pin for output
#define PIN 02
//----------------------------SETTINGS--------------------------

const int messagePause = 1000; //Pause between message blocks in ms
const int pulsePause = 100;    //pause between Signals in µS
void setup()
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN, HIGH);
}
void loop()
{
  for (uint8_t i = 0; i < sizeof(pulseLength) / sizeof(pulseLength[0]); i++)
  {
    for (uint8_t j = 0; j < pulseLength[i][0]; j++)
    {
      digitalWrite(PIN, LOW);
      delayMicroseconds(pulseLength[i][1]);
      digitalWrite(PIN, HIGH);
      delayMicroseconds(pulsePause);
    }
  }
  delay(messagePause);
}
« Last Edit: January 25, 2022, 06:21:08 pm by softwarecrash »
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #55 on: January 28, 2022, 05:57:36 pm »
I'll try to test this out Sunday.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #56 on: February 02, 2022, 05:08:37 am »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job

Sure, I'll help you test.  Can you please tell me exactly what you want me to do?

thank you, here a test code, when it dont will run you can variate the first 412µs impulse a little bit lower
one important thing i have noticed, the connection from pin2 to the omega port of the device must be secured, loose cable will produce fails, so short cables ar good to.
actual tested with a 24v screwdriver without problems

Code: [Select]

#include <Arduino.h>
//-------------------------------------------------------------------
//* Greenworks, GW, and other battery type faker, to use non communication Batterys
//*
//* Written by softwarecrash [url]https://github.com/softwarecrash/OmegaFaker[/url]
//-------------------------------------------------------------------

//----------------------------SETTINGS--------------------------
const int pulseLength[][2] = {
    {1, 412},
    {24, 105},
};

//Select the pin for output
#define PIN 02
//----------------------------SETTINGS--------------------------

const int messagePause = 1000; //Pause between message blocks in ms
const int pulsePause = 100;    //pause between Signals in µS
void setup()
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN, HIGH);
}
void loop()
{
  for (uint8_t i = 0; i < sizeof(pulseLength) / sizeof(pulseLength[0]); i++)
  {
    for (uint8_t j = 0; j < pulseLength[i][0]; j++)
    {
      digitalWrite(PIN, LOW);
      delayMicroseconds(pulseLength[i][1]);
      digitalWrite(PIN, HIGH);
      delayMicroseconds(pulsePause);
    }
  }
  delay(messagePause);
}

Just tested your code out and I get the same results that I had got on my previous attempts.  The snowblower runs for 3 seconds then shuts off.
« Last Edit: February 02, 2022, 05:26:21 am by typoknig »
 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #57 on: February 02, 2022, 08:14:59 am »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job

Sure, I'll help you test.  Can you please tell me exactly what you want me to do?

thank you, here a test code, when it dont will run you can variate the first 412µs impulse a little bit lower
one important thing i have noticed, the connection from pin2 to the omega port of the device must be secured, loose cable will produce fails, so short cables ar good to.
actual tested with a 24v screwdriver without problems

Code: [Select]

#include <Arduino.h>
//-------------------------------------------------------------------
//* Greenworks, GW, and other battery type faker, to use non communication Batterys
//*
//* Written by softwarecrash [url]https://github.com/softwarecrash/OmegaFaker[/url]
//-------------------------------------------------------------------

//----------------------------SETTINGS--------------------------
const int pulseLength[][2] = {
    {1, 412},
    {24, 105},
};

//Select the pin for output
#define PIN 02
//----------------------------SETTINGS--------------------------

const int messagePause = 1000; //Pause between message blocks in ms
const int pulsePause = 100;    //pause between Signals in µS
void setup()
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN, HIGH);
}
void loop()
{
  for (uint8_t i = 0; i < sizeof(pulseLength) / sizeof(pulseLength[0]); i++)
  {
    for (uint8_t j = 0; j < pulseLength[i][0]; j++)
    {
      digitalWrite(PIN, LOW);
      delayMicroseconds(pulseLength[i][1]);
      digitalWrite(PIN, HIGH);
      delayMicroseconds(pulsePause);
    }
  }
  delay(messagePause);
}

Just tested your code out and I get the same results that I had got on my previous attempts.  The snowblower runs for 3 seconds then shuts off.

damn, can you show me your setup and wireing?
it sound like you have another blcd controller or someting, or wrong wireing.

 i have now tested it with 80v devices and 40v lawn mower all runs, only when the dataline is wrong it will stop after 3 seconds
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #58 on: February 02, 2022, 03:52:57 pm »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job

Sure, I'll help you test.  Can you please tell me exactly what you want me to do?

thank you, here a test code, when it dont will run you can variate the first 412µs impulse a little bit lower
one important thing i have noticed, the connection from pin2 to the omega port of the device must be secured, loose cable will produce fails, so short cables ar good to.
actual tested with a 24v screwdriver without problems

Code: [Select]

#include <Arduino.h>
//-------------------------------------------------------------------
//* Greenworks, GW, and other battery type faker, to use non communication Batterys
//*
//* Written by softwarecrash [url]https://github.com/softwarecrash/OmegaFaker[/url]
//-------------------------------------------------------------------

//----------------------------SETTINGS--------------------------
const int pulseLength[][2] = {
    {1, 412},
    {24, 105},
};

//Select the pin for output
#define PIN 02
//----------------------------SETTINGS--------------------------

const int messagePause = 1000; //Pause between message blocks in ms
const int pulsePause = 100;    //pause between Signals in µS
void setup()
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN, HIGH);
}
void loop()
{
  for (uint8_t i = 0; i < sizeof(pulseLength) / sizeof(pulseLength[0]); i++)
  {
    for (uint8_t j = 0; j < pulseLength[i][0]; j++)
    {
      digitalWrite(PIN, LOW);
      delayMicroseconds(pulseLength[i][1]);
      digitalWrite(PIN, HIGH);
      delayMicroseconds(pulsePause);
    }
  }
  delay(messagePause);
}

Just tested your code out and I get the same results that I had got on my previous attempts.  The snowblower runs for 3 seconds then shuts off.

damn, can you show me your setup and wireing?
it sound like you have another blcd controller or someting, or wrong wireing.

 i have now tested it with 80v devices and 40v lawn mower all runs, only when the dataline is wrong it will stop after 3 seconds

The problem definitely isn't the wiring.  I tested it with my oscilloscope to make sure the it was producing a signal and it was.  I did change your code to use pin 6 instead of pin 2, because that is how I have my Arduino wired, but otherwise I changed nothing and the code did what I expected it to do when hooked up to the oscilloscope.

 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #59 on: February 03, 2022, 08:44:47 am »
Here is a previous post I made with code which I believe should work, but it doesn't, at least not with my 60V Greenworks snowblower.  I don't have any other tools to test it with.

https://www.eevblog.com/forum/reviews/greenworks-60v-battery-ohm-terminal/msg3465166/#msg3465166
thanks,
can you actual do tests with the snow blower?
i have made a raw data battery type, for test, it send only a 412µs and 24 105µs signals
so i have read out the data from varius 24/40/80V batterys, all send similar raw data with minimal changes, so the start flag variate at 390-420µs and the other flags ar 100-108µs
i think with the raw the snowblower will run

i have added the saleae files from the batterys to the document folder under raw, so you can check the signals and modify it a bit

PS: i have testet it with a attiny85-20 with internal 8mhz and 16mhz clock, its enugh power to do this job

Sure, I'll help you test.  Can you please tell me exactly what you want me to do?

thank you, here a test code, when it dont will run you can variate the first 412µs impulse a little bit lower
one important thing i have noticed, the connection from pin2 to the omega port of the device must be secured, loose cable will produce fails, so short cables ar good to.
actual tested with a 24v screwdriver without problems

Code: [Select]

#include <Arduino.h>
//-------------------------------------------------------------------
//* Greenworks, GW, and other battery type faker, to use non communication Batterys
//*
//* Written by softwarecrash [url]https://github.com/softwarecrash/OmegaFaker[/url]
//-------------------------------------------------------------------

//----------------------------SETTINGS--------------------------
const int pulseLength[][2] = {
    {1, 412},
    {24, 105},
};

//Select the pin for output
#define PIN 02
//----------------------------SETTINGS--------------------------

const int messagePause = 1000; //Pause between message blocks in ms
const int pulsePause = 100;    //pause between Signals in µS
void setup()
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN, HIGH);
}
void loop()
{
  for (uint8_t i = 0; i < sizeof(pulseLength) / sizeof(pulseLength[0]); i++)
  {
    for (uint8_t j = 0; j < pulseLength[i][0]; j++)
    {
      digitalWrite(PIN, LOW);
      delayMicroseconds(pulseLength[i][1]);
      digitalWrite(PIN, HIGH);
      delayMicroseconds(pulsePause);
    }
  }
  delay(messagePause);
}

Just tested your code out and I get the same results that I had got on my previous attempts.  The snowblower runs for 3 seconds then shuts off.

damn, can you show me your setup and wireing?
it sound like you have another blcd controller or someting, or wrong wireing.

 i have now tested it with 80v devices and 40v lawn mower all runs, only when the dataline is wrong it will stop after 3 seconds

The problem definitely isn't the wiring.  I tested it with my oscilloscope to make sure the it was producing a signal and it was.  I did change your code to use pin 6 instead of pin 2, because that is how I have my Arduino wired, but otherwise I changed nothing and the code did what I expected it to do when hooked up to the oscilloscope.
thank you for testing,
the signal looks good, so i think its give only two ways, one the 60v variant have another communication, so i must look a the electronic garbage place to take one of the things, ot your blcd controler is dead or have another problem.

can you grab the signal with the oszilloscope when the controller is conected? it must show a answer from the controller like the red marked.
i will make tests to recive the answer from blcd with a wrong signal to check if the controller ok
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #60 on: February 09, 2022, 05:11:09 am »
Sorry, been really busy.  Yes I'll get you those readings, but it probably won't be till Sunday.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #61 on: February 21, 2022, 06:55:44 pm »
Here is the waveform I captured.  Obviously the snowblower isn't pulling down the omega pin the way it should.  I believe this is because the code you provided doesn't ever switch the pin back to an INPUT after the initial OUTPUT.  Still, you can see what signal the snowblower is trying to generate in the attached picture.
 

Offline softwarecrash

  • Newbie
  • Posts: 7
  • Country: de
Re: Greenworks 60v battery Ohm terminal
« Reply #62 on: February 22, 2022, 10:10:22 am »
Here is the waveform I captured.  Obviously the snowblower isn't pulling down the omega pin the way it should.  I believe this is because the code you provided doesn't ever switch the pin back to an INPUT after the initial OUTPUT.  Still, you can see what signal the snowblower is trying to generate in the attached picture.
thanks for the work, so it dont need to switch the pin to an input, when the pin hold up the line try to put a 10K or someelse resistor in the line that the blower can switch down the signal.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #63 on: March 06, 2022, 04:10:56 pm »
Here is the waveform I captured.  Obviously the snowblower isn't pulling down the omega pin the way it should.  I believe this is because the code you provided doesn't ever switch the pin back to an INPUT after the initial OUTPUT.  Still, you can see what signal the snowblower is trying to generate in the attached picture.
thanks for the work, so it dont need to switch the pin to an input, when the pin hold up the line try to put a 10K or someelse resistor in the line that the blower can switch down the signal.

I put a 10K resistor in line and it had no effect.  Pictures attached.  The blue wire goes to the Arduino pin and the Greenworks Omega pin and it has the 10K resistor inline under the electrical tape.  The white/red wire is going to my oscilloscope.  With a resistor in line I don't think it is possible for the Arduino and the Greenworks controller to both generate the correct signals.
 

Offline tdi_twister

  • Newbie
  • Posts: 1
  • Country: us
Re: Greenworks 60v battery Ohm terminal
« Reply #64 on: March 07, 2022, 05:34:12 am »
Hello all,

Thanks for the great discussion and details! I registered to share a bit of my findings on this topic...

I recently purchased a Greenworks Commercial GL900 82V battery backpack. I wanted to share a few observations that might help with decoding this protocol.

This pack is not potted (but is conformal coated). Attached is a quick labeling of key components. Note that it has an open-collector half-duplex bi-directional signal line (labeled COM on the silkscreen, equivalent to Omega on others). It has a transmit transistor and receive transistor (which also echos the transmission, being half-duplex). I imagine the other batteries have similar internal circuitry.

The GL900 seems to share an identical preamble to the scope/analyzer captures posted here, without a reply from the load/tool (since I don't have a tool to test).

Connecting a 10k pullup from COM to Bat+ causes the BMS to wake up and send continuous preambles with <100W load. If the load exceeds ~100W, the BMS will beep three times and show error code E6, which seems to translate to "tool stealing power" - i.e. it didn't handshake properly for more power.

In order to reliably communicate with the BMS, it seems you would need at least two transistors (but ideally four). To transmit only, use two NPNs "in series"/cascaded to first invert the signal, then pull the COM/Omega line low with the second transistor. (Alternatively, invert the signal in code to use only one transistor as an open-collector...) Ideally, you would also listen for the preamble, using one or two transistors in the opposite manner of transmitting, to stop and then reply after some delay with the tool response/handshake. This is very similar to the old VW OBD protocol at the physical layer.

*IMPORTANT NOTES* On this pack, the COM line goes to about 10.5V, much higher than Arduino TTL logic levels. Also, if you have a load attached and you are using the B- output from the pack, you will get a negative voltage developed from the COM/Omega pin and the B- line (i.e. your TX transistor will see negative battery voltage!). This could easily destroy a processor output pin and/or entire chip/board/etc. by itself, with or without transistor buffers. The transistors and processor/Arduino should reference the actual physical battery ground, not the B- output from the battery if you have access. Alternatively, ensure there is no load before pulling up COM/Omega to B+, then apply load when the battery FET is enabled, providing GND reference.

@softwarecrash 's OmegaFaker looks like it is trying to replicate the preamble as a reply but does so blindly, without knowing if it timed up with a battery preamble. I'll be trying out that code first, soon. Oops, this is ok as it is ignoring the tool response.

@typoknig 's code looks like it is sending out the battery's preamble AND the tool/load response. Only the tool response should be necessary for this pack. It also looks like maybe your Arduino took some damage, since it can't pull the line low anymore. edit: I see it's the tool that's not able, not your Arduino. A transistor or two and picking a different output pin might work if the chip is still ok?

Hope that helps! I will try to remember to post my results...


Disclaimer: obviously, do any of this at your own risk!

« Last Edit: March 08, 2022, 02:08:56 am by tdi_twister »
 
The following users thanked this post: softwarecrash

Offline BornToRepair

  • Newbie
  • Posts: 2
  • Country: pl
Re: Greenworks 60v battery Ohm terminal
« Reply #65 on: April 12, 2022, 12:37:26 pm »
Here is the waveform I captured.  Obviously the snowblower isn't pulling down the omega pin the way it should.  I believe this is because the code you provided doesn't ever switch the pin back to an INPUT after the initial OUTPUT.  Still, you can see what signal the snowblower is trying to generate in the attached picture.
This waveform is promising. Once you will see the answer from motor driver you should be good to go. To me it looks Arduino port is not changed to input and port is driven HIGH after each query. You need to include line
Code: [Select]
pinMode(PIN, INPUT); in the code to change pin mode – please check my updated code below. Remove all external resistors. AVRs have internal ones 😊.

Quote from: typoknig
I believe this is either because the Arduino can't produce pulses precise enough for the Renesas IC to consider valid (Arduino is 8 bit and 16 MHz and the Renesas R5F100ACA used by the Greenworks battery is 16 bit and 32 MHz), or because there is some logic that won't accept the exact same series of pulses over and over again.
As per my investigation motor driver is very tolerant on timings. With Arduino I tried to ‘stretch’ and ‘squeeze’ the waveforms (they call it jitter, I guess?). Both were working fine. Also frequency of frames does not matter much. 5Hz (T=200ms) is native factory rate. I tried 10Hz and 1Hz – also works fine. It stops working at <~0,3Hz (>~T=3s).
https://youtu.be/Xx3xUMFyDFs
I think transmission looks like Manchester coded. This kind of transmission is self-clocked, what explains it’s tolerance on different timings.
Because existing hack works for me I did not try to decode answer frames (those are ignored in this project anyway).

Quote from: JunkPlusTools
I have a GW 60V trimmer that I bought for parts, and can confirm that when powered from a 66V battery with just + and - terminals, it runs for ~3sec then powers off. No audible beeper.
Seems there are different types of driver boards for different power tools and some of them are not equipped with buzzer on board.

For power tools with buzzer, I found following “error codes” so far:
-   3x beeps: battery communication error
-   6x beeps: onboard 5V error (5V hall power line overload)
-   8x beeps: Hall sensor error

Down below I have attached modified version of software. Although previously works just fine I figured two vulnerabilities:
- query period was not exactly 200ms (slightly less). In new software I used timer to generate exact 200ms interrupt. As a result I got rock solid 5Hz query.
- under some super-hot ambient condition mower turns in to error state (6 beeps) after some time (15 min in my case). This was caused by Arduino extensive current draw on 5V hall sensor power line. Activation Power Down mode in Arduino and desoldering unnecessary power LED, lowered power consumption from 16mA to 6mA (I am using Arduino UNO R3 clone).

Code: [Select]
// written 5/26/2020
// Working battery interface signal from the "Omega" port
// of a Greenworks Pro 60V battery


//20.05.2021 BornToRepair mod:
//reply frame removed
//pin6 input mode enabled beetween query frames
//query cycling each 2000ms


//02.04.2022 BornToRepair mod:
//200ms timer added.
//query cycling removed

//02.04.2022a BornToRepair mod:
//power down mode:
//- LED diodes desoldering
//- sleep modes (16mA -> 6mA).
//- eaxat 5Hz query every.

#include <avr/sleep.h>
#include <avr/power.h>

#define PIN 6
boolean toggle1 = 0;
volatile int f_timer=0;

void enterSleep(void)
{
  set_sleep_mode(SLEEP_MODE_IDLE);
 
  sleep_enable();


  /* Disable all of the unused peripherals. This will reduce power
   * consumption further and, more importantly, some of these
   * peripherals may generate interrupts that will wake our Arduino from
   * sleep!
   */
  power_adc_disable();
  power_spi_disable();
  power_timer0_disable();
  power_timer2_disable();
  power_twi_disable(); 

  /* Now enter sleep mode. */
  sleep_mode();
 
  /* The program will continue from here after the timer timeout*/
  sleep_disable(); /* First thing to do is disable sleep. */
 
  /* Re-enable the peripherals. */
  //power_all_enable();
}

void setup()
{
cli();//stop interrupts
//set timer1 interrupt at 5Hz (T=200ms)
  TCCR1A = 0;// set entire TCCR1A register to 0
  TCCR1B = 0;// same for TCCR1B
  TCNT1  = 0;//initialize counter value to 0
  // set compare match register for 1hz increments
  OCR1A = 3124;// = (16*10^6) / (5*1024) - 1 (must be <65536)
  // turn on CTC mode
  TCCR1B |= (1 << WGM12);
  // Set CS10 and CS12 bits for 1024 prescaler
  TCCR1B |= (1 << CS12) | (1 << CS10); 
  // enable timer compare interrupt
  TIMSK1 |= (1 << OCIE1A);
sei();//allow interrupts
 
pinMode(PIN, OUTPUT);
}

ISR(TIMER1_COMPA_vect)
{//timer1 interrupt 5Hz generates a query
pinMode(PIN, OUTPUT);
digitalWrite(PIN, HIGH);
digitalWrite(PIN, LOW);
delayMicroseconds(400);

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 13; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

for(uint8_t i = 0; i < 3; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(200);
}

for(uint8_t i = 0; i < 5; i++)
{
digitalWrite(PIN, HIGH);
delayMicroseconds(100);
digitalWrite(PIN, LOW);
delayMicroseconds(100);
}

pinMode(PIN, INPUT);
digitalWrite(PIN, HIGH);

  /* set the flag. */
   if(f_timer == 0)
   {
     f_timer = 1;
   }
}

void loop()
{
    if(f_timer==1)
  {
    f_timer = 0;
    /* Re-enter sleep mode. */
    enterSleep();
  }
}

I was able to purchase another cheap PowerWorks/GreenWorks power tool. This time 60V trimmer together with brand new 2,5Ah 60V battery. Thus, I was able to take few more experiments 😊.
Trimmer works with this hack as well however I will be using it with stock 2.5Ah battery (better balance). For large mower I will stick to my Makita hack :-).
« Last Edit: April 12, 2022, 12:42:47 pm by BornToRepair »
 

Offline Nioko

  • Newbie
  • Posts: 2
  • Country: ch
Re: Greenworks 60v battery Ohm terminal
« Reply #66 on: June 07, 2022, 02:09:04 pm »
Anyone tried with Stiga tools?
I have a chainsaw + trimmer both using the STIGA SBT 5048 AE Battery, which unfortunately I don't own, and is ridiculously expensive.

These Batteries and tools look like they are from the same factory, and also have the Omega Port. The Stiga Battery I would need to emulate is a 12s battery (marketed as 48v).
I've tried all the codes I've found on eevblog, but none worked with these tools.
 

Offline typoknigTopic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: Greenworks 60v battery Ohm terminal
« Reply #67 on: June 10, 2022, 04:32:46 am »
Sorry, I have not.  This project tends to take the back burner for me when it isn't snowing since a snowblower is the only GW tool I have!
 

Offline samocos191

  • Newbie
  • Posts: 1
  • Country: ru
Re: Greenworks 60v battery Ohm terminal
« Reply #68 on: July 25, 2022, 09:53:04 am »
Hello! Thank you for sharing your experiences. You can try this firmware. It will work with an Arduino based on Atmega328 or a Chinese LGT8F328P clone (developed on the latter). It was possible to achieve stable operation on a 60V trimmer.
Of the disadvantages, constant power is required through the converter, since there is no reduced power consumption mode. IO_PIN needs to be connected to the Ohm terminal via a 150 ohm resistor.
« Last Edit: July 25, 2022, 09:55:40 am by samocos191 »
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 4292
  • Country: it
  • EE meid in Itali
Re: Greenworks 60v battery Ohm terminal
« Reply #69 on: January 10, 2023, 02:18:42 pm »
I would like to thank everyone in this wonderful thread!

I almost pulled the trigger on a used no battery Greenworks 80V mower assuming all it needs is a + and - wires with 80VDC on it.

It makes me vomiting to see companies implementing a communication protocol with the battery, there is no real need for it, it will only piss off customers.

Greenworks if you are reading this, I did not buy your product because you made me difficult to use it as I want it.
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 

Offline chadez

  • Newbie
  • Posts: 2
  • Country: fi
Re: Greenworks 60v battery Ohm terminal
« Reply #70 on: April 10, 2023, 08:31:29 am »
Hi all and thanks for all the useful information! I've learned a lot from this forum in general.

Now I stumbled into an issue with related 40V Greenworks tool (a weed trimmer) that doesn't seem to be accepting the messages I'm sending to it. I can get it to respond to OmegaFaker (by softwarecrash) as an example, but the motor still stops after a while. I have so far got two different bit patterns as a response (depending on what I send) and I've tried alternating between them as well. To match the voltage levels, I've been tweaking MCU supply voltage, pull-up resistor size, MCU I/O pin state etc, but nothing seems to make a difference. The motor driver manufacturing date seems to be 3/8/18, so I'm assuming it's not any newer version than the ones discussed here. Any ideas?

BR, Pauli
« Last Edit: April 10, 2023, 11:49:36 am by chadez »
 

Offline chadez

  • Newbie
  • Posts: 2
  • Country: fi
Re: Greenworks 60v battery Ohm terminal
« Reply #71 on: May 08, 2023, 10:11:02 am »
Answering to myself:
I got hold on to some Cramer branded batteries that are compatible with GW 40V and finally was able to record and play back a working sequence!
I came up with following coding to make pattern recognition easier:

Long START - low pulse = S
Long low pulse = 1
Short low pulse = 0

Initial 24 x 0 pulse train = X
S011000001000000011100000 = A
S101000000101000011110000 = B
S111000000000000011100000 = C

I found the battery to be sending following sequence of pulse trains:

XBACCCCCC.... keeping repeating C until the trigger was released and starting from beginning when repressed.

I tried simply repeating XBAC XBAC XBAC ... and the tool seems happy. I also modified the Omegafaker code so, that the PIN is OUTPUT only when driving the line LOW, otherwise INPUT. By adding about 20k resistor for a pull-down I got the signal levels to match very well with the Cramer battery. I also tried draining the battery to see if the message would change, but didn't see any difference from 34.3V down to 30V where the tool seems to detect low voltage level and refuse to work.
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 4292
  • Country: it
  • EE meid in Itali
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 

Offline RandoMan70

  • Newbie
  • Posts: 1
  • Country: ru
Re: Greenworks 60v battery Ohm terminal
« Reply #73 on: January 16, 2024, 07:47:47 am »
Okay, let me continue observations. I've  captured full exchange sequence from the beginning. My tool is 40V snow thrower (2600607), batt is 5ah (2927207)
Battery starts transmitting when a tool is rising Ohm line up, initially it passes 5 different signals in 100ms interval, then starts transmitting one sequence until a tool release the line. Not sure how long it will cycle this, may be it will periodically retransmit whole greeting sequence (say, for older devices).

Initial sync pulse length: 397us (marked as S below)
Long pulse length: 198us (marked as 1 below)
Short pulse length: 94us (marked as 0 below)
Inter-pulse pause: 100ms.

Initial sequence

Q means query from battery side
R means tool response


1. Nearly +700ms from the moment when line is up
  Q: S 0 x 24
  R:   0 x 15

2. +800 ms 
  Q S 0 x 24
  R   1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1

3. +900 ms
  Q S 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0
  R   1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1

4. +1000 ms
  Q S 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0
  R   1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1

5. +1100 ms
  Q S 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 1 0 0
  R   1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1

Note: Surprisingly, first response is really only 15 bits. All further are 16 bits length

Continuous mode

6. +1300ms
  Q S 1 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0
  R   1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1

7. +1500ms
  Q S 1 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0
  R   1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1

... etc

Here is a arduino code, which works for me (chineese nano works perfectly). Didn't check yet for long load time, but at least it successfully starts.
Code: [Select]
const int LINE_PIN = 2;

const int S_PREAMBLE = 412;
const int S_SHORT = 105;
const int S_LONG = 205;
const int S_PAUSE = 100;

const int MSG_PAUSE = 1000;

#define MESSAGE_LENGTH 25
const int INITIAL[4][MESSAGE_LENGTH] = {
  {'S', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  {'S', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  {'S', 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0},
  {'S', 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0} 
};

const int PERIODIC[MESSAGE_LENGTH] =   {'S', 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0};

typedef enum {
  LINE_LOW,
  LINE_FLOAT
} line_state_t;

void set_line(line_state_t state) {
  switch (state) {
    case LINE_LOW:
      pinMode(LINE_PIN, OUTPUT);
      digitalWrite(LINE_PIN, LOW);
      break;
    case LINE_FLOAT:
      pinMode(LINE_PIN, INPUT);
      break;
  }
}

void send_pulse(int pulse) {
  set_line(LINE_LOW);
  switch (pulse) {
    case 'S':
      delayMicroseconds(S_PREAMBLE);
      break;
    case 0:
      delayMicroseconds(S_SHORT);
      break;
    case 1:
      delayMicroseconds(S_LONG);
      break;
  }
  set_line(LINE_FLOAT);
}

void send_message(const int m[MESSAGE_LENGTH]) {
  for (int idx = 0; idx < MESSAGE_LENGTH; idx++) {
    send_pulse(m[idx]);
    delayMicroseconds(S_PAUSE);
  }
}
 
void setup() {
  set_line(LINE_FLOAT);
}

int state = 0;

void loop() {
  int line = digitalRead(LINE_PIN);
  if (line == 0) {
    state = 0;
    return;
  }

  if (line == 1 && state == 0) {
    delay(700);
  }

  if (state < 4) {
    send_message(INITIAL[state]);
    state ++;
    delay(100);
  } else {
    send_message(PERIODIC);
    delay(200);
  }
}
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf