GIANT Trance "Bench Test" Rig

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
On average, we do 100 motors a month and photograph every one, so I could post pictures like this all day if you want :eek: eBike Motor Centre



View attachment 77704

View attachment 77705

View attachment 77706

View attachment 77707

View attachment 77708

View attachment 77709

View attachment 77710
You really have to to wonder if adding a small drain plug on the bottom would be a wise idea to relieve any condensation and so that you know you have a problem. Putting a circuit board at the bottom is priceless! Yamaha can build marine engines that keep salt water out and oil in, but this simple stuff seems to have them stumped. Weird!
 

Zimmerframe

MUPPET
Subscriber
Jun 12, 2019
13,998
20,749
Brittany, France
I've always been a huge Yamaha fan for whatever reasons. I've owned more Suzuki's than Yamaha's but for some reason the Yamaha's always just seemed to be less, but more in some way. I always wanted an OX-99, but it was never to be and a pair of wellies are for more useful these days and most of the cars I've owned over the years wouldn't even make it up the driveway of where I live now.

On the engine side it's amazing what they've done through their history. All the Engines they've made or tuned for Toyota. Ford. Volvo and many others.

It's a huge corporation though, so you can't expect the same magic to be applied everywhere and in fairness, many of the mistakes they've made have been similar to others and are just part of this early stage evolutionary. They're far from perfect, but nothing yet is, compromises are made with lack of experience from real world experience.

Still, it's fun and none of the motors are so crap that we can't go out and enjoy ourselves 99% of the time. (Except for @Evolution Stu who apparently never buys his flowers, so he's screwed - I'm still trying to figure out more on that but will comment in the other thread)
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I've always been a huge Yamaha fan for whatever reasons. I've owned more Suzuki's than Yamaha's but for some reason the Yamaha's always just seemed to be less, but more in some way. I always wanted an OX-99, but it was never to be and a pair of wellies are for more useful these days and most of the cars I've owned over the years wouldn't even make it up the driveway of where I live now.

On the engine side it's amazing what they've done through their history. All the Engines they've made or tuned for Toyota. Ford. Volvo and many others.

It's a huge corporation though, so you can't expect the same magic to be applied everywhere and in fairness, many of the mistakes they've made have been similar to others and are just part of this early stage evolutionary. They're far from perfect, but nothing yet is, compromises are made with lack of experience from real world experience.

Still, it's fun and none of the motors are so crap that we can't go out and enjoy ourselves 99% of the time. (Except for @Evolution Stu who apparently never buys his flowers, so he's screwed - I'm still trying to figure out more on that but will comment in the other thread)
Yeah, it's at the MG/Triumph sports car phase right now. Those cars brought lots of joy, including becoming an expert at fixing them. What was more fun than a bunch of guys standing around with the bonnet of a TR6 open with a few cans of Fosters? My catamaran sailboats break all the time, but we have the time of our lives sailing them. Same for my iceboats, snowmobiles, analog bikes, etc. Time always needs to be split between recreation and fixing.
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
It would seem possible to crack the interface with something like this, which could be programmed execute the battery ON command. This one is nice with a GUI, but once the message is cracked, any controller capable of CAN-Bus could listen for the Yamaha Power ON command and then execute the Giant one. Oh if I were only retired with money to play.

Komodo CAN Duo Interface - Total Phase - Total Phase
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
It would seem possible to crack the interface with something like this, which could be programmed execute the battery ON command. This one is nice with a GUI, but once the message is cracked, any controller capable of CAN-Bus could listen for the Yamaha Power ON command and then execute the Giant one. Oh if I were only retired with money to play.

