Micro Progamming help-CLARIFICATION

K

Kim

Guest
As I was not terribly clear in my original post, and several good questions
have come up, I will attempt to clarify. A copy of the original posting is
at the end of all of this, just in case the thread disappears.

-Again, I must stress that this is a counter, not a timer. Often describing
a specialized function is the hardest part of a job. This is a counter, not
a timer, at all. just consider this a counter that happens to count by 5's,
until it gets to 60, then it places a prefix of 1 ahead of the 5 count,
until it counts to 60 again, then it prefixes the count by 2....and so on.
So if you drop the idea of seconds, minutes, hours etc, it may be easier to
understand.

-It can display the numbers any way that is practical, with the available
display, that is also easy to understand.
It can display as XXsec,XXmin, XXhrs,XXdays,XXmonths,XXyears...or
alternately it can display by XXsec...blank...Then XXmin...blank....etc.

-The display can blank after displaying the current count once a new count
is triggered.

-I would like it to be as small as possible, but be made out of "off the
shelf" components.

-I would prefer that the count be held if the batteries were changed, but if
this is not possible, then forget it.

-I would prefer it be battery operated for at least a few months, if
possible. If this requires larger batteries, then so be it.

THE ORIGINAL POST:
I don't have enough experience, or common sense to complete this project, so
I need some help, and finally realised that I will have to pay for someone
else to do it for me. I'll list the basic requirements, but Email me for
specifics for the job, or if you are willing to take it on, along with a
price quote. As well, if you think that the project is impossible, then also
let me know. There is no real time constraints, so if you only do it in
your spare time, and it takes a long time to do, that will also be ok.

I require a circuit that will:
-display in 5 second increments, every time a switch is closed, on a basic 1
line lcd display (it wont actually be a 5 second increment in reality, this
is count, not a time, but the count has to be in 5 second increments)
-add up these 5 second increments, until they "rollover" into minutes, hours
days months, years.
-be battery operated (If it could be run for long periods of time on button
cells, or equivalent batteries, then that would be great, if not... a few
AAA cells, or a 9v batteries size is ok).
-the display only needs to turn on for a minute after the switch is closed,
if this will help extend the battery life.
-and be as small, and thin as possible (space is at a ABSOLUTE premium)
-the unit can be hard-wired or wire-wrapped, it doesn't need to look
"finished", or be done on a pcb.
-as a matter of fact, if I can be supplied with a chip, display, and
schematic, I can wire it myself.

IF there is a way to do this with a small, single chip
microcontroller....fairly easily, please let me know.
If you require more specifics, please email me with any questions you may
have. This is NOT going into mass production, so I WILL NOT be making
buckets of cash with this. This is just a item for a specific piece of
machinery at my work, and will DEFINATLY be a one-off.

Thanks, in advance
Kim
 
In article <nnTld.8702$Ho4.346078@news20.bellglobal.com>,
Kim <ksleep@sympatico.ca> wrote:
[....]
-Again, I must stress that this is a counter, not a timer. Often describing
a specialized function is the hardest part of a job. This is a counter, not
a timer, at all. just consider this a counter that happens to count by 5's,
until it gets to 60, then it places a prefix of 1 ahead of the 5 count,
until it counts to 60 again, then it prefixes the count by 2....and so on.
So if you drop the idea of seconds, minutes, hours etc, it may be easier to
understand.
So it counts: 000, 005, 010, 015 ... 055, 100, 101

Right?

You want to make this out of just chips you can buy easily off the shelf.

If you make a counter for each digit, you can connect a BCD to 7 segment
decoder to it and drive a 7 segment LED display or better yet if you find
the right one, a 7 segment LCD.

The bottom digit can be just a simple flip-flop like a 74HC74. It only
has to remember if it is "5" or "0" so there are just 2 states.

The next digit counts up to 5 and the starts over at zero. There are
several counter chips that have a parallel load function that will cause
the counter to load in a value on the next clock. If you use a logic gate
to decode the fact that the digit is 5, you have the signal needed to
cause it to load and also the signal to tell the next stage to count up by
one.

The other digits divide by 10 until we get up to the 24 hours. These
digits can be done with simple decimal counter chips.

