For the second term of my physical computing class, we had to create a small project using the ATTINY microcontroller!

In order to keep things simple, I decided to build a small circuit that lights up an LED when someone is moving thanks to a Passive Infrared Sensor. Next step would to trigger a relay so that for example I could have a light turn on just when I'm close to it!

As always, I started by using the Arduino as the power source and the programmer of the ATTINY controller. To do this, we followed a nice tutorial available here: http://highlowtech.org/?p=1695

Prototyping

The PIR sensor used.
It just needs 5V, GND and the actual pin where it will send 5V if it gets triggered

Initial prototype on breadboard.
You can see the Attiny connected to the red led


I then started designing the schematics in Fritzing in order to later create a PCB out of it using the [Roland SRM-20](https://www.rolanddga.com/products/3d/srm-20-small-milling-machine) that we have in the hatch-lab. I exported the traces, holes and outline view from Fritzing as black & white images in order to create the CAM for the machine using the [fabmodules](http://fabmodules.org) web interface.

Diagram of the connections made in Fritzing.
Power comes from the coin battery

Circuit Schematics

Soldering

Before going further and milling the PCB on the SRM-20, I created a soldered version of the project just to check if everything was still working fine.

The soldered version of the circuit

Not one of the best soldering I've made, but still..

Red and Black wires are used to power the whole thing.

Milling

Holes to be drilled.
You can see the ATTINY with its 8 pins in the center

Traces to be milled

Outline of the pcb