Magnet Wire Measurer
thingiverse
MAGNET WIRE MEASURER: Sometimes you need to measure out an exact length of wire. This comes in handy when winding electromagnet coils using a drill. This object holds a pair of bearings, which rotate when a wire is pulled between them. A small magnet on one of the bearings is detected each time it passes a hall effect sensor glued to fixture. Each pulse from the sensor is counted by an Arduino microcontroller, which displays the length of wire on your computer via the serial monitor. Designed and tested by David Hartkop for the Pueblo City-County Library District's Idea Factory makerspace. This system has been tested for magnet wire ranging from hair-thin up to around 20 gage. The resolution is related to the circumference of the bearing and the number of magnets used. The code given is just for one magnet and is pre-set to feet. Feel free to hack as needed! Print Settings Printer Brand: MakerBot Printer: MakerBot Replicator 2X Rafts: Doesn't Matter Supports: No Resolution: Low is fine Infill: 25% Post-Printing Parts To Get Bearing used: 6200-Z or similar, has O.D. 30 mm, I.D.10 mm, Thickness 9mm. Magnet used: Neodymium cylinder measuring 1/4"dia x 1/8" thick. Hall Effect Magnetic Sensor: A1221 by Allegro MicroSystems Microcontroller: Arduino UNO Screws Misc: Long screw to dispense spool, 2 x short screws to hold down mechanism Wood Block: Approx 6x6 cm square x 2 cm thick to support mechanism Wood Base: Just some base you can screw things into, at least 10 x 20 cm. Arduino UNO: A1221Hall sensor powered between 5V and GND, output into digital pin 2. Arduino Basic Code /*Wire length measurerThe circuit:* hall effect switch output attached to pin 2This code was based on the Arduino edge detection basic example script, and was hacked together by David Hartkop. It is in the public domain.*/ // this constant won't change: const int buttonPin = 2; // the pin that the pushbutton is attached to const float unitsPerRotation = 0.31145; // feet per rotation // experimental measurement for calibration: 3.7375 inches per rotation // Variables will change: int buttonPushCounter = 0; // counter for the number of button presses int buttonState = 0; // current state of the button int lastButtonState = 0; // previous state of the button float wireLength = 0; void setup() { // initialize the button pin as a input: pinMode(buttonPin, INPUT); digitalWrite(buttonPin, HIGH); // turn on pullup resistors // initialize serial communication: Serial.begin(9600); } void loop() { // read the pushbutton input pin: buttonState = digitalRead(buttonPin); // compare the buttonState to its previous state if (buttonState != lastButtonState) { // if the state has changed, increment the counter if (buttonState == LOW) { // if the current state is LOW then the sensor // went from on to off: } // Delay a little bit to avoid bouncing delay(10); } // save the current state as the last state, //for next time through the loop lastButtonState = buttonState; } Basic DIY Instructions Print the part Get the other parts (see above parts list) Mount the mechanism with two screws, through the wooden block and into the base. Put a long screw in to the base from where you wish the spool to dispense. Wrap one layer of black electrical tape around one bearing. Super-glue a small magnet to the top of one bearing, right to the edge but not beyond it. Pop bearings onto the mechanism. You can pull the spring arm out slightly, be careful. Solder extension wires onto the 3 pins of the magnetic sensor. (30 cm long) Hot-glue the magnetic sensor's pins onto the mechanism so it detects the passing magnet. Refer to the pictures as a guide. Connect the sensor leeds to the Arduino UNO as shown in the pictures. Copy & Paste the Arduino code into your Arduino Development environment. Upload this to the Arduino Uno. Visit the Arduino homepage for downloads and help doing this. With the Arduino connected to your computer, open the Arduino Serial Monitor to view the total feet of wire dispensed. Press RESET on the Arduino to reset the counter.
With this file you will be able to print Magnet Wire Measurer with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Magnet Wire Measurer.