I2c and the Raspberry Pi

Now i have succeded with communication between the Pi and the Attinys as I2C slaves.
Here is the result:

For live demo go to this page
URL:http://mrslade.dyndns.org:8083/test.PHP

Publicerat i Attiny, Communication, Home automation, Programming, Projects, Raspberry Pi | Stängt för kommentarer

My first Standalone Arduino

wpid-wp-1394678368744.jpg

wpid-wp-1394678391482.jpgI made a temperature logger  a long time ago. It was build on my very first Arduino Uno board. I got three of them now. ;)
The thing is, that it just running and nothing have changed with the source code since almost the first day i made it. So i decided to fix it as an own standalone Arduino. I putted together the necessary stuff like crystal and two capacitors and programmed the chip (that is an Atmega328-PU the non-p version) and it is a success. I also changed the network shield to one based on ENC28J60 instead for the original “Ethernet shield” from Arduino. I do have one problem. I didn’t have any voltage converter at home, so i have to order it. The network module need 3.3V. I do tried to make a own version with two resistors, but was unsuccessful. I don’t want to burn the module. So until the receive i will still have it running on my Arduino as a voltage host.

You can see the result of the data here (in swedish): www.tempkontroll.se

Publicerat i Arduino, Communication, Home automation, Projects | Stängt för kommentarer

My own AVR programmer shield

wpid-20140313_031843.jpgAfter made my own programmer with my Arduino Uno as a ISP and a breadbord with a couple of wires, i made something good yesterday. I made one on a  experiment circuit board. With the possibility to program both Atmega168/328 and Attiny 13/25/45/85. Well, it’s not looking so fancy, but it works, and isn’t that the game? As you see in the picture, the blue led is the “heartbeat” of the programmer. The second led (red) is indicating errors and the last one (white) is the programming led. Maybe i will make a PCB of it sometime, but for now its enough. I combined the schematic from last post and the schematic for programming the Attiny.

Source: http://highlowtech.org/?p=1706

Publicerat i Arduino, Attiny, Programming | Stängt för kommentarer

Nothing is impossible or how i uploaded a sketch to my Atmega328-PU (non-P version)

I tried a while to upload the sketch blink to my Atmega328-PU without success. I checked internet for solutions and trust me, i have tested them all. But no success, until i found this one. It’s not as simple like to use the Arduino IDE but it works with sketches made in the Arduino IDE, and that was important for me. I will also tell that i had successfull burned the bootloader without problem on the same Atmega328-PU before trying to upload sketches.

To burn bootloader i first added some rows in two files like this post:
Source: http://forum.Arduino.cc/index.PHP?PHPSESSID=nm4rudp4fe4d1abta9jhhi19j1&topic=58670.msg701645#msg701645
Files are located at C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf and C:\Program Files (x86)\Arduino\hardware\Arduino\boards.txt on my system that is Windows 7. Don’t forget to restart Arduino IDE.

I burned the ArduinoISP sketch to my Arduino. After i set Tools -> Programmer -> Arduino as ISP to use my Arduino as a programmer.
After that i connected my circuit like this schematic:
Schematic of using an Arduino UNO as a programmer
Source: http://www.instructables.com/id/How-to-program-a-AVR-Arduino-with-another-arduin/?ALLSTEPS
I recommend that you connect the debugging leds. Trust me, they simplify a lot.

Before i start to upload i change one more thing. I select Tools -> Board -> Arduino Uno w/ ATmega328 (non-P).

Now i can upload the bootloader with success.

But upload the sketchy thing… It won’t work, it didn’t do it for me anyway.
But i did solve it when doing like this:
I followed the instructions on step 3 and 4 in this guide. I do changed a little in my command line when uploading sketch to my Atmega328-PU as this :
AVRDUDE -P com7 -b 19200 -c avrisp -p m328p -F -u -U flash:w:”C:\Users\mrslade\AppData\Local\Temp\build4807434003741737164.tmp\Blink.cpp.hex”:i
Remember to change the com-port to your own and to change the -p flag dependent on what chip you will program. AND remember that the path was to my sketch.
Source: http://pdp11.byethost12.com/AVR/ArduinoAsProgrammer.htm

Good luck!

Publicerat i Arduino, Communication, Okategoriserade, Programming | Taggat | Stängt för kommentarer

I2C on a Attiny85 / Attiny45 / Attiny25

attiny85-i2c-ssr

I have made it. Finally i get it to work. I communicate with an attiny85 (will work with 45/25 too i think CONFIRMED!). The SSR i had to my previous lab with an Arduino as a “webserver” that was also controlling my SSR with a simple toogle button has now become a single Attiny85 controlled SSR. The schematic is like the image to the right.

IMPORTANT! The TLP621 part is not the one i use! I use S216S02 from Sharp. No equivalent was found in Fritzing
162558_BB_00_FB.EPS_1000[1]
The source on my Attiny85 is:

Publicerat i Attiny, Communication | Taggat , , , | Stängt för kommentarer

Measure my electricity consumption

elmatare

One part of the HAS (Home Automation System) is to measure my electric consumption. To do this i have to read an light pulse from my unit. So i made one simple reader with photo resistor and a single resistor on 1kΩ connected to my Arduino. Well, it was not so successful because the fast impulses from the led (10000 imp/kw) so i ordered a photo transistor to test with tomorrow.

fotoresistor_bb
the code follows here:

And here is a little video of the object with photo resistor:

Publicerat i Arduino, Home automation, Okategoriserade, Projects | Stängt för kommentarer

Show the people my world!

I have build a simple webserver with webcam so i can show you all when changes is made on my last project with home automation. Its a pretty simple build with the Raspberry Pi and a QuickCam® for Notebooks Pro. All together its simple task is to take one picture every 2 seconds and act as a webserver and let you se the image. Simple task for the Pi.

Go here for live Demo: http://mrslade.dyndns.org:8083

 

Publicerat i Other, Raspberry Pi | Stängt för kommentarer

Let’s start this page up now

Below is my projekt based on Arduino. It’s ment to be a predevelopment for my house automation, where i will be able to turn lights on/off as a timer, but with the smart idea of connecting a phototransistor so that the lights wont turn on until its enough dark outside. All will be a internal bus/net in the house. On this net i will also have my temperature sensors. As the end of the project will be a automated home monitoring system. Included the power consumtion of the house. All driven by a microcontroller.

Publicerat i Arduino, Home automation, Projects | Taggat , , | Stängt för kommentarer