23 hours is decoded with logic gates and causes the hour of the day
counters to be reloaded.

Now you have to include some more information. Are these months normal
Jan, Feb etc or can they just be 30 days each?


-I would prefer that the count be held if the batteries were changed, but if
this is not possible, then forget it.
If you use 74HC parts, you can include a "super cap" in the power circuit.
Even just a normal large value capacitor would give you enough time to
take out one battery and put in another. The "super cap" would give you
hours. If we assume at least 8V from the battery.


------ D3
Vin ---+--!LM7805!----+-------->|---------- To display chips
! ------ !
--- ! +-------->|---+------ To counter chips
--- V D1 ! D2 !
! --- --- \
GND ! --- / 100R
GND ! \
GND !
--- Supercap
---
!
GND

D1 causes the LM7805 to regulate at 5V + one diode drop.

D2 powers the counter normally and prevents the Supercap from trying to
run the display.

D3 just makes the drops equal.

--
--
kensmith@rahul.net forging knowledge
 
Well, as nobody has offered up a hard quote... its hard to say.
I realise that the engineering is the lions share of the project, and that
requires a great deal of experience, and in ANY field, a great deal of
experience costs money.
Its not so much the effort that has made me assume that this is "outta my
league", its the thought that it would probably require a pic , or other
type of programmable chip, that I am simply not set up to deal with, and
have absolutely no experience with, either in construction, or especially in
programming.
I only need 1 unit, with another programmed controller, and display as a
backup, if somehow I manage to kill the first during my ham fisted
construction (assuming that I would construct it). Time is not a factor, as
I do not require this immediately.
Obviously, a very high price quote will kill off this project in a hurry,
which is why I've tried to stress the "off the shelf" parts, and the lack of
time constraints would help bring down the costs, if even only slightly.
All I can say is "here are the specs"...I wont be making ANY money on this,
now its up to the individuals out there to tell me what they will charge,
and if they think a project of this type would interest them personally.
Thanks
Kim


"hamilton" <hamilton@deminsional.com> wrote in message
news:41981ea9$1_3@omega.dimensional.com...
OK, its better understood what you want.

So the next question that all the gear heads here want to know:

Are you looking for a bid on this project, or are you looking
for an off-the-shelf solution that can do this with minimum effort
on your part.

I am sure 100s of "Midnight Engineers" (C) on the list can do this type
of thing. I am sure there will be at least 50 ways of getting it done.

I am sure my way can get it done as well as the next guys.

As has been posted in another thread, how much do you want to spend
to get this done ?

Do you want just one unit ?
Do you want 10 units ?
Do you want xxx units ?

The cost of ten is almost the same as one.
Engineering costs time and money, the more you make the cheaper each
unit will cost. ( everyone in this group knows this )

Again, as has been posted in another thread, I am sure you can figure
this out for yourself. How soon do you need (want) this built ?
If you have no clue, it may take a while.
If you have money, it can be done in a few weeks.

So, Kim, what do you want to do ?

hamilton AT dimensional DOT com
 
Kim wrote:

Actually, it would count 5s, 10s, 15s, 20s, 25s, 30s, 35s, 40s, 45s,
50s,55s, 1m, 1m5sec,1m10s........1m,55s,
2m.....59m55sec,1h.............................etc


What happens right after 23h 59m 55s? Do you want to count days? Do
you expect to?

BTW: Will you be needing a reset?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
Ken Smith wrote:

In article <nnTld.8702$Ho4.346078@news20.bellglobal.com>,
Kim <ksleep@sympatico.ca> wrote:
[....]

-Again, I must stress that this is a counter, not a timer. Often describing
a specialized function is the hardest part of a job. This is a counter, not
a timer, at all. just consider this a counter that happens to count by 5's,
until it gets to 60, then it places a prefix of 1 ahead of the 5 count,
until it counts to 60 again, then it prefixes the count by 2....and so on.
So if you drop the idea of seconds, minutes, hours etc, it may be easier to
understand.


So it counts: 000, 005, 010, 015 ... 055, 100, 101

Right?

You want to make this out of just chips you can buy easily off the shelf.

