BACK to START

FINAL PROJECT / WEEK 1 / COMPUTER AIDED DESIGN / COMPUTER-CONTROLLED-CUTTING / ELECTRONICS PRODUCTION / 3D SCANNING & PRINTING / ELECTRONICS DESIGN / COMPUTER-CONTROLLED MACHINING / EMBEDDED PROGRAMING / MECHANICAL DESIGN / MACHINE DESIGN / INPUT DEVICES / 3D MOLDING AND CASTING / OUTPUT DEVICES / COMPOSITES / EMBEDDED NETWORKING & COMMUNICATIONS / INTERFACE AND APPLICATION PROGRAMMING / APPLICATIONS AND IMPLICATIONS / INVENTION, INTELLECTUAL PROPERTY, AND BUSINESS MODELS / PROJECT DEVELOPMENT

Week 13 - OUTPUT DEVICES

May 10

Lecture, Video

*Weeks Assignment*

* add an output device to a micro controller board you've designed 
* program it to do something

For this assignment I decided to get the LEDs of my space invader to work and make a second version with two RGB LEDs. In the end I did all output devices and made a little invader army.

Change the code to turn on the LEDs

For Input Devices I had made a space invader but failed to get the LEDs to turn on.

I first checked if I had soldered them correctly with the Green Line to the Ground. And I had. I also checked the Resistor Value again. I used the red LED and after looking into the Fabacademy Inventory I found the Red Led had the number 160-1167-2-ND. Looking that up on the digikey website I found the Forward Voltage is 1.8 V and the forwward current is 40 mA which result in a Resistor of 82 Ohms and I am using 499 Ohms at the moment so I will change the resistor to 100 Ohms.

Update 8. May 2016:

I changed the Resistors from 499 Ohm to 100 Ohms and finally got the invader eyes to light up! But the LEDs I connected to and MOSI and MISO which turned out to be Pin 0 and Pin 1 in then Arduino IDE.

Update 14. May 2016:

Next I wanted to get my hall effect Sensor working. The sensor has 3 legs, VCC, GND and VOUT which I connected to PB4.

Because I still did not learn enough C I looked for some Arduino Code.

But I found some code on the Arduino Website and some other code here and here.

Still I was not able to get any reading.

I check with the python file from Neil and with a different cable but still no reading. So I think I destroyed my sensor somehow. I will check the sensor on an Arduino to see if its really the sensor.

Update 22. Mai 2016:

I finally found the time to revise my space invader board and added a through hole connector, I think the chance that they break off is much lower then the ISP Connectors that only have a connection with the top of the board. You can find the design in the project download in input devices. I think I found this connector in the sparkfun library (Eagle: 1x5 Lock).

http://www.instructables.com/id/Hall-effect-sensor/step2/Range-of-a-Hall-effect-Sensor/

http://www.instructables.com/id/Arduino-Skateboard-Speedometer/step3/The-Arduino-Code/

http://www.instructables.com/id/DIY-SPEEDOMETER-AND-ODOMETER/step3/THE-CODE/

Invader RGB

Next I wanted to turn my invader into an RGB Invader. Also I wanted to avoid doing the fabmodules step and the step to turn create the black and white images. I first Vectorized my space invader image with Inkscape and exported as dxf and imported into Eagle in the Dimension Layer with File>Import>DXF.

I started with Neils Design and added another LED and resistor.

Bill of Material

Schematic and Board Design

First I looked at the Datasheet of the RGB LED to find how I need to connect it.

I connected it like this.

Then I added all the parts to the board. I had some problems to find the Voltage Regulator and the 2x2 Connector but managed in the end.

It was the first time I used the 5V Voltage Regulator 100MA (LM3480IM3-5.0/NOPBCT-ND) so I looked it on Digikey and found out the you can put in as much as 30V and it always puts out 5V.

Update 17. Mai 2016

After doing all the output board I realized that their are two different 5V voltage regulators in the Inventory one small one with a small 100mA footprint (LM3480IM3-3.3/NOPBCT-ND) ...

and a 1A one (LM3480IM3-5.0/NOPBCT-ND) with a big foot print.

All the boards are usign the small one only the SERVO board is using the big one.

For my RGB Board with the extra LED I did not manange to connect the RGB and the LED with out adding a O Ohm Resistor and two jumpers.

In the end I did a new board just with one RGB LED.

sudo make -f hello.speaker.45.make program-avrisp2

Milling

I saved the Brd file and milled with my Othermill.

Stuffing and Programming

Then I stuffed the board and tried to program it but got an error. Only after checking all connections and using another ISP I found that I had positioned the RGB LED wrongly. The little white corner is not the Power put R for Red. In my case it is on the right top side.

For Programming you download the Make and the C file into a folder and open them in Terminal. Because I stepped on my FabISP and damaged the connector I used the AVRisp I bought. I also find it quite difficult to remember the GND and VCC Side of the Cable of my FabISP.

I would love to do some screen printing soon to print lables on the boards before I mill them.

sudo make -f hello.RGB.45.make program-avrisp2

And it was successful! Because I could not get my board to work but the second board without the extra LED worked.

The first board I also tried to fix but damaged the Pads of the LED when desoldering and could not fix it again.

Invader LCD Screen

Invader Speaker

Only after I did not get a green light with my AVR I realized that I forgot a connection in my schematic between the VCC and the 10K Resistor. After fixing that with a little wire I finally got the greenlight and programmed it.

sudo make -f hello.speaker.45.make program-avrisp2

Thank you!

Invader Servo

Invader Brush DC

To control the DC Motor we need a H-Bridge. A DC Motor can only run at one speed and forward or backwards. So I am using a A4952 from Allegro to turn the Motor on and off really fast to control the speed this way.

First I forget to connect some line but I realized it before soldering. Here I realize I have to be more careful and check all lines and if I have added all components. So I milled again and finished the board.

Always I have to cut the line for the voltage generator with a knife. So I wander how can I avoid this?

Invader Stepper Uni

Invader LED Array (coming soon)

This one I would like to do on a two sided PCB. So I have the microcontroller on the back and all the led on the front of the Invader.

Invader Video (Coming soon)

Coming soon.

Project Files

Download all project files I ued for this assignment from my Google Drive. I have uploaded the improved invader_hall and the invader_rgb also to the repository. Also I made an invader with a coin cell battery that I linked here.

invader-rgb_working.brd

invader-rgb_working.sch (save as)

hall_sensor_v2.sch

invader_vector_final.dxf (file I imported on Dimension 20 Layer)

invader_coin2.brd

invader_coin2.sch (save as)

Learnings

Feedback

Twitter me or email me at andreasrkopp at gmail dot com.

Or chat with me on gitter.

Gitter

previous week <-----------BACK to TOP-----------> next week