Posts | Comments

Planet Arduino

Archive for the ‘attiny’ Category

Jan
29

8-Pin Arduino Programming Shield

arduino, attiny, shield Comments Off on 8-Pin Arduino Programming Shield 

FX590UNGTNKVSPH.MEDIUM

randofo @ instructables writes:

The 8-Pin Programming Shield allows you to program ATtiny series chips using the Arduino itself as the programmer. In other words, you plug this into your Arduino and then you can easily program 8-pin chips. These small microcontrollers can then be incorporated into any project that you want. Follows are instructions for assembling your own 8-Piin Programming Shield.

8-Pin Arduino Programming Shield - [Link]

Jan
27

Program an ATtiny with Arduino

arduino, atmel, attiny Comments Off on Program an ATtiny with Arduino 

FXG5P37GSUSNCRZ.MEDIUM

In this article you will learn how to programm an ATtiny mcu using Arduino IDE.

Follows are directions for programming the ATtiny microcontrollers using the Arduino IDE. In plain English, this is how to program 8-pin Atmel chips as you would normally an Arduino. This is cool because the ATtiny is tiny, and – well – this allows you to make tiny things that don’t need a big ol’ microcontroller.

Program an ATtiny with Arduino - [Link]

Jan
13

Software Half Duplex UART for AVRs

arduino hacks, attiny, ATtiny Hacks, half duplex, software uart, uart Comments Off on Software Half Duplex UART for AVRs 

One Wire Serial

If you have worked with very low cost microcontroller in the past, such as the ATtiny series from AVR, you’ve probably been stuck without a UART peripheral. The usual answer to this problem is to implement the UART in software. It’s not fast, but it works.

Lets say you’re even more limited on resources, and only have a single pin for UART. [Ralph] created a software library and a small circuit that enables half duplex UART using only one pin. With the above circuit, and a 62 byte Arduino compatible library, you can add UART to the tiniest of ATtinys.

In this circuit, the Tx/Rx pin is on the AVR, and the Tx and Rx pins are another device. The circuit relies on the idle state of UART being a logic high signal. When the Tx pin is idle, the transistor stays on. This allows the Tx/Rx pin to pull Rx low when the AVR sends a 0. When the Tx pin sends a 0, the Tx/Rx pin gets pulled low through the diode.

It’s a clever hack, and could definitely help add communication to your next tiny project.


Filed under: Arduino Hacks, ATtiny Hacks
Oct
22

knockAttiny

Pressing the power button on your computer usually isn’t too much trouble, unless your computer is stored away somewhere hard to reach. [Joonas] has been hard at work on a solution that would also impress his friends, building a knock sensor to turn on his PC.

For around $10 in parts he put together an ATTiny45 that emulates a PS/2 device, which takes advantage of his computer’s ability to boot upon receiving PS/2 input. The build uses a Piezo buzzer and a 1M Ohm resistor as a knock sensor exactly as the official Arduino tutorial demonstrates, and one of those PS/2-to-USB adapters that are most likely lurking in the back corner of every drawer in your office.