If you make a counter for each digit, you can connect a BCD to 7 segment
decoder to it and drive a 7 segment LED display or better yet if you find
the right one, a 7 segment LCD.

The bottom digit can be just a simple flip-flop like a 74HC74. It only
has to remember if it is "5" or "0" so there are just 2 states.

The next digit counts up to 5 and the starts over at zero. There are
several counter chips that have a parallel load function that will cause
the counter to load in a value on the next clock. If you use a logic gate
to decode the fact that the digit is 5, you have the signal needed to
cause it to load and also the signal to tell the next stage to count up by
one.

The other digits divide by 10 until we get up to the 24 hours. These
digits can be done with simple decimal counter chips.

23 hours is decoded with logic gates and causes the hour of the day
counters to be reloaded.

Now you have to include some more information. Are these months normal
Jan, Feb etc or can they just be 30 days each?



-I would prefer that the count be held if the batteries were changed, but if
this is not possible, then forget it.


If you use 74HC parts, you can include a "super cap" in the power circuit.
Even just a normal large value capacitor would give you enough time to
take out one battery and put in another. The "super cap" would give you
hours. If we assume at least 8V from the battery.


------ D3
Vin ---+--!LM7805!----+-------->|---------- To display chips
! ------ !
--- ! +-------->|---+------ To counter chips
--- V D1 ! D2 !
! --- --- \
GND ! --- / 100R
GND ! \
GND !
--- Supercap
---
!
GND

D1 causes the LM7805 to regulate at 5V + one diode drop.

D2 powers the counter normally and prevents the Supercap from trying to
run the display.

D3 just makes the drops equal.
This can all be done with a microprocessor, for much less (precious)
board space than 7400 logic -- although the logic would certainly serve.
Since it's battery powered one would want to see if there were a
microprocessor out there that'd operate over a wide Vdd range and think
of using just two or three cells and no regulator.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Mon, 15 Nov 2004 02:43:58 +0000 (UTC), kensmith@green.rahul.net (Ken Smith)
wrote:

So it counts: 000, 005, 010, 015 ... 055, 100, 101

Right?
And here I had figured:

000, 005, 010, 015 ... 055, 100, 105 <---

I must have missed something he said... ;)

