I'd prefer to keep the incandescent lights, just to minimize the reworking of the fixtures.
I am rusty on my PICAXE programming, and am trying to learn PICs. Maybe with elec_mech's help, we can start some coding for the lighting sequences, followed by the human interface, and finally the hardware to switch the lights. We can use triacs and optoisolators to interface the AC lights to the microcontroller.I'd prefer to keep the incandescent lights, just to minimize the reworking of the fixtures.
Insofar as I will finish this project - yes, but I won't be making it another long term hobby (I have so many as it is!). That having been said, I do understand programming from my forays with web development (PHP/MySQL and ActionScript). I feel confident in being able to learn a new code and syntax with guidance.I am rusty on my PICAXE programming, and am trying to learn PICs. Maybe with elec_mech's help, we can start some coding for the lighting sequences, followed by the human interface, and finally the hardware to switch the lights. We can use triacs and optoisolators to interface the AC lights to the microcontroller.
Do you plan to get into programming?
Gosh, there are just so many ways you could do this. How about using a calibrated scale on a potentiometer and a push button switch to start the timing sequence? For example, the scale on the Spinning Class Strobe below could easily be changed to a full scale range of 60 or 90 minutes.So I would need:
A programmable microcontroller (the AXE-021 or the MPS430)?
A device that can input/display the time value?
A device that control the time value
What else?
Ditto. That's how I learned and prefer to code - write a small section, test on hardware, debug, and onward. Not a simulation guy either.I think we should select the microcontroller that we are going to use as a first step. I don't know how elec_mech works, but with me, coding is an iterative process, and I don't care much for simulators. So, what I like to do is have my μC in a development board, start with a simple function, write a little code, and then try it out. Then, pick another function, add it to the code, and try it out, etc.
No problem for me. Might take a little time to clear the rust, but I'm game.My preference would be to try to do this using a PIC, if you will take the lead writing the code.
That would be great.I will be willing to set up a development board and do the actual programming. I can use it as a learning experience to try to transition from PICAXE to PIC.
I'm so jealous. I bought whatever version came out just prior to PBP 3, then a few months later PBP 3 comes out. Agh. Let me track down my copy and see if I can upgrade so we're working with the same version.I have PBP 3 Gold and the MPLAB IDE.
You missed the displays with colon LEDs; https://www.sparkfun.com/search/results?term=7-Segment+Displa+-+4-digit+%28&what=productswhat do you think about the displays? Would a dot work as a separator between the minutes and seconds? Would look like: MM.SS instead of MM:SS
While the MAX7221 and MAX7219 are viable display driver options, they're costly and the big bulky 24 pin package may be a disadvantage. The three pin interface may seem like an advantage at first, until you realize you can't mux' push button switches off of the column driver lines so you'll actually use more I/O pins for combinations of MAX72XX display driver plus switches. Other driver options, like the MacMux interface method (below), can provide hundreds of levels of gamma corrected brightness level control compared to only sixteen levels from the MAX7219;Interface between uC and display, perhaps a MAX7221?
I guess that's up to Transitory. I don't even mind sending him a programmed PIC.My only question is are you proposing we write and test the code and send to the OP or have the OP do it with our guidance? I have no problem with either.
I did see those. The OP was looking for 1" displays. Those are 0.39" and I would guess the serial ones are 0.56". Of course, you bring up a good point I forgot to ask the OP: Would a smaller digit height of 0.39" or 0.56" work?You missed the displays with colon LEDs; https://www.sparkfun.com/search/resu...&what=products
Excellent, thank you. I will look this over so I can better understand the operation and incorporate it into the master schematic.See the attached schematic. I have used these parts before in a similar circuit.
I've never controlled AC devices with a uC, so I will rely on your experience and expertise.I didn't use a snubber circuit and don't think we will need one.
I guess we'll see once we've selected the uC. No problem though.We might have to use a driver transistor to boost the current from the μC to the optocoupler.
Oops! Sorry! I missed that...I did see those. The OP was looking for 1" displays. Those are 0.39" and I would guess the serial ones are 0.56".
I've shown bits and pieces of several different projects so I'm not really sure which project you're referring to.Mike, I applaud your ingenuity. You have a great project there. The design appears based on minimum parts count, minimum size, and multiple uses of the same I/O lines. I will keep it in mind when I need to really get the most bag for my buck and minimize space and parts count on a uC.
Not sure what you mean by "a bit much for this project". You're not associating simple and elegant hardware design with more complex programming, are you? If anything, exploiting the hardware and producing a simpler design often reduces the complexity of the software.Being not much more than a novice myself, I think it is a bit much for this project. What is saved in hardware and space is made up for in programming and my thought (as well as limited experience) is to keep things simple on the programming side.
In this case I simply meant that unless someone simply wants to duplicate the project by using the hex file, you're limiting the capabilities of hobbyists who might want to modify the program but can't afford to purchase PBP.I would kindly disagree regarding the use of PBP for only one off projects, but we each have our reasons for using one language or another and for different reasons. I'm sure many here could give a number of reasons why C is better, but BASIC is easy to learn and understand, especially to a beginner. Thank you for mentioning BoostC, I don't recall coming across it before and the prices are the best I've ever see for a C compiler.
Sorry, I meant the PIC 99 Minute Counter.I've shown bits and pieces of several different projects so I'm not really sure which project you're referring to.
As you've phrased it, I suppose I am. I haven't programmed in awhile and I'm likely an order of magnitude below your level, so I apologize if my thinking or observations are in left field. But from a beginner's perspective, isn't charlieplexing, gamma correction (I'll be honest - I don't know what that is), and using the same I/O pin for multiple hardware functions a bit advanced? Not saying it's overly difficult, but to understand the timing required and writing code for that functionality doesn't seem trival. Again, it's been awhile for me and I was never a hardcore programmer.Not sure what you mean by "a bit much for this project". You're not associating simple and elegant hardware design with more complex programming, are you? If anything, exploiting the hardware and producing a simpler design often reduces the complexity of the software.
Is C universal? I know BASIC has slightly different flavors among the compilers, but the code could be cut and pasted and minor mods made to use a different BASIC compiler. I found C to be difficult to learn upfront and unlike learning to ride a bike, it doesn't seem to stay (with me in any event). Nothing against it, as I said we each have our favorites for different reasons.In this case I simply meant that unless someone simply wants to duplicate the project by using the hex file, you're limiting the capabilities of hobbyists who might want to modify the program but can't afford to purchase PBP.
Doesn't matter. As long as you can see it, that's fine. The traffic light is what matters.OP, what do you think about the displays? Would a dot work as a separator between the minutes and seconds? Would look like: MM.SS instead of MM:SS.
I imagine I can handle taking the code that you create and put it on the μC, that would be something I'd need to do if I wanted to adjust the timings later anyways, right?I guess that's up to Transitory. I don't even mind sending him a programmed PIC.
Sure, not a big deal.I did see those. The OP was looking for 1" displays. Those are 0.39" and I would guess the serial ones are 0.56". Of course, you bring up a good point I forgot to ask the OP: Would a smaller digit height of 0.39" or 0.56" work?
No, I think the plan is to make the timing adjustable via some control buttons and the display. Is that what you wanted?I imagine I can handle taking the code that you create and put it on the μC, that would be something I'd need to do if I wanted to adjust the timings later anyways, right?
Right, right. The timer itself will be adjusted with buttons/display.No, I think the plan is to make the timing adjustable via some control buttons and the display. Is that what you wanted?
Through the code seems simpler to me.Tracecom,
Since the OP would like to change the code in the future but doesn't plan to use microcontrollers for future projects, PICAXE seems the most economical choice, would you agree? I would be happy to do the schematics and assist with the programming to get the OP running. Afterwards, we could work together to transfer the program to PBP if you'd like so you can get some more experience with it.
Another thought is to go all out on the programming side and allow the user to change when and for how long each light comes on for. In this way the OP doesn't need to change the program to change the timing of the lights. There are certainly enough buttons and we'll have a display. This will require some thought and more code, but then the OP doesn't need to change the code.
OP,
Do you have a preference? Would you like to change the light timing via code or through the buttons and display?