Posts

Showing posts from July, 2017

Turning the Motor On

Image
The old blog was helpful when I was figuring out how to hook everything up. The only main difference is that I did not have to use a potentiometer. Everything is hooked up the same way as it was last year. 8V should be supplied to the motor shield, using a protoboard Wires attaching from motor to arduino should be in this order (starting on the bottom right of the bridge cord thing attached to the motor): YELLOW - attach to right M4 ORANGE - attach to left M3 GREEN - attach to left M4 In the old blog, Alex noted that this configuration worked although he wasn't sure why it did but hey if it works it works. You could also just directly hook up the wires coming out of the bridge to the arduino, but the wires can be difficult for them to stay put in the bridge so this controls the contact of the wires better in my opinion. Wires to Arduino 8V to motor shield

Code

Image
In order to use code for the stepper motor, I had to install a new library on my Arduino called AF_Stepper. The directions on how to download the library can be found   here . A page that I found to be really helpful in getting the motor to just move was  this . It gives you the basics and what's required to actually make the thing move. This seems like the website that Alex used last year to get his code, but I ended up making my own code to make the motor do what I want it to do. The code that I came up with starts the motor and makes it move 31.5 steps, about one degree, and then it waits 30 seconds and repeat. The 30 seconds is to give the GM Tube/counter enough time to get an accurate reading of the radiation at each degree around the sample. I'm still in the process of editing it to make it simpler so I'll update that when I'm done with it, but this is what I have for now. When using the system to collect data, the GM Tube will only be able to go ...