Anyway, sure is strange to run that last digit as only a 5 or 0. Could just be
a light that goes on and off, I suppose. ("It can display the numbers any way
that is practical, with the available display, that is also easy to
understand.")

You want to make this out of just chips you can buy easily off the shelf.

If you make a counter for each digit, you can connect a BCD to 7 segment
decoder to it and drive a 7 segment LED display or better yet if you find
the right one, a 7 segment LCD.
I think the LCD will have to be the ticket if he's to work towards the "months"
of operation by battery he'd like to have.

snip
D1 causes the LM7805 to regulate at 5V + one diode drop.
snip
I don't know. When thinking about months of operation and the earlier thought
about "could be run for long periods of time on button cells" I start thinking
about an all-2.7V-to-3.0V system, no regulator, LCD display, etc.

Take a CR2025 (commonly available, thicker version, and easier to find than the
CR2032) as a reference here. We'll call it 140mAh (conservative) at 2.85V
(internal resistance has risen to 5X the starting resistance at this point and
is rising steeply at this point.) At 140mAh and, say, 60 days of operation (on
the very short end of "at least a few months"), we get 140mAh/(60*24) = 97uA --
call it 100uA continuous. I'd tend to want to go for about 50uA as the average
draw.

Of course, if you were to think of using a higher voltage source and adding in
an LM7805, keep in mind that the quiescent current for it is as much as 8mA.
Not something I start thinking about when I'm also thinking of months of
operation on tiny batteries.

Jon
 
Kim wrote:
Well, as nobody has offered up a hard quote... its hard to say.
I realise that the engineering is the lions share of the project, and that
requires a great deal of experience, and in ANY field, a great deal of
experience costs money.
Its not so much the effort that has made me assume that this is "outta my
league", its the thought that it would probably require a pic , or other
type of programmable chip, that I am simply not set up to deal with, and
have absolutely no experience with, either in construction, or especially in
programming.
I only need 1 unit, with another programmed controller, and display as a
backup, if somehow I manage to kill the first during my ham fisted
construction (assuming that I would construct it). Time is not a factor, as
I do not require this immediately.
Obviously, a very high price quote will kill off this project in a hurry,
which is why I've tried to stress the "off the shelf" parts, and the lack of
time constraints would help bring down the costs, if even only slightly.
All I can say is "here are the specs"...I wont be making ANY money on this,
now its up to the individuals out there to tell me what they will charge,
and if they think a project of this type would interest them personally.
Thanks
Kim

Thank you for your response.

Lets say that this project is properly documented. ( so far its a good
start, but only a start)

If a reasonable engineer would accept this project, what would the costs be.

We will ignore the cost of the parts for the moment.

Lets say the total project would take, Hmmm 40 hours.

At what price would be 40 hours.
$ 5.00/hour = $200
$10.00/hour = $400
$12.50/hour = $500

You get the idea.

If someone says they can do it 20 hours, the cost per hour would be
higher for the better engineer. So it will still be hundreds of dollars.

So, where does that leave you.

You are correct that it can (should) be done with a single chip micro.

Pick one !!

OK, you said PIC, pick one.

Study it until you think you understand how you would use this PIC for
this project. Please ask questions here about anything you find confusing.

But understand, now one is going to hand you a complete project.

The two things that will need to be done is understand the hardware and
understand the software.

The discussion so far has been around the functions of the counter.
Thats good, but thats software. The hardware discussion has been around
long battery life and a LCD display.

To help get you started, I would suggest that you use a ATMEL AVR
Butterfly Evaluation Kit.
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3146
Includes an LCD display and will run a long time on a coin cell.
( you can build your own package )

Its available from Digikey for only $19.99.
http://www.digikey.com/scripts/dksearch/dksus.dll?KeywordSearch?Mpart=ATAVRBFLY

This is a good starting point for learning microprocessors.

TI also makes evaluation kits for little money, so you can learn.
The TI kits include an LCD display and runs of a coin cell.
Check ti TI site for MSP430 evaluation boards.

Good luck, we will help you in any way we can.

hamilton
 
On Mon, 15 Nov 2004 06:04:52 -0000, "Leon Heller" <leon_heller@hotmail.com>
wrote:

I quoted 200 GBP for this (about $350), using the TI MSP430 Day 'watch'
which I have lying around, which seems quite fair.
Very fair.

Jon
 
Kim wrote:

Well, as nobody has offered up a hard quote... its hard to say.
If anyone had, you would have been advised to run away from that
person. Nobody here would dream of giving a quote without nailing
down the definition of what you want first.

I realise that the engineering is the lions share of the project, and that
requires a great deal of experience, and in ANY field, a great deal of
experience costs money.
Its not so much the effort that has made me assume that this is "outta my
league", its the thought that it would probably require a pic , or other
type of programmable chip, that I am simply not set up to deal with, and
have absolutely no experience with, either in construction, or especially in
programming.
I really do think that you can do the programming yourself with
a Basic Stamp. (forget what I said about them when I thought you
needed precision timekeeping). The are *really* easy to program,
the book explain everything, and there are experts hanging out at
http://forums.parallax.com/forums/ who will help you at no charge.
I really think you should give it a try.

I suggest these products:
http://www.parallax.com/detail.asp?product_id=BS2-IC
http://www.parallax.com/detail.asp?product_id=27120
http://www.parallax.com/detail.asp?product_id=27910
9V battery to power it all. (battery will last a long
time if the unit spends most of it's time in sleep mode)
 
Jonathan Kirwan wrote:

...CR2025 (commonly available, thicker version, and easier
to find than the CR2032)...
The CR2032 is thicker.
 
Leon Heller wrote:

I quoted 200 GBP for this (about $350), using the TI MSP430 Day 'watch'
which I have lying around, which seems quite fair.
That's a good price, and Leon certainly appears to be well-qualified
judging from his posts.
 
Tim Wescott wrote:
hamilton wrote:


Lets say the total project would take, Hmmm 40 hours.

At what price would be 40 hours.
$ 5.00/hour = $200
$10.00/hour = $400
$12.50/hour = $500

Have you checked engineering salaries in the last 50 years? I think
you're off by a decimal point.

You get the idea.

To help get you started, I would suggest that you use a ATMEL AVR
Butterfly Evaluation Kit.
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3146
Includes an LCD display and will run a long time on a coin cell.
( you can build your own package )


This is a good example of the hypothetical eval board I mentioned
earlier -- assuming the LCD is sufficient it has everything you need.
Hi Tim,

Yes, you are very correct. The cost of an engineer is much higher. I
just did not want to cause a heart attack ;-).

The Atmel kit was only a point of discussion, I have used it a few
times so I could help Kim get started.

hamilton

PS: Yes ~$350 sounds like a very fair price for this project. But I am
sure Kim will want to do it himself.
 
"hamilton" <hamilton@deminsional.com> wrote in message
news:4198b775$1_3@omega.dimensional.com...
Tim Wescott wrote:
hamilton wrote:


Lets say the total project would take, Hmmm 40 hours.

At what price would be 40 hours.
$ 5.00/hour = $200
$10.00/hour = $400
$12.50/hour = $500

Have you checked engineering salaries in the last 50 years? I think
you're off by a decimal point.

You get the idea.

To help get you started, I would suggest that you use a ATMEL AVR
Butterfly Evaluation Kit.
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3146
Includes an LCD display and will run a long time on a coin cell.
( you can build your own package )


This is a good example of the hypothetical eval board I mentioned
earlier -- assuming the LCD is sufficient it has everything you need.


Hi Tim,

Yes, you are very correct. The cost of an engineer is much higher. I just
did not want to cause a heart attack ;-).

