Week 13: Output

This week we have to add an output device to a microcontroller board you've designed and program it to do something.


Neil's RGB board

RGB board

Design

Like for my input assignment I started by inspecting Neil's boards:

Neil's RGB board

And then designed my own on Eagle (using fab.lbr for the components):

My version of the board

Milling

Imported the monochromatic png file in Fabmodules : the traces for the fabmodules

(Fially understood where my weird offset came from, in Eagle there is a little cross, that's the origin!)

Here is the outline:

the outline for the fabmodules

That in return gave me my ".rml" files for the CNC:

  • traces
  • outline

  • I then milled it on a Roland MDX40, and soldered all the components:

    My RGB board Settings:
  • Tool: 10° conic
  • Traces: 0,4mm
  • Depth:0,06mm

  • Programming

    Flashing the board

    I downloaded the files from the Fabacademy page :

  • hello.RGB.45.c
  • hello.RGB.45.make
  • These contain all the different codes that you need to program your board .

    I then plugged my board to the FabISP and the FabISP to my computer with the USB cable and used my FTDI cable to power the board:

    plugging the board

    Opened a terminal where I had my files: :

  • sudo make -f hello.RGB.45.make program-usbtiny
  • And obtained:

    error

    This means that I've managed to talk to the FabISP, but that he didn't manage to talk to the chip, time to debug!

    I checked my connections, changed the chip, checked my board, everything! Nothing changed!

    So I wanted to give it a try with Arduino, and I noticed that when I plugged my FTDI (which only supplied the power for the board) the port would disapear as if there was a short circuit.

    And indeed! My voltage regulator was burning hot! I made a huge mistake: I replaced the normal voltage regulator by a mosfet! (they actually look exactly the same).

    So I desoldered it with a heat gun a replaced it by a "real" voltage regulator!

    Then I retried: "sudo make -f hello.RGB.45.make program-usbtiny".

    And got the expected result!

    error

    Now let's flash it: "sudo avrdude -p t45 -c usbtiny -U flash:w:hello.RGB.45.c.hex"

    error

    It worked! Here you can see the RGB fade (still an issue, colours are missing, connection problem?):

    Once again I had a problem, got frustrated, debugged, made it work! Paradise!



    Extra: Filament detector

    While I was taking the course I had to find ways to continue taking care of my fablab and my members, and I noticed that people often forget to check if they will have enough filament, which always leads to me having to unjam the machine and loosing time!

    So I made a little prototype of filament detector:

    filament detector

    And it only uses analogic electronics, no microcontrolers! I used a 555 timer in the astable multivibrator mode:

    circuit

    Basically it produces a square-wave signal that I then send to a buzzer, and the trigger is an endstop that acts like a switch.

    Here is a little test (don't laugh from the sound):



    Learn Make Share