Offline
Newbie
Karma: 0
Posts: 14
|
 |
« on: January 02, 2013, 11:40:07 am » |
Hi All,
I am new to Ardino and am looking to use Arduino in my next project for my students.
Final Product: I want to create a waterproof lap counter that one can use in the pool when swimming laps. I would design the product to count laps and keep track of real time.
Programming Counter (LED Display I): - LED display readout to increase in count everytime a button is pushed up to the hundreths place - reset button so that one can use this device over and over again
Time (LED Display II): - Real time
if anyone could help me with this programming I would greatly appreciate it. I would truly like to create these programs for my students but am unclear how to begin. Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 41
Posts: 1869
|
 |
« Reply #1 on: January 02, 2013, 01:15:24 pm » |
If you're just looking for help with writing the sketch, then you would probably be better off in the Programming Questions section. In there, you will want to review the thread at the top that guides you through what your post should include (like code, what you're expecting vs what it is doing, what have you tried, etc.).
Otherwise, if you're looking to have someone write the code for you, you are in the right place. Do you have the hardware already? If so, what "LED display" are you using? Do you have an RTC module for the time? If so, which?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #2 on: January 02, 2013, 01:30:47 pm » |
I am definitely looking for someone to help me write the code for me, Arrch.
I don't have anything yet, except what I want my program to successfully do. After thought a 3 segment LED display will be enough for my counting since I only want it to go to the hundreths place 0-999.
I do not have a RTC module yet. Any suggestions?
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 41
Posts: 1869
|
 |
« Reply #3 on: January 02, 2013, 01:54:29 pm » |
I don't have anything yet, except what I want my program to successfully do. After thought a 3 segment LED display will be enough for my counting since I only want it to go to the hundreths place 0-999.
7-Segment LEDs sound like they would work just fine in this project, but you'll have to consider how big you want them. The more common ones are around 1 inch in height. Those tend to require very little external components to drive them. Depending on the environment,though, that might not be big enough. I do not have a RTC module yet. Any suggestions?
How accurate do you want it to be? Is a couple seconds a day OK? If so, I would recommend something like the DS1307 kit that adafruit sells for about $10. If you want poinpoint accuracy, you could invest in a WiFi/Ethernet shield and update using NTP.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #4 on: January 02, 2013, 02:02:54 pm » |
I am looking for them to be a bit larger than 1 inch, rather 2-3 inch.
It is okay if they RTC is not 100% accurate, your inital suggestion will be just fine, thanks!
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 41
Posts: 1869
|
 |
« Reply #5 on: January 02, 2013, 02:13:25 pm » |
I am looking for them to be a bit larger than 1 inch, rather 2-3 inch.
I would go to some on the production sites like DigiKey, Mouser or Newark and see if you can find one in the size you are looking for. I doubt you'll be able to find a 3 or 4 digit ones, so they will likely have to hooked up individually. Keep an eye on the forward voltage and current requirements. Bigger displays often have multiple LEDs within each segment which increases the total forward voltage. One of my projects has these 7 segments for example.
|
|
|
|
« Last Edit: January 02, 2013, 02:15:54 pm by Arrch »
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #6 on: January 02, 2013, 04:18:06 pm » |
It would be easy to connect a MAX7219 to 8 common-cathode 7-segment displays, 6 showing time & 2 showing lap count for instance. H:MM:SSS, DD Look at taydaelectronics (Thailand)for MAX7219, $1.25 each If need larger digits there are other sources such as futurlec (Australia), 2.3", 3", 4", 5" available.
1.5-2 weeks for inexpensive shipping.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #7 on: January 02, 2013, 05:00:38 pm » |
After looking at the website you both provided perhaps a Double Digit Seven-Segment LED Display for the laps 0-99.
And a Four Digit Seven-Segment LED Display for the real time module.
Wouldn't it be simplier if the two counts were on seperate LED displays?
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 41
Posts: 1869
|
 |
« Reply #8 on: January 02, 2013, 05:45:29 pm » |
Wouldn't it be simplier if the two counts were on seperate LED displays?
That was what I was thinking. They also have 4-digit 7-segment "clock" devices that include the middle colon, although those may be harder to find in the larger sizes.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #9 on: January 02, 2013, 06:02:51 pm » |
that is okay i rather have the counter to be displayed larger than the real time, thanks for all your help.
now if i could get some help coding that would be great.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #10 on: January 02, 2013, 11:59:53 pm » |
If you have the MAX7219 driving the displays, and you wanted larger 2-3" digits, then seperate common cathode displays is the way to go. You said you wanted time to hundreths, so MM:SS.TH + 99 would be one way to occupy 8 digits.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #11 on: January 03, 2013, 12:17:08 pm » |
If you have the MAX7219 driving the displays, and you wanted larger 2-3" digits, then seperate common cathode displays is the way to go. You said you wanted time to hundreths, so MM:SS.TH + 99 would be one way to occupy 8 digits.
Does the Arduino come with MAX7219? I have decided that I would have two sets of displays: 1. 4-Digit 7-Segment LED Display for the real time 2. 2-Digit 7-Segment LED Display for the counting (0-99) 2 buttons: 1. Couting button for the 2-Digit 7-Segment LED Display 2. Reset Button (not from the Arduino) Is this possible?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #12 on: January 03, 2013, 12:55:57 pm » |
Easily. You can do it with SPI.transfer() commands to set up the MAX7219 and send it the 6 digits you want to display, or use some library to do it. This is a much larger version that uses a Promini for control and a MAX7221 (MAX7219 is identical but with faster signal edges) driving countdown timer display (and countup is easier) in the middle and 2 set of 00-99 digits at the upper sides. The '328P based promini does the timing, no external clock needed.  I think your hardest part will be making it all watertight. Can make it rechargeable-battery powered with sealed connectors for the pushbutton for the lap counter and the external reset. Or go fancier and make the reset wireless, so the only connection is for the lap button.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #14 on: January 03, 2013, 01:37:30 pm » |
Easily. You can do it with SPI.transfer() commands to set up the MAX7219 and send it the 6 digits you want to display, or use some library to do it. This is a much larger version that uses a Promini for control and a MAX7221 (MAX7219 is identical but with faster signal edges) driving countdown timer display (and countup is easier) in the middle and 2 set of 00-99 digits at the upper sides. The '328P based promini does the timing, no external clock needed.  I think your hardest part will be making it all watertight. Can make it rechargeable-battery powered with sealed connectors for the pushbutton for the lap counter and the external reset. Or go fancier and make the reset wireless, so the only connection is for the lap button. CrossRoads, you really do understand what I am trying to design! I thought I was explaining it wrongly. In the image you attached, I see the two couting LEDS on the left and right as well as the bottom set couting real time. What at the 2 digit 7 segment LEDS under the large left do? Is this image something you have made or something you found online?
|
|
|
|
|
Logged
|
|
|
|
|
|