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-10-2009, 05:29 PM   #1181 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Bucharest,RO and Copenhagen,DK
Posts: 42
Thanks: 0
Thanked 1 Time in 1 Post
The low pass filter you have applied makes a lot of sense. Actually, from your description you have calculated what is called in statistics a "prior moving average" which is probably the best way to smooth the readings for current in our application.

How many samples are you using? If too many, this form of averaging will be too much influenced by past values and you might consider using a weighted moving average (either linear or exponential) to strengthen the importance of the most recent readings.

I'd love to see the code.

Adrian

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-10-2009, 06:03 PM   #1182 (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,368
Thanked 1,202 Times in 765 Posts
You got that right, Charlie! I tried 128 samples, 64, 32, (I like powers of 2. hehe) 16, 8, 4, 2, and 1. 16 was the best. If the stupid LEM current sensor wasn't so dang noisy, I probably could do only 8 or 4, but 16 feels really nice, so who cares. I'll email you the zipped up version of the code.

It's really a work in progress, so it's not presentable at all at this point. Lots of global variables, everything happening inside the interrupt, so occasionally it will take so long that the next interrupt doesn't happen, but that doesn't affect at all how the car feels. could you PM me your email address? The zipped up file I think is too big for being on here. I'll try though.

Uh oh, My attachment limit has been exceeded. I guess the "PM me your email" approach is best.
__________________
kits and boards
  Reply With Quote
Old 05-10-2009, 10:19 PM   #1183 (permalink)
EcoModder Student
 
esoneson's Avatar
 
Join Date: Nov 2008
Location: Youngsville, NC
Posts: 117
Thanks: 11
Thanked 14 Times in 13 Posts
Paul and Adrian,

I have used Subversion for document/source code control and it works well and the Windows app/interface Tortoise is simple and easy to use. Paul, you should have no problem using what Adrian has provided what is called a "sand box". The place to put all your crap.......I mean code, documents, etc. Thanks again Adrian for your generous contribution of space. And Paul, you need not worry that it is on another machine out there in cyberspace, but if you do worry, you can always keep your own copies on your own machine. Believe me there will come a time when you change the code and don't have a copy of the last version when you realize that you made some goofy mistake and can't find out where it is. I am sure that Adrian will attest to this as I have done it many times also. It is just a very nice safety net to have when you need it.

Your running average is a great smoothing method, one I have used to smooth out the detection of signal strength in the DSL driver world (another story all together).

Great progress in the throttle control, that is superb.

One thing that you should be thinking about is acceleration. I.e. how fast you implement the rate of change when the throttle is detected to be above current (when the driver wants to go faster). This is one of those things that I see as a selectable value. Rate of change slow for granny or the valet or your teenage child. Rate of change faster for the normal moderate driver and rate of change really fast for the Grand Prix driver.

Also, the rate of change when decelerating should be really really quick since there is no motor "drag" and you sure as heck do not want to apply current when the driver wants to slow down or stop. This can be revisited when regen comes into play, but not now.
I think deceleration should be very quick, if someone else sees a use for doing it on a graduated scale, let me know.

I have my STK500 set up with the AtMega8 and am playing with your code (which is old already.....see how you need source code control). I will email you some guidelines for dealing with bits-on bits-off so you don't have to do the 128+64+....stuff. It will all be clear.

But for now, another couple of :thum bup: for all your great work!!!!

Eric
__________________
1995 BMW 318i EV in the making
  Reply With Quote
Old 05-11-2009, 03:45 AM   #1184 (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,368
Thanked 1,202 Times in 765 Posts
I'll get that stuff up on Adrian's space. Thank you Adrian!

I've been thinking about acceleration and deceleration. Curtis uses a 3.5 second ramp down from full throttle. I thought that seemed really stupid, but I think they do it so the car doesn't feel like the power got shut off like a light switch each time you take your foot off the accelerator. It made for really jerky driving. I never noticed how often I took my foot off the accelerator while still moving. It's actually pretty annoying to feel that jerk when there's an immediate loss of torque. Right now, I have deceleration happen 4 times faster than acceleration, and it's fast enough that it feels about how it does in a regular gas car.

The benefit of granny mode is that it makes it very easy to have really really smooth control at low rpm. Man, I always get ideas while typing! You can have the best of granny and Grand Prix Mode (for grand prix people only). In Grand Prix Mode, If the throttle changes fast, then change PWM stuff fast, if the throttle changes slow, then make everything as if it were in granny mode, with the full 8192 resolution (or whatever) of PWM changing slowly. I've been making the fine PWM signal change by at most 1 each throttle read, which makes for ramping similar to the Curtis, which has a minimum ramping time from 0 to full PWM duty in 3.5 seconds, and max ramp setting of 0 to full PWM duty in 15 seconds.

I think it would be pretty easy to make the changes to allow for the various modes. That's a good idea, Eric! We could have the mode be inputted through the RS-232.

By the way, the gerber files are done for the control section. Heck ya! They were all squishy too, and my son ate them. Then he took his gerber knife, and gerber baby food, and gerber files and blah blah blah.

Here's the deal. I'm sending the gerber files to futurlec, and the cost is about $35 each board. I'm getting 3 boards done. The expert with all the fancy test equipment is assembling them, and doing testing on them. The cost of components on the control board is about $43.00 or so. Whatever the heck the BOM says on the website. I have 30 200v diodes, 10 mosfets, maybe 20 old capacitors that were removed from the blown up controller, and lots of 3 ounce copper pcb.

