I am looking for a recommendation on a PIC mircrocontroller kit. I want to make a timer to control several devices connect to an aquarium (pumps, lights etc, all standard 120V devices). So I need a kit with like 8 relays and a PIC chip that I can program to schedule the devices on daily and weekly cycles. I'd prefer something that has a free or low cost C compiler available.
I think I can figure out the programming aspect of it but I'd like to avoid having to design the circuits well as program the chip.
Does it HAVE to be a PIC? As much as I like working with PIC's (and I do), there are other microcontrollers out there that are probably better supported by free or low-cost C compilers:
Freescale's HC08 family is supported by code-size limited CodeWarrior
formatting link
Atmel AVR is a GCC target, and (because it's not always straightforward to get GCC up and running under Windows) here's a Windows-based port
formatting link
If you've got your sights set on the PIC, I've used the SourceBoost C compiler with good results
formatting link
A Google search on "relay board microcontroller" came up with loads of good hits - choose your relays carefully, though.
That was the idea. I can handle C programming and I'm sure I can figure out how to toggle the PIC I/O ports off and on at set intervals. Problem I have is how to then get the I/O port to drive a relay to switch my 120V devices. From what I've seen/read over the past could days it doesn't look like it's as simple as connecting the relay to the I/O port of the PIC chip. Advice I've gotten so far includes adding a transistor and resitor to drive the relay or using an H-Bridge. I'm clueless here, if anyone could provide an example schematic of driving a relay off of the I/O port that would help tons
I'm not dead set on PIC. It just looked to me that the chip specs were good (16 I/O ports on the chip I was looking at) and there appears to be a lot of support/information for PIC processors and compilers on the web.
Not the cheapest solution, but for low noise, minimum parts count, solid state relays (with input tied between positive PIC supply and active low output) is hard to beat. No other parts needed.
That said, there are some very low power relays than might be driven directly by a PIC output, but their contact ratings are terrible.
Probably the next simplest is an N channel mosfet, gate connected directly to the PIC active high output, source to PIC negative supply rail, with the relay coil tied between something like a 12 volt positive supply and the drain. You also need a diode across the coil (cathode to positive supply) to suppress the inductive spike at turn off. Of course, this only works if the negative side of the relay supply is connected to the PIC negative supply. You will also need a bypass capacitor connected between the positive supply connection of the relay coil and the source of the N channel mosfet to contain switching noise. One good way to achieve this is to use a 12 volt unregulated supply for the relay, and use a linear regulator to produce 5 volts from that to supply the PIC.
PIC is a good choice. MPLAB is relatively easy to use, the assembler and linker are quite decent, and it can directly talk to various programming tools. I've got both a PICSTART+ (with the modification that allows MPLAB to update its code, automatically, for newer processors) and an ICE2000, so perhaps I'm a little spoiled though. But the chips are pretty hardy and I have to say that the technical support staff, while a few of them may be 'dry', are pretty well versed folks on the details. And, although I haven't called them in a few years, it was only the price of the long distance call to get ahold of them. So worth it, I think.
A lot of folks like the Atmel AVR. I certainly am one of them, though my attitude has gone through "mood" swings regarding the company, Atmel. My support is through a local FAE and this is mostly a bad thing for me, by comparison with Microchip. Funneling questions via a local FAE who has to support a large number of various products, none of them perfectly, and having to wait a day or two for responses -- isn't all that great.
The TI MSP430 is enjoyable for me. But for starting out, I wouldn't recommend it.
All of which gets me back to probably adding my recommendation for PICs. I think they would be a good choice, given what you've said.
However, I think most of the C compilers for it cost something, but there may be some code-size-limited versions around for free. You should research this part of the question, though. Also, if you are looking for preconfigured boards to play around with, I really am of little good. I just haven't used any of them.
"Norm3000" schreef in bericht news: snipped-for-privacy@g44g2000cwa.googlegroups.com...
Have a look at:
formatting link
Although the outputs come from an EPROM, you can connect a PIC output the same way. If you browse through the Velleman catalogus you will find other examples as well, even with a PIC:
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.