electric coil that works from 0V to 6V

Hello for my internship I have to make a project I have to build a cruise control for a test bench of diezel engines These work instead of a gas pedal like in the car with an electric coil that works from 0V to 6V For this I have to make a cruise control They want us to set a certain speed with a potentiometer and hold it for as long as possible. I also have to be able to measure the tozrental to be able to adjust it. with this comes another problem the sensor gives a value of 50v peak to peak how can I connect it to my arduino?

so in short I must be able to send a voltage so that the speed remains constant.

sorry my english is not the best Jef

You will need a voltage divider to deal with that 50V - i.e. two suitably sized resistors.

That's too vague, plus I don't know much about diesel engines...

The concept is simple and it's the same way a human drives a car... It's called feedback. You constantly monitor the speed and if it too slow you increase the speed (maybe the voltage or PWM) and if the speed is too fast you slow it down.

...That can actually get tricky because it can end-up unstable and always "hunting" for the correct speed.

These work instead of a gas pedal like in the car with an electric coil that works from 0V to 6V

I'm pretty sure you control the speed by controlling the fuel flow just like a gasoline engine.

A "coil" is not mechanical. Diesels have a glow plug instead of a spark plug and it's probably formed as a coil of wire (like a light bulb with no glass). (I had a toy car with a simple 2-stroke diesel engine, the same as a model airplane engine, and the glow plug was a coil.)

It might use a servo motor instead of a direct-mechanical connection to the gas pedal. Servos use pulse timing to control the angle of the motor shaft. There is a servo library for the Arduino. If you have a servo that runs from a 5V control pulse you can easily control it with the Arduino. I think most modern cars use a servo and cruse control always has a servo.

with an electric coil that works from 0V to 6V

It could be a DC motor or proportional solenoid, but I'm just guessing... The Arduino does not have a true-analog output. analogWrite() is actually PWM which will work to control the speed of a DC motor or the apparent brightness of an LED. You can "boost" the PWM with a MOSFET if you have 6V available.

with this comes another problem the sensor gives a value of 50v peak to peak how can I connect it to my arduino?

A 10:1 [u]voltage divider[/u] (2 resistors) will divide-down the voltage. The resistor values aren't too critical (the ratio is important) but resistors that sum-up to about 10K are usually about right for the Arduino. It's also a good idea to add a couple of [u]protection diodes[/u] in case there are positive or negative voltage spikes.

Is that an analog voltage, proportional to the speed?


for my internship

And internship for what? What are your skills/knowledge? Are you a diesel mechanic? An electronics engineer? Mechanical engineer? Programmer? Etc.?

Thank you for the reply

have learned a lot problem is that I really have to use that coil and can't do anything with servo motors

the coil works as follows you give a voltage of 6v the engine will run as fast as possible as you as the driver fully press the accelerator but I must be able to set it so that it continues to run at a fixed speed even if the engine is loaded with, for example, driving up a mountain (then I will have to give a higher voltage so that the engine continues to run at the same speed) I already planned to use an external power source and control it with a digital port with pbm from my arduino

and for the sensor I would then eg a resistance of 900 and 1 of 100 and measure the voltage over that

my program will working on the basis of a pid controller or are there better solutions for this

i just studied electro mechanics i am in my last year and i have to work 50 days for a company

Thanks for the help Jef

Diesels don't have a throttle valve; they run "wide open" all the time. Instead of throttling air flow, they have an injector pump that is controlled by the throttle (or ECU) to inject varying amounts of fuel, from enough to allow the engine to idle to full-on rolling coal.

The glow-plug is only there to assist in cold starts. As they rely on the heat of compressing air at ~20:1 ratio, cold starts may be difficult without an auxiliary means to heat the air and provide an ignition point for the atomized fuel injected. When the operator turns the ignition key "on" a light on the dash is often used to tell the operator to wait while the plugs heat. When they're fully heated, the light goes out and the operator cranks the engine. Once running the glow plugs are no longer needed/used.

@OP: You need to describe the parameters of the 0-6V coil better. How much current is required? Is the fuel control truly voltage dependent or is it dependent on the current flowing in this coil? If the coil is current controlled, is PWM permissible and if so, at what frequency? Does 0V equate to fuel-cut and 6V to rollin'-coal?

Is the engine governed like the venerable Detroit diesel 2-strokes where max RPM is limited by a mechanical governor in the fuel control linkage path?

The simple resistor divider may only be part of what is needed to connect the RPM feedback to the Arduino. Is frequency or amplitude that represents engine RPM? If it's an AC signal with part of the waveform positive and part negative with respect to the Arduino circuit ground you may need to scale it and rectify it. If it's frequency based perhaps you could use a zero-crossing detector circuit similar to that used for AC-mains detection.

