Calculate and interpret

manie

Senior Member
See attached picture:

The stepper motor sets the potentiometer to the midpoint (zero) position. This code works fine. The Pot will therefore always start off from the midpoint (adc = 128 from +5V input).
Code:
                  Pot
   +5V-----/\/\/\/\/\/\-------0V
                  ^
                  | wiper
 adc input ------
In the pic. the whole lot is contained by the caliper and can only move in one direction (towards the stepper). In real life it will be able to move both left and right from the midpoint.

I will then get the ADC shift from 128 (midpoint) and calculate the mm movement.

Suggestions and comments appreciated.
EDIT:
This is part of the drive-over alignmnet project.
 

Attachments

Last edited:

manie

Senior Member
tjetson: Nowhere near finished ! Only just started the project. Serial/RF link/LCD/Keyboard and a few other things still to be added.
 

tjetson

Senior Member
tjetson: Nowhere near finished ! Only just started the project. Serial/RF link/LCD/Keyboard and a few other things still to be added.
My point was you don't appear to have asked a specific question.
EDIT: Just realised that you asked for comments and suggestions. My bad.
 

manie

Senior Member
I have to try some code to read the "shift" value. I suspect that the QUESTIONS will start then...... In the meantime, this will give you guys an idea of what I'm trying to achieve, so we can get onto the problem without (when it happens...) cluttering explanations. Thanks for the comment.....
 

Dippy

Moderator
Hi manie.
I'm a little confused as to what you are expecting for replies at this stage.
Or are you just priming us all for design advice over the next few days/weeks.....?

So, at the moment, you have servo moving a wiper and you read the wiper voltage to move it to the centre. That's easy. You've done that.

Then you have a mechanism which, when the car slowly drives over it, moves the wiper and you read the ADC - and work out how much it has moved.
Is that right ?

The electrical and code bit is easy. The tough bit is your engineering design and manufacture.
Will it 'fight' the servo?
Will it require mechancial damping?
Will it fall apart?

All that is down to your engineering skill, and no-one has seen the mechanical aspect, so I'm not sure what you want people to say right now?
Or is the mechanical part bought-in already?

I just looovve the way you say "so we can get onto the problem without ...." etc.


Anyway, as it sounds quite interesting I'm sure you'll get loads of advice.
This is going to be a whopping thread.

By the way: Is this a commercial 'earner' for you?
 

hippy

Ex-Staff (retired)
I've not got any clear idea of the context; "This is part of the drive-over alignmnet project" means nothing to me given the number of posts I see on this forum, always include a link if part of an existing project.

I'm also not clear what you're hoping to achieve or what you want comments upon. At best it seems something moves - or turns looking at the picture - the pot alters in respect of that, and what's read is used to show 'mm' travelled.

That seems fine in principle.

I presume there's a more specific, potential issue but I cannot second guess what it is !
 

Dippy

Moderator
This was something manie alluded to ages ago.
Or was it a PM?

Once we've done the design work for it he'll be going onto Dragon's Den to get funding :)

You will definitely hear more about it over the next few weeks.
Be afraid.. be very, very afraid.
This was to get everyone excited and ready.

I just hope it doesn't involve MOSFETs or second-hand tractor parts ;)
 

BeanieBots

Moderator
Comments: Not clear what is expected/desired.

Use a pot of the correct impedance.
Be aware of noise issues.
Drive any FETs in the correct manner.
Remember mechanical limitations and tolerances as well as electronic ones.

Remember all that has gone before!
 

hippy

Ex-Staff (retired)
The thread title "Calculate and interpret" has me confused, and I'm still not sure - calculate what, interpret what ?
 

manie

Senior Member
Then you have a mechanism which, when the car slowly drives over it, moves the wiper and you read the ADC - and work out how much it has moved.
Is that right ?
Spot-on Dippy.

Calm down guys.... experiment proved... I can get you all excited and interested !

I was expecting problems, which I had.... but I kept at it, analysed what I got, corrected it and VOILA ! I now have self zeroing displacement reader working nicely, and showing mm's moved to +- 100uM repeatable accuracy.

Mechanical ? Thats a different and ONGOING saga. It does look OK at this point and will be EXTREMELY sturdy (having to carry fully laden Link-Truck axles, +- 9Ton). Mechanical "expert" busy with that while I do electronic side. The displacement reader is only one part. Central "desk" control module, Tx/Rx to/from handheld mobile module, RF comms with remote PC etc. still to follow.

By the way: Is this a commercial 'earner' for you?
At the moment not.

Hopefully, after getting it all "SABS"ed.... very slim maybe... this is a ONCE-OFF which might carry through, at best it will provide a small(ish) monthly retainer, no massive profit sharing scheme..ALAS !

I just hope it doesn't involve MOSFETs or second-hand tractor parts
It DOES ! For the stepper H-bridge. But don't dispair..... got that sorted out too... with TC4420 drivers and BTS-112A's N-channel Mosfets. Does not even get warm with EXTENDED (2.5hours) endurance testing.... you did help Dippy......

So do we close this thread ? It seems Dippy wants it to be a LOOOONNNNGGGG one....

Thanks for input so far people....
EDIT:
Dippy, look at the pic in post #1.... it has Mosfets showing !
 
Last edited:

manie

Senior Member
Dippy: The point is...was....errrr....uhmmmm. Well I thought I might encounter problems in the actual displacement reading and calculation.

I did. And I did'nt. The problems that arose I could solve.

Does that mean the forum's teachings are actually starting to pay off ????
 
Top