Designer hired for Servo control unit design

hi !

my project target:

Story/description of my Device

  • I have a servo controlled valve/guillotine on my 2-stroke motorcycle Cylinder (5Kohm dc 12V. 3,3W servo) , servo might be little wrong name to say..here is a sample video from web about Servo's movement range: Cagiva PV - YouTube

  • servos range (video above) is clockwise and anti clocwise but never 360 around or anything else than shown in video above. Servo has a 1 solid regular 0-position or homebase where it sits/rests during siesta. 5Kohm potentiometer at servo is for the rotation range limiter, +/- polarity switch function.

*a ECU or computer unit (if i call it with such name..) follows a engine's timing impulse/rpm signal from CDI and when timing pulse/rpm is 7250, the ECU makes the Servo to rotate......
Timing pulse voltage/duration is xxxx (edited 23.03-2011, because of wrong written info)

My project is to make my own ECU with various rpm options or even adjustable option, compered to the 1 only solid 7250rpm command. My motorcycle manufacturer has 5 different rpm model ECU's depending about engine tuning level, rpm value is 1 solid value in each model but factory made models are from 7250~9000rpm
This kind of "aftermarket" adjustable devices are already designed and manufactured by some italians, with PicMicro mainly.

My guestion:
can somebody recommend me a needed Arduino microprosessor i-o board model and needed exstras on hardware.
Also a advice or HIRED help reagrding my project would be wanted as i am a nooby on Microprosessor controller world but i have been studying Arduino for past 2 weeks to get somesorta idea about it.
For my helper i would be paying money, if wanted so, as im already used/mentally depressed to being alone without anykind of help what so ever in my hobbyes to make them happen from zero to finish only by my self (my country aint socially very open minded...towards helping strangers and i unfortunately know this too well as a native)

Contact me and introducde your self and make your demands regarding paycheck (paypal Gift titled)
i can reveal tell much more about this very basic valve system on my bike including photos,videos ++ and same for the italian made projects that work.

the italian models have various functions on them like:
Functions at Microkontroller such as:
-LCD display with:
-Servo control with engine ignition timing pulse/rpm surveillance
-pre-set 50rpm step +/- push button for above function to control Servo rotation start-up r.p.m value.
-servo self cleaning action: valve open and closed at 500rpm and 2000rpm or what ever wanted and programmed.
-digital rpm tacho on the LCD
-AirBox temperature sensor reading

as you may now think or even better realised that i have tryed now many many weeks to get any what so ever help or bought material from the italians BUT none of them has anything to do or sell (lack of will)

Device that im targeting here as titled and explained is something that i have been dreaming now for 15 years. Those italian designers and manufacturers only popped up into out open only like less than year ago.

to explain even more about my factory made system on my 2T bike is this:
Servo has 5 wires which from:

  • 2 are for servos motor (+ and - feeds)
  • 3 are for 5Kohm potentiometer (1 wire for Ohm resistance near 0 value and 1 wire for resistance near 5Kohm. 1 data wire)
    *CDi that gives 1 wire to Computer that controls Servo movement. this 1 wire gives the timing impulse at engine BTDC & TDC. Impulse voltage value is mentioned earlyer above..

*all Servos 5 wires are connected into ECU and also the 1 wire from CDi.
ECU gets dc +12V from ignition switch wiringloom, so that is its power Source.
Those are all wiring connections on the WHOLE system.

that simple it is.

with this project i do not only represent my self, i am talking from a behalf of our whole global Club of owners in our brand of rare race/road production motorcycle models.

Bye:)
m

ps. please feel free to ask any guestions also in this topic if wanted/needed.

are you having any luck with this?

All of this could be fairly easily done with a regulary 328-based Arduino, though you might need a 644 or mega (1280) just for the the extra RAM needed for the profile tables (?).

Anyhow, the motor device -is- a servo, albeit slightly "deconstructed". You could either replace it with a heavy duty R/C servo (though I don't know how well that would work on a bike long-term), or interface the current device with the Arduino. Interfacing the current servo device can be done, but it will require extra parts and more coding.

You would need to tie the input of the timing pulse signal to an i/o pin that triggers an interrupt. In your interrupt handler you would use the timer functions to time how long it takes between pulses, in order to ultimately determine RPM. The calc for RPM will likely happen outside the interrupt handlers (handlers should be lean and mean); you're just going to time and store the difference in value from the last time (remember to take into account rollover - can't remember if this is fixed or not).

If you go with a heavy-duty R/C servo, get one with metal gears, full ball-bearings on the output shaft (both ends of shaft) - you might consult with someone at a hobby shop who knows about R/C servos, tell him or her what you're doing and what it's for (engine control), and they might be able to recommend something to stand up to the harsh environment. If so, then you may want to consider this (although the servo likely won't be cheap - a good place to find the servo you'd want would be here: http://servocity.com/index.html; possibly something like this one: http://servocity.com/html/hs-985mg_super_torque.html), otherwise go for using the current setup. If you do use a servo, you would need some kind of regulator to take the 12VDC system on the bike down to 6VDC for the servo (look into switching buck converters - heck, if you can find a beefy 7806, that'd work too); that servo is likely going to want 1 amp or more of drive current; the spec sheet doesn't say, but you can measure it. Ultimately, the software to drive it will be the Servo library.

If you decide to use the current device, you'll need to measure the current draw of the motor under load, then select an appropriate h-bridge driver and/or circuit to hook the motor too. Hopefully you'll get lucky and be able to use something cheap (likely you could use a L398N in bridged mode, but do a current measurement test, first). Once you have that hooked to the motor, you can control the motor and direction easily with PWM, using analogWrite(). Then, you'd need to hook the two ends of the potentiometer to form a voltage divider; one end would go to ground, the other to +5 VDC (you could tie it to the 7805 regulator powering the Arduino, if you wanted - since it is only a signal level, and not anything needing a ton of current, it won't hurt anything). The middle (wiper) pin on the Arduino would go to an analog input pin, which you could then monitor using analogRead().

