Spencer Posted July 15, 2013 Share Posted July 15, 2013 Took you 6 hours to update How many hours spent building and programing the kit? I am all for DIY but CBF programing micros in my old age. Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 15, 2013 Share Posted July 15, 2013 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. Quote Link to comment Share on other sites More sharing options...
Benno Posted July 15, 2013 Share Posted July 15, 2013 Looking pretty good man. How stable is the PI control? Does the servo oscillate much? Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 15, 2013 Share Posted July 15, 2013 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). Quote Link to comment Share on other sites More sharing options...
Simon Posted July 15, 2013 Share Posted July 15, 2013 Epic! I'm thinking about doing this also, but would use an off the shelf $30 uC rather than build one from scratch lol. Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 15, 2013 Share Posted July 15, 2013 What do you mean exactly by that Simon? Like a pre-programmed chip with some inputs/outputs? Quote Link to comment Share on other sites More sharing options...
Simon Posted July 15, 2013 Share Posted July 15, 2013 Not pre programmed, you still need to write the source code, but you can come up with pretty bang on PID values + simulation with math software like Matlab. Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 15, 2013 Share Posted July 15, 2013 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. Quote Link to comment Share on other sites More sharing options...
KKtrips Posted July 15, 2013 Share Posted July 15, 2013 How much to build something similar for my 308 mate? Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 15, 2013 Share Posted July 15, 2013 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. Quote Link to comment Share on other sites More sharing options...
KKtrips Posted July 15, 2013 Share Posted July 15, 2013 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? Quote Link to comment Share on other sites More sharing options...
Benno Posted July 15, 2013 Share Posted July 15, 2013 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 Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 15, 2013 Share Posted July 15, 2013 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 Quote Link to comment Share on other sites More sharing options...
ProZac Posted July 17, 2013 Share Posted July 17, 2013 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. Quote Link to comment Share on other sites More sharing options...
ProZac Posted July 17, 2013 Share Posted July 17, 2013 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 . Quote Link to comment Share on other sites More sharing options...
coldturkey Posted July 26, 2013 Share Posted July 26, 2013 Oh, I studied engineering so I know all about that stuff. I also work as a control systems engineer, so I also know that in real life situations that shit hardly ever works as intended and educated trial and error yields sufficient results Quote Link to comment Share on other sites More sharing options...
Benno Posted September 9, 2013 Share Posted September 9, 2013 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 Quote Link to comment Share on other sites More sharing options...
Llama Posted September 9, 2013 Share Posted September 9, 2013 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 Quote Link to comment Share on other sites More sharing options...
coldturkey Posted September 9, 2013 Share Posted September 9, 2013 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 doingNot 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. Quote Link to comment Share on other sites More sharing options...
coldturkey Posted September 9, 2013 Share Posted September 9, 2013 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 STK500I 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.