Do you have any datasheets on the fuel control and the speed feedback sensor? It's hard to help with such vague information.

To me, the description sounds like a solenoid is used to control the position of a lever on the fuel injection system. More current(6 volts) pulls the lever open. Less current, a spring returns the lever. To the OP, rather than giving the voltage on the coil, measure the current going through the coil at various voltages, or just tell us the resistance of the coil. Ohm's law will tell the current at various voltages. Paul

Also do let us know what this 50V sensor is. I have the feeling there's more to it than meets the eye.

thank you for all the help

Paul_KD7HB is right this is a Solenoid I have to drive all i know about it so far is that they normally control them with an external power supply they do this between 0-6v and 10A will certainly do further research on this but it is rather difficult

and for the sensor this is a dynt10200 don't find much about this on the back is ritten

part no: CO5/8-92C Batch No: 080118 threads -5/8" 18 unf con. 2pin MS Type

coil risistance = 600 +- 25 ohms output voltage when tested on 65 t.g. wheel of 6" dia with 0.5 to 0.8mm gap and rotating at 1500 RPM. @ 10k load observed= 6 to 8V

have already found something online that the max output is 3.6v and maxiamle resistance is 250ohms but this does not correspond at all to what was with the sensor

am not at all sure if this is correct information

Thanks for the help grts Jef

How come that 50V suddenly dropped to 6-8V? That's quite a difference. Did you measure DC or AC?

So this is a magnetic pickup type. So basically an electromagnet that acts as coil. 6-8V output is fine, connect to the input pin through an additional 10k resistor and your pin is sufficiently protected. The clamping diodes take care of the rest. At this voltage level even the negative part of the signal should not be an issue.

If the voltage is much higher, like the 50V you mentioned before, a diode (half wave rectifier - so you only see the positive half) and a zener to clamp the voltage to 4-5V may be a good idea. Lowering the load resistance also helps in lowering the signal voltage.

sorry for the confusion but I just got that information have only now been able to look it up properly cannot measure this voltage because it is forbidden to enter when an engine is running on the test bench but know i sure its between 6 and 8v

so a resistor of 10k and then directly on the arduino i also want toplace a Optocoupler for safty can i do that?

thanks Jef

You may try but I don’t think such a sensor has the ability to drive an LED.

This should work (note that in the second schematic you have to use INPUT_PULLUP):

thank you for the schematic. but i think i dont need a led i just need to know how much rpm the motor does

thanks Jef

jefvr: but i think i dont need a led

You did ask for an optocoupler...

sorry i dont understand is a optocoupler the same as a led i thought an optocoupler was right there to make sure the arduino was a little bit protected i was thinking about to use this one https://www.kiwi-electronics.nl/4n35-transistor-optocoupler-5-stuks

sorry i just dont understand thanks for the support Jef

Do check how an optocoupler works... the input is an LED!

Ow sorry know i see. Tanks for the help. verry sorry .

do you think its mutch beter to make the second circuit?

thanks Jef

am totally unsure if this is correct
can someone help me

thanks for the assistance

Looks backwards to me. The sensor on the engine should be lighting the LED in the optocoupler.

this is not for the sensor its for the solenoid [img alt=No description available.]https://scontent.fbru4-1.fna.fbcdn.net/v/t1.15752-9/145353302_3762726557080816_3453463583201796553_n.jpg?_nc_cat=105&ccb=2&_nc_sid=ae9488&_nc_ohc=_GBOlhtoWE8AX8-mt52&_nc_ht=scontent.fbru4-1.fna&oh=57464c9363118bc2391d830884a96dce&oe=604387A0[/img] this is for the sensor but i dont know what to conect to pin 4 5 6 from te optocoupler sorry for the confusion jef

For the speed control solenoid I don’t think we have enough information to help you.

I infer that the solenoid has a nominal coil DC resistance of 600milliohms. I further infer that when 6V is applied to the coil (producing a nominal current of 10A) the solenoid mechanism contrives to set the fuel control to “maximum” and that when the coil has no voltage applied (0A) the mechanism sets the fuel control to minimum (or perhaps cutoff.)

I don’t know how to modulate the fueling between these two points. Does the solenoid require a constant current for a given fuel control setting or is it possible to apply a PWM to achieve the same? So 0% duty is “off”, 100% duty is “full-throttle” and if you apply a 50% duty cycle the fueling will be set to ~half-throttle?

What is the solenoid manufacturer? Do you have a manufacturer part number? Do you have any technical documentation at all regarding the control and sensing?

I can’t believe your employer would task you with a non-trivial task like this and not make such information available to you.