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 05-23-2009, 02:30 PM   #1371 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,831

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,367
Thanked 1,115 Times in 730 Posts
Are you serious!? Pin compatible??? What in the crap am I doing with an ATMega8? I'm going to order a few of those.

__________________
kits and boards
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-23-2009, 09:18 PM   #1372 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location:
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 267 Times in 210 Posts
Here is the CPU and Crystal that come with the mpguino. It is pin compatible but some of the instructions/register names are a bit different than the mega8. I'm moving towards 20mhz too FYI, couple low level timing changes as you can imagine.

I don't think it will solve slow 32 bit math though, 32 bit math is handy, but slow, have to use it sparingly. I do a lot of it but only once every 1/2 second to update the display and just do basic addition in the interrupts.

$4.11 atmega168p
http://mouser.com/Search/ProductDeta...ATMEGA168-20PU

$0.57 20mhz small crystal
http://mouser.com/Search/ProductDeta...-FOXS200-20-LF

edit: did not see a divide assembler instruction for either the mega8 or 168. Both muls take 2 cycles
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 05-23-2009 at 09:43 PM..
  Reply With Quote
Old 05-23-2009, 09:30 PM   #1373 (permalink)
EcoModding Lurker
 
Join Date: Mar 2009
Location: Graham NC
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Regarding trying to make the controller act like an ICE car.

Most cars for Joe/Joy average driver are equipped with an automatic transmission and therefore have a torque converter that soaks up drive train vibrations/"irregularities".

Auto enthusiasts that have a stick want to feel everything that is going on with the car.

My vote is to let me know what is going on with the vehicle.

With an ICE car I am not going to try to remain stationary on a hill or the clutch will burn.
With the electric car on a hill, wouldn't it also be better to take the foot off the throttle and onto the brake?

Thanks
  Reply With Quote
Old 05-23-2009, 09:51 PM   #1374 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Lake Tapps WA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by tinkerdave View Post
Regarding trying to make the controller act like an ICE car.

Most cars for Joe/Joy average driver are equipped with an automatic transmission and therefore have a torque converter that soaks up drive train vibrations/"irregularities".

Auto enthusiasts that have a stick want to feel everything that is going on with the car.

My vote is to let me know what is going on with the vehicle.

With an ICE car I am not going to try to remain stationary on a hill or the clutch will burn.
With the electric car on a hill, wouldn't it also be better to take the foot off the throttle and onto the brake?

Thanks


While I agree a little with what you are saying, I don't think the intent is to try and make it silky smooth as much as just very drivable, If people got a speed control that took off like a teenage girl try to learn how to drive a stick for the first time, it would turn off a lot of people from doing EV conversions.

I know when it spills my coffee on me I would say really bad words....
  Reply With Quote
Old 05-23-2009, 11:27 PM   #1375 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,831

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,367
Thanked 1,115 Times in 730 Posts
I think all the testing with sometimes really badly behaved voltages and currents and overshoots because of too big of P's or I's and the micro-controller sometimes going into latchup may have caused a problem with my control section. It already was a "walking wounded" because it was in the exploded controller. I can't do any other testing until it's fixed or replaced. boohoo... I did learn the following:

Probably the best performance was one of the PI loops, but I forgot which one, and the controller is acting weird.

Another disturbing fact: I would compile a program, run it in the simulator, and it would have completely different behavior in the car. This is all very disturbing.
__________________
kits and boards

Last edited by MPaulHolmes; 05-24-2009 at 11:45 AM..
  Reply With Quote
Old 05-23-2009, 11:34 PM   #1376 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Bucharest,RO and Copenhagen,DK
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
....

edit: did not see a divide assembler instruction for either the mega8 or 168. Both muls take 2 cycles
You're right of course. Somehow I was under the impression that atmega8 doesn't do hw mul. And yes, hw div is not implemented in either of them.
  Reply With Quote
Old 05-24-2009, 03:32 AM   #1377 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,831

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,367
Thanked 1,115 Times in 730 Posts
Well, I got it working again. Long story. At least it works outside of the car on the oscilloscope. I'll hook it up tomorrow, and the saga shall continue. It's still acting weird. I put in a new ATMega8. Maybe that helped?
__________________
kits and boards
  Reply With Quote
Old 05-24-2009, 11:46 AM   #1378 (permalink)
EcoModding Lurker
 
Join Date: Jul 2008
Location: Memphis, TN
Posts: 58

2010 Prius - '10 Toyota Prius IV
Last 3: 51.4 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
Paul, FWIW I used a BT serial port on my robot to send all of the current time and measurements out to my PC. I would captures these in Hyperterm, save them to a text file and import into excel. I also wrote a small "menu" so I could change the constants and capture the results to see if I over or under damped.

In the attached image, the Yellow is the commanded speed. My speeds are from -50 to + 50 (that's a relative unit of measure given my encoder resolution and how fast I'm sampling them). In the example I command from 0 to 20 then to 0 to then 4 then to 0. The blue is actual measured speed.

Jay
Attached Thumbnails
Click image for larger version

Name:	pid_cap.jpg
Views:	73
Size:	6.0 KB
ID:	3553  
  Reply With Quote
Old 05-24-2009, 01:01 PM   #1379 (permalink)
EcoModding Lurker
 
Join Date: Jul 2008
Location: Memphis, TN
Posts: 58

2010 Prius - '10 Toyota Prius IV
Last 3: 51.4 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by MPaulHolmes View Post
Are you serious!? Pin compatible??? What in the crap am I doing with an ATMega8? I'm going to order a few of those.
From what I gather you get up to 20MHz, you get 3 more PWM channels, you an external interrupt on any I/O pin, and you get a USART on your SPI and less than a dollar more.

Also have you seen the parametric table from Atmel?

Jay
  Reply With Quote
Old 05-24-2009, 01:11 PM   #1380 (permalink)
EcoModding Lurker
 
Join Date: Jul 2008
Location: Memphis, TN
Posts: 58

2010 Prius - '10 Toyota Prius IV
Last 3: 51.4 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
BTW, there is a 20MHz version of the Mega8 too. Oh, an I forgot the 16 in 168 means you get 16K of Flash versus 8. I'd say go to the 168. Another benefit would be that you could port it to use Arduino boards versus rolling your own.

I haven't played with Arduino myself, I have all the programmers I need (STK500, Dragon, and a JTag) but the bootloader and USB functionality are more friendly to beginners. Nuts and Volts has been featuring articles about the AVR and recently the Arduino.

Not trying to confuse anything just submitting items for consideration. BTW, new Ardunios are using the Mega128 and Mega256 chips

Jay

  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 3471 06-01-2020 10:53 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 09:09 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.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com