Cycle Analyst V2.1 sneak preview, and call for beta testers

Hi justin, I've just seen this topic.
If you want, I have already developed full support for fat32 and fat16 on MMC and SD cards. I have also written a library to parse GPS data. This, with a virtual serial port capability that I can implement, lets us save data from both a GPS and the CA, simultaneously. And maybe an option to adjust all settings by writing a file on the SD. If you can make the port on the CA bidirectional, the CA can load the settings directly from that file. A GPS on the second port, would provide the date and time to display also. Cheap GPS modules start from 25$.
I can provide full source code, in CCS C, for the PIC of your choice... In exchange of a CA to test on! :mrgreen:
The new ECU is pretty interesting too.... :)
 
justin_le said:
Serial Data Output

The extra small pad labeled TX is now enabled for serial data transmission, at 9600 baud, ascii formatted, tab seperated values which look like the following:

Ah V A S D
0.031 37.31 17.85 21.2 0.413
0.042 38.22 7.45 21.2 0.452
0.048 38.25 5.85 21.2 0.487

You can select whether the data rate is at 1Hz, suitable for general purpose data logging, for 5 Hz, which is fast enough to capture the dynamic response of an EV during acceleration and such, and do all kinds of vehicle performance analysis.

The output is 0-5V CMOS level, so directly compatible with other microchips, but to read it with a PC you would need an RS-232 level shifter. Fairly soon we'll be designing a plug-in circuit with a SUB-D connector on the end to allow for direct connectivity to a computer or PDA, and further down the line hope to offer an SD memory card writer, so you could ride around and all the trip data would be stored on a small memory chip.

Combined with the additional low voltage and current limiting features of the CA, this allows for some interesting possibilities. For instance, you could purchase an inexpensive bicycle trainer stand and use it as a stationary load for your ebike, then completely discharge the battery pack at constant current by running the hub motor on the stand, with the CA recording the discharge profile on a PC and maintaining the constant current discharge. No need for massive load banks, and you can test up to 100V or 200V battery packs without even removing them from the vehicle.


An example of the data taking abilities of the CA

I used the serial out of the CA to collect data for my motorcycle

I interfaced the CA with a RS232 to TTL converter KIT-0100 from http://www.NKCelectronics.com

I used Hyperterminal to capture the data to the PC at 5HZ rate (200ms)

and Excel to plot the data

As always questions welcome

Mark
 

Attachments

  • DSC_0132_S.jpg
    DSC_0132_S.jpg
    34.2 KB · Views: 5,279
  • Current and Speed_S.jpg
    Current and Speed_S.jpg
    59.9 KB · Views: 5,276
markcycle said:
An example of the data taking abilities of the CA

I used the serial out of the CA to collect data for my motorcycle

I interfaced the CA with a RS232 to TTL converter KIT-0100 from http://www.NKCelectronics.com

I used Hyperterminal to capture the data to the PC at 5HZ rate (200ms)

and Excel to plot the data

As always questions welcome

Mark


Cool ! I presume blue is current which peaks first, and purple is speed, which peaks after current. Those are 130 amp spikes ?? !! :shock:

Do the green dots represent something ?

I'm hoping to build an open source CA type device (sorry, Justin :) ) and such data collection, storage and graphing is very interesting to me.
 
Blue is current and it does peak at around 130 amps I think 136 is the peak number.
The green dots mean nothing just a Excel artifact

Good luck matching the performance of the CA and price, its only around 150.00

For 150 I get a pretty complete vehicle data logger, speed controller, current control, undervoltage shutdown, all control functions using a PID type controller, and backlit display unit. I got to believe its the best deal out there.

Mark
 
Mark, sometimes we just do things just because _we can_, and since the hardware for a CA can be made for about 30$ this is a must-do! Also you learn a whole lot of stuff. And you can personalize it with your own features. A geek can't resist the challenge alone, even if the hardware would have costed a lot more. So, why do people buy kits instead of already made ebikes? That's the same reason. :D
 
Hey, since I'm getting asked about this on a pretty regular basis, I'm just going to put the firmware up here for anyone who has the know-how and tools to reprogram their CycleAnalyst with the V2.1 beta code. The programming header on the PCB is clearly labeled and follows the microchip standard order. I usually program with the PIC powered up externally, but it would probably work with the 5V from the programmer as well. Before you do this, be sure to make note of the values of GRatio, RShunt, and VSense, since these will be restored to a default value. Right after programming, the display will show "OS", and pressing the button after you see this will zero the current offset (and display two HEX values on the 2nd line of the readings from both amplifiers, they should each be ~32,000). I can't give any support to people reprogramming boards, you do it as your own undertaking and risk.

There is a known bug in the way that the wh/km are calculated in this beta revision, and especially when you are dealing with large numbers of watt-hours the reading can be significantly off or negative at times, and then go back to being correct. As well, it has been observed on a couple occasions to go into a loop on power-up, continuously showing the splash screen again and again. Just cycling the power off and on will restore normal operation.

As has been mentioned earlier, the RS232 data output is CMOS level, which is great if you are interfacing to another microchip but for reading on the serial port of a computer you'll need an RS232 level shifter.