The Atmel kit was only a point of discussion, I have used it a few times
so I could help Kim get started.

hamilton

PS: Yes ~$350 sounds like a very fair price for this project. But I am
sure Kim will want to do it himself.
I quoted that because there isn't a great deal of work if I use the MSP430
watch. TI has the time and date routines in their application literature, so
it's mainly a question of putting them together and modifying the existing
display code slightly. There is no hardware development required.

Leon
 
On Mon, 15 Nov 2004 08:32:34 +0000, Guy Macon <http://www.guymacon.com> wrote:

Jonathan Kirwan wrote:

...CR2025 (commonly available, thicker version, and easier
to find than the CR2032)...

The CR2032 is thicker.
Yes, I know that. I just phrased my English very poorly to express it.

Jon
 
In article <10pgck791973p42@corp.supernews.com>,
Tim Wescott <tim@wescottnospamdesign.com> wrote:
[...]
This can all be done with a microprocessor, for much less (precious)
board space than 7400 logic -- although the logic would certainly serve.
Since it's battery powered one would want to see if there were a
microprocessor out there that'd operate over a wide Vdd range and think
of using just two or three cells and no regulator.
Yes but if it is a PIC, someone has to program it.

BTW: A PIC will work over a wide enough range for 3 AA cells to power it.
The issue then is the display current if you want to have the capacitor
hold the count while the batteries are changed.

--
--
kensmith@rahul.net forging knowledge
 
Leon Heller wrote:
I quoted that because there isn't a great deal of work if I use the MSP430
watch. TI has the time and date routines in their application literature, so
it's mainly a question of putting them together and modifying the existing
display code slightly. There is no hardware development required.

Leon
I checked TIs site and could not find the watch from the seminar.
Is it still available and how much does it cost ?
 
"hamilton" <hamilton@deminsional.com> wrote in message
news:41998be2$1_3@omega.dimensional.com...
Leon Heller wrote:

I quoted that because there isn't a great deal of work if I use the
MSP430 watch. TI has the time and date routines in their application
literature, so it's mainly a question of putting them together and
modifying the existing display code slightly. There is no hardware
development required.

Leon

I checked TIs site and could not find the watch from the seminar.
Is it still available and how much does it cost ?
They gave them away to attendees, but they haven't got any to sell, AFAIK. I
doubt if they have any left, and all the info on it seems to disappeared
from the TI web site. Your best bet is to join the MSP430 Yahoo group:
http://groups.yahoo.com/group/msp430/ and see if anyone wants to part with
theirs.

