[TriEmbed] Jeff's Response

The MacDougals paulmacd at acm.org
Fri Oct 25 07:50:41 CDT 2013


My $0.02

I would look at using three AA batteries and having your ATTiny sleep
between samples. 
My rain gauge is doing this and has been running fine since Oct 6.

So, the trick is to convert the piezo pulse into an interrupt to wake up the
processor.

Looking at the datasheet, I see this section:

15. Analog Comparator
The analog comparator compares the input values on the positive pin AIN0 and
negative pin
AIN1. When the voltage on the positive pin AIN0 is higher than the voltage
on the negative pin
AIN1, the Analog Comparator Output, ACO, is set. The comparator can trigger
a separate interrupt,
exclusive to the Analog Comparator. The user can select Interrupt triggering
on comparator
output rise, fall or toggle. A block diagram of the comparator and its
surrounding logic is shown
in Figure 15-1.
Figure 15-1. Analog Comparator Block Diagram
Notes: 1. See Table 15-1 on page 129.
See Figure 1-1 on page 2 and Table 10-9 on page 67 for Analog Comparator pin
placement.

If you google "Arduino analog comparator", you find code to handle this
function.
http://forum.arduino.cc/index.php?topic=158657.0

---> Paul



-----Original Message-----
From: TriEmbed [mailto:triembed-bounces at triembed.org] On Behalf Of Charles
McClelland
Sent: Thursday, October 24, 2013 8:52 PM
To: triembed at triembed.org
Subject: Re: [TriEmbed] Jeff's Response

Jeff, 

I think you are on to something there.  My input is analog as I need to be
able to set a "threshold" value using a trimpot once the sensor is attached
to the bridge (some are more rickety than others).  But, I have been focused
on how much voltage the ATTiny84 can take, not how little.  My ATTiny looks
like it would work with as little as 2.7V.  So, I should be able to rewire
my 18650 battery holder to put the cells in parallel not series.  Then the
voltage would go from 4.2 to 3.4 volts.  I am not sure what that would do to
my AREF so need to look at whether there is an "internal" option.  

Thanks,

Chip



On Oct 24, 2013, at 11:07 AM, triembed-request at triembed.org wrote:

