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

Now available from EcoModder: ScanGauge II fuel economy gauge.  Click for details.  

Reply  Post New Thread
Submit Tools LinkBack Thread Tools
Old 12-22-2008, 04:36 PM   #31 (permalink)
Losing the MISinformation
 
Intrigued's Avatar
 
Join Date: Oct 2008
Location: Southern Missouri
Posts: 391

Quad Cam - '00 Intrigue GX
Last 3: 25.94 mpg (US)
Thanks: 13
Thanked 2 Times in 2 Posts
// GOOD Programmer! Good Boy!
// Leaves lots of notes, if for no other reason, to remind himself
// ...of what the heck that all was...
// 2 years later when have forgotten...


(Support Ecomodder.com & get rid of these annoying ads!)      
 
__________________


The brake pedal is my enemy. The brake pedal is my enemy. The brake pedal...
  Reply With Quote
Old 12-23-2008, 03:16 AM   #32 (permalink)
Moderate your Moderation.
 
Join Date: Nov 2008
Location: Troy, Pa.
Posts: 8,387

Herbie - '86 Golf Diesel
90 day: 51.89 mpg (US)

Steve - '92 Festiva
Thanks: 957
Thanked 324 Times in 273 Posts
LOL intrigued... I learned a long time ago, to leave plenty of notes, even in HTML... if nothing else, it helps other people using your de-compiled stuff to learn.

MPaulHolmes - Subscribed - Better late than never? LOL.

I'm quite interested to see where this goes as I lean more and more toward converting my CR-X to an EV.
__________________
"¿ʞɐǝɹɟ ɐ ǝɹ,noʎ uǝɥʍ 'ʇı ʇ,usı 'ʎlǝuol s,ʇı"
  Reply With Quote
Old 12-23-2008, 09:08 AM   #33 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 5 Times in 3 Posts
I just had a peak at your schematic and read up on the IXDD414. I would like to HIGHLY recommend that you have some sort of fail-safe switch attached to the enable line instead of tieing it high. You could put it on the dash as the "start" switch.

Also, i don't know if you've done this because i didn't read the code... I would highly recommend that you use a watchdog timer that will put the chip into a reset state where the pwm line is driving the mosfets off.

I'm a computer engineer... i write embedded code for a living and i spend a lot of time dealing with the hardware for which i write code (i've got a pile of boards on my desk right now that i'm testing). I will definately follow your thread and see what you're up to and make little inputs where i can. Be sure to post anything that is puzzling you or any little ideas that you'd like expanded.

Cheers, and good luck.
  Reply With Quote
Old 12-23-2008, 10:29 AM   #34 (permalink)
Losing the MISinformation
 
Intrigued's Avatar
 
Join Date: Oct 2008
Location: Southern Missouri
Posts: 391

Quad Cam - '00 Intrigue GX
Last 3: 25.94 mpg (US)
Thanks: 13
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by Christ View Post
LOL intrigued... I learned a long time ago, to leave plenty of notes, even in HTML... if nothing else, it helps other people using your de-compiled stuff to learn.
Back during my "first college-hood" in the '70s, (Before Al Gore ) the only computer languages around were COBOL and FORTRAN. I took a liking to COBOL then, but was an Aviation Technology major, and didn't mess with it.

Since the Sudden Stop at the bottom of that fall that put me in this cursed wheeled conveyance, I have been going through my "second college-hood." Guess what one of the first things was I studied? COBOL! Even 9 years ago nearly a third of what was coming out in the business world was in COBOL for use in AS-400s and other midrange-to-mainframe computing-type contraptions. Now that I'm close to my Bachelor's degree (Business) there's not much use for it anymore, but if I can figure out how to live until Y2.1K, I could sure help in reprogramming all of the old-timers - again!

EDIT: Wait a minute... ARPANET IN '69, TCP/IP first written in '74. Maybe it wasn't before he invented the internet...
__________________


The brake pedal is my enemy. The brake pedal is my enemy. The brake pedal...

Last edited by Intrigued; 12-23-2008 at 10:46 AM.. Reason: More thoughts of the past...
  Reply With Quote
Old 12-23-2008, 11:47 AM   #35 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,554

