Cycle Analyst Beta 2.1 Experiments

Hi NutsAndVolts and glad to see you got the V2.1 features tinkered with and being used. I really look forwards to seeing what people do with this, and hopefully we'll see some neat PDA apps that display a lot of interesting graphical data in real time.

I have fixed the bug which would cause the CA 2.1beta2 to occasionally power up in a loop frozen around the splash screen (try dropping the CA power below 14V and then raising it up again, and it'll do this), as well as the bug causing the Wh/km calculation to go errant. The hex file for this firmware revision, V2.1 beta3, is attached, and I'm pretty confident that this will be the model that we take live.

I have added total cycles to the items that can be changed in the advanced menu, so now the odometer, total battery amp hours, and total battery cycles can all be input manually now. That does mean that in principle there is no need for a 'full reset' option since these things can all be cleared to zero one by one. In that case, we could make it so that holding the button for >5 seconds causes the CA to enter the setup menu instead of doing a full reset. No need to cycle the power with the button down to get into the settings menu. Good idea? Bad idea? Lemme know your thoughts.

Justin
 

Attachments

  • CYCLEANALYST_V21B3.zip
    7.7 KB · Views: 276
Heya...

You can actually be better off buying development products from Microchip directly. They have a site for this - http://www.microchipdirect.com. If you do a search on Pickit 2, you'll see a variety of products available. You have the option to buy JUST the programmer device (no cable, software, or demo board) for $34.95US. As you've noted, all of the software can be downloaded for free (and you wind up doing this anyways, as it's usually more current than what comes with the kit).

Of course, if you're interested in hacking with PICs, getting the full fledged kit for $49.95 gets you a demo board, the cable (which is standard), and guess what? A PIC16F690 to play with... If you go this route, you're just as well off with Digikey, once you factor in the exchange and difference in shipping.

In case you're wondering about shipping - Microchip charge $13 (US) to ship, but you're getting FedEx 2nd day air for this.

Cheers!
 
I have been wanting to tap the potential of the Beta. But my lack of knowledge is holding me back. I asked Justin, however it was just a bit complicated. I have this converter, it comes from my FMA balance pro.

Will it work, and also is there a program in Windows that I would be able to use?

Thanks
 

Attachments

  • HPIM1604.JPG
    HPIM1604.JPG
    56.8 KB · Views: 7,030
there is also the chinese connection through ebay. look for Item number: 380091102656 it is $34.95 including shipping. usually stuff from these guys takes 10 days to get here.

it is supposed to be a clone of the PICKIT 2. programmer.

rick
 
while looking for some other crap on E-bay i found a couple of neat little devices.

for those without a serial port on their laptop or computer there are these guys:
002.jpg
eBay Item number: 230321999570 (01/28/2009) from seller: virtualvillage-usa for about $18USD including shipping. this could be used to connect the CA directly to the USB of your laptop.


there are also these guys:
View attachment 2
DB-UC001_4.jpg
ebay Item number: 230322013058 (01/28/2009) from eBay Store: Sure Electronics. price $15.00 including shipping. this has a USB to serial TTL adapter and a second board that plugs into it that also converts serial TTL to RS232 with both male and female DB9 connectors. this could be used to conncct the CA directly to either the USB or COMM port of your laptop.

or of course there is just a plain old TTL to serial MAX232 based adapter like this one here:
001.jpg
eBay Item number: 250362359199(01/28/2009) from seller: virtualvillage-usa for about $9USD including shipping. this can be used to connect the CA to a serial COMM port on your computer and a lot less trouble than building one of your own.

i bought one of the 2 board USB/TTL/RS232 units from sure electronics since i was ordering some other items from theem anyway. note that these are DATA LOGGING adapters for the CA only. they are not used to program the CA or to upload new firmware into the CA. those are different.

rick
 
I was prompted to come back to this thread, as I decided to flash the older CA that I have with the new firmware... It occurred to me that I'd been posting about the TTL serial interface subject (somewhat extensively) in a completely different and unlrelated thread (the objective, there, was to update the parameters in a Shenzhen controller). The hardware hacks I did to come up with a "pretty" cable proved to be available in an off-the-shelf cable (that has an FTDI USB chip molded right in to the connector), but going through the whole exercise was fun...

http://www.endless-sphere.com/forums/viewtopic.php?f=2&t=8317&st=0&sk=t&sd=a&start=32
 
I'm interested in adding cruise control to my electric motorcycle: www.electricmotion.org

Justin filled me in on how this could be done with the 2.1 firmware and a few added connections. Below is a summary and attached is a schematic I made.

In summary, here is a typical "cruise control" scenario:
Let's say I have the CA program set to have a max speed of 45 MPH (set inside the CA software/menus). I'm at rest, and I apply half throttle (~2.5 Volts). The CA would interpret this as a desire to go 22.5 MPH, and it would thus apply the PI (proportional + integral) control algorithm to achieve this speed. As long as I keep the throttle at the same position (2.5 Volts), the CA/PI algorithm will continuously modify the throttle signals in order to maintain a 22.5 MPH speed (even if I go up a hill).

The details:

The 0-5 Volt signal (typically 1-4 Volts, actually) from the throttle should be connected to the Vi input pad on the Cycle Analyst (CA). Then the CA takes this as a desired speed or current that the user wants. The CA uses the Th output pad to send the appropriate 0-5 Volt signal to the motor controller. So instantly your throttle becomes a cruise control, or a power control. The Vi input range is default to 1-4V, though this is adjustable through the CA software.

Note in the attached schematic that you should not add a resistor and diode as shown in other CA setups.

Also note that in the present configuration, it is not possible to actually set the cruise control speed in a hands-off fashion (like a car). Meaning, you must keep the throttle manually in a particular position to maintain that corresponding speed. I'll start thinking of a slick way of adding this feature external to the CA. Any bright ideas out there?
 

Attachments

  • CA_Cruise_Control.jpg
    CA_Cruise_Control.jpg
    62.1 KB · Views: 1,345
Hurray... it worked...
:lol: :mrgreen:

I bought a PICkit2 and successfully patched the CA to 2.1
First there was some frustration since i could not get the Programming software for the PICkit working under Parallels on a Mac.
It did not communicate, even the USB-Monitor showed the PIC-Programmer.
Then i used my ancient Dell Notebook , installed the software on XP, plugged it in and it connected.
Next difficulty was : You have to know that the PIC is 16F690 (Justin by mistake had told me 16F619) and that you have to choose manual device selection.
I loaded the firmware hex file from Justin.
I used the "Programming on the go" functionality , choosed "Power target from PICkit2 at 5,0V" and downloaded it into the PICkit2.
Now the yellow LED "Target" lights.

To power the PICkit2 i connected the USB cable with my USB-Socket which i have installed on my bike to charge / operate my Iphone and GPS.

After pluging the PICkit2 into the programming pins which i had soldered into the CA PCB and pressing the botton there was the busy light for a couple of seconds.
And after powering up the CA it showed Version 2.1 Beta 4

Great !

Thanks Justin for this great enhancement.

If there is somebody else planing to upgrade, needing help...
 
Vax,

which bluetooth module are you using?
I hv got this :
http://zefiryn.tme.pl/dok/a04/btm222_datasheet.pdf
I hope one day to be able to get the CA data into my Iphone via bluetooth. Next Iphone firmware (early summer hopefully) should allow this.
Please report your progress
 
vax said:
There's also one very attractive solution: wireless.
Bluetooth serial adapter to be exact. I'm gonna test it with Kelly controller to program it.
No wires!

Any progress with the bluetooth?

A Cycle Analyst is part of my plan for my up-coming PHEV modification to my Gen-I Insight.

I'll need the 200V model ... And I'll need to size the shunt for ~100 Amp operation.

I like the new large display version.

I am also very much liking this new data logging option.... USB data logging should work fine ... but Wireless / bluetooth would be more convenient.... I probably won't .... need the data logging ... but I know eventually I'll want to do it... so it is great to know now that the cycle analyst will let me do both ... I was originally thinking I would have to get a second device for data logging.
 
I have an application that already has a hall effect current sensor built in for tracking 100 Amp loads and regen.

Would it be overly complex to use this current sensor instead of adding a 100 Amp shunt for the Cycle Analyst?
 
Hey Everyone,

I have a cycle analyst that uses the external shunt & speed sensor, Could someone please point out how i could re-wire it internaly to use a c/a plug & the hall sensor to sense the speed.

Also,

Could anyone please advise on how one would go abouts reprograming a c/a from version 2.0 - 2.1? .. I know i need a PIC microchip programmer, however .... what do i need to wire to program this?

thanks
-steveo
 
Hey

Thank you so much for the detailed info!! ... This is very helpful!! ..

Will this microchip pic programmer work?

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=270449446183&_trksid=p2759.l1259

its 19$ us .. thats perty cheap!!

thanks
-steveo
 
Back
Top