Saturday, May 17, 2014

A Pickup Winding machine built on an ATmega8

A pickup winding machine it is used to wind a guitar pickup.

The core of this project is an ATmega8.

It features:
  • wind counter
  • slow startup
  • automatic stop
  • configurable motor speed
  • configurable winds
  • 2 directions
This winder has an LCD display that will show
  • the current motor direction
  • the rotating speed of your pickup
  • the total and current wind counter

You can also setup:
  • motor direction - clockwise, or anti-clockwise
  • direction of the wind counter to increase - clockwise, or anti-clockwise
  • motor max speed - from 1(min) to 100 (max)
  • motor startup accelleration - from 1(min) to 100 (max)
  • numbers of wind - from 1(min) to 99999 (max)
  • auto stop mode - manual mode, or stop when all winds are done
There are 3 buttons, SELECT, button UP and DOWN.
To enter the programming mode, just long press SELECT button.
Press SELECT once to change the programming parameter, button UP and DOWN to edit the selected value, then long press SELECT again to save new values.

If you are in building mode, to make the wind start press the RUN pedal, it will start with a slow startup, to stop the winder release the RUN pedal.
Long press butto UP to change direction.
Long press butto DOWN to reset counter.
The winding machine will automatically stops when the wind counter reach the configured number, and it can goes less than zero
If you disable the autostop mode, the machine will always count wind, independently by the direction choosen.

The motor used is cheap DC motor 12V 1200rpm, the motor driver is L298N chip board.

This library was developed on Eclipse, built with avr-gcc on ATmega8 @ 8MHz.

  • 01b: fix a circut file typo error in the LCD connection of previous version.
  • 01: first version.


  • read risk disclaimer
  • excuse my bad english


  1. Bravo, interessante, ci proverò (un dì).

  2. which was magnet used in the hall sensor?

    1. The hall sensor is a A3144, the manget it's a circle one, almost 2mm dimeter x 1mm height.

  3. Thanks, neodinium or ferrite magnet?

  4. This comment has been removed by a blog administrator.

  5. This comment has been removed by a blog administrator.

  6. Very nice project ;) Which motor you are using?

    1. Thank you, i'm using an ebay cheap DC motor 12V 1200rpm.
      I'm also implementing an hardware PWM driver with slow startup, which eventually can drive motor smoothly.

  7. Hello, very good project, I asked PC4 and PC5 connected to JP3, how to connect to (L298N), IN1 and IN2 connected? Thank you!

    1. Hello, if you have a L298N preassembled board, IN1 and IN2 are the motor input. If you are building your how driver, that output goes to L298N input pins for motor 1.

  8. I want to copy this build more or less, any advice what I maybe should do differently?

    1. The one you see above, works. But I'm developing a new version with hardware timer controller DC motor, and eventually a guide motor, this version has not the same wiring. It has to be tested, and then i will publish it... but it will take sametimes, cause i do this type of work during sparetime.

    2. I can't quite get it from the schematics, but what kind of screen did you use ? I'm guessing you had to use one that can actually "refresh" fast enough to display the windings.

    3. The one that i used is a "standard" ebay cheap 2x16 LCD HD44780 based.

  9. Hola.
    Eu nao consegui fazer funcionar. Gravei o .hex usando o PonyProg2000, mas nao aparece nada no display :(

    1. Hello.
      You have to debug your hardware. Double check your wiring. Also if you are not using an ATmega8, re-compile the source with avrgcc.

    2. Yes, I used the ATmega8.
      Could you send me only the Hex file for I try to burn again?
      Thank you. Sorry any bother.

    3. or
      Thanks, David

    4. This comment has been removed by the author.

    5. Hello Friend. I had given up. But I decided to do the last test, as hopeless. And amazingly it worked :) lol I had not set the bits properly.

      Here is a picture of the running project, still in the testing phase:

      Here is the correct way of Bits:

      Thank you for your help.

    6. Great, and thank you for feedback!