Before, Trinket insulated with a sandwich bag. |
Sunday, November 23, 2014
Fannator 1000 v2
The Fannator 1000 is being upgraded from an Adafruit Trinket and Sunfounder relay shield spaghetti mess to a custom PCB featuring an ATtiny85 and dual MOSFET's with JST connectors, programming headers.
Sunday, November 16, 2014
Recovering a "bricked" ATtiny85 from bad clock fuse settings
In my endeavor to add some board selections in the "boards.txt" that offer BOD protection, I managed to burn fuses on an ATtiny85 to run it at 128kHz, aka the watchdog oscillator. Bad idea. At this point the ATtiny became unresponsive and the IDE displayed the error below. Arrggh, just bought these. BTW, I'm using an Arduino Nano v3.0 as an ISP for the ATtiny85.
Error after trying to burn the 128kHz boot loader …
Error after trying to burn the 128kHz boot loader …
avrdude: Yikes! Invalid device signature.Here's how I un-bricked them ...
Double check connections and try again, or use -F to override this check.
- Checked wiring, checked again.
- Downloaded an enhanced ArduinoISP sketch from https://github.com/adafruit/ArduinoISP which essentially allows you to fix bad fuse settings.
- I renamed it to ArduinoISP2 so I could differentiate it from the original.
- Before you load this on your programmer (nano in my case), you'll want to un-comment out the line "#define LOW_SPEED" which enables all the wonderful un-bricking goodness packed inside. I also had a 10uF cap on the nano's RST pin and GND (for uploading sketches to the ATtiny85) so I pulled this cap out before uploading.
- Now you can upload the ArduinoISP2 sketch.
- After the upload, I inserted my 10uF cap back on the nano's RST pin.
- Next, I selected a known good board selection for the ATtiny85 at 1 MHz and
burned the boot loaderset the fuses. You may encounter the following error:
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x00
avrdude: stk500_cmd(): programmer is out of sync
Just keep going, the rest is easy. - Now i went to the original ArduinoISP sketch and uploaded that to the nano, so out with the cap again, upload, cap back in.
- Now repeated step 7 with the difference being that the ISP is going regular speed. I got the usual error message ...
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
which just fine with me. - I tested it out with the Blink sketch (led = 4) to verify everything was peachy. Blink blink blink.
Edit - 20150829 - changed "burned the boot loader" to "set the fuses".
Edit - 20150923 - this only worked with Arduino 1.0x.
Edit - 20150923 - this only worked with Arduino 1.0x.
Monday, November 10, 2014
CadSoft EAGLE + Random tName Formats + OSH Park = A Mess … Fix included
Using different libraries means dealing with varying artwork. In the end, it's easy to end up with a collection of seemingly random artwork. When I submitted my brd file to OSH Park, I saw a mess in the preview. Anyway, I prefer labeling manually for reasons of consistency and clarity.
The layers tNames and bNames is the culprit here. I took the direct approach, deleted those layers and resubmitted. Everything looked fine in EAGLE. Low and behold, no artwork at all. So deleting them is not an option. I ended up renaming the offending layers to x1 and x2 (or name them whatever you'd like). I then created two new (and blank) layers named tNames and bNames. This time OSH Park's render showed no mess, only the text I put down.
The layers tNames and bNames is the culprit here. I took the direct approach, deleted those layers and resubmitted. Everything looked fine in EAGLE. Low and behold, no artwork at all. So deleting them is not an option. I ended up renaming the offending layers to x1 and x2 (or name them whatever you'd like). I then created two new (and blank) layers named tNames and bNames. This time OSH Park's render showed no mess, only the text I put down.
The nice part about renaming is that it can be done right before fab and it's not permanent.
Subscribe to:
Posts (Atom)