Public Lab Research note

  • 3

Riffle Beta Release: Feature Requests / Review?

by donblair |

Hi All!

We're wrapping up a bunch of conversations about the design of the board, in order get a "Beta Release" out to people for testing, hopefully sometime in the next few weeks. I'm right now trying to incorporate the additional features we wanted to get into the Beta release, and

(Aside: in order to keep with common practice, should we name the Beta version "0.9" something, rather than "1.0"? )

The current main datalogger board features include:

  • RTC for accurately measuring the time between 'sleep' cycles
  • Lithium battery charging circuitry
  • Onboard 'charging status' LED, as well as 'indicator LED' that can be used to provide the user with visual feedback
  • an EEPROM memory storage
  • a microUSB port for programming and charging the device
  • a 2x7 subset of pins brought out at the end of the device

I'm about to wrap up a design iteration of the board, with the following changes:

  • the addition of two M4 screw holes in the board, to allow for mounting
  • a rearrangement of the pins brought out at the end of the board
  • (potentially) adding a connector for easily attaching AA batteries (another JST connector, perhaps)
  • moving all non-throughole parts to the 'top' of the board to allow for less expensive manufacture
  • the ability to wake up the microcontroller using the RTC 'alarm' function, so that the device can be put into deep sleep mode

I know there are only a few of you out there who've as yet even been able to play with one of these boards, but for those of you who have -- or who've been interested -- are there any particular features you're interested in, that I've missed?

Some example questions:

  • What pins do you think must be on the 2x7 connector at the end of the board? This is where any sensors or other devices would connect, and is akin to the double-row 'mounting headers' on an Arduino UNO that are used by Arduino shields.

  • Is I2C EEPROM a useful feature (for storing e.g. device settings, or even data)? Would e.g. an SPI memory module be a better idea (high capacity, but takes up an additional digital pin)?

The main repo for the Riffel is here:

The latest (unfinished) design is here:

Cheers! Don

air-quality water-quality water datalogger logging riffle logger


For versioning, I'm tending to use Semver. Did you push this announce out to the lists, btw? Great to see it!

Cool! I super support the easy AA battery option. I have a design for a DIY battery case I can mock up soon, one that will ship flat. I'll watch to see what terminals you go with.

My only other feature is the self-test script for manufacturing, when they install firmware so it blinks "hello" if it works.

Thanks @warren re: Semver -- that looks like just the sort of guidance I was looking for!

@tonyc -- I was thinking about this issue ... one of the approaches I've seen generally is to simply leave a + and - terminal with a standard 0.1 " header spacing somewhere on the board. This allows for either a) soldering battery container wires there directly, b) soldering a wire that goes to a JST connector, or a female barrel jack connector, and then to a standard JST wire / barrel jack wire connected to a battery or battery holder, c) soldering a 3.5 mm standard screw terminal there, d) soldering a female or a male header there ... etc. So then, if we're shipping a flat kit, we can simply include whatever of those options we find most convenient / accessible -- and folks can choose their own alternatives if they like. (Re: requiring soldering -- we'll anyway likely be requiring the user to do a little soldering for the 2x7 female header at the board.). It also makes it easier to fit on the board -- whereas choosing a barrel jack or a JST connector would sort of be bulky ...

Whaddya think?

Note: regarding the RTC wakeup functionality, I posted some thoughts here:

well, it's all tradeoffs...I'd prefer to have an option to use AAs without a soldering iron, since it's the simplest way to get the thing working out of the box.

Is it an option to have a 2-pin JST somewhere for power? seems smallest/cheapest, but you know the layout of this thing.

I'd love to avoid saying, "required skills and tools: Soldering" if we can, even if it added 0.1 to each kit.

The Pocket Operator has a great 2x AA battery clip on the back. I know that's not exactly what you're looking for but I just love my PO so much I have to post it:


Exciting stuff! I'd second the easy AA battery option. I can solder at a basic level, but the less it's required, the less it can go wrong.

I don't have the technical knowledge to make an informed comment about which pins I'd prepare on the 2x7. As far as applications are concerned, it might be good to support connecting to a cellular modem with a long cable, so the riffle can collect data submerged with the modem mounted somewhere above the surface.

Wow, so many good thoughts ....

soldering & accessibility

It's a good point that it'd be nice for the kit to be useful without requiring any soldering. Given the sort of manufacturing processes we're considering, the only parts that will require soldering on this board will be "through-hole" parts -- parts with pins that go through the board. We are using a through-hole 2x7 connector for the pins at the end of the board in order to make it mechanically more stable; I had been thinking that we might just ship the board with that part separately, as is standard for any of the parts from Sparkfun or Adafruit. The main reason for this is that paying someone to do the 'through hole' soldering, which isn't easy to do with a robot, tends to be more expensive. But I really don't know the details on that. E.g. the Arduino Uno has through-hole parts; I don't know what manufacturing process they use. Perhaps we could ask MacroFab how much it would cost to have through-hole parts soldered?

If we want some functionality to be available 'out of the box', we could load the board with code that measures the temperature from the on-board RTC, which has a thermistor, and records it to an on-board uSD card. That way, the device is useful immediately as a temperature datalogger.

We could also look for alternative connectors on the board that don't require soldering. I'll do a quick check into that.

@tonyc -- Do we have an idea for a AA battery holder that lies flat, connects to a JST connector, and doesn't require soldering? Perhaps we could use wire-twisting, and tape?

Another option to have something ready 'out of the box' would be to ship a small, flat lipo battery


The numbers are rough for me still, but I think that we should still be able to easily get something like 1000 hours of temp measurements out of a 100 mAh battery, for applications where we make a quick measurement every 10 minutes and sleep in-between.


@pdhixenbaugh -- spot-on exactly what I was hoping to try next :) It looks like for measuring turbidity we'll want to be submerged at least a few feet underwater, so it'd be good to see if we effectively waterproof a water bottle with a cable sticking out of the bottle and going up to an antenna at the surface ... maybe with a little flotation device to keep it above water?

