This week we have to add an output device to a microcontroller board you've designed and program it to do something.
Like for my input assignment I started by inspecting Neil's boards:
And then designed my own on Eagle (using fab.lbr for the components):
Imported the monochromatic png file in Fabmodules :
(Fially understood where my weird offset came from, in Eagle there is a little cross, that's the origin!)
Here is the outline:
That in return gave me my ".rml" files for the CNC:
I then milled it on a Roland MDX40, and soldered all the components:
Settings:I downloaded the files from the Fabacademy page :
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:
Opened a terminal where I had my files: :
And obtained:
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!
Now let's flash it: "sudo avrdude -p t45 -c usbtiny -U flash:w:hello.RGB.45.c.hex"
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!
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:
And it only uses analogic electronics, no microcontrolers! I used a 555 timer in the astable multivibrator mode:
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):