Komodo CAN Duo Interface - Total Phase - Total Phase
I'm retired with some play time. Last year I designed some stuff (mostly during F'n Zoom meetings talking about synergy and such :) ) to measure LORA radio strength vs distance, capture GPS, report it back to iphone via bluetooth low energy, then to Internet of Things backbone, then into a database. On a prior project I designed similar to capture my solar array output every 10 seconds over 5 years and write it out to a database. It is just a re-swishing of the code and hardware for this project. Need to get two wiring harness parts: 1) Battery to motor cable 2) Charger port (since that connects to the Plus pack battery) , and install shunts in those wires. These shunts: Shunt_Raw . I also ordered two managed 36v 100WH batteries to experiment with adding parallel 36v batteries to either of my bikes. Reliving my prior life designing flight and ground test monitoring equipment for an aircraft company back in the late 80's. I've not done any work with CAN, but have with various other data busses. Need to learn a bit more about it. Not sure if my Rigol Oscilliscope decodes it, will have to check.
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I've used these Eagle Tree data loggers, back in the day on RC aircraft. I believe setting one up to log data on an ebike would be very simple, provided someone has time to tinker.

Eagletree Systems eLogger V4 - Heavy Duty Data Logger - 150A - Aerialpixels
Thanks! Those look like a pretty good match. Would need to front-end them with an analog multiplexer to switch between main battery and booster and pass along a BatteryID field with the data. I did that while monitoring my three solar stings of panels on an Arduino project.
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I have absolutely no idea to be honest.
In theory, if they are regulated like a cars electric motor then it requires a canbus torque request which will be calculated back as a currrent requirement for the motor which is likely where the ceiling sits in the software as we have regulated assistance levels so I suspect it regulates current allowance to the motor. (80NM @ 70rpm requires an allowance of 2A for example)

Another fella on here kindly worked out the wiring for the bikes which I have since confirmed as follows:

  • Red = Battery + For motor supply​
  • Yellow = Charger Input + Supply​
  • Brown = CAN-H​
  • Green = CAN-L​
  • Pink = 1.5 Volts wake up signal​
  • Black = Negative (-) for everything​
So please let us know how you get on when you start poking around.
Are sure you are not talking 20A, rather than 2A? 2A * 36v=72W.
Wen calculator shows 590W for that combo, which is 16.3A @ 36V.
1639001742435.png
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
I see small Arduino CAN-bus ecu's for cheap. I've not played around with Arduino, though it looks very interesting.

These guys figured it out.

 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I have absolutely no idea to be honest.
In theory, if they are regulated like a cars electric motor then it requires a canbus torque request which will be calculated back as a currrent requirement for the motor which is likely where the ceiling sits in the software as we have regulated assistance levels so I suspect it regulates current allowance to the motor. (80NM @ 70rpm requires an allowance of 2A for example)

Another fella on here kindly worked out the wiring for the bikes which I have since confirmed as follows:

  • Red = Battery + For motor supply​
  • Yellow = Charger Input + Supply​
  • Brown = CAN-H​
  • Green = CAN-L​
  • Pink = 1.5 Volts wake up signal​
  • Black = Negative (-) for everything​
So please let us know how you get on when you start poking around.
So, if you look at this cable then the two right hand pairs are for two CAN connections? The power is the shorter of the left ones?
1639101167875.png
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
I purchased a couple Arduino boards with the CAN-bus module built in. $27 each.

CANBed - Arduino CAN-BUS Development Kit (ATmega32U4 with MCP2515 and MCP2551) SKU: 102991321.

If I can figure Arduino out, this should do nicely recording the systems messages.

My goal is to put an off-the-shelf Yamaha motor in my 2021 Trance x. Sounds simple enough and starts with understanding the Giant battery ON function.
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
I purchased a couple Arduino boards with the CAN-bus module built in. $27 each.

CANBed - Arduino CAN-BUS Development Kit (ATmega32U4 with MCP2515 and MCP2551) SKU: 102991321.

If I can figure Arduino out, this should do nicely recording the systems messages.

My goal is to put an off-the-shelf Yamaha motor in my 2021 Trance x. Sounds simple enough and starts with understanding the Giant battery ON function.
Then of course, open source the process, so anybody can do it. Once these proprietary Giants are out of warranty, its a free for all.

The Giant Panasonic batteries will outlive the warranties, and the motors by a decade, is my guess.
 

Evolution Stu

E*POWAH Master
Jun 30, 2019
457
448
Blackpool. U.K.
I purchased a couple Arduino boards with the CAN-bus module built in. $27 each.

CANBed - Arduino CAN-BUS Development Kit (ATmega32U4 with MCP2515 and MCP2551) SKU: 102991321.

If I can figure Arduino out, this should do nicely recording the systems messages.

