12-22-2008, 05:36 PM
|
#31 (permalink)
|
Losing the MISinformation
Join Date: Oct 2008
Location: Southern Missouri
Posts: 393
Thanks: 15
Thanked 3 Times in 3 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...
__________________
The brake pedal is my enemy. The brake pedal is my enemy. The brake pedal...
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
12-23-2008, 04:16 AM
|
#32 (permalink)
|
Moderate your Moderation.
Join Date: Nov 2008
Location: Troy, Pa.
Posts: 8,919
Pasta - '96 Volkswagen Passat TDi 90 day: 45.22 mpg (US)
Thanks: 1,369
Thanked 430 Times in 353 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,ʇı"
|
|
|
12-23-2008, 10:08 AM
|
#33 (permalink)
|
Master EcoModder
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096
Thanks: 0
Thanked 17 Times in 14 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.
|
|
|
The Following User Says Thank You to MazdaMatt For This Useful Post:
|
|
12-23-2008, 11:29 AM
|
#34 (permalink)
|
Losing the MISinformation
Join Date: Oct 2008
Location: Southern Missouri
Posts: 393
Thanks: 15
Thanked 3 Times in 3 Posts
|
Quote:
Originally Posted by Christ
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 11:46 AM..
Reason: More thoughts of the past...
|
|
|
12-23-2008, 12:47 PM
|
#35 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Quote:
Originally Posted by MazdaMatt
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
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
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!
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
12-23-2008, 12:55 PM
|
#36 (permalink)
|
Master EcoModder
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096
Thanks: 0
Thanked 17 Times in 14 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.
|
|
|
The Following 2 Users Say Thank You to MazdaMatt For This Useful Post:
|
|
12-24-2008, 07:08 PM
|
#37 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
video!
Oh ya! We have thermal shutdown (until it cools) now as a feature.
|
|
|
12-24-2008, 07:44 PM
|
#38 (permalink)
|
EV test pilot
Join Date: Jan 2008
Location: Oconomowoc, WI, USA
Posts: 4,435
Thanks: 17
Thanked 663 Times in 388 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!
|
|
|
12-24-2008, 08:18 PM
|
#39 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 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.
Last edited by MPaulHolmes; 12-25-2008 at 01:00 PM..
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
12-25-2008, 11:46 AM
|
#40 (permalink)
|
Batman Junior
Join Date: Nov 2007
Location: 1000 Islands, Ontario, Canada
Posts: 22,530
Thanks: 4,078
Thanked 6,978 Times in 3,613 Posts
|
Yay! The hair dryer saved the Muppets! Or something.
|
|
|
|