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 07-14-2009, 04:05 AM   #2001 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Two extra instructions..OUCH!....ha ha ha...
Seriously though, the OC lock out circuit has been designed into the product so the related piece of software should be a "must include". So add the extra instructions (clean up the development notes etc) and mark it compulsory.


As far as the pull down is concerned the jury is out...a uP can fail with the output high as well.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 07-14-2009, 04:46 AM   #2002 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
The 1N4148 diode pulls PWM low while !CLEAR is active
Actually this is not guaranteed. The ATmega8 output when low can be as high as 0.7V. The diode forward voltage will be 0.7V or more meaning you are only certain of pulling the PWM signal down to 1.4V which is around the threshold of the input low condition of the CMOS NAND gate input. If you really want to have a hardware circuit I would use an AND gate with PWM and !CLEAR as inputs. (or a NAND gate followed by a NAND Invertor). Or (shudder) a transistor circuit.

Having diodes in digital logic circuits is something to avoid....except zeners as voltage protection devices.
  Reply With Quote
Old 07-14-2009, 12:12 PM   #2003 (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 View Post
I resoldered the stuff that I removed in the debugging process. It's all a go, I repeat, everything is a go! With it all working perfectly, I believe. I am going to put it in the car later.

I have a way to tune my PI loop now. I'll use the serial port to output the current so I can look at step response. I'm getting a super cheap laptop on Craigslist if it isn't sold already. This is going to be awesome! I remember Jay's graphs if his robot PD loop, and I'm going to try something similar. I can't wait to get good solid data! Then Joe and Adrian can tune to their motors too, and we can get something of a library together, so we know the just right P and I for each motor type.
//////////////////////////////////////////////////////////////////////////////
R12 keeps pwm output low as the default
R11 keeps the current draw from the PB1 down
The 1N4148 diode pulls PWM low while !CLEAR is active

ya!
Paul, what specs do you need in the super cheap laptop? I picked up a pile of laptops a while ago that were chucked out from the college (we have an electronics Bone Yard!), and I believe some of them work, I just haven't cleaned them out yet. If any check out, you can have one. (Runs to Bone Yard.....)
__________________
Civic EV http://2001-civic-ev.blogspot.com/
Solectria Force http://solectriaforce.blogspot.com/
  Reply With Quote
The Following User Says Thank You to TheSGC For This Useful Post:
mpgmike (01-12-2022)
Old 07-14-2009, 12:29 PM   #2004 (permalink)
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,362
Thanked 1,202 Times in 765 Posts
Quote:
Originally Posted by squiggles View Post
Actually this is not guaranteed. The ATmega8 output when low can be as high as 0.7V.
Hey Squiggles!

On pg. 265 of the ATMega8 datasheet, it has a graph called:

Figure 149. I/O Pin Sink Current vs. Output Voltage (VCC = 5V)

The current will be 5v / 10K for the pulldown, plus 5v / 1K for the PWM series resistor. That makes 5.5mA, which makes for approximately 0.2v. 0.2v + 0.7v is safely under for the HC74 family to be considered low. I see what you mean, though.



TheSGC: I need something that will run AVR Studio from Atmel, and that can function as a hyperterminal. I need to be able to get AVR Studio onto the computer, and I have one of those little plug things that go into the usb port. The older one I have doesn't have the right drivers to be able to read it. I think that's it.
__________________
kits and boards
  Reply With Quote
Old 07-14-2009, 12:33 PM   #2005 (permalink)
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,362
Thanked 1,202 Times in 765 Posts
AVR Studio® 4 is the new professional Integrated Development Environment (IDE) for writing and debugging AVR® applications in Windows® 9x/NT/2000/XP/Vista(32- and 64-bit) environments.

AVR Studio 4 includes an assembler and a simulator.

haha! I guess it needs at least Win 98. haha! I heard win 95 doesn't work.

EVRag was going to loan me his, so I might not need a permanent one for a little while.
__________________
kits and boards
  Reply With Quote
