Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 05-23-2011, 10:37 AM   #241 (permalink)
Master EcoModder
 
jackbauer's Avatar
 
Join Date: Sep 2009
Location: Ireland
Posts: 734
Thanks: 26
Thanked 304 Times in 171 Posts
Ok guys more problems! Installed a standard old fashioned resistive fuel gauge in a pod on the dash today. Very simple gauge. 12v=full , 2v=empty. Wired it all up and switched on with 100% soc in the module. Gauge goes to 3/4 with a 2khz whine. Enter setup mode and gauge drops to empty. Ran the 5k pot up and down the track. No change. Key off , key on. Back at 3/4 and whining. Decided to do a little spin. Hadn't driven 100 yards when the whine stopped and needle jumped to full. Also when in normal mode and using the button to change screen , the needle jumps to full when pressed then back to normal reading when released. I presume this is to do with the interrupt driven key handling.Running v1.2 code. Any thoughts much appreciated.

Everything else works fine just cant seem to get this fuel guage problem sorted.

__________________
Now, Cole, when you shift the gear and that little needle on the ammeter goes into the red and reads 2000 Amps, that's bad.
www.evbmw.com
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-23-2011, 11:02 AM   #242 (permalink)
EcoModding Apprentice
 
apowers's Avatar
 
Join Date: Aug 2009
Location: Tn
Posts: 126
Thanks: 14
Thanked 19 Times in 16 Posts
I get a very very faint beep,beep, beep,.... from my fuel gauge. About 1/2 second between beeps. Sounds like a construction vehicle backing up but very faint. I only hear it if I am very quiet, so it is not annoying. When I reset my state of charge the fuel gauge only goes to about 1/4 until I have driven about 200 ft.

I changed my batt pack but have not changed the firmware to match. With 100% SOC 21 MTE. After 33 miles driven still shows 3 or 4 MTE. At this mileage the batteries are still above 12 volts each. I think that is considered
50 % SOC. That is about as low as I want to go on lead acid I think.

Alvin
  Reply With Quote
Old 05-23-2011, 11:40 AM   #243 (permalink)
Master EcoModder
 
jackbauer's Avatar
 
Join Date: Sep 2009
Location: Ireland
Posts: 734
Thanks: 26
Thanked 304 Times in 171 Posts
Bit more info. Just spent the past half hour fault finding. Upgraded to v1.3. No change. Removed the pic and put a meter on pin 22. The 5k pot varies this between 0 and 5v. Scoped pin 13 (fuel pwm). In setup mode , the pot has no effect on pwm. In normal mode no effect either. Looks like we have a pwm bug in the code for the 2480. No doubt this is what's been causing my problem with the bmw fuel gauge also.
__________________
Now, Cole, when you shift the gear and that little needle on the ammeter goes into the red and reads 2000 Amps, that's bad.
www.evbmw.com
  Reply With Quote
Old 05-23-2011, 01:29 PM   #244 (permalink)
Master EcoModder
 
jackbauer's Avatar
 
Join Date: Sep 2009
Location: Ireland
Posts: 734
Thanks: 26
Thanked 304 Times in 171 Posts
Ordered an 18f2420. Will test tomorrow.
__________________
Now, Cole, when you shift the gear and that little needle on the ammeter goes into the red and reads 2000 Amps, that's bad.
www.evbmw.com
  Reply With Quote
Old 05-23-2011, 02:01 PM   #245 (permalink)
EcoModding Apprentice
 
apowers's Avatar
 
Join Date: Aug 2009
Location: Tn
Posts: 126
Thanks: 14
Thanked 19 Times in 16 Posts
I am using the 2480 and the fuel gauge matches the LCD. There is just a delay before the gauge goes all the way up to full. Just on the reset after that it is alright till the next reset. It also does not take the reset on the LCD if I don't drive away briefly before turning the key off.
  Reply With Quote
Old 05-23-2011, 04:37 PM   #246 (permalink)
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Quote:
Originally Posted by apowers View Post
I am using the 2480 and the fuel gauge matches the LCD. There is just a delay before the gauge goes all the way up to full. Just on the reset after that it is alright till the next reset. It also does not take the reset on the LCD if I don't drive away briefly before turning the key off.
Hey Alvin, thats funny. I just found that bug yesterday and didn't get to post it. Basically, when you reset SOC, it will update the capacity in ram immediately, but still relies on the 1 minute timer to update the new ram value to EEPROM (hence your little required drive). Don't have code in front of my but solution is simply adding line "Call Capstore" in the section of code after "Reload" label. Resetting SOC will then update capacity and immediately write it to EEPROM. I will post tonight.