My goal is to put an off-the-shelf Yamaha motor in my 2021 Trance x. Sounds simple enough and starts with understanding the Giant battery ON function.

Awesome Project.
I for one would really enjoy reading about the challenges as you overcome them.
 

Mattnzl

Member
Aug 5, 2020
10
12
NZ
It is surprising (and annoying!) that no one has leaked the Giant dealer software/dongle. I had a good search a while back inc. some good dodgy Russian sites but no luck :(
I don't want to have to bodge a Bafang motor/battery in my Giant frame haha!
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I've posted this before, somewhere... Smart-Gateway Trivia questions

View attachment 77805
A couple of things here. Giant gave more to the FCC than they had to, and left out anything that completes the story here. I don't think the FCC cares much about the 3 seconds of DC signal to turn it on and off. It is also a bad Chinese/English translation.

But, more importantly, Giant has done a few things that differ from my Haibike's ST motor in its plain vanilla configuration. Some of them are done by the typical engineer geek with little end user engagement. The most annoying one is the Sudden Shutdown that happens if you plug in the charger, and the inability to turn the control head on while charging. Want to see if you have enough charge to go? Then you have to pull out the charger in order to turn the bike on, to be able to connect with the app, if you have an internet connection, and then you can monitor the battery. Oh, only 40%, lets plug it in for a little while longer and repeat this pullout process. The power plug has no discernable orientation engagement feel so you have to carefully rotate it around back and forth before you find it, stressing the vinyl cable back and forth. (Yamaha has a feel to when it is oriented correctly and can be pushed in). Even worse, if you have the Plus booster battery, you have to plug it all together, in order to see what the state of both batteries are, and the main battery reading changes when you plug the plus pack in it. That requires two times fumbling with the connector to find its seating position. On the Haibike/plain Yamaha, you can fire up the display and look at the battery reading (in bars), while you have the charger on. There is no reason to lock out the display, BLE, and ANT+, like on the Giant system, unless it is fed by the motor's 36V. People who develop systems know when they did an incomplete job. They usually incrementally bring the missing features out over time. Something is missing here between the user community and the engineering team.
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I purchased a couple Arduino boards with the CAN-bus module built in. $27 each.

CANBed - Arduino CAN-BUS Development Kit (ATmega32U4 with MCP2515 and MCP2551) SKU: 102991321.

If I can figure Arduino out, this should do nicely recording the systems messages.

My goal is to put an off-the-shelf Yamaha motor in my 2021 Trance x. Sounds simple enough and starts with understanding the Giant battery ON function.
I am a big fan of the Arduino ESP32 development board. It has built in BLE, i2c, SPI, serial, wifi, DACs, ADCs. What I do is write a BLE service that I can hit with my iPhone or an Android, that offloads data to the Adafruit (or any other) iOt backbone. From the iOt backbone I can pull the data to a PC. So, as I am acquiring data I queue it up in memory until I hit the BLE service with my phone and move it up to the backbone. This allows offline operation. Connecting a CAN adapter via SPI is pretty simple. The whole problem with Arduino is that people often write code that does endless busy waiting looping, and the code falls flat when you run it continuously. You miss datapoints, etc. A proper understanding of how to write very efficient real time loops/interrupts, and not bog them down with processing during collection becomes essential. Be glad to hear your progress, and I will share mine. I am adding shunts to the battery wires as well so that I can measure actual wattage, rather than the bogus wattage reported.
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
It is surprising (and annoying!) that no one has leaked the Giant dealer software/dongle. I had a good search a while back inc. some good dodgy Russian sites but no luck :(
I don't want to have to bodge a Bafang motor/battery in my Giant frame haha!
One would just need to monitor the bluetooth traffic stream with WireShark while the dongle is in use, and hope that stuff is plain text. The send the same commands to the bike and capture the response.
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
The most annoying one is the Sudden Shutdown that happens if you plug in the charger, and the inability to turn the control head on while charging.

My 2019 Trance did not turn off while charging, but also used no smart-gateway.

It is described in the FCC doc, as though the Smart Gate Way is powered via the main battery 36 volts.
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
Awesome Project.
I for one would really enjoy reading about the challenges as you overcome them.
Thanks.

I will keep it simple stupid.

The arduino stuff is rolling in, and when I find time and motivation on the same day, there will be an attempt made to capture the stream like this dude. If I'm successful, I'll make the log available for interpretation.


 

Evolution Stu

E*POWAH Master
Jun 30, 2019
457
448
Blackpool. U.K.
Thanks.

I will keep it simple stupid.

The arduino stuff is rolling in, and when I find time and motivation on the same day, there will be an attempt made to capture the stream like this dude. If I'm successful, I'll make the log available for interpretation.



Top man.
I for one will be very grateful.
I could probably be persuaded to buy a unit / cables and any spreadsheets you create to convert the data to human form in order to help you recoup some dev costs. :)
 

DrStupid

E*POWAH Elite World Champion
Patreon
Jul 10, 2019
1,464
2,128
Pleasureville Ky
Top man.
I for one will be very grateful.
I could probably be persuaded to buy a unit / cables and any spreadsheets you create to convert the data to human form in order to help you recoup some dev costs. :)

