Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 8
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
Vaxian (17)


Next birthdays
05/21 Dalus (34)
05/21 Kizmo (37)
05/22 Skynet (32)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

FAST rotary position sensor

Move Thread LAN_403
ramses
Sun Aug 01 2010, 09:06PM Print
ramses Registered Member #1208 Joined: Thu Jan 03 2008, 05:30PM
Location: Chesterland, OH
Posts: 154
I need to read the angular position of a shaft rotating at around 3000 RPMs within +- 1 degree at any given instant with an ardiuno. I want to use an absolute analog sensor for simplicity. I have found a few possible sensors: here and here, as well as a continuous rotation potentiometer.

Unfortunately, the specified maximum sample rate of the first two are 2870 hz. What is the danger of exceeding this by, say, a factor of 20? Is there any easy way to have the arduino specify an output voltage at which some circuit would pull one of the digital I/O ports high? Something like a voltage controlled comparator? Only becasue digitalread is faster than analogread. Could this sensor be shared among a number of such comparators easily, possible between separate microcontrollers?

I also have to ask, how long do you think a continuous rotation potentiometer would last at 3000 RPM? The specified life is 1M rotations, so in theory it'd last 5:33:20 cheesey

Back to top
Bjørn
Mon Aug 02 2010, 12:59AM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
You need to explain what you try to do so we will be able to help you better. For example if it is a constant rpm device then you only need to read it with an optical sensor once per rotation and interpolate and you will get perfect positional data.

The sensors you linked to seems to have a fixed sample rate so they would be useless. A potentiometer would not last long, at that rpm it might fail within seconds.

A programmable comparator is easy, just use filtered PWM to give a voltage for a normal comparator.
Back to top
ramses
Mon Aug 02 2010, 01:22AM
ramses Registered Member #1208 Joined: Thu Jan 03 2008, 05:30PM
Location: Chesterland, OH
Posts: 154
This is a camshaft position sensor. It will be geared down by a factor of 3, because this will be a 6 cycle engine. it will not be a constant RPM device, because of changing load, throttle position, etc. I was hoping to avoid interpolation becasue it requires processing power, which I don't really have to spare. In an ideal world, one arduino would control every aspect of the engine and transmission (including valve timing), but at 10K rpm, it has around 4800 clock cycles for every cycle, and must deliver at least 4 precisely timed pulses at specific times which are always changing based on a lookup table and sensor data. I'd probably be better off using a parallel port, but that takes away portability and requires external ADC's, and software based PWM.

One of the sensors has straight up analog input, as in it outputs 0-5V based on the angular position of the shaft, and is linear. Would something like that work with a comparator?

The potentiometer was suggested mostly as a joke. In the best case scenario, it would jitter like crazy, but there's only one way to find out.

I now realize how stupid my first post was, "voltage controlled comparator", as opposed to what?


Back to top
Bjørn
Mon Aug 02 2010, 02:05AM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
If processing power is a problem then replace the CPU with one 100 times more powerful, it makes little sense to waste time and money on an underpowered CPU when processing power is practically free.

If you are talking parallel port on a PC then it makes little sense since it is so slow that a microcontroller will be faster and the timing of a PC is very bad and unpredictable.

If you can afford it buy a suitable sensor, if not then buy the best you can afford and interpolate the rest.
Back to top
...
Mon Aug 02 2010, 02:11AM
... Registered Member #56 Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
One thing you might want to look into is the ford EDIS system, which is available cheaply (I got mine for about $20 at the junkyard), which will take care of the timing for you. You just feed it a signal to tell it how much advance you want, and it has its own variable reluctance based CPS.

If you are sticking with a complete DIY system, you might want to look into VR based systems, generally you will use a wheel with 36 teeth (ie, 10 degrees per tooth), with one missing tooth so you know where TDC is. You can then interpolate across the 10 degree range, which you can use a simple linear fit for and get to much better than +/-1 degree. If you really wanted to go all out you could use a 360 tooth wheel, and have 1 pulse per rotation, but that seems a bit excessive and getting a reluctor that works at 20kHz would be a challenge.
Back to top
ramses
Mon Aug 02 2010, 02:12PM
ramses Registered Member #1208 Joined: Thu Jan 03 2008, 05:30PM
Location: Chesterland, OH
Posts: 154
I am kind of partial to arduino, but can you suggest something more powerful? The Maple leaf? I mean, it would seem that a 16MHz microcontroller could control a 1 cylinder engine, but...

The EDIS system would be great, but I also need to control the pulse width of the output, how long the valve is open, etc. This is also going to be a 6 stroke engine, so using 4 stroke hardware could be an issue.

I'm still not clear on why the first sensor I linked to would have a maximum sample rate. The sin/cosine interpolation is likely hardware based, and should run very quickly.
Back to top
Bjørn
Mon Aug 02 2010, 05:30PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
Maybe it has an internal microcontroller with a 1 kHz sample rate. It does not matter, the datasheet says it is slow.

There are countless fast 32 bit microcontrollers out there. I use these: Link2
Back to top
hboy007
Tue Aug 03 2010, 11:17PM
hboy007 Registered Member #1667 Joined: Sat Aug 30 2008, 09:57PM
Location:
Posts: 373
The first thing that comes to my mind is the GP1A038, which is is an integrated optical quadrature encoder but it delivers up to 20kHz count rate. Inertia will smoothen the agular velocity over time, so this might be an option. However, the preferred solution in automotive applications is to use hall switches and multipolar permanent magnets as quadrature encoders because of the ruggedness and tolerance towards humidity, solvents, dust and oil. I am currently working on a servo motor driver that uses hall switches in a rotary encoder assembly to derive axis position, angular velocity and acelleration. The motor can run at well above 5000rpm.
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.