> Send TriEmbed mailing list submissions to
> 	triembed at triembed.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> or, via email, send a message with subject or body 'help' to
> 	triembed-request at triembed.org
> 
> You can reach the person managing the list at
> 	triembed-owner at triembed.org
> 
> When replying, please edit your Subject line so it is more specific 
> than "Re: Contents of TriEmbed digest..."
> 
> 
> Today's Topics:
> 
>   1. Power Questions (Charles McClelland)
>   2. Re: Power Questions (Jeff Highsmith)
>   3. Re: Power Questions (John Vaughters)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 24 Oct 2013 10:23:58 -0400
> From: Charles McClelland <chip at mcclellands.org>
> To: triembed at triembed.org
> Subject: [TriEmbed] Power Questions
> Message-ID: <C43887D3-D32D-4BEB-8B0F-3B43180C129B at mcclellands.org>
> Content-Type: text/plain; charset="windows-1252"
> 
> First,
> 
> I want to thank you all for the help I have received so far.  I am working
with a group that is building and maintaining trails in the woods around the
RDU airport.  We are talking to the state and county parks folks and need
some solid data on trail utilization to support your requests.  I am
building a simple sensor to count the bike traffic per hour on a trail in
the woods over a week.  
> 
> Thanks for Paul?s suggestion, I went with a Piezo sensor attached to the
underside of a wooden bridge and write the counts every 3.6M clock cycles to
EEPROM.  Each count takes just one byte (never more than 253 bikes in an
hour) so the setup should last for 21 days before taking up all 512 Bytes of
memory.  I tested it last weekend and it worked like a charm - here are some
pics and a short clip of the sensor in action.  
> 
> Now the problem and a request for help.  I am currently using a 9V battery
(typical capacity 310 mAH) and a 7805 linear regulator.  With a fresh
battery, I am only getting about 24 hours of operation.  I have some high
capacity 18650 LiON batteries which operate at 3.6 volts (voltage curve
here).   Which I can put in series using a simple holder.  The problem is
that I will not get nearly the full capacity of the batteries (3400 mAH
each) before I am below the drop-out voltage of the 7805.  At the PCB
Carolinas conference yesterday - I asked around and was delighted to hear
about a ?high efficiency buck boost regulator? like this one.  However, I
can?t seem to find one in a through-hold package.  
> 
> I also considered putting a diode in series with the 18650 batteries to
knock off a volt.  However,  looking at the voltage curves, it seems that I
would exceed the 6V maximum the Atmel data sheet specifies for the ATtiny84
when the batteries are freshly charged.
> 
> I want to keep this circuit cheap and small as it will be buried in the
dirt for a week at a time and may well get stolen.  Any suggestions would be
appreciated.
> 
> Thanks, Chip
> 
> PS - thank you for the PCB Carolina?s suggestion - made some great
connections to local suppliers and enjoyed the free food.
> -------------- next part -------------- An HTML attachment was 
> scrubbed...
> URL: 
> <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/
> 20131024/190e2b54/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 24 Oct 2013 10:59:34 -0400
> From: Jeff Highsmith <jeff at jeffhighsmith.com>
> To: Charles McClelland <chip at mcclellands.org>
> Cc: "triembed at triembed.org" <triembed at triembed.org>
> Subject: Re: [TriEmbed] Power Questions
> Message-ID: <-8121659943955316096 at unknownmsgid>
> Content-Type: text/plain; charset="windows-1252"
> 
> Chip,
> 
> If you could run the ATTiny84 directly from a battery (with a voltage 
> within the '84's specs), you wouldn't have to lose power as heat 
> knocking the 9V down to 5V.
> 
> Another way to save significant power would be to have the ATTiny use 
> it's low power modes. This won't be effective if there is still a 
> linear regulator in the circuit. If you had a sensor that acted like a 
> switch or had a digital output, you could have it wake the '84 upon 
> sensing. The '84 could log a bike and go back to sleep. You would use 
> the interrupts or even the reset pin for this. A year or two ago, I 
> made my sons' a traffic light using three LEDs (green, yellow, red) in 
> Radio Shack's smallest project box. The circuit is just an ATTiny85 
> (maybe the low voltage version) powered by two AA cells. The "on" 
> button is actually tied to the reset pin, so it resets the '85 when 
> pushed (I was in too big of a hurry to learn interrupts that day). The 
> program tells the '85 to run the traffic light for two minutes 
> (average toddler attention span) and then go into low power sleep. In 
> the couple years of play and (mostly) standby, I can't remember ever
changing the battery.
> 
> I'm not sure what would happen to the memory when the battery 
> eventually drops below the '84's minimum, but maybe you could 
> gracefully remove power completely at that point using some discrete
components.
> 
> Jeff :)
> 
> 
> On Oct 24, 2013, at 10:24, Charles McClelland <chip at mcclellands.org>
wrote:
> 
> First,
> 
> I want to thank you all for the help I have received so far.  I am 
> working with a group that is building and maintaining trails in the 
> woods around the RDU airport.  We are talking to the state and county 
> parks folks and need some solid data on trail utilization to support 
> your requests.  I am building a simple sensor to count the bike 
> traffic per hour on a trail in the woods over a week.
> 
> Thanks for Paul?s suggestion, I went with a Piezo sensor attached to 
> the underside of a wooden bridge and write the counts every 3.6M clock 
> cycles to EEPROM.  Each count takes just one byte (never more than 253 
> bikes in an
> hour) so the setup should last for 21 days before taking up all 512 
> Bytes of memory.  I tested it last weekend and it worked like a charm 
> - here<https://www.dropbox.com/sh/9qdzturvffr66do/3QMS0SvYHP> are some 
> pics and a short clip of the sensor in action.
> 
> Now the problem and a request for help.  I am currently using a 9V 
> battery (typical capacity 310 mAH) and a 7805 linear regulator.  With 
> a fresh battery, I am only getting about 24 hours of operation.  I 
> have some high capacity 18650 LiON batteries which operate at 3.6 
> volts (voltage curve
here<http://www.lygte-info.dk/pic/Batteries2011/All18650/Capacity-0.2A.png>)
.
> Which I can put in series using a simple holder.  The problem is that 
> I will not get nearly the full capacity of the batteries (3400 mAH 
> each) before I am below the drop-out voltage of the 7805.  At the PCB 
> Carolinas conference yesterday - I asked around and was delighted to 
> hear about a ?high efficiency buck boost regulator? like 
> this<http://www.intersil.com/en/products/power-management/switching-re
> gulators/integrated-fet-regulators/ISL9110.html>
> one.
> However, I can?t seem to find one in a through-hold package.
> 
> I also considered putting a diode in series with the 18650 batteries 
> to knock off a volt.  However,  looking at the voltage curves, it 
> seems that I would exceed the 6V maximum the Atmel data sheet 
> specifies for the ATtiny84 when the batteries are freshly charged.
> 
> I want to keep this circuit cheap and small as it will be buried in 
> the dirt for a week at a time and may well get stolen.  Any 
> suggestions would be appreciated.
> 
> Thanks, Chip
> 
> PS - thank you for the PCB Carolina?s suggestion - made some great 
> connections to local suppliers and enjoyed the free food.
> 
> _______________________________________________
> Triangle, NC Embedded Computing mailing list TriEmbed at triembed.org 
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
> -------------- next part -------------- An HTML attachment was 
> scrubbed...
> URL: 
> <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/
> 20131024/0144761b/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 3
> Date: Thu, 24 Oct 2013 08:07:41 -0700 (PDT)
> From: John Vaughters <jvaughters04 at yahoo.com>
> To: Charles McClelland <chip at mcclellands.org>,
"triembed at triembed.org"
> 	<triembed at triembed.org>
> Subject: Re: [TriEmbed] Power Questions
> Message-ID:
> 	<1382627261.86664.YahooMailNeo at web163004.mail.bf1.yahoo.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Chip,
> 
> That is some mighty impressive work there. The woods around the Airport
would be great for bike trails. I will make a suggestion, but it is
completely untested, so I would be curious to your results. I have often
used Buck regulators from old car Cell phone chargers to pull power for 5
volt electronics in cars. Just about everyone has 5-10 laying around the
house alone. You can break them open and reduce the space by taking out the
electronics. They are basically designed to provide 5-6V from a 12-18V
source. So you could see what they provide with 9V first, but if that
doesn't cut it, use two 9V for an 18V source. I still use a 7805 to get it
to 5V, I prefer to prevent over voltage from the Buck.?
> 
> This may or may not help you, but the cost is really cheap. Walmart even
sells them for about $5. The main problem is that these buck regulators are
not the most efficient and they get worse as the difference in voltage
between source and sink rise.?
> 
> If you go this route, let us know how it works out for you.
> 
> Thanks,
> 
> John Vaughters
> 
> 
> 
> On Thursday, October 24, 2013 10:24 AM, Charles McClelland
<chip at mcclellands.org> wrote:
> 
> First,?
> 
> I want to thank you all for the help I have received so far. ?I am working
with a group that is building and maintaining trails in the woods around the
RDU airport. ?We are talking to the state and county parks folks and need
some solid data on trail utilization to support your requests. ?I am
building a simple sensor to count the bike traffic per hour on a trail in
the woods over a week. ?
> 
> Thanks for Paul?s suggestion, I went with a Piezo sensor attached to the
underside of a wooden bridge and write the counts every 3.6M clock cycles to
EEPROM. ?Each count takes just one byte (never more than 253 bikes in an
hour) so the setup should last for 21 days before taking up all 512 Bytes of
memory. ?I tested it last weekend and it worked like a charm -?here?are some
pics and a short clip of the sensor in action. ?
> 
> Now the problem and a request for help. ?I am currently using a 9V battery
(typical capacity 310 mAH) and a 7805 linear regulator. ?With a fresh
battery, I am only getting about 24 hours of operation. ?I have some high
capacity 18650 LiON batteries which operate at 3.6 volts (voltage
curve?here).?? Which I can put in series using a simple holder. ?The problem
is that I will not get nearly the full capacity of the batteries (3400 mAH
each) before I am below the drop-out voltage of the 7805. ?At the PCB
Carolinas conference yesterday - I asked around and was delighted to hear
about a ?high efficiency buck boost regulator? like?this?one. ?However, I
can?t seem to find one in a through-hold package. ?
> 
> I also considered putting a diode in series with the 18650 batteries to
knock off a volt. ?However, ?looking at the voltage curves, it seems that I
would exceed the 6V maximum the Atmel data sheet specifies for the ATtiny84
when the batteries are freshly charged.
> 
> I want to keep this circuit cheap and small as it will be buried in the
dirt for a week at a time and may well get stolen. ?Any suggestions would be
appreciated.
> 
> Thanks, Chip
> 
> PS - thank you for the PCB Carolina?s suggestion - made some great
connections to local suppliers and enjoyed the free food.
> _______________________________________________
> Triangle, NC Embedded Computing mailing list TriEmbed at triembed.org 
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
> -------------- next part -------------- An HTML attachment was 
> scrubbed...
> URL: 
> <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/
> 20131024/a82b317b/attachment.html>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> TriEmbed mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> 
> 
> ------------------------------
> 
> End of TriEmbed Digest, Vol 5, Issue 19
> ***************************************


_______________________________________________
Triangle, NC Embedded Computing mailing list TriEmbed at triembed.org
http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
TriEmbed web site: http://TriEmbed.org





More information about the TriEmbed mailing list