For now, the reward is itself, and getting this battery to turn ON, might be within the realm of what is possible for me.



This dam arduino kit is awesome! It makes me want to skip class (work) and play with the RC car (ebike).

20211217_082552.jpg
 

Nobrks

Active member
Sep 16, 2021
94
117
Denmark
I purchased a couple Arduino boards with the CAN-bus module built in. $27 each.

CANBed - Arduino CAN-BUS Development Kit (ATmega32U4 with MCP2515 and MCP2551) SKU: 102991321.

If I can figure Arduino out, this should do nicely recording the systems messages.

My goal is to put an off-the-shelf Yamaha motor in my 2021 Trance x. Sounds simple enough and starts with understanding the Giant battery ON function.

IF you crack the code with the battery communication, then you also open up for the possibility of homemade batteries !!
That would be awesome !!! :)
 

malc101

Active member
Nov 29, 2021
191
168
Upstate, NY
I've built Arduino projects to monitor solar arrays and other things, including most recently to measure antenna effectiveness of low power radio (LORA) antennas according to distance and geography, plotted against GPS topo data. A few things to mention:
1) Arduino is no longer tied to Atmel processors. The $15 ESP32 boards have everything built in, most importantly BLE. The good news is you can move code between processors with a small amount of rework, and sometimes none at all since the various INCLUDE files handle much of the differences. Those all-in-one CANBUS cards talk to the CANBUS chip via SPI or I2C, so connecting a standalone CANBUS card to any Arduino is just a few wires and pretty much the same code.
2) The Arduino coding environment is like 20 years out of date. It is the best thing for getting started, but learning the Microsoft Code (MSCode) Arduino programming environment will save you a lot of time. It has intellisense to show you the parameters for yours and other library code that you suck in. Otherwise you are back and forth between your code and others. The color coding is very helpful.
3) These days, it is easiest and most useful to develop headless code and use a phone as your display and uploader. If you look at the LightBlue BLE app you will notice that this allows you to upload traffic to the various iOt backbones, including the easiest one to start with, Adafruit. Developing the BLE services is pretty easy, and you can even create a few to allow you to drop annotations into the IOt steam, such as, "Powerup", "Shutdown", "Hill Climb", etc. Over time you build up a code library which allows you to quickly cobble other headless applications without dealing with displays, buttons, specially made boxes for the displays, etc. You can bury the thing in a small plastic box with no buttons. Additionally, you can record the BLE messages from the bike itself, perhaps using them to correlate one thing with another. The ride parameters (cadence, etc.) and battery level are plainly visible in the BLE feed, along with some secret ones which will take a bit of decoding or maybe be impossible to figure out. One of the BLE services that I wrote tells the embedded Arduino board to dump it's data to the iOt backbone, when I return from a ride. That ensures that I don't need an internet connection while collecting data.

Hope this is helpful. I will be at my projects soon, as my previously flooded basement is now almost finished, since I really can't bring my dirty bike into my home office any longer.
 
Last edited:

EMTB Forums

Since 2018

The World's largest electric mountain bike community.

552K
Messages
27,908
Members
Join Our Community

Latest articles


Top