07-11-2009, 08:32 PM
|
#1981 (permalink)
|
EcoModding Lurker
Join Date: Jun 2009
Location: Isle of Man
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
|
Hi Paul,
don't want to muddy your train of thoughts, but ..
While you're contemplating a different current sensor, perhaps consider the lm293 version of its associated comparator U8 as well.
The 393 is only rated down to zero degrees C and from what i've read in these posts it can get pretty cold stateside!
cheers Rob
|
|
|
The Following User Says Thank You to magicsmoke For This Useful Post:
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
07-12-2009, 07:34 PM
|
#1982 (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
|
Hey TheSGC! If I can get your email, I can send you the most recent software. It's just in the middle of testing right now so I can find that stupid problem.
The LM393 is only good to 0 degC!? that's not good! Thank you, Rob!
TESTING RESULTS:
There is a problem with the hardware overcurrent trip circuit. The mosfet driver is getting disabled, but the micro is still putting out it's pwm. Now we are getting somewhere! The nice thing as far as quick fixes go, is on Ben's, Joe's, and Adrian's, if we really had to, we could just skip the overcurrent part of the circuit, and the software would be perfectly happy keeping the current low enough. I mean, the dang mosfets are rated for very short bursts of 130 amps EACH!
But I'll figure out what the crap is going on! Makes me mad. hehe.
|
|
|
07-12-2009, 08:42 PM
|
#1983 (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
|
Pin B2 isn't resetting the overcurrent event! I can manually reset the overcurrent event by connecting U5B, PIN 5 to ground. Man, we are getting close! I just love this.
|
|
|
07-12-2009, 09:00 PM
|
#1984 (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
|
PIN B2 isn't resetting the overcurrent event, because the delay isn't long enough! Be right back!
|
|
|
07-12-2009, 09:05 PM
|
#1985 (permalink)
|
Master EcoModder
Join Date: Nov 2008
Location: Massachusetts, USA
Posts: 442
Thanks: 1
Thanked 60 Times in 45 Posts
|
Quote:
Originally Posted by MPaulHolmes
PIN B2 isn't resetting the overcurrent event, because the delay isn't long enough! Be right back!
|
Paul! I just got your e-mail and took a look through the code and was going to ask you to try using the same lines of code that you used to Initialize the pin to reset the current!
// Pulsing pin b2 low for a moment guarantees that the state of the flip flop in the hardware overcurrent
// shutdown circuit is known.
PORTB |= 0b00000100; // set pin b2 to 1.
Delay(5);
PORTB &= 0b11111011; // Set Pinb2 to 0.
Delay(5);
PORTB |= 0b00000100; // set it to 1.
That should guarantee the Reset in the NAND gates!
|
|
|
07-12-2009, 09:13 PM
|
#1986 (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
|
Well, gosh dang it, let's try it!
BRB!
|
|
|
07-12-2009, 11:39 PM
|
#1987 (permalink)
|
Master EcoModder
Join Date: Nov 2008
Location: Massachusetts, USA
Posts: 442
Thanks: 1
Thanked 60 Times in 45 Posts
|
Quote:
Originally Posted by MPaulHolmes
Well, gosh dang it, let's try it!
BRB!
|
Yeah try it!
Mixing Digital and Analog parts can be tricky, especially when the NAND gates are so much slower than the digital! Can't wait to hear how it went!
|
|
|
07-13-2009, 12:00 AM
|
#1988 (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
|
The problem is that Pin B2 can't be brought low. If I set it to 0, it just jumps around from about 2.5v and 5v. Something is keeping it high, even if the ATMega8 tries to make it go low.
|
|
|
07-13-2009, 01:26 AM
|
#1989 (permalink)
|
EcoModding Lurker
Join Date: Jul 2008
Location: Memphis, TN
Posts: 58
Thanks: 0
Thanked 1 Time in 1 Post
|
Check that you are setting the DDRB pin to output and that your are not turning ont he internal pull-ups (have to look up where those get set, can't recall off the top of my head.
Jay
|
|
|
07-13-2009, 01:30 AM
|
#1990 (permalink)
|
EcoModding Lurker
Join Date: Jul 2008
Location: Memphis, TN
Posts: 58
Thanks: 0
Thanked 1 Time in 1 Post
|
Switching Between Input and Output
When switching between tri-state ({DDxn, PORTxn} = 0b00) and output high ({DDxn, PORTxn}= 0b11), an intermediate state with either pull-up enabled {DDxn, PORTxn} = 0b01) or output low ({DDxn, PORTxn} = 0b10) must occur. Normally, the pull-up enabled state is fully acceptable, as a high-impedant environment will not notice the difference between a strong high driver and a pull-up. If this is not the case, the PUD bit in the MCUCR Register can be set to disable all pull-ups in all ports.
Switching between input with pull-up and output low generates the same problem. The user must use either the tri-state ({DDxn, PORTxn} = 0b00) or the output high state ({DDxn, PORTxn}= 0b10) as an intermediate step.
From a different datasheet but it might apply here too.
|
|
|
|