Old 07-14-2009, 12:55 PM   #2006 (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 View Post
AVR Studio® 4 is the new professional Integrated Development Environment (IDE) for writing and debugging AVR® applications in Windows® 9x/NT/2000/XP/Vista(32- and 64-bit) environments.

AVR Studio 4 includes an assembler and a simulator.

haha! I guess it needs at least Win 98. haha! I heard win 95 doesn't work.

EVRag was going to loan me his, so I might not need a permanent one for a little while.
I have one here, a Gateway Solo 500 MHz Celeron, 32 MB Ram and a 4 GB hard drive and I am installing a fresh copy of Windows 2000. The battery is probably shot and there is a chunk missing from the case, but it is working and almost done with the Windows 2000 install. I will even install AVR Studio and make sure it works!
__________________
Civic EV http://2001-civic-ev.blogspot.com/
Solectria Force http://solectriaforce.blogspot.com/
  Reply With Quote
The Following 2 Users Say Thank You to TheSGC For This Useful Post:
mpgmike (01-12-2022), Sritharan (05-10-2019)
Old 07-14-2009, 01:14 PM   #2007 (permalink)
Dartmouth 2010
 
SVOboy's Avatar
 
Join Date: Nov 2007
Location: Hanover, NH
Posts: 6,447

Vegan Powa! - '91 Honda CRX DX
Team Honda
90 day: 66.52 mpg (US)
Thanks: 92
Thanked 122 Times in 90 Posts
Send a message via AIM to SVOboy Send a message via MSN to SVOboy Send a message via Yahoo to SVOboy
Congratulations on a truly, epicly long thread,
  Reply With Quote
Old 07-14-2009, 06:28 PM   #2008 (permalink)
EcoModding Apprentice
 
Join Date: May 2009
Location: Australia
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
Hey Squiggles!

On pg. 265 of the ATMega8 datasheet, it has a graph called:

Figure 149. I/O Pin Sink Current vs. Output Voltage (VCC = 5V)

The current will be 5v / 10K for the pulldown, plus 5v / 1K for the PWM series resistor. That makes 5.5mA, which makes for approximately 0.2v. 0.2v + 0.7v is safely under for the HC74 family to be considered low. I see what you mean, though.
Actually you mean 5v / (10k + 1k) = 4.55mA + the uA feeding gate inputs, when the Output pin is high.

I believe the graph on P265 is showing you how much current an output pin can sink at a particular voltage. So a max of 30mA at 0.7V 25DegC

The table on page 242 shows that an output pin can be a max of 0.7V when the output is set low. Way back in my schooling days this was the figure we designed too.

Last edited by squiggles; 07-14-2009 at 06:45 PM..
  Reply With Quote
Old 07-14-2009, 07:44 PM   #2009 (permalink)
EcoModding Lurker
 
Join Date: Jun 2009
Location: Isle of Man
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
The current will be 5v / 10K for the pulldown, plus 5v / 1K for the PWM series resistor. That makes 5.5mA, which makes for approximately 0.2v. 0.2v + 0.7v is safely under for the HC74 family to be considered low. I see what you mean, though.
Hi Paul, I don't think your calcs are quite right here. The resistors do indeed add in series, but the current therefore drops.

Anyway I think this is how it is ..
(approximated I/Os as 25R source / sink resistance)

PWM !CLEAR D3Anode D3Kathode (Volts)

LO LO 0 0
LO HI 0 5
HI LO 0.8 0.1 PWM source 4.1mA, !CLEAR sink 4.0mA
HI HI 4.5 5 PWM source 0.45mA

The above of course assumes that the I/O's were set as outputs! LOL.

cheers Rob
  Reply With Quote
Old 07-14-2009, 07:47 PM   #2010 (permalink)
EcoModding Lurker
 
Join Date: Jun 2009
Location: Isle of Man
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Hmm, see my table's screwed up, but you get the idea!

Rob

  Reply With Quote
Reply  Post New Thread




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 3431 05-04-2022 06:43 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 10:09 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 05:10 PM



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