@warren -- wow, that Pocket Operator looks so cool. It makes me wonder if there are AA battery holders like the one they used with the metal clips that could be folded down before shipping -- then folded back up by the recipient -- in keeping with the vision that you and @tonyc have had about being able to place everything in a flat envelope ....

oh, interesting ... i don't know how mechanically stable these will be, but:


Receptacle side ...

Hmm, maybe we can get away with no soldering required after all!

I don't know if this part can be placed by a pick-and-place, but if it can, might be worth trying -- the double row SMT pads might make it sufficiently mechanically stable?


Though, it those connectors really will tend to get a lot of bending forces on them when small boards / wires are connected to them, and probes are dangling off ...

My impression, from what I've heard, read, is that it's a bad idea to use SMT components when there is any regular mechanical stress expected. Cf. the discussion here:

I wonder if the connector were recessed from the edge of the board, and perhaps wrapped around some kind of supporting shape of the board itself? It could then be rubber banded, heatshrunk, or just taped to stay in place. Something like this seems like it'd be very sturdy:


Those recesses look like the ones I was reqeusting for the zip-tie mounting idea. should be simple manufacturing-wise, and if we had recess on front/back, coudl allow for the mount found in this note.


Aj, cool ideas @warren and @tonyc!

Also: I just heard back from MacroFab -- they can do through-hole soldering for a little more (per pin) ... so it'll be interesting to price out having a fully pre-soldered board (with through-hole 2x7 connector) ... that would be neat. But if the price is too high, we should consider rubber band & heatshrink!

power / batteries

And I now recall that shipping lithium batteries in the mail, and abroad, might not be so easy. So, even more urgent to look into other options and make them accessible.

In looking at the board design, it really seems like it's confusing / inelegant to have two power JST connectors, one for lithium, one for AA ...

And now this is reminding me that:

  • John Keefe had actually preferred to have a power port that simply accepted a large range of voltages from a large range of battery chemistries -- alakaline, lithium, whatever -- and that it didn't need to have recharging capability. His thought was: if people wanted to use a rechargeable lithium battery, they can also get a ~ $5 little board for recharging.

This would simplify the design and allow it to become more general. For example, if someone wanted to add a solar-recharged lithium battery, it'd be easier to do.

I'm going to give designing a board without the lithium charger a shot -- that way there's just one JST connector (and I'll leave a two-pin connector open too) and one can plug anything into it ...

Cheerio! D

Oh, and @warren & @tonyc -- so some notches on the edges of the board, yeah? Will play with the idea ...

I support the idea of giving up recharging in order to handle more types of batteries. That seems a higher likelihood use case. We could offer the Lipo battery and the recharging board in the store, and solve that issue separately.

Ah, okay, issue:

I can drop the charging chip; but currently the charging chip performs a useful additional function: it allows voltage to be coming in from both USB and the battery, and automatically only uses USB power to charge the board, and not to power the uC, when USB is connected.

If we drop the charger chip, then we need to find a way to avoid having USB connect to the battery. This is often done with diodes, as per:



This way, you can plug in both USB and battery and neither will be affected by the other.

The problem with this approach is that diodes have a 'voltage drop' across them -- this means that some of the voltage from the battery (typically, .5 V) will be lost before we hit the LDO -- which has its own voltage drop (about .3 for the one we're using). So, running our board at 3.3V, that doesn't give us much headroom / reduces our battery life significantly for a lithium battery that starts at 3.7V.

Hmm. Is there an IC that performs the switching that this charger chip does, but doesn't try to charge the battery?

The surface mount connector has plastic pins protruding on the bottom to help with mechanical rigidity.

SMconnectorF.pdf Click on the box in the upper left corner and then read the text in the yellow caution. You might need to update to a new version of Adobe Reader since this is a 3D image. The image is from the DigiKey URL @donblair provided for the receptacle in a comment above.

It could be hot glued or zip tied by the user if needed. The surface mount will save a few cents over the thru hole. I like the socket over the pins because it is easy to test something by just pushing a wire into the connector.

Thanks @danbeavers! The PDF you just linked to seems empty -- if you get a chance, could you link to a URL with the part?

I have share your feeling about the "socket" designs -- very easy to prototype, as with the Arduino UNO.


What about this as a simple solution:


I.e. the switch decides whether we are connected to USB or Battery. It both serves as an "on/off" switch when only on battery (useful so that, with only a battery connected, you can switch off the device when not deployed), and could serve as a "reset" button of sorts when connected to USB and not connected to battery (when you're programming and run into those bugs that really make you wish you could easily just reset the board).

Seem like a good idea, or am I missing something?

To be more specific ...

The goal is for the microcontroller (uC) brain (Atmel 328p), and the sensor boards it connects to, to be running at 3.3V. That way all the signal levels will match.

So, whatever voltage comes into the board (assuming above 3.3V), it needs to be dropped down to 3.3V.

This is done with a linear dropout regulator (LDO) -- it takes whatever voltage V_in and drops it down to whatever voltage it is designed to generate (in our case 3.3V).

So, the way I'm thinking of taking in voltage to the board via various power sources, and generating 3.3V on the board, is as follows:


I'm adding a general "through hole" pair of +/-, so that if folks want to use something other than a JST connector, they can easily. Because it's easy to mix up +/- on that connector, I'm putting a diode in front of the positive terminal, in case someone goofs up. I'm not worried about USB or JST -- they're both polarized connectors so you can't plug something in wrong.

@donblair what battery is the coin cell battery?

-- a CR1220 coin cell.

You must be logged in to comment.