Hi,
I'm new to Arduino, in fact this is my very first project. I thought I would do something useful and relatively simple. What I am trying to achieve is to use two stepper motors to rotate 180 degrees so that it will pull/push two door locks. When I looked in to the idea it seemed complex to operate two stepper motors so I tried to keep it simple and buy a motor shield. I decided on this one:
Stepper Motor Shield that I'm using:
http://altelectronics.co.uk/shop/arduino/arduino-stepper-motor-shield/prod_84.html
Stepper Motor Shield Datasheet:
http://altelectronics.co.uk/shop/images/uploads/datasheets/Arduino_Stepper_motor_shield_datasheet_v1.0.pdf
Shield Schematics:
http://altelectronics.co.uk/shop/images/uploads/schematics/Arduino%20_%20L6470_shield.pdf
Shield Example software:
http://altelectronics.co.uk/shop/images/uploads/software/dSPIN_example_v2.0.zip
This shield will operate two stepper motors (other shields I've come across only control one stepper motor).
Type of stepper motor I'm using:
http://www.hobbytronics.co.uk/motor-control/stepper-motors/stepper-motor
I want to trigger the motors using an RFID reader (RFID-RC522 Funduino). Using the example code for the stepper motors I can get them to run so I know that code works. Also I can get the RFID code to run too. The problem is when I try to attach the RFID reader to the motor shield nothing works. Obviously the code would need modified to operate both of these, I did try this, but I couldn't get it to work. I think there's something more fundamentally wrong with what I'm doing. I have a feeling that I'll need to use different Arduino pins to attach the RFID reader I just don't know how to figure this out.
I've also tried using the RFID code that works and connected the RFID reader to the motor shield exactly as I would if connecting directly to the Arduino, couldn't get anything to display on the serial monitor, I would expect to see something as I know the code works.
The only small nougat of information came from the datasheet:
STCK1, STCK2 signals
Step Clock signals are accessible on two pins
Arduino pin 4 & Arduino pin 8
(PD4 & PD0
respectively) for driving the step movement directl
y from Arduino. For using this feature the proper
STCK mode has to be programmed and the Direction of
the movement via config register (is not
enabled by default)
To summarise, I can get both motors to run with the example code, I can also get the RFID code to run with its example code if connecting the RFID reader to the Arduino directly. When I try to connect the RFID reader to the motor shield it doesn't work when only using the RFID code.
I've attached the RFID code and the documentation I have on it.
Anybody got any idea how to to figure out what I need to do in order to get the motor shield to accept the RFID signal so that I can switch the motors on and off?
I'm now pretty lost with this, I'm pleased I managed to at least get the motors running ![]()
Any help with this would be sincerely appreciated.
CaptainChainsaw
rfid reader .zip (761 KB)