I've got all the info about the 'watch', which includes the schematic and
the source code, if you want them. It was made by Softbaugh for TI, and uses
an LCD that they sell, so it would be quite easy to design a PCB and make
something similar. It actually has a lot of functionality as it uses the
MSP430F437 which includes a 12-bit ADC (brought out to a header), and can
measure the ambient temperature with the on-chip sensor, record sound, etc.

Leon

Leon
 
On Tue, 16 Nov 2004 07:44:37 -0000, "Leon Heller" <leon_heller@hotmail.com>
wrote:

They gave them away to attendees, but they haven't got any to sell, AFAIK. I
doubt if they have any left, and all the info on it seems to disappeared
from the TI web site. Your best bet is to join the MSP430 Yahoo group:
http://groups.yahoo.com/group/msp430/ and see if anyone wants to part with
theirs.

I've got all the info about the 'watch', which includes the schematic and
the source code, if you want them. It was made by Softbaugh for TI, and uses
an LCD that they sell, so it would be quite easy to design a PCB and make
something similar. It actually has a lot of functionality as it uses the
MSP430F437 which includes a 12-bit ADC (brought out to a header), and can
measure the ambient temperature with the on-chip sensor, record sound, etc.
See upper right sidebar of:

http://www.softbaugh.com/

MSP430 Retro Watch LCD
MSP430-Day Attendees get the LCD on the 430 Retro Watch

Also see the LCD itself at $9.50 ea in 1's:

http://www.softbaugh.com/ProductPage.cfm?strPartNo=SBLCDA4

Is this it, Leon?

Jon
 
"Jonathan Kirwan" <jkirwan@easystreet.com> wrote in message
news:bhgjp0tpcmj7mo4t344h7d30mpqtculmjs@4ax.com...
On Tue, 16 Nov 2004 07:44:37 -0000, "Leon Heller"
leon_heller@hotmail.com
wrote:

They gave them away to attendees, but they haven't got any to sell, AFAIK.
I
doubt if they have any left, and all the info on it seems to disappeared
from the TI web site. Your best bet is to join the MSP430 Yahoo group:
http://groups.yahoo.com/group/msp430/ and see if anyone wants to part with
theirs.

I've got all the info about the 'watch', which includes the schematic and
the source code, if you want them. It was made by Softbaugh for TI, and
uses
an LCD that they sell, so it would be quite easy to design a PCB and make
something similar. It actually has a lot of functionality as it uses the
MSP430F437 which includes a 12-bit ADC (brought out to a header), and can
measure the ambient temperature with the on-chip sensor, record sound,
etc.

See upper right sidebar of:

http://www.softbaugh.com/

MSP430 Retro Watch LCD
MSP430-Day Attendees get the LCD on the 430 Retro Watch

Also see the LCD itself at $9.50 ea in 1's:

http://www.softbaugh.com/ProductPage.cfm?strPartNo=SBLCDA4

Is this it, Leon?
Yes, that's the beast.

Leon
 
On Sun, 14 Nov 2004 22:09:28 -0500, "Kim" <ksleep@sympatico.ca> wrote:

Actually, it would count 5s, 10s, 15s, 20s, 25s, 30s, 35s, 40s, 45s,
50s,55s, 1m, 1m5sec,1m10s........1m,55s,
2m.....59m55sec,1h.............................etc
The first counter can be a simple toggle FF to drive the display, 0 =
0, 1 = 5. Since segments a, c, d and f are always on just drive them
with resistors. Connect b and e to !Q, g to Q and you're done.

The rest of the counter chain is a rather standard clock circuit, look
up the 7490 app notes, ISTR there's an example there. You can even
save a bit by using the A divider for the first digit and the B
divider for the 0 to 5 counter. Oooops, no !Qa output on it, use an
inverter.

Of course, the 7490 is prehistoric now, and hardly optimized for space
nor power, so just do what everyone else seems to do, throw a PIC at
it.

Note: !Q is Q-bar.

- YD.

--
Remove HAT if replying by mail.
 

Welcome to EDABoard.com

Sponsor

Back
Top