Sense the world.
In this week i decided make a board than could be a experiment, and useful to the final project.
As you can see in my final project proposal i want to make a device than can know the height of the garbage in the trash can’s.
For than i will use IR led’s and IR phototransistor’s.
Why? Because they are cheaper easy to encapsulate.
At first i think in design using an attiy44, but if it was an experiment, it well be in all sense. So i chose attiny45.
first i go to the internet try to find an eagle example already made.
Why?! because i master eagle so i think i can skip some stages.
So i find it here.
Thank’s Anton Sky. :)
I change the ambient light sensor in order to full fill my intent’s
because i want to measure distances how much further as possible i will try to use differential gain amplitude in ADC module, as you can read in ADC section of attiny datasheet.
In fact in attiny45 we have 4 single input adc or one 1 diferential adc.
I will only need one adc so i chose that.
And because i have adc3 as already an adc input, i keep it. and adc2 will be ground… Howw wait a minute…
ERROR
I make an error in the design i know it now.
ADC0 or ADC2 can be used as deferential positive pin. And all ADC pin’s can be the negative one’s.
So i must change adc3 to adc2 and vice-versa.
Ok let’s begin. That’s my first experiment.
The second experiment is this. I will need an output to the led. But what i pin i should use? My left over pin’s was MISO and MOSI in programmer header. so i chose to use booth and the experiment if with 2 led’s in that pin’s i can program the board.
So i design what left in the board.
After that i export the board traces and outline to png 500dpi. But i make another add on, the Penela logo to the board ;)
I was ready to mill.
It’s always challenging, but with fabmodule’s i consider it heavenly easy.
This time, i use fabmodules all way down. Because Luis Carvão make a server in the connect pc.
It’s very easy and integrated. as you can see in the photo’s.
Since my first board stencil is a blessing that i carried into the fablab EDP. Maria Boavida my colleague in fabacademy love’s it every time.
But we struggle in something, we can’t in a easy way extract the only pad’s from eagle. We need to always go to the gimp or inkscape to kill the traces.
But can’t be…
I search and we found, people use eagle to make board’s and we have tcream layer that is exactly what we want, so we use it.
After that is the habitual procedure:
And voila a ready tho program board, nice cleaner wonderful.
So after all this adventure it’s time to test it.
Up’s it’s look’s that board have no Power.. i’m on debugging… see you
function coloca_dados(data){ len = data.length; for (var i = 0; i < len; i++) { byte1 = byte2 byte2 = byte3 byte3 = byte4 byte4 = byte5 byte5 = byte6 byte6 = byte7 byte7 = data[i] }; } sp.open(function(error) { if (error) { console.log('can not open '+serial_port) } else { console.log('opened '+serial_port) sp.on('data',function(data) { coloca_dados(data) // byte1 = byte2 // byte2 = byte3 // byte3 = byte4 // byte4 = byte5 // byte5 = byte6 // byte6 = byte7 // byte7 = data[0] //console.log(data.length) if ((byte1 == 1) & (byte2 == 2) & (byte3 == 3) & (byte4 == 4)) { //console.log(" byte1 " + byte1 + " byte2 " + byte2 + " byte3 " + byte3 + " byte4 " + byte4 + " byte5 " +byte5 + " byte6 " + byte6 + " byte7 " + byte7) value = (byte5 + 256*byte6 + 256*256*byte7)/samples //256*256 } }) } })another thing is.
run node in terminal
node hello.mag.45.jsAND VERY IMPORTANT open this file hello.mag.45.html in your browser. node is serving websocket's but not the page it self. And the great result is