thatoneguy
- Joined Feb 19, 2009
- 6,359
There is an I²C version of that same segment driver, Hardware I²C is supported and tested functional with a MAX6956 by my son.
Or maybe we switch to a 20X2.There is an I²C version of that same segment driver, Hardware I²C is supported and tested functional with a MAX6956 by my son.
If you already have the SPI driver, then switching the controller would be more straightforward, if the driver hasn't been ordered yet, the commands are the same over I²C or SPI.Or maybe we switch to a 20X2.
-Yes, you have the general plan right.Okay, here is a first cut at the schematic.
OP, please take a look and let us know if this is roughly how you envision the unit to operate.
Currently,The schematic is a first draft and is subject to change. Some notes:
- Minute and second buttons are used to increment display by one minute and one second, respectively, each time they are pressed.
- Reset button clears the display and turns off all lights.
- Start/pause button is used to begin countdown as long as the displayed value is greater than 00:00. It will also stop the count and resume.
- When each light comes on, blinks and for how long will be programmed in and can only be changed by modifying the code. We will follow the sequence the OP originally mentioned and which is shown in the flowchart unless told otherwise.
OP,
- R7 determines current to the display and will depend on the display selected.
- Buttons are used with pull-down resistors. This may change to pull-ups if it makes programming for one reason or another easier.
- Fuse values selected somewhat arbitrarily. 60W bulbs consume ~0.5A, so 1A was selected for some cushion. Let me know if you feel another value should be chosen.
- For the sake of reducing parts variety, an opto-isolator is used to control the buzzer in the event it requires more current than the PICAXE can provide. Actual voltage used to power buzzer will be subject to buzzer selected.
- Pins used on PICAXE were selected arbitrarily. Please let me know if the ones selected will not work for their intended purpose.
We can make selections for the parts if you're not too concerned about picking them out yourself. A few questions regarding parts:You'll also want to think about how you're going to build this, what to enclose it in, etc.
- Would you prefer 1" tall digits with a MM.SS format or 0.39" tall digits with a MM:SS format? Both are about $2-3 from the source I have in mind and include all four digits.
- What color would you like the digits to be, e.g., red, green, yellow, blue, or white?
- What kind of buzzer do you have in mind? Little one to get attention or big one to make you flee for your life?
Larger digits, anything above 1" really, will require a separate driver circuit to provide enough voltage and current to the displays. While certainly not difficult, it will add quite a bit of complexity and cost to the final circuit. Unless you opt to make the displays out of LEDs yourself, the least expensive 6" display I can find right off the bat is a 6.5" from Sparkfun which runs $15 USD per digit. That takes your $3 one-inch display to $60. Unfortunately, I don't think you'll have much luck with finding a multiplexed display this big, so wiring this will be a bigger effort too. You might find some slightly cheaper displays, but I doubt it'll be by much.-If the price is the same, 1" is better. Would it be hard to move to larger digits in the future? If so, maybe we might want to consider something bigger to start, i.e. 6"?
Then this would be ideal: https://www.sparkfun.com/products/11408.-I've always liked bluuuuuuue.
Hmm, could you post a link to an example? A product that makes said sound or a video with the sound demonstrated? A simple buzzer will just sound continuously. Some sirens will change the pitch on their own, but many will probably require an additional circuit. Alternately, you could add a module that plays an MP3 file if that would work.-Little buzzer, something low pitched. I've always preferred mechanical bells. Something with 3 dings with 1/2 intervals.
The bulk of the circuit should probably go into the button/display housing to reduce your total wire run count. We can address this in more detail down the road.-Everything except for the display and buttons can be easily housed in the traffic light itself. I'll just need a long cable to run from the traffic light. The display/buttons can be simply attached to some sort of wood or plastic piece. I can work on the elegance of the housing later.
This is going to hang in a classroom as an indicator for students as to how much time is left. (You are thinking: why not just buy a timer? I have one, and it works, but it's become boring to me. A traffic light is fun, visible, and easy to interpret - plus I happen to have a traffic light and I want to make it productive).What is your ultimate goal with this project? First you mentioned 1" displays, then said a smaller size would be useable, now you state you'd like a 6" display? The more we know up front, the easier it is to incorporate.
I was thinking a 6" fire bell, but I think it wouldn't fit in the light and it would be a bit too loud and expensive.Hmm, could you post a link to an example? A product that makes said sound or a video with the sound demonstrated? A simple buzzer will just sound continuously. Some sirens will change the pitch on their own, but many will probably require an additional circuit. Alternately, you could add a module that plays an MP3 file if that would work.
Ah, how cool. This just got more fun.This is going to hang in a classroom as an indicator for students as to how much time is left.
Then there is this which allows you to load an MP3 (technically a WAV, but a soft copy of your choice anyway):How about an MP3 playing module.
This is why I love the internet. It's taught me so many awesome things.And you may be thinking, why are there people designing electrical circuits, writing code, offering advice and how to spend as little dough for completing such projects? For the same reasons you provided - it's fun and different.
You are correct; it was off by two rows. That error crept in during my rebuild, and unfortunately, even after I corrected it, the operation is still erratic as before.Only thing catching my eye at the moment is the connection between pin 9 of the PICAXE and pin 12 of the MAX7221. It looks like the white wire coming from pin 9 should be moved to the right of the blue wire (currently it is to the left and doesn't appear to be connected).
This is the chip select line and tells the MAX7221 when to look at and ignore data. If it is not connected, it could explain the erratic behavior you've mentioned.
Yay! Wonderful news.Report to Transitory.
Elec_mech's code is now running on my breadboard. Of course, this is just test code to control the display and light the LED's, but it's a big step. It proves that the PICAXE can communicate with the MAX7221 and control the 4 digit display.
Thanks! So in this setup, the Maxim IC is translating the time to the individual LEDs (to form numbers) on the display or does the PICAXE also do that?Top to bottom:
LED Display
LED Display Driver (Maxim IC, think of it as a port expander to drive all the LEDs in Display)
Breadboard Programmer for PICAXE (to left of LED Display Driver)
Interconnects for power/programming/display communication
PICAXE 20M2 in center of board
Power connections Gnd/+5V on right edge, red and black alligator clips on headers to power each rail on breadboard
Traffic Light LEDs on right
jumper wires to connect switches to PICAXE
Select buttons on board at bottom for setting time.
by Jake Hertz
by Don Wilcher
by Jake Hertz
by Aaron Carman