Cycle Analyst V3 preview and first beta release

Get real world experience and user feedback on the electric bicycle products.
User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 19 2012 5:57am

Bartimaeus wrote: I'd be willing to work with whatever kind of setup you would want to go with. I was thinking that having an ISR for receiving serial that checks for a "enter config" command, and then from there the phone can send each setting one at a time with an id tag in front of it. After the cycle analyst gets the data for a setting it can send a confirmation byte that tells the phone to send the next setting.
Hey Bartimaeus, saw your other thread before the reply here. This can all be done. It wasn't something I was planning to work on until early next year, but it might not take that much time to at least have this functionality crudely implemented in the beta code stage, if you are game for the protocol going through a number of revisions before it gets locked into a 'final' state. Everything on the CA is working in limited memory and assembly programming, so using strings as the ID and ASCII numbers will be tricky and might take a while, but if we just have it such that 01 = RShunt, 02 = Amps Limit, 03 = Speed Limit etc. it won't be too difficult. Most of the data is stored as either signed or unsigned 16 bit integers, so you'd have to binary format the data that way. Presuming that's no problem?

-Justin
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
Bartimaeus   10 W

10 W
Posts: 94
Joined: May 31 2012 2:52am

Re: Cycle Analyst V3 preview and first beta release

Post by Bartimaeus » Nov 19 2012 1:49pm

Ha ha, it'll be great to come up with some conversion functions from scratch! I'll have to do some experimenting, are there any inputs that aren't ints? I don't know how the floating point numbers are shown in binary, but i'm sure it isn't too difficult to learn. I've got a really sizable post I've written on the other thread waiting to be submitted, so I'll keep this one short.
Team Farfle Website: http://www.farfleracing.com/
Team Farfle Facebook Page: https://www.facebook.com/TeamFarfleRacing

Eascen   10 mW

10 mW
Posts: 32
Joined: Oct 17 2012 11:36am
Location: DC Metro

Re: Cycle Analyst V3 preview and first beta release

Post by Eascen » Nov 19 2012 2:21pm

Justin: If you could do that... epic. What is the current address length of the storage values? Would it be possible to simply reuse those?

Bart: It actually can vary slightly when we're dealing with various languages, aka Java your standard int tends to lend itself to a signed 32 bit integer, and after a quick search a 'short' would map to a signed 16 bit int, and in the .NET world I'd have a ushort to represent the value appropriately, it appears Java doesn't have built in support. Seemingly good article: http://stackoverflow.com/questions/7306 ... t-integers
I'm a noob that got to 50mph by piggybacking off the hard work done by other members and out of the box kits, and I'm likely to crash and burn soon. At least I'll be wearing a full helmet when it happens; but I'm no expert.

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Nov 19 2012 4:21pm

Justin-
In V3B19 there is a new serial data column 'Acc'. What's this new data? :)
  • Code: Select all

     Ah - Amp hour
      V - voltage
      A - Amperes
      S - Speed
      D - Distance
    Deg - Temperature Degrees
    RPM - PAS RPM
     HW - Human Watts
     Nm - Thun Newton-meters
    ThI - Throttle In Voltage
    ThO - Throttle Out Voltage
    Acc - hmmmm - new data! <------------------!!! [EDIT - temporary for this particular beta release]
    Lim - Limit Flag Characters
Last edited by teklektik on Jan 04 2013 4:29pm, edited 1 time in total.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 19 2012 7:05pm

teklektik wrote:Justin-
In V3B19 there is a new serial data column 'Acc'. What's this new data? :)
Ha yes, new data, this is your ebike's acceleration in m/s^2. I needed to bring it out when troubleshooting and debugging the speed limit feedback loop, but will probably hide it again since you can derive this fairly easily from the change in speed between adjacent rows.

-Justin
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 19 2012 7:12pm

Eascen wrote:Justin: If you could do that... epic. What is the current address length of the storage values? Would it be possible to simply reuse those?
Yes for sure, the internal address length is just 8 bits for the 256 user eeprom memory locations (of which ~250 are already claimed). This is what the bootloader and related CA PC software will use for writing the data, and so we'll be compiling various memory location tables for each firmware release if these addresses change around as different features get added or removed. But as much as possible I'll try to keep them consistent across updates.
Bart: It actually can vary slightly when we're dealing with various languages, aka Java your standard int tends to lend itself to a signed 32 bit integer, and after a quick search a 'short' would map to a signed 16 bit int, and in the .NET world I'd have a ushort to represent the value appropriately, it appears Java doesn't have built in support. Seemingly good article: http://stackoverflow.com/questions/7306 ... t-integers
I should mention too, there are a few values that are 32 bit signed integers, as well as a number that are 8-bit unsigned. So you'll definitely need to be able to type-cast your variables to the appropriate form with whatever programming language you are using before transmitting out the serial port.

