Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - EKMallon

Pages: 1 2
I have not yet had time to put this one under real scrutiny, but I am hoping to use it to detect low voltage on long term datalogger project.  At the moment, I have only tested it down to about 3.8 volts, and seen a bit of noise in the readings - the flop around by 200 mV ish, but as my project is pretty rough I dont yet know if this is due to the routine, or its simply my cheep AA battery holders giving me grief in a humid environment.

Apparently this code has been floating around for quite a while, so you might be able to find out how reliable the internal 1.1 v ref via google. If you do, please post the extra info here so others can use it...

With the thickness of my mounting platform, the short machine screws that come with the TinyDuino Mounting Kit just are not long enough for my stack of 4 boards (5 with the ftdi board) and while there are probably a million ways to solve this problem I though I would post mine in case it helps someone else with the same issue.

I found some 3/64 inch brass rod at my local hobby shop [made by K&S engineering, Chicago stock 3/64 brass rod stock number 1619] , which cuts easy and threads perfectly through the plastic standoffs in the mounting kit. So I simply shape this into a "U" shape, and run it under the mounting board so that it pokes up through two diagonally opposite holes of the tinyduino stack.

On the other two holes of the stack I use the supplied machine screws with bolts, and this afixes the stack to the mounting platform, but these are then two short to hold the upper boards. But the brass rod is as long as I need to make it, so it supports the upper boards. Then to lock the upper boards down, I thread some very small diameter heat shrink tubing down the brass rods, and once shrunk in place this holds the upper boards in place. 

General Discussion / Re: Is TinyDuino appropriate for beginners?
« on: November 26, 2013, 02:49:41 PM »
Re: Tiny Duino for beginners?

After putting full headers on two protoboards (which was a bit challenging...), I would add one thing about the tiny duinos that while obvious, but might not be apparent to a real beginner: You need to be pretty darned good at soldering to work on boards this small (Especially on protoboard 1). If you haven't had much practice there, then I would recommend you buy a few protoboards and just try to solder ten wires to each one, in holes right beside each other.  If you get through that without bridging any contacts, then you know you are good to go, at least on the physical side of things.  Otherwise it might be good to start on a bigger board with bigger contacts pads.

Just stumbled across this little trick, and it seems to work reasonably well on the Tiny duino (although it seems to report about 0.6 volts lower than an external voltmeter directly on the supply).  I will try to compare this to a voltage divider later, but for now I just thought someone else might find this handy for low voltage warnings, etc. I have not tried the temperature trick yet.


"There is a little trick using that internal 1.1v reference Grumpy Mike talks about. I'm not sure exactly how they measure the Vcc (or probably AVcc) without any external voltage divider.

This only works for the atmega 168 or 328.