Michael's Electric Beetle - '71 Superbeetle 500000
Thanks: 373
Thanked 297 Times in 188 Posts
Quote:
Originally Posted by MazdaMatt View Post
I just had a peak at your schematic and read up on the IXDD414. I would like to HIGHLY recommend that you have some sort of fail-safe switch attached to the enable line instead of tieing it high. You could put it on the dash as the "start" switch.
ABSOLUTELY! I was reading about that too. It would be a shame to have such a wonderful soft shutdown available and not even use it. I'm just being super simplistic right now for the bike version. I've never done anything like this before (I'm a substitute teacher), and I'm just trying to get something as simple as possible to work as the first draft.

I think I was just going to add a thermistor right next to the mosfets, and monitor that in the software. The idea was that their case temperature would not be allowed to get above a pre-determined safe amount. As it got closer to that max temp, I'll ramp down the duty cycle all the way to 0. Since the input pin is wired to ground through a resistor, the mosfets would be shut off that way instead.

My Analog to digital converter is going at about 125,000 samples per second, so I thought that would be quick enough for monitoring temperature increases. This brings up a question I have. The maximum sample rate of the A/D Converter is like 4 MHz, but the ATMega8 documentation says the conversions are the most accurate with no more than 200,000 sample/sec. It doesn't say how inaccurate it gets the faster it goes, so I've limited mine.

Quote:
Originally Posted by MazdaMatt View Post
Also, i don't know if you've done this because i didn't read the code... I would highly recommend that you use a watchdog timer that will put the chip into a reset state where the pwm line is driving the mosfets off.
I haven't done this. I saw that there is such a thing as a watchdog timer on the ATMega8, but I have no idea what it is. I'll read up on that. It sounds like a very good idea.

Quote:
Originally Posted by MazdaMatt View Post
I'm a computer engineer... i write embedded code for a living and i spend a lot of time dealing with the hardware for which i write code
Man, I love ecomodder. This site is the reason my wife and I were able to get our conversion done. So many experts in such a wide variety of fields!
__________________
When I die, I would like to go peacefully, in my sleep, like my grandfather did. Not screaming and yelling like the passenger in his car.
  Reply With Quote
Old 12-23-2008, 11:55 AM   #36 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 5 Times in 3 Posts
Hehe... don't confuse "educated and working" with "expert"

I will be proud to help this project in any way i can. You have accomplished an amazing amount without any embedded systems/electrical engineering background. Good work!

Quite frankly, you don't need to sample the A/D converter that fast... 100Hz would be fine.

Watchdog timer was an obscure concept when i started this stuff. It is actually quite simple. You enable it, then it counts down till it expires and resets the chip. The idea is that your code will regularly reset the timer so that the chip doesn't reset. If ever your program hangs due to an unforseen bug (it happens to the best!) your system resets and you carry on with life. Ideally, a watchdog reset would be followed by an immediate shutdown of the motors.

In my reading, the big risk with DC motors is the ability to run away at full throttle if your control goofs up. I'd do as much as possible to ensure that this doesn't happen... just keep it in mind, don't hang up your project on it.
  Reply With Quote
The Following User Says Thank You to MazdaMatt For This Useful Post:
ShadeTreeMech (04-13-2010)
Old 12-24-2008, 06:08 PM   #37 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,554

Michael's Electric Beetle - '71 Superbeetle 500000
Thanks: 373
Thanked 297 Times in 188 Posts
video!



Oh ya! We have thermal shutdown (until it cools) now as a feature.
__________________
When I die, I would like to go peacefully, in my sleep, like my grandfather did. Not screaming and yelling like the passenger in his car.
  Reply With Quote
Old 12-24-2008, 06:44 PM   #38 (permalink)
"Crush"
 
bennelson's Avatar
 
Join Date: Jan 2008
Location: Oconomowoc, WI, USA
Posts: 3,863

Electric Cycle - '81 KZ440
90 day: 334.6 mpg (US)

S10 - '95 S10
90 day: 30.48 mpg (US)

Electro-Metro - '96 "Electro-Metro"
90 day: 129.81 mpg (US)

The Wife's Car - Plug-in Prius - '04 Prius
90 day: 71.8 mpg (US)
Thanks: 4
Thanked 280 Times in 184 Posts
Nice video.

I almost did a spit-take when you pulled out the hair dryer to test the thermal shutdown.

I think that's the exact same thing I would have done!
__________________


300mpg.org Learn how to BUILD YOUR OWN ELECTRIC CAR CHEAP
My YouTube Videos
  Reply With Quote
Old 12-24-2008, 07:18 PM   #39 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,554

Michael's Electric Beetle - '71 Superbeetle 500000
Thanks: 373
Thanked 297 Times in 188 Posts
That hair dryer was right out of the Ben Nelson playbook. Remember the coffee can brakes? hehe!

I attached the (once again) revised version of the program, with the thermal shutdown included.

EDIT: I ordered a hall effect current sensor. I wasn't going to, because I don't think we need one in this case. However, current limiting is critical with EV controllers, so maybe we'll do it for practice.
Attached Files
File Type: txt PWMAndInputTest.txt (6.9 KB, 193 views)
__________________
When I die, I would like to go peacefully, in my sleep, like my grandfather did. Not screaming and yelling like the passenger in his car.

Last edited by MPaulHolmes; 12-25-2008 at 12:00 PM..
  Reply With Quote
Old 12-25-2008, 10:46 AM   #40 (permalink)
Batman Junior
 
MetroMPG's Avatar
 
Join Date: Nov 2007
Location: 1000 Islands, Ontario, Canada
Posts: 12,538

Blackfly - '98 Metro
Team Metro
90 day: 67.07 mpg (US)

ForkenSwift - '92 Metro EV
90 day: 125.37 mpg (US)

U.F.O. - '00 Insight
Team Honda
90 day: 85.75 mpg (US)
Thanks: 302
Thanked 1,021 Times in 569 Posts
Yay! The hair dryer saved the Muppets! Or something.


(Support Ecomodder.com & get rid of these annoying ads!)      
 
__________________
Latest project: removable Geo Metro boat tail
Latest test: Massive cardboard air dam on a Geo Metro


www.MetroMPG.com - fuel efficiency info for Geo Metro owners
www.ForkenSwift.com - electric car conversion on a beer budget
  Reply With Quote
Reply  Post New Thread

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul and Sabrina's Cheap 3 Phase Inverter (AC Controller) with Field Oriented Control MPaulHolmes Fossil Fuel Free 728 05-14-2012 07:44 AM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 529 03-12-2012 02:16 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 04:10 PM




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