Jump to content
 
  • entries
    400
  • comments
    930
  • views
    288,817

Level crossing gates controlled by an Arduino (part 2)


Fen End Pit

938 views

As I mentioned in my previous entry, one of the issues with a stepper motor is that you can only tell it to step! You can't get it to go to a certain position unless you have some mechanism to set a 'datum' point first. This often means that you have some kind of limit switch which you can run the motor against so you 'know' you have reached the limit of travel, and therefore, know that if you move a certain number of steps you will also be at a known position.

 

The practical issue with my first test rig was that if someone turned the power off while the gates were in anything other than the 'normal' position then on powering up the unit would think it was in the normal position even though it wasn't. This could mean that you then drive the linkage further than it should be driven.

 

To fix this I have laser cut a little unit which holds a micro-switch against a cam on the motor drive. The coding on the arduino now looks at start up to see if the micro-switch is on or off and runs the motor until it changes. The result is that now the unit resets the gates to a datum point on start up.

 

blogentry-7212-0-06535100-1438551623_thumb.jpg

 

I have a base plate and some gates drawn up now so hope to have something that actually looks like a level crossing soon.

 

David

  • Like 4

3 Comments


Recommended Comments

  • RMweb Gold

Hi David, this looks really interesting. Could you be persuaded to go into the detail of the build when you are happy with it?

 

Cheers

 

Jason

Link to comment
  • RMweb Gold

Hi David, this looks really interesting. Could you be persuaded to go into the detail of the build when you are happy with it? Cheers Jason

Hi Jason

sure, I've almost got a version with gates that I am happy with.

Thanks for the interest

 

David

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...