View Single Post
Old 12-23-2008, 12:47 PM   #35 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,119 Times in 734 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!
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
faerietree (07-14-2012)