Your code would then need to monitor that pin, then vary the PWM output and directional control to the h-bridge to make the motor rotate in such a manner so as to bring the motor shaft in alignment with the setpoint you command it with, as read by the potentiometer. Now, note that what the potentiometer reads and what you command won't necessarily be perfect, because the potentiometer is not likely a precision position sensing device. So, your setpoint is actually going to need to "float" around in a window of space, by some percentage. Best way to figure this out is to monitor the values from the potentiometer using the Arduino, and note what the smallest change is that can be observed. If the difference between changes is constant (or near so), then that value, divided by two (with perhaps a bit extra padding on each end) will become the window's end points, which your setpoint can be within in order to be considered "on target". This is called a windowed comparison scheme, and while it isn't greatly accurate, it might be OK for your needs.

If not, then welcome to the wonderful world of PID algorithms! Fortunately, there's a library out there to help. A PID is more accurate than a windowed approach, but it is also a whole lot more difficult to understand and implement, even with a library at hand. Good luck, if you need to go this route.

So - whichever way you choose, your code is going to have to read the changes in difference in order to figure the RPM (or just use the raw difference value, as it means the same thing on lookup), use that value to lookup something in the table, then output that value in order to control the servo positioning (via the Servo library or PWM and monitoring of the potentiometer).

That's the basics; this should be enough to get you started. In the end, there's a lot of other code and legwork to do, not to mention a ton of other learning. But it can be done. You'll likely only want to use a real Arduino board for testing and prototyping; the final device, even if only a prototype, should be a standalone unit, and like potted in some epoxy or silicone or other potting compound to protect it from dust, weather, and temperature changes.

Good luck, and let us know how it turns out!

Hi !

Thx very much for above, im going to save it all into my files.

on my 1st message on this topic i have stated the Impulse wave values totally wrong, no where near correct real values and totally noncomplite.

currently im in a very good situation on this project. im Cracking this project kinda from 4 different solutions of Device designed.

the original Servo will be used-kept and never replaced with anything else.

i only have very Basic multimeter my self, and NO Oscilloscope but i have managed to collect Oscilloscope data... With my Multimter i can see that Servo uses +6Vdc during its function rotating cable pulley (with and without Cable load) But i cannot say for sure if my Multimeter can detect-show the Servo's Peak Voltage value.

im no where near to do such a project alone as Microcontrollers + addings are totally new area to me.

The value of this project to me is totally priceless, cannot even put a value to it as ive been dreaming it like 15 years, took that long to learn basics all by my self and now get Cracking and find a Helping hand hired.

i used to have a local friend (he moved away) who was a Gratuated student from School of electronics. with him i started a project for Gear indicator (my 1st real project) with 7-segment display. Took him 5 years to "2do it" as/and i pulled it through with correct design. He was like useless exept with his PC programs to design pcb-board layout.

been too rocky and depressing past 15 years basically alone on my stuff. i literally live in a Forest among 3000 people village far away from civilisation. my village has like 200 people near my own age and im the only1 into electronics and motorvehicle electronics. no way of geting help here, totally Depressing.

just the Oscilloscope data i had to collect from 5 different Nation people/person. every1 only told me like 1 word (money didnt help anything, data was secret) and i had to mirror compere check them all. took 2 weeks and ~12h per every day to run all through and make them all understand why im asking the Stuff.

if only people would learn to speak english, and forget the chit chat BS.

bye:)
m

9300i:
the original Servo will be used-kept and never replaced with anything else.

i only have very Basic multimeter my self, and NO Oscilloscope but i have managed to collect Oscilloscope data... With my Multimter i can see that Servo uses +6Vdc during its function rotating cable pulley (with and without Cable load) But i cannot say for sure if my Multimeter can detect-show the Servo's Peak Voltage value.

You shouldn't need an o-scope for anything on this project (though you might still want to look into getting one - they can be handy on other vehicular issues); your multimeter should be fine.

What you want to measure is the current draw for the "servo" - the easiest way to do this is to put your meter into current measurement mode, and hook the leads to the largest current input on the meter (so, set the controls to measure amps - somewhere around 5-20 amps first, decrease as needed - then plug your leads into the largest amperage measurement plugs on the meter; typically 10-20A). Then connect the leads in series between the motor's negative and ground, so you have:

  • positive---->motor---->meter----> ground -

Make sure your meter is in current measurement mode when you do this, then actuate the servo and note the readings, both with and without loaded (to get the min/max current values). Once you know this, then you can decide on what to use for an h-bridge. Likely you'll be able to use a bridged L298N (with a heatsink) - I don't really expect that servo to draw that much current. There are other options, though.

:slight_smile:

Hello I live in France if that is any use to you.

20 years 4GL development and about 5 years embedded controller (PIC) and PGA coding. Design in PWM Coding for robotics (Servo) control. I also speak English fluently.

If you are still looking for help them PM me.

Cheers Pete.