About the open sourcing, I get asked about that a lot too. If I thought that making it 'open source' would lead to an overall net benefit as far as what comes out over the amount of work I need to put in, then I'd do it. But I don't believe that model would pan out nearly so well with combined hardware/embedded software design as it does with more conventional software only projects. If someone wants to show me otherwise here then go to it!

Justin
 

Attachments

  • CYCLEANALYST_V21B2.zip
    8 KB · Views: 305
justin_le said:
About the open sourcing, I get asked about that a lot too. If I thought that making it 'open source' would lead to an overall net benefit as far as what comes out over the amount of work I need to put in, then I'd do it. But I don't believe that model would pan out nearly so well with combined hardware/embedded software design as it does with more conventional software only projects. If someone wants to show me otherwise here then go to it!

Justin


I'm sure many will appreciate the object code being posted here or perhaps on ebikes.ca and easy to find.

Open source doesn't HAVE to mean many contributors to the code. One could still maintain full personal control of the official code, but allow others to examine the code (perhaps to identify bugs or better understand the operation) or create their own forked versions to handle special needs.

I would agree that it's usually the best business decision to keep code under wraps, embedded or otherwise, especially if open sourcing results in cheap foreign built knock-offs, but the CA type market is probably relatively small so knock-offs may not be a threat.

Thanks for considering open source anyway, and please keep reconsidering it, in the many variations that could be done. You could also consider releasing any design documents or flow-charts or block diagrams of the code/hardware if you think that might increase awareness and understanding (and sales?) of the CA, without having a negative impact.


CA is a wonderful device/product, and I don't think there's anything similar out there in the same affordability region at this time. For the consumer, it's a more or less single purpose device, which is a good thing for the average CA buyer I think.

As a techie though, I want a collection of simple devices that can hook together in multiple ways, much like Unix command line tools can be hooked together using pipes and such.

If the CA could be interface with other micro-controllers using documented I2C protocol or serial port command line interface then it could be a compelling component to use in a larger system.

Riding last night with a bad cell I have a DMM on in my YardWorks pack, I was lowering the throttle to keep that cell above 3v. I want an intelligent throttle that could automatically keep that cell (or all cells) above LVC or at any selectable voltage. I would also find capability like this very useful for getting home with low battery (even if all cells good and matched), or for maintaining an energy budget up hills (or on flat even) and giving me opportunity to use my legs to take up the slack or even to increase motor efficiency with higher RPM.

The things I want don't seem to exist commercially, or are too limited in capability or too expensive. So I'll select my components (off the shelf inexpensive hardware as much as possible), and "roll my own" via integration and coding.
 
I'm sorry, but I have to agree with justin's point of view. Releasing the code open source for a niche device like this means only that people that can build a circuit but can't program will build their own "pirate" CA, with their logo, and take all credit. (the hex file is already here...) About people helping write better code? Well: there aren't a lot of programmers around here -> there are even less programmers that can program a PIC -> there are even less programmers that want to mess with old ASM -> there are even less programmers that can sacrifice time and effort to understand the complete program flow of the ASM code -> we and up with justin still doing the hard work, with the only difference that he increased the risk of being "cheap-knockoffed" by some chinese guy.
 
gip_mad said:
I'm sorry, but I have to agree with justin's point of view.


No reason to be sorry; no disagreement/fighting here. Just some thoughts and everyone makes their own decisions, as they see best. :)
 
Well, I'm sorry not for you, I'm sorry at how thing goes in this world... That's what I meant! :D We're lucky to have honest and good people like justin, fetcher and, well, everyone on this forum... Good job guys! :D
 
I'm new here but I'm helping some folks with a new battery design for electric
bikes and scooters. We really need the 5 HZ data rate and some way to get data
out for recording. Has anyone got that far ? Any other data acquisition
systems out there ? Should I be posting on another topic ?

Thanks in advance for any tips.
 
justin_le said:
One obvious use for this is to use to wire a potentiometer to the pad, and have a knob for simple adjustment of the speed or current limit, so that you don't have to enter the setup menu and go through all the button pressing just to change it.

Need help. I messure 17ohm between ground and Vi if the CA is powered on. So if I connect a potentiometer to ground, Vi and 5V (limited to 2-3mA) the Voltage on Vi drops to nearly Zero. If a battery (1,5V) instead is connected between ground and Vi the limit seems to work. With the potentiometer connected strange things happen like CA is restarting if I'am near one end of the 10K potentiometer, or the displaz changes brightness. Am i missunderstanding something, am I wiring correctly? Can somebody point out how to use the on the fly current limit in detail?

I use an ezee kit from ebices.ca with pedelec sensor + throttle knob connected all to CA and I want to be able to limit the current on the fly for getting extended range if I need it without reprogramming the fixed limit.
 
I just had the same problem.

There is a chance that you will need to send back your CA to Justin at ebike.ca so he can re flash it to version 2.11. He got a batch that somehow didn't get the software installed right and causes problems if you do the pot. mod.

Send him off an email. The guy is absolutely first class about backing his products. I can't say enough nice things about him and his company.
 
Back
Top