User avatar
aries
Posts: 85
Joined: Thu Aug 12, 2010 9:35 pm
Delivery Date: 26 Jun 2015
Location: San Diego, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sun Aug 05, 2012 8:18 am

Turbo3 wrote:Just before 1PM the package of production boards arrived on my door step.

Here it is out of the plastic pack. The six pin connector J3 on the right edge is for the Bluetooth module.
Very nice! What firm are you using to produce the PCB and what layout software?

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sun Aug 05, 2012 4:46 pm

The PCBs are from expresspcb. They provide the free schematic and layout software. Once you lay it out you can get an instant quote from within the layout software. Ordering is also done right in the layout software. Just select type and quantity and then enter your credit card number.

Jim

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sun Sep 02, 2012 12:51 pm

A lot of progress has been made on both the hardware and software this month. Let’s cover the software first.

Modifications to the event timer software were made to support LEAFer’s request to support the longer times possible when charging from 120 volts. I took his suggestion of using letters for numbers greater than 9 in order to still fit within the H:MM:SS display space available for time on the 2x16 screen.

This turned into a somewhat major change in the way the event times were saved within the register space. The result being the freeing up of a large number of internal registers. Originally only three bits were available for hours within the two byte time variable but by using a more efficient packing scheme I was able to increase that to five bits for hours while still keeping a two second granularity.

The max time is now 31:59:58 which is displayed as V:59:58. More than enough to cover the time it takes to charge a Leaf battery from empty to full on 120 volts or even 100 volts (i.e. Japan).

With the freed up registers I was able to increase the number of saved events from four to seven. This then required the invention of a way to select more than eight screens. The method I came up with added seven new screens by adding one line of code and using a new flag for history.

Each time the rotary selector is turned fully clockwise so the Debug screen is selected the History flag is toggled ON and OFF. When OFF the first seven screens are for real time data (SOC, Power Bar, Motor RPM). When the History flag is ON the first seven screens display the seven last drive/charge events. This allowed the rotary selector code to remain unchanged.

A side benefit was four new screens for real time data. I just needed to come up with what to display on them. Just as I was finishing this code up Steve Lemke emailed me for a status update and a suggestion he came up with after seeing the new RAV4 EV maximum distance to empty screen.

He suggested I add a screen where I calculated the maximum miles remaining based on current gids and a user selectable mile/kwh number. This sounded like something that could be added since it did not require any additional register space just some calculations and a screen to display it.

Rather than have the user select a miles/kwh number I decided to display a range of five values (4.0, 4.5, 5.0, 5.5, 6.0). With two digits for miles below each number so the driver can see the effect of different driving styles on the remain miles. The final format used the letter scheme for numbers above 99 which is not so important for miles but when I created a kilometer version seemed more useful. Also below 1 mile or km of range the display switches to “.x” to show the last few tenths available.

There are actually three of these “Distance to Event” screens as I am calling them (not to empty). The events are Low Battery warning, Very Low Battery warning and Turtle identified by the letters ‘L’, ‘V’ or ‘T’ in the left most position (at the 49,24,4 gids level).

Here is what it looks like.

Image
Image
Image

Here is the km versions for VLB and Turtle.

Image
Image


So to summaries the improvements:
- Max event timer increased from 8 hours to 32 hours
- History screens increased from four to seven
- Added three ‘Distance to Event’ screens (miles or km) LB, VLB & Turtle
- Total selectable screens increased from 8 to 15.

The next post will cover the hardware status.

Jim

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sun Sep 02, 2012 6:35 pm

This week I built up five of the new Rev 1.1 boards. Here is what they look like.

Back side showing black connector for Bluetooth module.
Image

Same board with Bluetooth module installed
Image

Component side of board. Second CAN Transceiver is for testing only and will not be installed in the shipped product. (no software support for it at this time)
Image

Just completed set of five boards.
Image

Five rev 1.1 boards and three rev 1.0 boards ready to be mounted in cases.
Image

The same software runs on both rev 1.0 and rev 1.1 boards. The rev 1.1 boards have the option to add a Bluetooth module. The rev 1.0 boards support only a hardwired serial port. Current output format for both is eleven byte CAN-DO (SOF, ID_LO, Data_count+ID_HI, followed by 8 bytes of data).

The next step is to modify the cases to take the completed modules then make up some cables. Cases are back-ordered but I do have six in stock. Another batch of cases is coming in the next two weeks.

Jim

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Mon Sep 03, 2012 12:50 pm

Here is the schematic for the WattsLeft rev 1.1 board. The SX28 chip is reprogrammable through the included four pin debug port. So it is conceivable that someone could write their own firmware for it. All chips are in sockets. Only the EV CAN bus tranciever is installed at this time. There are jumpers to allow the software to drive the EV-CAN bus (U4 not populated) or receive data from the Bluetooth module which are not used at this time and left open.

