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

0 Members and 1 Guest are viewing this topic.

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: 4603
  • 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: 4603
  • 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