Reply to thread

OK, some more progress on this whole issue...


First off, the first microcontroller board I designed (scroll to the bottom) is terribly flawed, as it turns, out: first, one of the lines I connected to I/O is an input-only line, and therefore not useful for driving an LED...  Second, the arrangement of resistors is basically useless: they're set up to "pull up" the output lines - the microcontroller outputs can drive themselves to +5V, so there's no real need for that...  It would only be useful if the outputs were open-collector...  And even then, the usefulness of this would be seriously limited unless the I/O were connected to LED cathode...  in which case the board doesn't provide an on-board current-limiting resistor for the LED.  If the I/O were connected to LED anode, then current to the LED would either need to go through that pull-up resistor, or come from the microcontroller itself...  So I'm not sure what I was thinking there...  The 12F683 I/O pins are not open-collector, and the resistors (square pads on the back of the board) where I've got them wouldn't work as current-limiting resistors...


For similar reasons, my plan to use a 12V power source and a voltage regulator, along with open-collector outputs won't work on a board this size...  There's no space for an additional component on my board design, and a voltage regulator would be as large as the microcontroller itself.  Plus, as I noted above, the PIC I/O pins aren't open-collector and haven't got an open-collector mode...


I had hoped I would be able to do this project with the 12F683 - for such a small part, the low pin count definitely makes it a lot easier to solder on.  But it seems like the small number of I/O lines makes it a poor choice for this project, since I want to use two I/O lines as a serial interface to control the board's behavior, that only leaves three I/O lines for driving LEDs.  So I came up with a new 11mm x 10mm board design using the 16F688 - a 14-pin microcontroller with the same physical size...  (This obviously means the pins are a lot closer together - and therefore harder to solder...  But it also means there's a lot more I/O lines to work with - a total of 11 outputs, compared to the 5 on the 12F683...)  The new board design eliminates the second row of I/O pins (these were just ground lines, anyway) and provides pinouts (with pads for series resistors) for a total of five I/O lines plus solder points for another two.  (The remaining four I/O lines are used for in-circuit serial programming and for interfacing to the microcontroller's on-board USART for serial communication...)  This means I can put current-limiting resistors for the LEDs right on the controller board, and distribute a multiple LED load over multiple I/O lines...  And two of the I/O lines are set up such that if the resistor is omitted and some pads bridged on the opposite side of the board, those I/O lines become access to ground or voltage instead...  Unlike the previous design, the new board does not provide a whole row of pins just for easy access to voltage and ground...


I may still rethink some of my design decisions from this board: for instance, the connector to the right of the microcontroller (the ICSP header, which is also used for powering the board and issuing instructions to it during normal operation) ties two pairs of I/O pins together: one is the normal set of ICSP data and clock pins, the other is the set of pins the USART can use for synchronous I/O clock and data...  Typing these pin pairs together means that I can use just one five-pin header for both writing program code to the board and for controlling the board while it's running, and still take advantage of the USART for my serial I/O needs (if I can figure out how to write the code to do that...)  But it would also be possible to write the synchronous I/O code myself using the two I/O pins used for ICSP - this would free up another two I/O pins for other purposes...  I'm not sure what's the best way to go.  I haven't fully explored the problem of writing I2C code on the device.


As for the problem of getting enough power out to drive multiple LEDs - I think I need a second board...  I'll probably try designing something that can sandwich the controller board, and provide (I guess) some kind of LED driver and maybe a voltage regulator for a 12V supply.  (I still have reservations about going to a higher voltage supply because I feel like it complicates things in a way...  But being able to run multiple LEDs in series is still quite appealing.)


[attachment deleted by admin]


Back
Top