[Joonas] used AVRweb to disable the 8X clock divider so there’d be enough clock cycles for PS/2 communication, then loaded some test code to make sure the vibrations were being detected correctly. You can check out his Github for the final code here, and stick around after the break for a quick video demo. Then check out a similar hack with [Mathieu's] home automation knock sensor.

https://www.youtube.com/watch?v=FTVppOZquE8


Filed under: Arduino Hacks, computer hacks, Microcontrollers
Sep
16

The TinyLoadr Shield Programs AVRs From Your Arduino

arduino, attiny, AVR, Electronics, General, microcontrollers, shield Comments Off on The TinyLoadr Shield Programs AVRs From Your Arduino 

IMG_2974Turn your Arduino into an AVR programmer with the TinyLoadr Shield! Jeff Murchison's shield makes shrinking Arduino projects easier and more efficient.

Read more on MAKE

Aug
10

BareDuino micro

arduino, ATmega328P, attiny, ATTiny45, ATTINY85, Mcu Comments Off on BareDuino micro 

dingetje-600x400

Niek designed this BareDuino micro, that is available at github:

For some Arduino projects, you don’t actually need that many IO pins. That’s exactly the case when I tried to build a simple RGB throwie that would cycle through colours. I was looking for a cheaper alternative to the Arduino UNO’s ATmega328P when I stumbled across this post by MIT’s High-Low Tech lab. They developed a library for programming the 8-pins ATtiny45/85 from the Arduino IDE. It’s a very smart solution to use permanently in some low pin-usage projects, but you still need to hook up individual wires from your programmer to the ATtiny to be able to program it. That’s when I came up with the idea of the BareDuino Micro.

[via]

BareDuino micro - [Link]

Jul
26

ATtiny programmer using Arduino ISP

arduino, ATmega328, attiny, ATTiny45, ATTINY85, avrdude, DASA, isp, Mcu, USBtinyISP Comments Off on ATtiny programmer using Arduino ISP 

F2AY9GVGZ0MMEBD.LARGE

JeonLab @ instructables.com writes:

For relatively small (less number of pins than ATmega328) projects, ATtiny series, ATtiny45 or Attiny85 are good choice in terms of its physical size (8-DIP or 8-SOIC) and low power consumption. There are many ways to program it. One of the popular device is USBtinyISP and DASA. Both of them work very well with WinAVR (AVRdude).

ATtiny programmer using Arduino ISP - [Link]

Nov
05

Beginner project: Color Sensing with RGB LEDs and a photocell

arduino hacks, attiny, led hacks, RGB Comments Off on Beginner project: Color Sensing with RGB LEDs and a photocell 

I’ve seen the concept art for “real world eyedroppers” several times. I haven’t noticed any of the products come to market though. It isn’t the technology stoping them, color sampling can be done a million ways. I picked one of the easiest ways and tossed something together pretty quickly.

The method I chose is outlined in fantastic detail by [Fjordcarver] on instructibles. I took his project and used the Teensy2 instead of an arduino as well as seperate red, blue, and green LEDs since I had some lying around. He includes the schematic to do exactly that, so again, credit goes to him. [Fjordcarver] also made a processing sketch to display the colors. I wanted to actually use this, so I added a tiny feature where any keystroke will copy the hexidecimal color to the clipboard. This way I can just leave the “eyedropper” running and sample things whenever I want.

IMG_0590 IMG_0592 IMG_0593 IMG_0594 IMG_0595 IMG_0597 IMG_0598 fjordcarvers_schem


import processing.serial.*;
import java.awt.datatransfer.*;
import java.awt.Toolkit;

String buff = "";
int val = 0;
int wRed, wGreen, wBlue;
String col = "ffffff";
ClipHelper cp = new ClipHelper();

Serial port;

void setup(){

size(200,200);
 port = new Serial(this, "COM3", 9600); //remember to replace COM20 with the appropriate serial port on your computer
}

void draw(){
 background(wRed,wGreen,wBlue);
 // check for serial, and process
 while (port.available() > 0) {
 serialEvent(port.read());
 }
}

void keyPressed() { cp.copyString(""+col); }
void serialEvent(int serial) {

if(serial != '\n') {
 buff += char(serial);
 }
 else {
 int cRed = buff.indexOf("R");
 int cGreen = buff.indexOf("G");
 int cBlue = buff.indexOf("B");

if(cRed >=0){
 String val = buff.substring(cRed+3);
 wRed = Integer.parseInt(val.trim());
 }
 if(cGreen >=0){
 String val = buff.substring(cGreen+3);
 wGreen = Integer.parseInt(val.trim());
 }
 if(cBlue >=0){
 String val = buff.substring(cBlue+3);
 wBlue = Integer.parseInt(val.trim());
 }
 col = hex(color(wRed, wGreen, wBlue), 6);
 buff = "";
 }

}

// CLIPHELPER OBJECT CLASS:

class ClipHelper {
 Clipboard clipboard;

 ClipHelper() {
 getClipboard();
 }

 void getClipboard () {
 // this is our simple thread that grabs the clipboard
 Thread clipThread = new Thread() {
 public void run() {
 clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
 }
 };

 // start the thread as a daemon thread and wait for it to die
 if (clipboard == null) {
 try {
 clipThread.setDaemon(true);
 clipThread.start();
 clipThread.join();
 }
 catch (Exception e) {}
 }
 }

 void copyString (String data) {
 copyTransferableObject(new StringSelection(data));
 }

 void copyTransferableObject (Transferable contents) {
 getClipboard();
 clipboard.setContents(contents, null);
 }

 String pasteString () {
 String data = null;
 try {
 data = (String)pasteObject(DataFlavor.stringFlavor);
 }
 catch (Exception e) {
 System.err.println("Error getting String from clipboard: " + e);
 }
 return data;
 }

 Object pasteObject (DataFlavor flavor)
 throws UnsupportedFlavorException, IOException
 {
 Object obj = null;
 getClipboard();

 Transferable content = clipboard.getContents(null);
 if (content != null)
 obj = content.getTransferData(flavor);

 return obj;
 }
}


Filed under: arduino hacks, led hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook