Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Installation & Troubleshooting / Re: can't add a programmer to Arduino 1.0.3 on: July 06, 2013, 07:05:30 pm
hmm, the upgrade to 1.5.2 fixed my problem.  thanks!
2  Using Arduino / Installation & Troubleshooting / can't add a programmer to Arduino 1.0.3 on: July 06, 2013, 06:20:27 pm
I've tried editing programmers.txt in /hardware in the Arduino directory as well as /hardware in the sketch directory, but nothing I do changes the list of programmers available. I can tell my edits are having no effect since even editing the names of programmers that are present has no effect.  Is there some other super secret place where the programmer list is stored that I do not know about?  I'm using Arduino on Windows 7.  Changes to programmers.txt have immediate effects in Arduino 023 -- and because i can find my programmer there but not in 1.0.3, i've been reluctant to upgrade.
3  Community / Exhibition / Gallery / Using an AtTiny as a configurable environment controller on: June 29, 2013, 05:42:36 pm
I have a complex Arduino-based solar hot water controller that I can configure and monitor using a 100 ft. serial cable. (I'm not using a modern Arduino, but instead one that connects via a Max232 -- USB does not have an adequate range.)  This normally works okay and I can use its bootloader(s) (there's a master and a slave) to upload new firmware.  Occasionally, though, there are problems.  When the serial cable gets unplugged from the computer, that 100 feet of unterminated wire pulls in all sorts of random noise and repeatedly resets the controller via the DTR line (which is connected to the reset line via a capacitor -- as is the case in Arduino Diecimilas). To make the solar controller more reliable, I needed a way to switch off the capacitive connection between DTR and reset and only enable it when I need to upload new firmware.  So I build a circuit based on an AtTiny85 (which is programmable from within the Arduino environment -- see ) that monitors the serial transmit line (transmit from the computer, receive to the Atmega328s) looking for a string of the form '!X[digit]' -- if it sees that, it turns on a pin that, using a 4016 CMOS switch, connects the DTR to the Atmega reset pin for a length of time equal to 10 raised to the power of [digit] seconds.  During that time, I can reflash the Atmega328s as usual.  Otherwise I can only read data from the Atmega328s and send them serial-based queries and instructions.  This has made the solar controller much more reliable.  Here's the source code of the AtTiny:

June 27, 2013
Judas Gutenberg
Serial watchdog for the AT Tiny 45/85/84
It monitors a serial line for !X[digit] or !R
if the former, it makes pin 0 go high for 10^[digit] seconds
if the latter, it sends a low-going pulse out of pin 1 for 1/100th of a second
i use this as a serial watchdog on an Arduino, allowing
me to keep the capacitor on the reset pin disconnected most of the time
so a disconnected serial cable won't throw the arduino in a loop
i use the !R to force a hardware reset of both a master and slave arduino.

#include <SoftwareSerial.h>
SoftwareSerial softSerial(3, 4); // RX, TX
char byteThird;
char byteSecond;
char byteFirst;
long milliStart;
long timeOn=10000;
int len=0;

void setup()
pinMode(0, INPUT);

void loop()

if (softSerial.available() > 0)
byteThird =;
pinMode(0, OUTPUT);

pinMode(1, OUTPUT);
pinMode(1, INPUT);

if(milliStart+( powerof(10,len) *1000)<millis())
pinMode(0, INPUT);

void clearBytes()

unsigned long powerof(long intin, byte powerin)
//raises intin to the power of powerin
//not using "pow" saves me a lot of Flash memory
  unsigned long outdata=1;
  byte k;
  for (k = 1; k <powerin+1; k++)
  return outdata;

And here's the schematic for how I attached it to the Atmegas:

learn more about my solar controller here:
4  Using Arduino / Microcontrollers / Re: weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 05, 2013, 07:02:16 pm
I'm using an old Arduino BT for testing at my workstation and, for the actual application, an Atmega328 in an Olimex 28 pin development board (reachable only via RS-232) -- so I wouldn't have thought to call it a UNO.
5  Using Arduino / Microcontrollers / Re: weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 05, 2013, 11:34:41 am
i narrowed down the range of sketch sizes where the optiboot bootloader would fail to between 28660 and 28676 and then did google searches on each of the values with optiboot:

optiboot 28660
optiboot 28661

and got hits for 28666 and 28668 -- that latter one (and 28672) gave me this page:
6  Using Arduino / Microcontrollers / Re: weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 04, 2013, 10:34:03 pm
I loaded the bootloader myself, using (in at least one case) the optiboot bootloader provided with the Arduino022 download (I've found it more or less impossible to migrate my code to Arduino 1.0X, but then again there isn't much motivation). The thing about "well known bugs" is that they're only really well-known to people who know.  My Google searches turned up nothing when I searched for all the symptoms I was seeing. It's good to hear this bug has been fixed; Optiboot is so much better than any other bootloader I've tried.  I really don't have the time to wait around for the stock bootloader. Also:  for an Arduino to be usable in real equipment, there needs to be a watchdog (supported by Optiboot and Adaboot). Otherwise your solar pump will hang at some point while you're on a beach in the Dominican Republic and all your antifreeze will boil out into the snow.
7  Using Arduino / Microcontrollers / weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 04, 2013, 10:03:14 pm
This is just a word of warning to people who compile large Atmega328 sketches using the Optiboot bootloader on Arduino0022 and 0023 (I haven't tried it on other versions of the IDE).  When the sketch exceeds 28725 bytes in size (and possibly smaller, though no smaller than 27734 bytes), the upload will fail if you are using the Optiboot bootloader.  It will initially seem to be working (lights will blink, etc.) but the the upload will hang.  This isn't a problem with the Adaboot bootloader (and perhaps others that allow so much usable flash space).  It was good to finally figure out that the size of the sketch was the issue and not something else. (It took me hours to figure out what was wrong -- it was only obvious when I tried uploading a different sketch.)

The error you will get when the upload fails is:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
8  Using Arduino / Installation & Troubleshooting / Re: Pony Serial Programmer in Arduino 1.0.3 on: December 30, 2012, 06:27:11 pm
the commands in avrdude work for ponyser -- that's never been a problem. that's how i write the bootloader.
9  Using Arduino / Installation & Troubleshooting / Re: Pony Serial Programmer in Arduino 1.0.3 on: December 17, 2012, 08:56:58 pm
i would modify board.txt if i could find any info on what needed to be changed.  when i did this for arduino23, all i had to do was modify programmers.txt.  as things stand now, i can't use arduino1.0.3 -- which is just as well considering how much code of mine that it breaks (arduino.h, really?).  but i would like to try out some libraries written by others for it.
10  Using Arduino / Installation & Troubleshooting / Re: Pony Serial Programmer in Arduino 1.0.3 on: December 17, 2012, 07:14:44 pm
I don't really know what my device actually IS, I just know that it worked with this configuration in programmers.txt:

as you can see, it's a serial programmer. Hardware-wise, it only uses a few components:

here's the schematic:

I don't think any of that is at issue, though.  The problem is that Arduino1.0.3 doesn't seem to obey the dictates of programmers.txt.  I was hoping someone who has dealt with this issue could tell me what my problem is.
11  Using Arduino / Installation & Troubleshooting / Pony Serial Programmer in Arduino 1.0.3 on: December 17, 2012, 04:58:07 pm
I've been searching everywhere for help on this, but part of the problem is that virtually nobody says whether what they are describing is happening in Arduino1.X or in the pre-1.0 version of Arduino.  The differences between those two are pretty big (and software incompatibility has kept me using Arduino23 (pre 1.0) for any actual work I do.  That said...

I cannot for the life of me figure out how to get my PonySerial programmer working in the Arduino 1.0.3 IDE.  I tried editing programmers.txt, but the IDE (unliked Arduino23) seems to completely ignore that info. I know, because I changed the names of the programmers and nothing changed.  Evidently it is pulling its programmers.txt file from somewhere other than C:\Program Files (x86)\arduino\hardware\arduino .  Argh! I'm about ready to cry.  Why couldn't things work like they did under Arduino23?  Part of the reason I try to stick with open source as opposed to proprietary environments is that changes tend to be evolutionary and not revolutionary.
12  Community / Exhibition / Gallery / solar controller on: June 26, 2011, 10:04:50 pm
Here's my solar controller, which involves master/slave Arduinos, an LCD, a real time clock, a range finder, and EEPROMs, so there should be plenty of example code in here for those who are hungry for that sort of thing. Most recently I created an interactive menu system using an LCD and an IR mutifunction remote (the code is all in the slave arduino).

Watch me narrate the menu system here:

more details here:
13  Using Arduino / Microcontrollers / Re: exteral watchdog timer ic for mega2560 on: April 12, 2011, 08:47:18 am
the thing is, if you don't know the name for something and are simply experiencing a problem that you think you can solve, you find yourself designing something (at least in your head) until finally your research takes you to the wheel that has already been invented. i did a lot of research on how best to implement a 555 "auto resetter" (as i called it) before stumbling across a web page that spoke of watchdogs.  at that point i found atmel builds watchdogs into their chips and i was ecstatic!  i didn't have to build anything, i just needed a different bootloader and a couple lines of code. the more i work with arduino, the more i discover how rich an environment it is.  there's the arduino layer, but just beneath that is this huge avr layer. i do a google search, find some non-arduino page referencing libraries that turn out to exist in the the arduino environment. it's continually surprising (but in a good way).
14  Using Arduino / Microcontrollers / Re: exteral watchdog timer ic for mega2560 on: April 11, 2011, 06:54:34 pm
a few days ago, i found myself needing a watchdog without evening knowing there was such a thing and that it had a name.  my initial plan was to hook up two 555 timers (actually, two such timers in a 556 package), using one as a missing pulse detector and the other as a brief one-shot (it would have to work through a logical inverter).  i'd dedicate an arduino pin to sending regular pulses to the missing pulse detector, and if that ever failed, i'd fire the one shot, which would strobe the reset pin through the inverter.  it wouldn't be difficult to implement and wouldn't require a special bootloader. but then i discovered that watchdogs are real things and are implemented in hardware on atmel chips.  the tricky part was getting past the stock bootloader, which is inherently incompatible with the built-in hardware watchdog. if i were in your position and gave up on the bootloader, i might implement the dual 555 analog watchdog.
15  Using Arduino / Microcontrollers / watchdog reset hardware behavior on: April 11, 2011, 05:56:55 pm
After much experimenting, I was finally able to implement the Atmega328's watchdog.  This required, among other things, use of the Optiboot bootloader (which works so much better than stock bootloaders!).  My question is:  does anyone know if a reset generated by the watchdog timer actually pulls the Atmega328's reset line low electrically?  I'm curious because that line is connect to other things and it would be nice to know that they are also rebooting (or, if they are not, i might need to do something).  I know I could watch the reset line with an oscilloscope, but I don't feel like taking the circuit out of its application and hooking all that up right now.
Pages: [1] 2 3 ... 6