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 11 - INPUT DEVICES

April 13 - April 20

Lecture, Video

*Weeks Assignment*

* measure something
* add a sensor to a micro controller board that you have designed and read it

Hall effect Sensor Board

I was waiting for this assignment as I already wanted to measure the speed of my penny board for some time so I decided to make the Hall effect Sensor Board.

First I looked in the Fab Academy Inventory for the parts number of the Hall Sensor called A1301 from Allegro with the Part Number 620-1021-1-ND and then I looked on the Digikey website for the datasheet. If you would order it from Digikey Germany a sensor would be 1,77€ when you buy ten the cost would be 1,38€.

The Hall Effect (part 2 on the Output page)

The Hall Effect describes a voltage difference across an conductor whenever a magnetic field is applied in a direction prependicular to the flow of the current of the conductor.

This means whenever the hall sensor detects a magnet it outputs a High Voltage to its Output pin (VOUT). So by clueing a magnet to the wheel of my pennyboard and putting the Hall Sensor Board next to it I can measure the times I get an Output and then with the radius of my wheel I can calcualte the speed of my board in m/s and km/h.

After reading the datasheet I understood that the Hall Sensor A1301 I got has a maximum Output voltage of 50% of the input Voltage and the Output Voltage proportional to the magnetic field supplied. So I decided to use a neodyne magnet to make sure I get a good output.

Bill of Materials

SMD Components for the Hall Sensor:

I also decided to add 2 LEDs.

Neils design I started with.

My Schematic

I got all the components together and added them to my schematic. I just could not find the hall sensor at first in eagle. Finally I looked in the datasheet and found that the name for the hall sensor is A1324-26 or SOT-23. With SOT-23 I found it at last. I decided this time to also connect all the components to understand the schematic better. The LEDS I connected to MISO and to MOSI. Also I added GND and VCC to all the components. I had to look in another library for them called Supply1.

Setting up your libraries correctly

After that problem of not finding the components I did some more research into how I can set up my libraries correctly. I figured out that I have to click on the button "load all libraries". I also installed the adafruit library. This tutorial on sparkfun helped me out. And now I finally see all the libraries wenn I click on add components.

Designing the traces

To make things a bit more fun I wanted to make a space invader design of my board. So I first drew a rough design with the eyes on top but I did not manage to connect all the components without using 0Ohm Resistors so I took Neils Design as a guideline and went from there. I also put the leds in the bottom. Then I did a first export and overlaid it with a space invader in gimp. I realized I need much more practice in gimp. I could not use photoshop because I do not have a license anymore.

After like 15 iteration going back and forth between eagle and gimp making the traces smaller and splitting up the pads I finally got my final space invader hall sensor board Version1 at the end of the day.

To get the design through the Design Rules I had to make the traces smaller. Still I did not manage to go through the hall sensor with the ground but I will fix that later with my knife.

Prepare and Mill

My first try was a fail as I used 8mil in eagle Design Rules instead if 16 mil so the traces where to small.

So I changed the Design Rules to 16 mil and exported the boad again and did the gimp operation.

Postprocess, Stuffing and Soldering

Update 23. April

Finally in Valldaura on Saturday I finished stuffing and soldering the Invader.

Before soldering I used my knife to get rid of some thin copper in between the traces.

I think I got these problems because I made my traces thinner and then I would need to put in fabmodules that I want more the 50% overlap.

Connecting the Cables

This time we are using Rx, 5v and GND of the FTDI cable and connect them to the Invader.

Flash Attiny with Neils C code

For programing I saved the make, the c and the python file from the academy site in one directory and opened the folder in Terminal.

sudo make -f hello.mag.45.make program-usbtiny

and it worked.

Program Attiny with Neils Python Code

Then I tried to run the python program.

I needed to install brew, python and pyserial

brew install python
python hello.mag.45.py /dev/tty.

And then hit TAB to autocomplete your serial port. In my case it was this.

python hello.mag.45.py /dev/tty.SLAB_USBtoUART

But I got an error that the serial modul is not installed. So I installed it.

sudo easy_install pyserial

Now I am getting an error that the port is not working.

After not getting it to work with my FTDI Cable I used a different Cable and got it to worked.

Update 30. April 2016:

It was not the cable I have just connected the pins wrongly.

python hello.mag.45.py /dev/tty.usbserial

Also when I put a magnet close to it it worked.

To show the output of the sensor I installed python-tk before which is a python Web User Interface.

Change the code to turn on the LEDs

Ok the next step is to look into the Neil´s C code and change it to turn on my LED. I looked at the C code but I still understand too little C so I decided to switch to the Arduino IDE.

First I looked at the Attiny45 Datasheet to find out the pin Numbering and then also googled what would be the pins then in Arduino.

I remember I connected the LEDs to MISO and MOSI which would be Leg6/Pin 1 and Leg5/PIN0.

I opened the Ardunio IDE, chose Platine --> ATtiny x5 series, Chip --> Attin45, Clock --> 8Mhz internal (standard is 1mhZ), Port --> dev/cu.SLAB_USBtoUART and --> Programmer USBtinyISP.

The upload workded but I do not get the LEDs to turn on. I tried every pin. I think that is a great strategy to find the the right pin.

So first I checked the the LEDs again. I have soldered them correctly with the Green Line to the Ground. So I check the Value again. I used 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 forward current is 40 mA which resulted in a Resistor of 82 Ohms and I am using 499 Ohms at the moment so I will change the resistor to 100 Ohms.

In Output Devices I resolved that issue finally and got the LEDs to light up.

Otherduino

I already tried to cut the Otherduino as a second project with my new othermill but I used only a once sided FR2 board and the design was two sided. I only used the mill for two cuts but the otherplan software is great. You can directly use the brd files from Eagle and do not have to prepare traces and outline images in gimp or photoshop.

I will try again when I am home in Munich. There is a great instructable for it.

Update 3. Mai 2015:

Now I got a 2 sided FR2 and I tried to cut the Arduino again. It cut beatfifully with the Othermill I just had to postprocess a little. The machine is great it tells you when to change tool and you can easily produce two sided PCBs

The process with the Othermill:

Bill of Material (all through hole components)

I did not buy any of the components but looked around at my used electronics and found all the parts.

First I soldered the Vias which are the connections between the bottom and the top.

The Otherduino next to my first Arduino Duemilanove from 2009 which I took the ATmega328 chip and the 16 mhz clock from.

Then I soldered the chip and the other components. At first I soldered the chip wrongly so I had to desolder it and resolder it.

I checked everything put I could not upload a sketch yet.

Update 23. Mail 2016

I checked all connections and was able to upload a sketch but could not get the light to blink.

I will try to get anothter light to blink tomorrow.

Optional external power materials:

AAduino

In this week I saw an article on techcrunch of an Arduino in a AA Battery case.

I am also getting together all the components to make this arduino as well.

Update 19. Mai 2016:

After doing almost all output device boards I got a better understanding of Eagle. I think taking a design of somebody else and look for the components and then change it is a great way to get even a step further.

Here are all the files and a good explanation.

Other Input Devices I want to do later

Switch

Motion

Distance

Temperature

Light

Acceleration

Sound

Step Response

#

Project Files

Download all project files from this assignment from my Google Drive or directly from here.

hall_sensor.brd

hall_sensor.sch

hall_sensor_outline.png

hall_sensor_traces.png

hello.mag.45.make

hello.mag.45.c

hello.mag.45.py

blink_input.ino

Otherduino.brd

Learnings

Feedback

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

Gitter

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