Week11

Input device

magnetic field

Assignment:

  • measure something: add a sensor to a microcontroller board that you have designed and read it
  • measure the analog levels and digital signals in an input device
  • Measure something: add a sensor to a microcontroller board that you have designed and read it:

    You can see the complete documentation of group assignments on the opendot website at this LINK.

    Intro

    For the week of input device I decided to focus on what could be useful for the final project. This was not easy at all: I had to imagine all the components to be inserted on the board, both for input and output.
    I started thinking about what could be the most suitable sensor (sensible, cheap and easy to manage) to solve the problem "blocking the drawers" of my kit. This requirement is useful considering the context in which the object will be inserted.
    Enrico and Francesco helped me to think about all the electronics related to the project, and how it could work synergistically with the part of electronics that Francesco will deal with in his final project that will be integrated into the upper part of the drawer.

    Hall sensor BOARD

    I choose this A1326 hall sensor and extract some information from datasheet.

    Then I started to draw the schematic in Eagle and to follow I connected everything. I have provided 4 holes to attach the card to the piece

    But the 4 holes were too small so I decided to make two large ones to better facilitate fixing to the final project.

       
    	
    	
     

    I test it with Arduino and it's works.


    MAIN BOARD: version 1

    Before starting I schematized the board dividing it into logical blocks.

    Being able to make the slopes for this board was quite complicated. I had to design custom connectors in Eagle, but the VCC still had to be lifted, so as a last resort I used a zero resistance in the schematic.

    Schematic after drawing personal components: It's work better.

       
    	
    	
        
    FIRST MILLING

    When I tried to connect the cables to the SPI connector, part of the traces were skipped, together with the 3x1 connector dedicated to the hall sensor.

    Thanks to the help of Enrico, we managed to attach the connector and the traces, apparently correctly.

    TEST IT (board one)

    In order not to waste time I decided to try anyway to test hall sensor with my board when it will be glued. At the first connection to the PC the board started to emit smoke and to heat up.

    DEBUGGING PART 1
    Then I started testing the traces again and I realized that there were two problems:
  • there was some solding material around the FTDI connector, like a little ball stuck under the connector: once the connector has been removed, it has resumed working without causing a short circuit.
  • the zero resistance wasn't soldered: so I replaced it with a new one because in moving it the package got worn out.
  • At this point the circuit seems to be free of short circuits, but it was not true!

    DEBUGGING PART 2

    When I tried again to program it with an IDE of arduino, he continued to give errors:

  • we replaced the cable,
  • revised the pc ports,
  • corrected some wrong settings: nothing strange in the program.
  • Then we double checked the board and we realized that in rebuilding the traces after the accident, we skipped one: part of the circuit was not powered. So we reconnected the missing part by soldering.

    DEBUGGING PART 3

    Victorious we tried again:

  • I managed to write the boothloader
  • I managed to load the sketch but nothing works exactly
  • the LED at pin 7 refuses to work.

    DEBUGGING PART 4

    As a last option it could be a problem of the programmer or of the code: I then decided to do a test with my old hello board. This charged perfectly and blink without problems. (By chance the LED was at the same pin so I did not even have to change the code.)

    CONCLUSION

    Right now I do not know what else to do to identify the problem. The time it took was useful to understand and learn more about my card and its behavior, but it also served to convince me to design a new board. But first I correct the distance between pinhead in the old schematics.

       
    	
    	
        

    MAIN BOARD VERSION 2: new opportunities

    Taking advantage of the fact that there is a need to mill a new board, I decided to change the micro controller and consider using the atmega. For a number of reasons, before which the pins in my attiny44 are already full and if we had to add anything else we would have to rethink everything.

    NEW EAGLE BOARD

    To rethink the board I decided to start studying Satshakit. With atTiny44 I had already finished the pins so I preferred, since I would start again, switch to an atmega and have a more versatile board for the final p.

    NEW EAGLE BOARD PART2

    in designing the new card, I decided to add some connector for the pins that at the moment I do not need but that maybe could be useful for possible developments of the final project

    SECOND BOARD: PRODUCTION

    After the milling I have corrected the file that you find below to download

       
    	
    	
        
    SECOND BOARD: PROGRAMMING (week 12: output)

    During my research I found several examples of projects made using servo motors as outputs. This helped me understand but I still do not know what kind of servo motor I need. As soon as the new sheda is ready I will start to do some tests, above all because in the final project it will be necessary to manage the end of the race with precision. Examples and resurce with arduino:

  • Arduino library.
  • Examples.
  • servo and satshakit.
  • NEW DEBUGGING

    Since the card continued to give errors of connection we thought that the microcontroller was damaged, so we changed it

    Even after this operation the card does not work, the error was linked to the signature, moreover the micro was heated so we have revised the schematic and milled a new board

    MAIN BOARD VERSION 3: short story of a failure

    In the new tab we have modified some components and connection, unfortunately it still does not work.
    I also made a reset error during the contour milling, which we managed to solve, but despite this the board never worked.

    MAIN BOARD VERSION 4: maybe it works

    In the new tab we have modified some components and connection, unfortunately it still does not work.
    I also made a reset error during the contour milling, which we managed to solve, but despite this the board never worked.