Image

Jim

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Sep 05, 2012 11:29 pm

Yesterday I came up with a better idea for how to mark and cut the holes in the plastic box. The original idea and the one used for the first box was a paper template. This 1:1 template was glued to the box and then the marked holes drilled or cut out. This worked ok for the first box but the rounded edges on the box made alignment a problem. The template also had to be printed and then cut out.

A quick stop at Ace Hardware and I had the parts to make a Hard template that allowed perfect registration every time.

The parts were a brass sheet used as a base plate and ½” flat brass stock used for side rails. The stock was cut into four pieces and attached around the box to hold it in place.
Image

Next step was to use the paper template to drill the four mounting holes and LED hole.
Image

The hardest part is making the large rectangular cut-out for the LED display.
Image

Once the template was made a box is placed on the template with the side guide rails holding it in perfect alignment. Double side tape holds the box to the template during the drilling and cutting operations
Image

Here is the first box made with this new hard template with the electronics installed.
Image

Here’s the hard template from the top side.
Image

The goal for tomorrow is to do the same to the other five boxes I have.

Jim

User avatar
TonyWilliams
Posts: 10091
Joined: Sat Feb 19, 2011 1:48 am
Location: San Diego
Contact: Website

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Sep 05, 2012 11:46 pm

Turbo3 wrote: A side benefit was four new screens for real time data. I just needed to come up with what to display on them. Just as I was finishing this code up Steve Lemke emailed me for a status update and a suggestion he came up with after seeing the new RAV4 EV maximum distance to empty screen.

He suggested I add a screen where I calculated the maximum miles remaining based on current gids and a user selectable mile/kwh number. This sounded like something that could be added since it did not require any additional register space just some calculations and a screen to display it.

Rather than have the user select a miles/kwh number I decided to display a range of five values (4.0, 4.5, 5.0, 5.5, 6.0).
Exactly what I've been asking for. I would want to start at 3.5 through 5.5. I'd probably prefer a selection knob, since my economy stays very close to one figure for both freeway and town driving.

Great work.

Now, how will you scale this data for different battery capacities; both permanent losses and temperature related temporary ones? Gid reading should work well for permanent loss, but it doesn't seem to scale well in cold.

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Thu Sep 06, 2012 12:49 am

Tony,

You are siding with my wife. She was saying I should have a lower starting value than 4.0. For now this range is not user selectable but I am open to lowering it. It could also be an option when ordering but I would prefer that the default value be what most people would like to have.

Anyone else have an opinion? What would be most useful to you? 3.5 thru 5.5 or 4.0 thru 6.0

There will be no temperature compensation.

As far as I understand it, permanent loss will just lower the max starting gid and better batteries will increase the highest gid. In that case the current formula handles it. Better motors on future Leafs will just increase the miles/kwh number so then maybe the 6.0 makes more sense.

Jim

QueenBee
Posts: 1564
Joined: Sun Aug 08, 2010 5:14 pm
Delivery Date: 20 Jun 2011
Leaf Number: 2062
Location: Bellevue (Seattle), WA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Thu Sep 06, 2012 8:47 am

Turbo3 wrote:Tony,

You are siding with my wife. She was saying I should have a lower starting value than 4.0. For now this range is not user selectable but I am open to lowering it. It could also be an option when ordering but I would prefer that the default value be what most people would like to have.

Anyone else have an opinion? What would be most useful to you? 3.5 thru 5.5 or 4.0 thru 6.0

There will be no temperature compensation.

As far as I understand it, permanent loss will just lower the max starting gid and better batteries will increase the highest gid. In that case the current formula handles it. Better motors on future Leafs will just increase the miles/kwh number so then maybe the 6.0 makes more sense.

Jim
I too am siding with your wife. My life time average is more like 3.6 and in the winter can get down closer to 3.0. This feature is EXACTLY how I want to use a gidmeter though! I don't care about percent full or how many gids there are, just let me assume I'm going to get x miles per kwh and then do the math for me. I'd be happy with 3.5+ but maybe starting at 3.0 would be better? Looking good :)

This is looking very nice! It's hard to judge depths in the images but is there much extra space in the box? Looks deeper than the boards are.

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Thu Sep 06, 2012 9:58 am

Here is a top down view of the case. The top of the nylon standoffs is the bottom of the back cover. The highest points are the black Bluetooth connector and the adjustment screw on the Pot used to fine tune the range on the rotary selector which comes within about 1/32” of the back cover. The box is 1.5” thick

Image

Looking like the default starting value should be 3.5 with 3.0 and 4.0 as order time no cost options. I’ll have to go calculate what the km/kwh equivalent numbers are.

Anyone outside the US want to comment on what range they would like to see? Right now it is 6 thru 10 km/kwh.

Jim

Return to “LEAF CANBus”