I'm going to do Ben's controller for free, because I have pretty much all the parts for 1 controller, thanks to all the donations. So, should I wait for awhile to make sure nothing blows up? I might secretly set his on granny mode. haha! Or are there 2 people that want to pay for parts to the other 2 controllers? They could either put them together themselves, or I could do it. I sort of want to test the new alternate power section layout concurrently with Ben's controller, which has the old one. The problem is, I don't have the money to make the other 2! Does anyone want a controller for the cost of the parts to build it? This is a 3 controller limited edition run. hehe. Ben's, and 2 others, on a new and dramatically improved control section. Now, could it last a week, and then blow up? Sure! I doubt it this time, because there has been a lot of thought put into the possible failure modes. The guy that made the anti-land-mine machine, the expert with all the fancy test equipment,... etc.. They have all given their help.

I can't guarantee that all 3 would be done really fast. My main work time is during my son's nap, which is from 3pm to 4:30pm each day. Maybe I should figure out how much they will cost, and then see if anyone wants to pay that. One thing I'm really curious about is whether or not the 3 ounce copper is enough for a 500 amp controller. My guess is that it is fine. I know that 4 ounce is good up to a 600 amp controller, so 3 ounce is probably fine for a 500 amp controller. Lord knows I have enough of that crap in the garage. Just no more 4 ounce stuff.

Hey Wolfman! Where the heck did you order that 4 ounce stuff, anyway? With the alternate layout, 6"x8" is plenty! The alternate layout also means I can use the copper bus bars you sent too! Heck ya, dude! They will all soon be in their own controller. I'm also going to tin them with TINNIT Bright plate. That will be cool.
__________________
kits and boards

Last edited by MPaulHolmes; 05-11-2009 at 03:53 AM..
  Reply With Quote
Old 05-11-2009, 07:20 AM   #1185 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Bucharest,RO and Copenhagen,DK
Posts: 42
Thanks: 0
Thanked 1 Time in 1 Post
Volunteer Guinea pig

Count me in for one of the 3 boards. I can put the pieces together myself. Let me now how much is it for a "kit" In fact, if you send me the gerber files, I can also ask a local company for a price (35$ seems a bit high, I have paid smth like 10$ for a double-faced PCB for a "megasquirt" board, but it depends on the quality I suppose)
  Reply With Quote
Old 05-11-2009, 09:36 AM   #1186 (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,368
Thanked 1,202 Times in 765 Posts
For the cost of the control PCB, it includes silkscreening, soldermask, and a 2 sided 8"x3" pcb. It's also really low volume right now. Here's the cost per board for greater volumes:

QTY 3= $35.80

QTY 10=$21.60

QTY 20=$18.53

QTY 100= $13.00

It's not bad once you really get up there. But there's no way I want to order 100 right away. We need to test this thing! The guy that put in so much work on this version wants to assemble all 3, (for free, by the way) look for errors in the copper artwork, any mistakes that you just don't know about until you try it. He's also going to do the testing, modify component values based on what works best, and then we'll get a new BOM together, reflecting the new component values.

Also, we really need to see how all the new code works on the untested new features of the control board. I might have to reprogram some chips and mail them to him. I'd rather do exchanges with a single location for the initial testing.
__________________
kits and boards
  Reply With Quote
Old 05-11-2009, 09:43 AM   #1187 (permalink)
Master EcoModder
 
Join Date: Apr 2009
Location: Charlton MA, USA
Posts: 463

EVVette - '71 Chevy Corvette Coupe
Thanks: 31
Thanked 183 Times in 94 Posts
Wow that board is big. Do you have any pictures of the layout on of the PCB?

-Adam
  Reply With Quote
Old 05-11-2009, 09:48 AM   #1188 (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,368
Thanked 1,202 Times in 765 Posts
Heck yes I do (have pictures)! Sabrina will add all of it to the web site very soon. Maybe later today. I'll include the gerber files, but I really don't think it's a good idea for people to order their own yet, as it's really really really untested, and correct components from real life testing need to be selected. But I ain't nobody's pappy, so do what you want. Dang, I do have kids! Nevermind!

The pictures are in PDF format, and my attachment limit has been exceeded.
-Paul
__________________
kits and boards
  Reply With Quote
Old 05-11-2009, 09:59 AM   #1189 (permalink)
EV test pilot
 
bennelson's Avatar
 
Join Date: Jan 2008
Location: Oconomowoc, WI, USA
Posts: 4,435

Electric Cycle - '81 Kawasaki KZ440
90 day: 334.6 mpg (US)

S10 - '95 Chevy S10
90 day: 30.48 mpg (US)

Electro-Metro - '96 Ben Nelson's "Electro-Metro"
90 day: 129.81 mpg (US)

The Wife's Car - Plug-in Prius - '04 Toyota Prius
90 day: 78.16 mpg (US)
Thanks: 17
Thanked 663 Times in 388 Posts
Yep, we gotta do some more testing before getting everything out to the general public.

It's amazing what can be missed until you actually try something out!

Paul, is the re-hashed Cougar going to be running the exact same software as the "mini-first run?"
__________________


300mpg.org Learn how to BUILD YOUR OWN ELECTRIC CAR CHEAP
My YouTube Videos
  Reply With Quote
Old 05-11-2009, 10:05 AM   #1190 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Mazda Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 17 Times in 14 Posts
Paul,

When asking for your board quotes, ask if there is a setup fee rolled into the price and see if that setup fee will be waived the second time you order. I am 99% sure that is how PCBCART, Prototype to Production PCB supplier from China does it (that's the chinese company I mentioned a few hundred posts ago).

Also, ensure that they do electrical testing of the boards (they just make sure all the connections are made and none are shorted).

I am pretty sure you'll get a better price from PCBCART, Prototype to Production PCB supplier from China as well. Very reasonable turn-around times, too.

  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 3480 05-04-2022 05:43 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 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com