Search the Community
Showing results for tags 'pcb'.
Found 2 results
-
Now that my semester is mostly over, I've been thinking about some of the projects I had to put on hold to focus on my senior design project this year - specifically, the PCB I developed a couple years ago to run two three-color track signals off a centralized microcontroller: The original design called for a three-color signal: red, yellow, and green. My plan was to divide my layout into blocks, with a signal placed on each block. I wanted my signals to respond in the following manner: - If a train is detected in a block, that block's signal must be red (block is occupied). - The signals in the blocks adjacent to occupied blocks must be yellow (block ahead is occupied). - Otherwise, the block signal will be green (block is unoccupied). This would result in the signals 'following' the train around the layout, such that any trains travelling on the same track would be aware of each other, hopefully avoiding collisions. In practice, I won't be running trains on the same track, but it's still a fun effect to have! My resulting truth table then looks like the following. Inputs A and S are the signals from the adjacent blocks and block sensor, respectively, while outputs R, Y, and G are the red, yellow, and green signals, respectively. It doesn't matter which 'side' I get a signal from an adjacent block, as either way I want the signal to turn yellow. In addition, if the block sensor sees a train, I don't care what the adjacent blocks are doing - the signal must turn red. After working through this table, it occurred to me that there were two ways I could build this signal controller... Form 1: NAND Logic This truth table is simple enough that I should be able to build it with basic logic gate ICs - and if I can do that, then I can do it purely with NAND logic gates, saving cost as I only need one type of chip to make this work. However, I still need to work on converting the truth table to a set of Boolean expressions, and from there into pure NAND logic. After doing a bit of research, it looks like I'll need multiple NAND chips, as most chips I find have only four gates inside them. However, I am space and cost limited, as I can only use four NAND chips (16 NAND gates) if I want to be comparable to the cost of the ATTiny85 at 36 cents per chip. Form 2: ATTiny85 Since I only have five inputs/outputs, the ATTiny85 microcontroller is perfect for this application - there are exactly five pins left over after accounting for power, ground, and reset. However, I would need to program each microcontroller, and doing so with a surface-mount device becomes problematic. The cost is also an issue, as each one costs about $1.16-1.25. Buying in relatively small quantities, I think I can get the cost of components for each board to about $5 per board - including connectors and such. The main issue with using NAND gate chips is the amount I'll need, and thus the space they'll take up on a size-limited board. I also will need some transistors to drive the LEDs as the logic chips can't drive that much current directly. The issue with using an ATTiny85 chip for each board is how to program the much smaller surface-mount versions, as well as the relatively large fixed cost of each chip - I can't work on optimizing out some of the cost in the same way I could with the NAND version. I want to use JST connectors for running cables between the boards and sensors and such, as they're directional and I don't have to worry about plugging things in backwards this way. There is another question I have for you all: what's the most useful form factor? My original project had a board that was designed to fit in a 4x4 stud area, but for this I'm leaning more towards a 2x6 or 2x8 board, as I think I can fit that into more spaces.
-
Fragment of printed circuit board with microchip and SMD capacitor in a scale of 20:1. Microchip by vir-a-cocha, on Flickr