Jump to content

ColdTurkeys 240C wagon


pies

Recommended Posts

  • Replies 359
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

To be honest it took a while. Most of it was re-learning shit that I learned over 7 years ago at Uni.

 

Maybe like 20 hours all up including all the installation. Of course it would be like a third of the time if I did it again.

 

But it was a fun challenge, so the time didnt really matter.

Link to comment
Share on other sites

To be honest I can't actually tell how much the servo is moving while driving. It would be interesting to know though, I could write some code to flash an LED every time the Servo moves more than one increment.

 

The only thing I can tell is when it backs off the accelator sharply and I get some spluttering, but after getting the parameters right I dont get any more of that.

 

 

The PI control is sweet, it does overshoot a little when hitting the top of a hill etc but thats to be expected (it cant tell the future).

Link to comment
Share on other sites

Ah I follow you. Problem with that is you still need circuitry to drive anything that requires resonable current etc. Most of the stuff is external to the main circuit anyway, as you can see from my schemiatic the main board itself is pretty basic.

 

It would be handy to be able to plug directly into your computer though I was getting really sick of pulling out the chip each time I wanted to change something. Should have engineered in some programming headers.

Link to comment
Share on other sites

Ha. It's hardly something that I would want to build and offer up to someone else, due to the backyard spec-ness of the whole thing.

 

But I mean I could help out with aspects of it and program a chip if you were serious and were prepared to mount all the gear yourself. The only problem is that it would probably take a lot of jiggery pokery in the code to get it working right, I doubt it's a one-size fits all thing. And you aren't just around the corner in case a code change needed to be made.

Link to comment
Share on other sites

A more simple hardware solution might be to use something along the lines of what Simon suggested, perhaps an Arduino. With a built in voltage regulator and USB programming capabilities the only hardware required would be a voltage regulator for the servo, a voltage divider for the input signal and a couple of switches and LEDs. Any software changes could be made in minutes with any laptop with a USB port. KK - adding a potentiometer/rheostat to adjust the gains would be very simple to add to the code. Also happy to help out with code or schematics if you want to have a crack at it yourself

Link to comment
Share on other sites

Ah I see - all good man. Keen for a burn in your car to try it.

 

Could you set it up so the "sensitivity" of the servo movements is controlled by a rheostat?

 

 

Yep anything like that is possible. Problem with that is by doing that you are essentially messing with the PID variables, and if depending on the road ahead (hills and shit) you can mess it up and get overshoot/undershoot oscillations.

 

Unless you opted for a different form of control. I have thought about some kind of custom control based on acceleration/decceleration and the target speed. But then that is basically what PID control is so didn't bother re-inventing the wheel.

 

 

Edit:

As phib3r said there are options that can simplify aspects of it like a prebuilt controller board. Theres certainly way more than one solution. Im not sure what they are like but there is a lot of code overhead for the continous servo and speed stuff. You want a pretty high clock speed (the PIC is 4Mhz), at least a couple high speed timers and multiple IO interrupt capability.

 

Vacuum control could be another option, instead of a rangi servo pulling on a string ;)

Link to comment
Share on other sites

Look up the Zeigler-Nichols method for tuning PID controllers and give AVR application note AVR221 a good read, its pretty damn helpful. Last year, after 2 months of sweet math in a controls course at uni figuring out perfect PID parameters for given transfer functions, they then tell us: In practice you never really have the exact transfer function, so use the Zeigler-Nichols method.

Link to comment
Share on other sites

Also, after having a good read about the factory cruise control systems fitted to VN commodores (V8 or V6), I'm convinced they'd be really really easy to retrofit into another vehicle. Doing it to a mates HQ One Tonner we've just put a 304 into, might do it to my red starion if the mood strikes.

 

You custom solution is way cooler though :-).

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Are you running an inertia switch or some way to cut off the fuel pump in case of an accident? If not, might be worth considering doing

Not right now, just wanted to get it going but don't worry that's next in priority. I'm just going to set up a simple micro that looks at oil pressure, charge light and has a 15sec prime time when key first switches to on, as well as a bypass toggle switch if it craps out. I'll also add in an inertia switch maybe /probably not.
Link to comment
Share on other sites

What programming board/micro did you use? I'm kinda keen on a AVR dragon since it has on board debugging, although it's not as fully fledged as the STK500

I used microchip stuff but if I did it again I might use something a bit different. I do like the fact that the chips are only 5 bucks each or so.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...