Week 12

Output !

MOOD OF THE WEEK

Going on with the good vibes of last week. I changed plans in the middle of the road, by changing my output, but I'm pretty happy with the result (even if it doesn't work as I wanted to). At least I have something to validate my week, and I obtained it with not too much pain :)

I still have to work on the result though, to make what I had in mind. I want to do some work with the motors next. And I dare say, I'm looking forward for some holidays too ^^'

Output

This week's assignments :

    Group assignment
  • measure the power consumption of an output device
    Han Solo assignments :
  • measure something: add an output sensor to a microcontroller board that you have designed and program it to do something

Here is the link to the Fabacademy schedule page of the week

Group Assignment

Here is the link to our documentation for the group assignment :

Han Solo Assignment

Wallou 2.0

Step 1 : designing and milling the board

Since I succeeded in catching up with my delay last week, I'm more confortable approching this week :)

I wanted to work with DC motors first, but since everyone is doing something related to it I'll check for something else. I like RGB leds so let's do something about that !

The idea for this week is to relate an input and an output, to make a connexion for what I did last week. So in my design I took what I did with the sonar, and designed a new board where I added a button and an RGB led. Why the button ? So if there's something wrong with the sonar, I can still do something related to an input with the button ^^

Since I'm using more components, I also changed the micro controller from an attiny85 to an attiny84 to have more pins.

Here are my schematic and my board.

If you're interested in looking at it, here's the datasheet for the RGB led.

I'm pretty happy to say that the machining went well ! I just had one trouble when I wanted to mill the outline of my board, Roland just touched my board and then went away. At first I thought he had something against me, or maybe I said something that upseted him.

But actually it was just that the mill was too up and so he didn't like it. Once I changed it and installed it properly, it went well :)

Here's Wallou 2.0 with all his components soldered, brand shiny and smooth ^^

Step 2 : connecting and sending a first program to the board

First, I try and upload a simple blink program for my RGB led to check if everything works well.

Arf, it couldn't go that well for too long... The infamous "Yikes, invalid device signature" is back. My board is not recognised by the arduino. Hum, let's do the checklist of stuff that could have gone wrong :

  • The connexions : are the wires well put between my Arduino and my board ?
  • Just a quick reminder :
    • Pin13(arduino) to SCK
    • Pin12 (arduino) to MISO
    • Pin11(arduino) to MOSI
    • Pin 10(arduino) to RESET
    • 5V to VCC
    • Gnd to Gnd
  • Multimeter : are the roads I draw all well connected between each other ?
  • Soldering : are my solders okay, and all smooth and shiny to receive and pass the informations ?
  • Settings : have I selected the right port? the right board? the right microcontroller? the right processor? the right clock? the right programmer?
  • Components : have I burnt my microcontroller or an important component while soldering or because of a short circuit?

It's a long checklist I know, but once you have those in mind you'll see that pretty much a lot of errors can come out of it ^^

In my case, it was a soldering problem with my ISP. Once I put on some more solder, it was all good :)



Step 3 : connecting an input and an output

Now that I know that my board is working, that it can receive some code, let's try to make my output and one of my inputs to interact !

Weirdly, I can't seem able to receive anything from my sonar. Nothing. Nada. Niete. Not even some println. I used the same library as last week (software serial), I tried uploading this code to my previous board it worked. Don't know why ! And I don't have a checklist yet to see what happens ^^'

After showing Adel my board, I noticed something that could have an importance and explain it : I didn't connect my sonar to analog pin. Let's do a new board then and correct this !

Fortunatley, I thought this could happen and put a button on my board :)

It's alive... ALIVE ! :)

Wanna try by yourslef ?

Here are all the links to my files, feel free to download them :

Name of the documents Link to download
Arduino file RGB Arduino Code (with sonar code commented)
Eagle files Sonar output Schematic File
Eagle files Sonar output Board File