-Justin
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

Eascen   10 mW

10 mW
Posts: 32
Joined: Oct 17 2012 11:36am
Location: DC Metro

Re: Cycle Analyst V3 preview and first beta release

Post by Eascen » Nov 19 2012 10:05pm

Justin,

If you include some of this in your next beta, along with the basic docs I'll commit to writing an API for comm in C#, then move a port to Java so it can be moved reused and OSS it. Since my bike is out of commission for a week or two, it'd be a fun interim project to see if we can help promote some community development of an app (which, I may work on but with my ADD I don't want to commit to too much yet). At minimum it'd let us have a basic Windows API/GUI for programming your CA.
I'm a noob that got to 50mph by piggybacking off the hard work done by other members and out of the box kits, and I'm likely to crash and burn soon. At least I'll be wearing a full helmet when it happens; but I'm no expert.

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 21 2012 3:26am

OK, so good news on this front. It turns out that the current bootloader program does support byte by byte reprogramming of individual memory locations in eeprom rather than just the full block, so it's possible to do this with the existing firmware if you send the ascii character "U" (0x55 in hex) within about 200mS of powering on the device. If the CA sees that, it will reply with the string "CAXX" where XX is the bootloader revision number, and then latch in a bootloader state where you can send commands to read and write the parameter settings. I can very easily change this so that if the character "U" is received even during normal code operation it will go into that state too so that you don't need to do a power cycle.

The protocol is a trimmed down version of that described in AN1157, microchips app-note for a pic24f serial bootloader, adapted for the PIC16F devices:
http://ww1.microchip.com/downloads/en/A ... 01157a.pdf

The command 04h is used to read EE data, while the command 05h is used to write data, which are the only two operations of relevance here. It is a little bit convoluted since the protocol uses little endian for the address data, while I've got all the variables stored in big-endian in eeprom, so you'd need to keep those byte orders straight. It also treats all addresses as 24 bits wide and all data as 16 bits, even though in the case of data eeprom both the address and data fields are only 8 bits long. So the result is a lot of unecessary zeros going back and forth.
Eascen wrote:Justin,
If you include some of this in your next beta, along with the basic docs I'll commit to writing an API for comm in C#, then move a port to Java so it can be moved reused and OSS it. Since my bike is out of commission for a week or two, it'd be a fun interim project to see if we can help promote some community development of an app (which, I may work on but with my ADD I don't want to commit to too much yet). At minimum it'd let us have a basic Windows API/GUI for programming your CA.
This would be super! I'll work with MRVass to get the full documentation done for the bootloader syntax soon then, and also prepare the memory map for the address and format of each setting parameter. It effectively looks something like this, to write 2 bytes 0x1234 to eeprom at memory locations 6 and 7 you'd need to send

Code: Select all

0x55  0x55  0x05  0x05   0x02   0x06  0x00  0x00  0x12   0x00   0x34   0x00   0x53  0x04
start/sync   DLE  WT_EE  2Bytes ADRL  ADRH  ADRU  Byte1L Byte1H Byte2L Byte2H Cksm  End
If all went well, the CA will then reply with and echo of the command (0x05)
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

Eascen   10 mW

10 mW
Posts: 32
Joined: Oct 17 2012 11:36am
Location: DC Metro

Re: Cycle Analyst V3 preview and first beta release

Post by Eascen » Nov 22 2012 8:26pm

Justin,

I figured I would start with attempting to read some data first, before I go attempting to write things. Following the guide above, I've got it into bootloader mode, and have the following being sent:
0x55, 0x55, 0x05, 0x04, 0x01, 0x02, 0x00, 0x00, 0x04
(my assumption would be read 1 byte from mem 2)
To which the response appears somewhat consistent with the documentation except a minor confusion I seem to have about this:
First bits as expected (in decimal):

Code: Select all

85, 85, 5, 4, 1, 2, 0 (eg 0x55, 0x55, 0x05, 0x04, 0x01, 0x02, 0x00) 
followed by:
Mem1:

Code: Select all

0, 1, 0, 247, 128, 127, 20, 235??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 153(csum?), 0x04
Mem2:

Code: Select all

0, 0, 0, 247, 128, 127, 20, 235??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 153 (csum?), and lastly 0x04
(ETX) which leaves me with 18 bytes in the response stream, though I requested an LEN of 0x01, I'm receiving 18 response bytes.
Mem3:

Code: Select all

0, 5, 4, 0, 247, 128, 127, 20, 251??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 132 (again, csum?), 0x04. 
Mem4: No response
Mem5: No response
Mem6:

Code: Select all

0, 255, 0, 247, 128, 127, 20, 251??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 134 0x04.
Every time I start the analyst, the 235/251 value seems to change (not when booting to loader, but if I accidently let it boot to the app code), which leaves me to believe the checksum on it though I haven't run it through.
Reading 0x02 len for Mem1:

Code: Select all

0, 1, 0, 0, 0, 0, 127, 20, 249??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 1, 0x04
vs 1 len:

Code: Select all

0, 1, 0, 247, 128, 127, 20, 235??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 153, 0x04
Which, provides me consistent enough results to ask the TLDR:
Data and addresses are 8 bits, though the bootloader expects 16/24, which makes sense with the above addresses in your example, but my results seem somewhat inconsistent with my reading. If I'm on the proper track and value 2 (index 1) is actually the value I'm looking for, I'll call it a day and wait for the mapping; though it makes Mem3 look off, If you have a few basic mappings I can use for testing, I can likely get quite a bit further tomorrow :).

Thanks again for supporting this, and I apologize for my lack of low level programming skills, most of my work is done in higher level languages.
I'm a noob that got to 50mph by piggybacking off the hard work done by other members and out of the box kits, and I'm likely to crash and burn soon. At least I'll be wearing a full helmet when it happens; but I'm no expert.

User avatar
pendragon8000   1 MW

1 MW
Posts: 1740
Joined: Sep 28 2012 3:29am
Location: Adelaide, Australia

Re: Cycle Analyst V3 preview and first beta release

Post by pendragon8000 » Nov 25 2012 9:11pm

Hi all,
Little help with setting up the v3 for a crystalyte 72v 50a controller?
Hooked it up and looks great.
Detecting throttle and brake but controller not doing anything.

Shunt value?
Thanks for any help
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
hjns   100 kW

100 kW
Posts: 1273
Joined: Aug 20 2011 11:05pm
Location: Basel, Switzerland

Re: Cycle Analyst V3 preview and first beta release

Post by hjns » Nov 26 2012 3:33am

Hi Pendragon,

The CAv3 is a bit daunting with all the new features and settings. The most obvious thing that comes to mind is that you may have forgotten to break the Tho out of the DP into the throttle connection to the controller.

Did you read through Teklektik's manual? Very nice description how you should connect it, including all first settings.
Henk


All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible. T.E. Lawrence

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Beta21 Firmware, with user access to bootloader

Post by justin_le » Nov 26 2012 9:23am

Okay, so attached is a Beta21 firmware file that has 3 main changes:

#1) Current / Power Throttle Kick: The issue (introduced only in Beta20) that was causing an unpleasant kick at the start of applying throttle in current or power throttle modes has been fixed.

#2) Proportional Torque PAS in Watts: The proportional torque assistance has been changed from a current control (mA/Nm) to a power control (watts/Nm), so that if you change battery voltages or have a pack that drops in voltage significantly over the course of discharge (eg LiPo), the power assistance factor stays the same.
Trq Assist Watts.jpg
Trq Assist Watts.jpg (22.41 KiB) Viewed 4572 times
#3) Bootloader Mode from Main Code: If the CA receives the character 0x55 (=ascii "U") at any point during normal operation, it will display "...PC Connection" and then jump to the bootloader code section where any of the eeprom settings can be changed. This also means that once you have the B21 firmware installed, you no longer need to power cycle the CA in order to reflash it with the bootloader software, which is a bit it more convenient. And makes it easier to do firmware upgrades via a serial->bluetooth connection as well.
PC Connection.jpg
PC Connection.jpg (20.25 KiB) Viewed 4572 times
Attachments
CA3_B21_NoCal.zip
Beta21 Firmware File
(46.55 KiB) Downloaded 126 times
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 26 2012 10:14am

Eascen wrote: I figured I would start with attempting to read some data first, before I go attempting to write things. Following the guide above, I've got it into bootloader mode, and have the following being sent:
Hey Eascen, nice work tackling that one quickly!
though I requested an LEN of 0x01, I'm receiving 18 response bytes.
Indeed, it turns out that in the interest of trimming the bootloader size it was tweaked to only return full rows (8 bytes) of eeprom data, so if you request a length of say 2 bytes, it will respond with the first 2 bytes correctly and then another 6 bytes of potential garbage. If you request say 16 bytes, it will reply with just the last 8 bytes of that request. Effectively there's an 8 byte buffer that the eeprom reads get moved into, and the buffer is always sent in full.

For writing new values to eeprom, the length field is handled properly up to 8 bytes.
Mem3:

Code: Select all

0, 5, 4, 0, 247, 128, 127, 20, 251??, 64, 0, 254, 48, 255, 0, 255, 64, 191, 132 (again, csum?), 0x04. 
Mem4: No response
Mem5: No response
And this is where the byte stuffing comes in. In the AppNote, microchip used 0x55 as the start of the packet, and 0x04 as the end of packet (the first 0x55 is the sync bit for auto-baud detection). As a result, if 0x04 or 0x55 are ever in a different part of the packet, either as part of the data, address, or command, then they must be preceded by the Data Link Escape (DLE) character 0x05. Similarly, if 0x05 needs to be sent, it also needs to be preceeded by a 0x05. In calculating the checksum, all instances of the 0x05 as DLE are ignored, whereas instances of 0x05 as data/address/command are counted.

It's a bit unfortunate, but the two commands relevant here, RD_EEDATA and WR_EEDATA, are commands 04 and 05, and so both need to be preceeded by the 0x05 escape character.

If you use the normal bootloader program, it creates a log file "serial_communication_record.txt" which you can open up to see all the back and forth between the computer and CA, and can copy and paste commands from there while sorting out and verifying stuff. Notice the last command:

Code: Select all

0x55 0x55 0x00 0x00 0x00 0x04 
which causes the CA to exit the bootloader and return to normal operation.

If I'm on the proper track and value 2 (index 1) is actually the value I'm looking for, I'll call it a day and wait for the mapping; though it makes Mem3 look off, If you have a few basic mappings I can use for testing, I can likely get quite a bit further tomorrow :).
So that took a way longer time to organize and compile, but the full memory table for the B21 code is in the attached spreadsheet. Hopefully it should be pretty clear. You can totally break the code by putting values in here that are outside of the expected bounds. So for instance, programming in a Preset of 5 (outside of the 0,1 or 2 which are allowed) would cause all kinds of crazy behavior. That goes with every setting that is part of finite set, since I'm not doing any bounds checking on eeprom arrays.

You'll notice too that there are a small number of settings which aren't settable via the setup menu. Some of them are dependencies (like the DGainSpan) while others might be useful for people doing more OEM type customizations. For instance, the 13 bytes of InnrSetupMask lets you control whether individual items show up in the setup menu or not. So if you don't want the speed limit to be changeable, you'd note that the speed limits are the 5th setup menu, and max speed is the first option, so if you set the 5th byte of InnrSetupMask to b'01111111', then it would skip over the MaxSpeed setting and jump right to the next item "Strt Speed". On a similar note, if you want to be able to change your speed limit but only up to a certain maximum, then that hard coded max can be set at address D8 MaxSpeedADR, and any value that a user puts in via the setup menu will be clamped to this.
Thanks again for supporting this, and I apologize for my lack of low level programming skills, most of my work is done in higher level languages.
I'd say you've done quite well. Let me know if there is anything more I can help with.

-Justin
Attachments
B21 Eeprom Memory Table.xls
(68 KiB) Downloaded 234 times
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
Bartimaeus   10 W

10 W
Posts: 94
Joined: May 31 2012 2:52am

Re: Cycle Analyst V3 preview and first beta release

Post by Bartimaeus » Nov 26 2012 12:56pm

Love the progress, although "PC Connection" wouldn't always be an accurate description if it's connected to a smart phone.
I can't think of a better phrase to use that would be more general though. "External Config Mode" maybe?

Justin, for adding a timestamp to the datalog file from Windows or Android, do you want the system time or a timestamp of a counter going up from 00:00.00 or both?
Team Farfle Website: http://www.farfleracing.com/
Team Farfle Facebook Page: https://www.facebook.com/TeamFarfleRacing

ashwright   100 mW

100 mW
Posts: 42
Joined: Oct 01 2011 3:33am
Location: Brisbane, Australia

Re: Cycle Analyst V3 preview and first beta release

Post by ashwright » Nov 26 2012 3:54pm

Bartimaeus wrote:Love the progress, although "PC Connection" wouldn't always be an accurate description if it's connected to a smart phone.
I can't think of a better phrase to use that would be more general though. "External Config Mode" maybe?
While it may not be accurate, I think most people would understand what is going on. "PC Connection" would be difficult to be confused with something else. "Configuration Mode" sounds like you are in the setup menu.

User avatar
Bartimaeus   10 W

10 W
Posts: 94
Joined: May 31 2012 2:52am

Re: Cycle Analyst V3 preview and first beta release

Post by Bartimaeus » Nov 26 2012 4:00pm

ashwright wrote:
Bartimaeus wrote:Love the progress, although "PC Connection" wouldn't always be an accurate description if it's connected to a smart phone.
I can't think of a better phrase to use that would be more general though. "External Config Mode" maybe?
While it may not be accurate, I think most people would understand what is going on. "PC Connection" would be difficult to be confused with something else. "Configuration Mode" sounds like you are in the setup menu.
I can see how that could be misleading. I would consider it to be the same basic thing as the setup menu, since you're sending commands to the CA to set values for the settings. The only difference is that you're sending your values over the serial connection and through a different user interface than the main screen.
Team Farfle Website: http://www.farfleracing.com/
Team Farfle Facebook Page: https://www.facebook.com/TeamFarfleRacing

User avatar
lester12483   10 kW

10 kW
Posts: 941
Joined: Jan 30 2009 1:45am
Location: Chicago, IL USA

Re: Cycle Analyst V3 preview and first beta release

Post by lester12483 » Nov 26 2012 5:38pm

I just started experiencing the new cycle analyst. I plan on putting them on my high end electric bikes in 2013.

I must say the CA is absoultely awesome!!

Excellent work ebikes.ca and Grin Technologies!!

:D
MT6 Hybrid- Electric Bicycle 48V
48V 23AH AllCell Lithium Manganese Battery Pack
http://www.chicagoelectricbicycles.com

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Nov 26 2012 8:47pm

Bartimaeus wrote:
ashwright wrote:
Bartimaeus wrote:Love the progress, although "PC Connection" wouldn't always be an accurate description if it's connected to a smart phone.
I can't think of a better phrase to use that would be more general though. "External Config Mode" maybe?
While it may not be accurate, I think most people would understand what is going on. "PC Connection" would be difficult to be confused with something else. "Configuration Mode" sounds like you are in the setup menu.
I can see how that could be misleading. I would consider it to be the same basic thing as the setup menu, since you're sending commands to the CA to set values for the settings. The only difference is that you're sending your values over the serial connection and through a different user interface than the main screen.
As a rule of thumb, it's not a good idea to name such things by use - rather, they should be named by intrinsic functionality. In this case, "External Config Mode" is the former and clearly inaccurate if this CA mode is used by other applications as a bootloader or to access (non-)EEPROM memory for other purposes. The term "PC Connection" may be benignly flawed because of the fixed remote machine type designation, but it remains consistently meaningful in the context of any use case including the specific (remote config) application at hand.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 26 2012 9:54pm

Bartimaeus wrote:Love the progress, although "PC Connection" wouldn't always be an accurate description if it's connected to a smart phone.
Yeah, that was going through my mind too but I couldn't come up with a phrase 16 characters or less that was more clear. The close contender was "..remote connect" , but I'm all ears to other suggestions. I would suggest though that a smart phone is the new Personal Computer, and so the meaning of PC in this context isn't confusing.
Justin, for adding a timestamp to the datalog file from Windows or Android, do you want the system time or a timestamp of a counter going up from 00:00.00 or both?
Both is a bit unnecessary but a system time would at least give new info that a counter that starts at 0:00:00 wouldn't give. The analogger doesn't do any time stamping except for on the file name itself, which includes the time at the begining of the data acquisition, and then any software just calculates the time of each data point based on the line number and CA data rate (1Hz or 5Hz). But admittedly it would have been more standard practice to have a relative time stamp included at the start of each row.

-Justin
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
justin_le   10 MW

10 MW
Posts: 2233
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Nov 26 2012 10:02pm

lester12483 wrote:I just started experiencing the new cycle analyst. I plan on putting them on my high end electric bikes in 2013.
I must say the CA is absoultely awesome!!
Excellent work ebikes.ca and Grin Technologies!!
:D
Hey Lester and good to hear. A lot of the things we are working on now are going to better help OEM types who want to tweak the functionality of the CA to match their bike and user needs and then hide any extraneous stuff that isn't relevant or that you don't want changed. So even though all the settings and options can seem confusing now, in principle it could be dialed in to be simpler and more intuitive for a new user than the V2 devices. Stay tuned for a basic software package that would let you customize the interface in this way, and in the meantime let us know if you run into any issues or questions.

-Justin
Previously competed in the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver learning to be a dad with my Big Dummy Frame (yes This One, thanks ES!) with GMAC 10T rear hub motor, Phaserunner controller, and 52V 19Ah EM3EV pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
NeilP   10 GW

10 GW
Posts: 4983
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by NeilP » Nov 26 2012 11:43pm

Regarding name for 'PC Connection'

External Device Port. 16 char limit so
Ext. Device Port
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

Eascen   10 mW

10 mW
Posts: 32
Joined: Oct 17 2012 11:36am
Location: DC Metro

Re: Cycle Analyst V3 preview and first beta release

Post by Eascen » Nov 26 2012 11:57pm

I'll vote for "Configuration Mode", but I care little of what it says, functionality is all the same. I have values reading to 180 (few timing issues with threading to handle tomorrow (not sure if I know how to power this at work but at least when I get back) I should have the full read of values to which I can start converting.

Justin, out of curiosity when the CA shuts off it sends out a CA## message, which... earleir when I was trying to keep track of state I did note also plagued the updater. When you power down the CA to flash it, it think's it has hit startup and then subsequently failed. Now that this mode can be entered from any point, I suppose it's moot.

Before I get too much farther on this, does anyone here have an interest in creating a reusable memory mapping piece of code for this while it goes along? I'll likely start hardcoded, but that doesn't bode well for multiple firmwares.
I'm a noob that got to 50mph by piggybacking off the hard work done by other members and out of the box kits, and I'm likely to crash and burn soon. At least I'll be wearing a full helmet when it happens; but I'm no expert.

User avatar
NeilP   10 GW

10 GW
Posts: 4983
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by NeilP » Nov 27 2012 12:40am

Regarding Street/ Trail mode that was first mentioned back before page 16 of this thread.
Sorry if this has already been covered, just started re-reading the whole thread, but only got as far as pg 16 last night.

First... Did it get implemented? Or was it further built upon .. I believe VALET / restricted user mode was also mentioned If not, second question is irrelevant

Second: does each mode store settings for every parameter, or was it implemented to just control a limited number of parameters, like Power. So for instance, one mode would have PAS / THUN sensor monitoring, mild throttle mapping,etc and the second mode set to ignore every other input except throttle, e-brake and temp sensor with unlimited power and aggressive throttle response
So each mode is effectively a completely different set of settings?
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

User avatar
pendragon8000   1 MW

1 MW
Posts: 1740
Joined: Sep 28 2012 3:29am
Location: Adelaide, Australia

Re: Cycle Analyst V3 preview and first beta release

Post by pendragon8000 » Nov 27 2012 4:54am

just got the ca v3 going. used the option of green wire from dp conetor to throtle in on controller, works nicely.
thanks Justin and others for help.
BTW really nice unit.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Nov 27 2012 8:15am

NeilP wrote:Regarding Street/ Trail mode that was first mentioned back before page 16 of this thread.
First... Did it get implemented?
Yes - as of V3B20 there are three available 'Presets' and three available battery pack configurations :D. These can be selected either by going into Setup and jiggling a couple of parameters or from outside Setup by holding down a console button and repeatedly pushing the other button to cycle through the available options - holding the left or right button determines if selection is for batteries or presets.
NeilP wrote:Second: does each mode store settings for every parameter, or was it implemented to just control a limited number of parameters, like Power. So for instance, one mode would have PAS / THUN sensor monitoring, mild throttle mapping,etc and the second mode set to ignore every other input except throttle, e-brake and temp sensor with unlimited power and aggressive throttle response so each mode is effectively a completely different set of settings?
Not all parameters may be set uniquely for each preset but Justin has made a select set preset-specific to allow the multi-mode operation you describe. The common or global settings generally are those that reflect some underlying hardware characteristic that could not reasonably change from preset to preset (e.g. tire circumference or max throttle input voltage). Please have a look at the available config settings for V3B20 here - the doc indicates whether a Setup parameter is global or preset/battery-specific.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

Post Reply