-Chris
  Reply With Quote
The Following User Says Thank You to Freyguy For This Useful Post:
apowers (05-23-2011)
Old 05-23-2011, 04:47 PM   #247 (permalink)
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Quote:
Originally Posted by jackbauer View Post
Ok guys more problems! Installed a standard old fashioned resistive fuel gauge in a pod on the dash today. Very simple gauge. 12v=full , 2v=empty. Wired it all up and switched on with 100% soc in the module. Gauge goes to 3/4 with a 2khz whine. Enter setup mode and gauge drops to empty. Ran the 5k pot up and down the track. No change. Key off , key on. Back at 3/4 and whining. Decided to do a little spin. Hadn't driven 100 yards when the whine stopped and needle jumped to full. Also when in normal mode and using the button to change screen , the needle jumps to full when pressed then back to normal reading when released. I presume this is to do with the interrupt driven key handling.Running v1.2 code. Any thoughts much appreciated.

Everything else works fine just cant seem to get this fuel guage problem sorted.
Jackbauer,
I think I know what this is. I should have known when Alvin mentioned needing to drive a bit before the needle moved to full. The PWM frequency is too high and the meter coil's inductance limits the current (and whines about it,ha-ha). With limited current, the coil can't move the needle or in Alvin's case needs a little vibration from driving to unstick it. I knew not being able to test this on my own setup would come back to bite me
We can easily cut the PWM frequency from 2Kz to 500hz by changing the prescaler. I think I loaded T2CON with a 0x05. Changing it to 0x06 will make frequency 500hz. See what that does.
I'm not sure why the pot doesn't change PWM. I confirmed it works for me, but I have a 2420. Will look at code tonight.

-Chris
  Reply With Quote
Old 05-23-2011, 05:15 PM   #248 (permalink)
Master EcoModder
 
jackbauer's Avatar
 
Join Date: Sep 2009
Location: Ireland
Posts: 734
Thanks: 26
Thanked 304 Times in 171 Posts
Thanks Chris. Much appreciated. As i say i will have a 2420 tomorrow so will test with that. Not as if i'll be doing the can stuff anytime soon anyway.
__________________
Now, Cole, when you shift the gear and that little needle on the ammeter goes into the red and reads 2000 Amps, that's bad.
www.evbmw.com
  Reply With Quote
Old 05-23-2011, 09:49 PM   #249 (permalink)
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Quote:
Originally Posted by jackbauer View Post
Thanks Chris. Much appreciated. As i say i will have a 2420 tomorrow so will test with that. Not as if i'll be doing the can stuff anytime soon anyway.
Ok, but I really don't think this is a PWM bug in the 2480 code. Alvin has the 2480 and he could adjust his after I discovered the rogue line of code that prevented PWM adjustment (back at post #169).

But I definitely think I messed up with the PWM frequency. I am so use to using PIC PWM for a poor man's DAC that I always use 2~4kHz frequencies out of habit...easy to filter with an RC.

So mods as follows:

Under the PWM fuel gauge setup section
line 592- change MOVLW 0x05 to 0x06 ; prescaler change from 4 to 16
(PWM freq should now be 488hz)

Under the Reload SOC section
After line 618 add this line- Call Capstore
(SOC reset value is immediately written to EEPROM)

I'll release another revision after a few more guys build & run this successfully.
We might find more bugs in the meantime.

-Chris

Last edited by Freyguy; 05-24-2011 at 06:32 AM.. Reason: Mental mixup of period vs freq
  Reply With Quote
Old 05-23-2011, 10:11 PM   #250 (permalink)
EcoModder
 
Join Date: Mar 2010
Location: New Zealand
Posts: 181
Thanks: 0
Thanked 33 Times in 20 Posts
I have mine running, but haven't attempted to hook up the fuel gauge as yet. My BMW has a great big tacho sitting in front of my face that I had vaguely thought to connect up one day, but really what's the point of a tacho? The thing is redlined at 6000 and it crossed my mind that it would make a very good ammeter. Its driven by a magnetic sensor on the old ic engine at one pulse per rev and the LCD unit could very easily produce such a signal from the current sensor, much as you do for the fuel gauge. How about it Chris?

__________________
Sometimes I sits and thinks and sometimes I just sits.
  Reply With Quote
Reply  Post New Thread






Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com