lifted club cars - lifted ezgo
Home FAQDonate Who's Online
Go Back   Buggies Gone Wild Golf Cart Forum > Golf Cart Repair and Troubleshooting > Electric Club Car
Electric Club Car Electric DS, and Precedent golf cars



Post New Thread  Reply
 
Thread Tools Display Modes
Old 12-08-2017, 10:37 PM   #11
tdcb128
Not Yet Wild
Club Car
 
Join Date: Nov 2017
Location: Alabama
Posts: 25
Default Re: Project: Display of Speedometer/Odometer + Battery Info

This sounds like a very interesting project to follow.
tdcb128 is offline   Reply With Quote
Alt Today
BGW

Golf car forum Sponsored Links

__________________
This advertising will not be shown in this way to registered members.
Register your free account today and become a member on Buggies Gone Wild Golf Cart Forum
   
Old 12-08-2017, 11:24 PM   #12
PingEye3
Gone Wild
 
PingEye3's Avatar
Club Car
 
Join Date: Sep 2014
Location: Orlando, FL
Posts: 1,308
Default Re: Project: Display of Speedometer/Odometer + Battery Info

This sounds like a very nice project. I will follow this as well. I am curious as to why you are not using a shunt that you can depend on? One that has a mounting base. See attached pdf. I think you would have a much more reliable system. 2 cents worth, well maybe 3 cents. See attached pdf, lots of choices.
Attached Files
File Type: pdf Riedon RS Series - DC_Current_Shunt.pdf (579.6 KB, 0 views)

Last edited by PingEye3; 12-08-2017 at 11:26 PM.. Reason: attach file
PingEye3 is offline   Reply With Quote
Old 12-09-2017, 01:39 AM   #13
Wingsy
Not Yet Wild
Club Car
 
Join Date: Jul 2017
Location: Mocksville, NC
Posts: 54
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by PingEye3 View Post
This sounds like a very nice project. I will follow this as well. I am curious as to why you are not using a shunt that you can depend on? One that has a mounting base. See attached pdf. I think you would have a much more reliable system. 2 cents worth, well maybe 3 cents. See attached pdf, lots of choices.
Good suggestion, but I believe I can get around buying a $30 shunt by using the resistance of the cable. And I agree that relying on the resistance of a bolt-on cable is hit or miss, I believe that with the calibration of the current flow that I can make it reliable enough to be useful. Once a gas tight connection is made there should be no mechanism to alter its resistance, so the calibration should hold until the cable is disturbed by a disconnect/reconnect, at which time I would recalibrate. Calibration is just a push of a button during the beginning of a charge cycle when the charge current is 15A.
Wingsy is offline   Reply With Quote
Old 12-09-2017, 01:54 AM   #14
Wingsy
Not Yet Wild
Club Car
 
Join Date: Jul 2017
Location: Mocksville, NC
Posts: 54
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by WalterM6 View Post
I've got a suggestion. Can you make it readout in miles and tenths of miles only instead of feet. Is it large enough to be easily seen while driving?
I plan to have it switch to miles when the distance in feet reaches a large number, but I could have that field alternate between feet and miles all the time. Since I'll have the software written to do both it should be easy enough to do it that way. I'll try it and see how it looks. Thanks for the suggestion.

I've used this same LCD before and still have one here for testing. It's adequate for me to see at the distance to the dash (with my eyesight I just barely passed my vision test for my drivers license). I'm considering mounting it to the steering column to get it closer but so far I don't see any way to do this without it looking a bit unsightly, plus I won't be able to see it when I'm the passenger.


You guys know this will take some time, right? I have to take time out to eat, sleep, watch Oak Island, and maybe some other things. I do these personal projects mostly during the winter when I have a lot of spare time and it usually takes me all winter to do one like this.
Wingsy is offline   Reply With Quote
Old 12-09-2017, 11:38 AM   #15
Wingsy
Not Yet Wild
Club Car
 
Join Date: Jul 2017
Location: Mocksville, NC
Posts: 54
Default Re: Project: Display of Speedometer/Odometer + Battery Info

There appears to be some interest in this project so I'll try to keep y'all posted with the process I'll go through to get to the final design.

First up is to see what the timing demands would be on the CPU chip. With the essential info provided by Sergio, the pulses that must be measured from the tach are coming along at a rate easily handled by most any processor chip. At 40mph it would see around 548 pulses/sec. The pulses would be counted over 1 second and the speed computed and displayed every second. 1 second is a very long time if you're a computer chip. Piece of cake.

Next is the math. Using my favorite 2-dollar processor chip (MC9S08SH4) I've got to get creative. It has no floating point hardware built in, and not enough memory to swallow a floating point math package (I don't like those anyway, they're notoriously inefficient). So it took most of last night to factor down the math to its bare essentials. (I've done this before.) I know most of you aren't familiar with binary math but this is what it is. Here are my notes to myself:

Calibration:
1. Measure pulses in 165 ft (typically 1539, or $0603 in hex).
2. Shift left 16b. = $0603 0000
3. Divide by 3600 ($0E10). $0603 0000 / $0E10 = $6D70 . This is Scale Factor (SF) as a binary fraction.

Computing speed (20mph):
1. Count pulses in 1 second. (At 20mph this typically would be 274)
2. Multiply this by 10. 274 * 10 = 2740 ($0AB4).
3. Divide (pulse count * 2^16) by SF.
 2740 ($0AB4 0000) / SF ($6D70) = $1909, or 6409.
