View Single Post
Old 10-03-2013, 02:56 PM   #1 (permalink)
Quezacotl
Scandinavian creature
 
Join Date: Jun 2012
Location: Finland
Posts: 146

Golf ball - '94 Volkswagen Golf III
90 day: 28.46 mpg (US)
Thanks: 4
Thanked 27 Times in 22 Posts
Electrical cruise control

Hello!

So i did a cruise control. Well, actually it is constant throttle control at this point of development...

I saw that all aftermarket cruise controls are quite expensive, so i started to make my own.

I got familiar with Arduino platform, and saw that it is quite easy to start coding with Arduino IDE. Just install and that is it. Well it has many limitations and confusions compared to normal AVR, mainly on interrupts and pin numbering.
Well to the point...

So i made a feature list it needs:

2 buttons: more speed and less speed
1 input for release fuction triggered by brake and clutch
1 input for speedometer signal, or alternatily, fuel economy signal from MPGuino
ON/OFF switch to the whole thing
motor that holds the throttle at desired position, but can be freely rotated --> stepper
driver for the motor
programmable IC --> Arduino Nano (Atmega328P-AU)

So i first got an servo motor, but then i realized that servo does not spin freely, so i got an stepper motor, Arduino Nano and a L293D H-bridge-IC.
I had no idea of what strenght motor i would need, so i ordered about 40x40x40mm hybrid unipolar stepper motor for 12 Volts. It has 4 leads, so it needs an H-bridge circuit, or an H-bridge-IC.

I started building it, and first thing i noticed is that the driver IC heats a lot, and the motor gets about 5A of current. So i needed another way to handle it.
I tried the simplest thing first, resistors. 15R/10W for every lead of the motor, in total of 30R for both coils. It got the current to about 600mA, but in exchange, the resistors got about 2 Watts each, and they were hot. So i tried yet another way.
PWM. The acronym of the modern times. Pulse Width Modulation, meaning it switches the power on/off very fast, thus dropping the power with minimum heat. I made an pwm function that switches the enable pin of the L293D IC. And i added an potentiometer that adjusts the pwm duty. The perfect solution. Now the power power need can be adjusted with only an adjustment of a simple pot.

Then i was ready to install it in my car. I was thinking all kind of solutions how to attach it there, and i came into conclusion that i attach a steel wire directly to the motor shaft, and to accelerator wire.

For the code, for now, this is not yet a constant speed control, it is constant throttle control.
I have made an input for the speedometer signal, but not yet implemented the code for it. I am learning the coding little by little until i can do that.

I have made the whole circuit with proto board, but i made a better circuit with fet-H-bridge, and sent the drawings to a fab house, so i get the professional-looking boards at some day...


Today i got to finally test my proto on a 100km trip, and it works like a charm.


Here's some pictures about my build, and a schematic for the IC driver version. I have'nt tested the fet version yet.

Attached Thumbnails
Click image for larger version

Name:	tn_IMG_20130917_220522.jpg
Views:	1022
Size:	39.2 KB
ID:	13848   Click image for larger version

Name:	tn_IMG_20130917_223542.jpg
Views:	920
Size:	30.7 KB
ID:	13849   Click image for larger version

Name:	tn_IMG_20131003_140012.jpg
Views:	1013
Size:	24.2 KB
ID:	13850   Click image for larger version

Name:	tn_IMG_20131003_140023.jpg
Views:	961
Size:	32.1 KB
ID:	13851   Click image for larger version

Name:	tn_IMG_20131003_140030.jpg
Views:	941
Size:	39.7 KB
ID:	13852  

Click image for larger version

Name:	cruise.png
Views:	773
Size:	27.2 KB
ID:	13853  
__________________

Brrrmm
Now selling preassembled MPGuino's!
http://www.mthtek.net/mpguino/
  Reply With Quote
The Following User Says Thank You to Quezacotl For This Useful Post:
jeff88 (10-03-2013)