Copy, paste into Arduino and see what it returns. This works on an Arduino 168 or 328.
Code: [Select]
long readVcc() {
  long result;
  // Read 1.1V reference against AVcc
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
  delay(2); // Wait for Vref to settle
  ADCSRA |= _BV(ADSC); // Convert
  while (bit_is_set(ADCSRA,ADSC));
  result = ADCL;
  result |= ADCH<<8;
  result = 1126400L / result; // Back-calculate AVcc in mV
  return result;

void setup() {

void loop() {
  Serial.println( readVcc(), DEC );

There's also a similar method of measuring the temperature:"

New Product Ideas / Re: New Proto board
« on: November 18, 2013, 04:55:01 PM »
Good for the desktop, but I wonder how a second stack would just stress the joint once the whole unit starts moving and shaking, esp with the extra wires coming out of the top protoboard acting acting like springs. I know this is a bit extreme for most people, but if a ribbon cable connector was available for the USB shield, (with a pass through connectors on in the main stack side) I would be tempted to pot the entire thing due to moisture hazards, as well as structural support.

...Like the idea of having the same shield for through hole AND smd. (though still have not been brave enough tackle smd soldering)

New Product Ideas / Re: New Proto board
« on: November 17, 2013, 06:33:05 PM »
I love this shield idea, but I have already run out of room on the bolts from the mounting hardware kit so would need some longer ones to make use of it.  Does anyone know where one could find longer bolts in this extremely small diameter? The local hobby shops had nothing to offer.

Found the reference I was looking for wrt the level shifter on the Tiny accelerometer board:

So the devices connected via the level shifter do not need pull up resistors (which is why I could not find them in the schematic pdf).  However the graphs further down the page, refer to "using the I2C Level Translator .... AND external pullup resistors shows a vastly improved improved signal for both standard speed and high speed communication." I interpret this to mean that the other devices on the I2C lines, that are not behind the level shifter, should have pullups applied as normal.

So I am adding 10k pullups on the RTC, which, even if they parallel the internal 10k's on the level shifter, will leave me with 5k overall, which should be ok. Will post to let folks know if this works ok.

I found a nice explanation of the pull up resistors function here:

And a more detailed I2C reference here:

And as I interpret my way through that information, I am left thinking that I am probably safer to add the I2C pullups on the RTC, even if they already exist in the circuit, than to go without them. But I am still left without knowing what the Tiny accelerometer is already doing to the SDA and ACL lines (just going by the pdf - cant get the eagle files to open with the freeware version)  and I just dont know how to interpret the level shifter's effect on the I2c lines.

Please forgive another newbie question:

In the absence of a tinyduino native RTC, which I know is in the works, I need to use a Chronodot RTC communicating via I2C to SDA (analog input pin A4) and SCL (analog input pin A5). According to my reading, I²C uses open-drain IO pins, so pull-up resistors on the SCA and SCL lines are generally required. But confusingly I have read that the Wire library, which does the
I2C communication, enables internal pull-up resistors by default. More confusing for a newbie like me, I see photos of  projects on the web, where people are using chronodots RTCs with other 3.3v boards like the pro mini, with no sign that they have installed the pullups, but they still seem to be working.

Do the SCL and SDA lines on the tinyduino have internal pull-up resistors that are automatically enabled by the wire library, or do I need to run my own 4.7KΩ(?) resistors from the SCA pin to VCC, and the SCL pin to VCC.

And finally, my final unit will also have the Tiny-circuits accelerometer in it, which is also an I2C device with a level shifter. Does the presence of that level shifter, affect this question? Ie, does the level shifters connection to the SCL & SDA lines mean I dont have to worry about pulling up SCA & SCL for the other I2C devices that would also be connected?

New Product Ideas / Re: RTC board with a few extras
« on: November 11, 2013, 08:17:40 PM »
I just want to add to the request for a fairly accurate RTC board, so that folks can build data logging applications with deeper sleep cycles for power saving, and use an an alarm interrupt from the RTC to wake. I know Tiny has an RTC in the works, but I would love to know eta, and the chip they are considering. The DS323x chips (rather than the cheaper DS1307s) have a built-in crystal and temperature compensation, which becomes more important in outdoor applications, and you can pull the internal temp data from the rtc, so you get that sensor for free.

And wrt stacking, somewhere in the forum there was a suggestion of a ribbon cable with stackable, mini connectors on both sides, which solves the problem of stacking multiple proto boards, and also deals with the battery holder on the RTC board (unless the rtc board had its own power connector, similar to the way they attach cmos batteries to the mother board in laptops)

New Product Ideas / Re: Stackable Ribbon Cable Connectors
« on: June 30, 2013, 08:27:27 PM »
I just wanted to put another positive vote in for this idea.  My project will become extremely space constrained in later versions, and having a flexible cable hanging away from the main stack, lets me attach a usb shield after the rest of the stack is bolted down tight in the housing (and wedged in between the batteries) That would make things much more convienient.

General Discussion / Re: USB & ICP board mosfet question
« on: June 30, 2013, 12:21:47 AM »
Well, as someone who would like to cobble together a datalogger, with the tiny accelerometer shield, and the tiny microsd card shield and a proto board (currently need for the rtc interupt, but will be populated later with sensors once the tiny RTC board is available)

What voltage range can we supply at VBATT, to keep the whole stack at a happy operating range (assuming that the USB shield is disconnected when the unit is in the field and the RTC is has its own power ) Am I within operating tolerances for the whole stack with a simple set of 3AA Alkalines (~ 4.5 V) on the Vbat pins?

Pages: 1 2
SMF spam blocked by CleanTalk