Controllig a single servo with mutiple if, ands, or buts

Hey all,

I'm Mark and I am 100% new to Arduino. I am so new that I really couldn't generate the question I am trying to ask to conduct a meaningful search here. Sorta sad, but I am now here to learn and try and complete a project I have been mauling over for a year or two now.

So, lets get to it. I am looking to control a factory servo controlled turbo. It is a holset vgt turbo. The factory servos burn out quickly and are not only very expensive to replace but also difficult to control with aftermarket stuff (so i have read, over, and over, and over again). So, the end result of this is a really awesome turbo, that is very affordable and can support a wide range of applications, if you can control it somehow.

I have looked into several different avenues, but none are great because they only provide one range of motion. what i am looking to do is to be able to have two maps, or reference tables and possibly a lock out function for on servo.

The basic layout is a turbo with a mechanical arm that will be moved by a heavy duty rc car servo that will be waterproof and located on the cold side of the turbo as to not melt it instantly. This servo shall be controlled by i was thinking a arduino r3uno that will reference a 0-5v output gm 3bar map sensor. I think that is all with in my understanding and doesn't get me beyond the 1 range of motion, but it is still awesome as i should be able to scale the servo motion to the map sensor in a very adjustable manor.

Now I guess i am finally getting to my question. if this one servo is running off of the map sensor, can i add other scales and a full open option.

trying to be clear, would i be able to apply a signal, to the board via a toggle switch or something and run a different scale of motion, and could i also add yet another signal to tell my servo to be full one direction so the turbo is max flow and i could have the best fuel economy?

I am really looking for yes or no if it can be done. Also any links to anyone doing anything similar, and anyone who has any thoughts on a better/ easier way. I am going to be moving forward with this direction as it seems to be the best option even for my one range of motion but more is always better.

Many thanks in advance and sorry for being so long winded!

puzman56: The factory servos burn out quickly and are not only very expensive to replace

....SNIP.....

heavy duty rc car servo

An R/C servo is a hobby device probably designed to work for 10 to 60 minutes once per week. Don't assume it will be better than the expensive factory servo.

Why do the factory servos burn out quickly? What, exactly, do you mean by "burn out"? What do you mean by quickly - how many operating hours?

I imagine you will have to know the control responses of the factory fitted device (do you?) and will have to replicate them with an Arduino (do you know how to do that?). Do you know the specification for the signals that the engine management system uses to control the factory servo? I would expect the engine management system to require some feedback signals from the factory servo? Do you know what they are and how to replicate them?

In short, this sounds like a very complex project before you write a line of Arduino code.

...R

Hey Robin2,

Thank you for your response. Many of your concerns are valid but not really a problem in my application.

So, I am using a stand alone efI system and do not need to get any feedback from this rig. It does its thing via engine speed, temp, throttle position, map value and 02 sensor value. It can find its way around what I'm trying to do. There are many people doing what I am attempting via a spring or vacuum wastegate accuator. That is the single motion, no switching on the fly and not very modular.

As for burning up, they make it 60k-90k miles, so that is many many cycles but they are on the hot side of the turbo and use a very small movment. They also use it to control boost pressure which results in many times more motions than I need it to do. I am only looking for a sweep, the use it to move the arm constantly, basically always moving while driving. As for what fails, it wasn't something I really looked into. I thought the servo, but it could be the board that is on top of it. Both are located 1" away from the hottest part of the turbo.

I to am concerned with the rc car stuff but I am very flexible on that end. So long as the servo is less than the $450 the factory unit costs I'm ok. The 1/4 scale unit I was looking at produces 3x the torque I need so I think it will last a bit and was 1/10 the price. I also am not depending on this. It is on a project/toy and if it fails will not have the ability to be dangerous.

For clarification the servo controls a slide in the exhaust housing, at full open the housing is 24cm^2 and full closed is 2cm^2. So full open is like having no turbo and full closed would be like a Jake brake with no exhaust flow, though I will have a limiter in the 5-8cm^2 range to prevent engine damage in the event of a failure. This does not control boost pressure, although it can effect it.

So can I have dual tables to control some sort of servo or 3 activated by some sort of voltage in puts to the r3uno?

Can someone direct me towards industrial grade servos? Rc stuff is the only area I have any experience in.

Lastly many thanks for any help. I appreciate all of it especially the oversight on things I may be over looking.

puzman56: So can I have dual tables to control some sort of servo or 3 activated by some sort of voltage in puts to the r3uno?

If you are satisfied about the hardware then I suspect the software should not be a problem.

Can you give some examples of what you mean by dual tables?

How will the Arduino detect what it needs to know to make its decisions? What sort of sensors and what sorts of data will they produce.

...R

Ya sorry, i speak in car and welder not so much in electronics and programing. I will try to make this more understandable.

So what i would like to do

  1. I want to move a servo based on a map sensor voltage output. i want the servo to move from 0 to 180 degrees (ideal world) when the sensor goes from 0v to 5v. This seems like it is very doable and i should have plenty of control over speed of the servo and my range of motion (not that i know how to do this yet). this is what i am talking about when i say map. Its a car tuning term and it is a little confusing i suppose but its the word i use for describing the programing that makes every thing work together.

  2. I would also like to have a different range map to run the servo. In this i would like to switch from map A. to map B. B map is going to be the same idea but have say a 60deg to 180deg range for the same 0-5v input from the sensor. (map sensor, barro sensor, or whatever other confusing term i can think of)

  3. I would also love to have an option that just pins the servo at 180deg. this way i could get maximum fuel millage .

now, i would assume i can just load different programs for each function, but i would really like to have the ability to pick between these 3 options while driving the car. i was thinking i could use a toggle switch to make this work if i could send voltage to different inputs on the board but that is just car stuff i am thinking of that may not work here at all. I hope it does though.

Can i do this? one way or another.

puzman56: now, i would assume i can just load different programs for each function, but i would really like to have the ability to pick between these 3 options while driving the car. i was thinking i could use a toggle switch to make this work if i could send voltage to different inputs on the board but that is just car stuff i am thinking of that may not work here at all. I hope it does though.

Can i do this? one way or another.

You load one program (which is all an Arduino can take) with 3 different functions. You select which function is used with switches that the Arduino reads and acts accordingly. Eg. If switch one is pressed, do function 1, if switch 2 is pressed, do function 2, etc.

Thanks for the clarifications. Computer folk are very familiar with the concept of mapping. I just needed to know what would be mapped to what.

The Arduino system has a map() function (see the Reference web pages) which will convert one range to another. For example the Analog to Digital Converter (ADC) will give a value between 0 and 1023 as the voltage varies from 0 to 5v (Note that 5v is the absolute max). Then the map() function can convert that to a range from 0-180 or from 60-80 or any other range you like.

It would also be possible to map to a non-linear set of values. For example if you saved (say) 10 different values 0, 20, 20, 20, 30, 40, 40, 60, 100, 100, 160 in an array you could select the appropriate value based on the input from the sensor.

In either case you could have several sets of ranges that could be selected with a switch as @Henry_Best has suggested.

...R

Thank you both. I am very excited to finally have a solution to this problem i have been trying to work around. I have some gear on order and will be trying to figure out how to program all this by the end of the week. I will be back with questions i'm sure. Hopefully i can post some positive results in the next couple of weeks.

Thanks again! :)

puzman56: I have some gear on order

While you're waiting, look at the servo knob example. The potentiometer outputs 0-5V, and is thus an exact mimic of your sensor. The code then maps (yep, as Robin said, we use the term too 8) ) that to a servo position from 0 to 180. That could just as easily by 60-180 or whatever.

Welcome btw....