4. Shift result right 5b and round. Integer result of $00C8 (200) is mph in 10ths, or 20.0mph.
5. Convert binary $00C8 to ascii decimal string and display on LCD “20.0”.

Slow speed (2mph):
1. Count pulses in 1 second. (At 2mph this typically would be 27)
2. Multiply this by 10. 27 * 10 = 270 ($010E).
3. Divide (pulse count * 2^16) by SF.
 270 ($010E 0000) / SF ($6D70) = $0277, or 631.
4. Shift result right 5b and round. Integer result of $0014 (20) is mph in 10ths, or 2.0mph.
5. Convert binary $0014 to ascii decimal string and display on LCD “02.0”.

Need 32bit by 16bit divide with 16bit result
Need 16bit multiply by constant of 10


Next to investigate in detail is the analog part, measuring battery current. Later.
Wingsy is offline   Reply With Quote
Old 12-09-2017, 11:59 AM   #16
PingEye3
Gone Wild
 
PingEye3's Avatar
Club Car
 
Join Date: Sep 2014
Location: Orlando, FL
Posts: 1,308
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by Wingsy View Post
Good suggestion, but I believe I can get around buying a $30 shunt by using the resistance of the cable. And I agree that relying on the resistance of a bolt-on cable is hit or miss, I believe that with the calibration of the current flow that I can make it reliable enough to be useful. Once a gas tight connection is made there should be no mechanism to alter its resistance, so the calibration should hold until the cable is disturbed by a disconnect/reconnect, at which time I would recalibrate. Calibration is just a push of a button during the beginning of a charge cycle when the charge current is 15A.
Then I concur, especially if recalibration is that easy.
PingEye3 is offline   Reply With Quote
Old 12-09-2017, 04:14 PM   #17
NoleFan4Ever
MOD of all BS!
 
NoleFan4Ever's Avatar
Club Car
 
Join Date: Sep 2011
Location: Florida
Posts: 17,477
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by Wingsy View Post
Calibration:
1. Measure pulses in 165 ft (typically 1539, or $0603 in hex).
2. Shift left 16b. = $0603 0000
3. Divide by 3600 ($0E10). $0603 0000 / $0E10 = $6D70 . This is Scale Factor (SF) as a binary fraction.

Computing speed (20mph):
1. Count pulses in 1 second. (At 20mph this typically would be 274)
2. Multiply this by 10. 274 * 10 = 2740 ($0AB4).
3. Divide (pulse count * 2^16) by SF.
 2740 ($0AB4 0000) / SF ($6D70) = $1909, or 6409.
4. Shift result right 5b and round. Integer result of $00C8 (200) is mph in 10ths, or 20.0mph.
5. Convert binary $00C8 to ascii decimal string and display on LCD “20.0”.

Slow speed (2mph):
1. Count pulses in 1 second. (At 2mph this typically would be 27)
2. Multiply this by 10. 27 * 10 = 270 ($010E).
3. Divide (pulse count * 2^16) by SF.
 270 ($010E 0000) / SF ($6D70) = $0277, or 631.
4. Shift result right 5b and round. Integer result of $0014 (20) is mph in 10ths, or 2.0mph.
5. Convert binary $0014 to ascii decimal string and display on LCD “02.0”.

Need 32bit by 16bit divide with 16bit result
Need 16bit multiply by constant of 10


Next to investigate in detail is the analog part, measuring battery current. Later.
Yeah, got it. 10-4, no problem.... (What the.....)

NoleFan4Ever is offline   Reply With Quote
Old 12-09-2017, 04:38 PM   #18
yawood
Gone Wild
 
yawood's Avatar
Club Car
 
Join Date: Jan 2017
Location: Queensland Australia
Posts: 1,332
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by Swan View Post
following along , i know enough to understand but not enough to build from scratch . this is going to be interesting for sure .
Same for me. I can just (only just) follow the binary calculations too but I certainly couldn't do them for myself.
yawood is offline   Reply With Quote
Old 12-09-2017, 04:43 PM   #19
Swan
Cave Dweller
 
Swan's Avatar
Club Car
 
Join Date: Apr 2013
Location: Always On The Move
Posts: 22,117
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by NoleFan4Ever View Post
Yeah, got it. 10-4, no problem.... (What the.....)

there will be a test at the end
Swan is offline   Reply With Quote
Old 12-09-2017, 06:43 PM   #20
NoleFan4Ever
MOD of all BS!
 
NoleFan4Ever's Avatar
Club Car
 
Join Date: Sep 2011
Location: Florida
Posts: 17,477
Default Re: Project: Display of Speedometer/Odometer + Battery Info

Quote:
Originally Posted by Swan View Post
there will be a test at the end
I have a calculus test to study for....
NoleFan4Ever is offline   Reply With Quote
Reply
Go Back   Buggies Gone Wild Golf Cart Forum > Golf Cart Repair and Troubleshooting > Electric Club Car


Thread Tools
Display Modes


Similar Threads
Thread Forum
Picked this up for a project looking for info! Gas Columbia ParCar
Odometer Speedometer App For IOS...? Electric Club Car
New Project - Fancy Speedometer, etc Electric Yamaha
Odometer for TXTPDS Electric EZGO
yet another 36v battery LED display question Electric Club Car


All times are GMT -5. The time now is 04:52 PM.


Club Car Electric | EZGO Electric | Lifted Golf Carts | Gas EZGO | Used Golf Carts and Parts

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
This Website and forum is the property of Buggiesgonewild.com. No material may be taken or duplicated in part or full without prior written consent of the owners of buggiesgonewild.com. © 2006-2017 Buggiesgonewild.com. All rights reserved.