Thursday, June 30, 2016

Arduino RGB Clock

     I was thinking about making an LED clock with an arduino. So, I was wondering what would make my clock stand out from the rest of the arduino LED clocks projects that are already out there.
     I was remembering an RGB cube I built. I then said that I would set out to make this an RGB clock.
     First, I setup a 4-digit seven segment display and got the clock code working. Then I was wondering if I could get a temp/humidty module to work with this also. I started with setting this up and ran into hurdle after hurdle.
     I stumbled upon some code that was very simular to what I wanted. This code display the temp, then the humidity, then the time. Well, that code didn't really work, but I did some tweaking and tuning and got it to work.
     Now that I had a working clock with temp and humidity, it was time to make a display to the size I was imagining.
     I found a 3x5 dot matrix frame to hold 5mm LEDs in a clock digit arraingment. This was perfect. I whipped up this frame on the 3D printer and started stuffing it with the commom cathode RGB LEDs. I then soldered all of the cathodes for each digit separately.
     Then I was on the tedious part of soldering all of the leads of the first digit to the second digit, then from the second digit to the third digit, then from the third digit to the forth digit. Then the two colons. I tested each section as it was going together. When I got done, all was good.
     Now it was time to solder a wire to each lead from the red, green, and blue on each LED on the first digit. Because of the fifty wires needed, I chose to use a ribbon cable so I could have one ribbon for each color. This made things easier by not having to number the wires. I just labled the ribbons by color: Red, Blue, Green. I got all the wires in place and soldered some connectors to the other end.
     Now that the rgb display is assembled and wired, now it was on to get the code to work. This was going to be a little challenge because of the rgb that can give me seven colors (without pwm control).
     Well, the code did prove to be a challenge that took me a while get it sorted. But, it worked just fine.
     I wanted to add some shift registers to reduce the number of arduino I/O pins needed so, that forced me to make a circuit board to do that. That is in another blog.
     After getting the rgb pcb display boards, I started designing a box to house all of the compnents of the clock. That took a few attempts and got it done, put it all together and I now have the project finished close to what I had envisioned.
     The next option is to add buttons to adjust the time.
     This was fun and time consuming.

Monday, May 30, 2016

3D Printing

     I have been interested in 3D printers since they were first announced. I couldn't afford the 5g's they wanted for them. When they came down to a grand, I still couldn't justify that amount of money for something that might be a flop.
     I was getting into the Arduino stuff (to try and stay a step ahead of the g-kids) and ran across a board for the Arduino called Ramps. I had to look more into this and what it was used for.
     I found that the Ramps board was developed for running a 3D printer. I got really interested in this because it was open source and all of the parts needed to build the printer can be gotten at various places locally or online for cheap.
     I got a little worried that I was not going to select the correct parts for everything to play nice together. So, I opted to purchase a kit from FolgerTech called the Prusa i3. I liked this model because of the openess of the print bed and the ease of repair.
     When I got the kit in, I got busy putting it together. the printer went together fairly easy. Instructions and all related software are provided via a Google Drive link.
     The instruction also walked me through all of the required settings to get the printer printing. I found later that these settings are rough and slowly got some things ironed out.
     I got to printing multiple things, but had a hard time getting every part to stick to the print bed reliably. Online searches reveal a mixed concensus. I did find that blue masking tape worked nice for PLA plastic. I have now found that the green Frog Tape (found in Wal-Mart) is also working really well with PLA and longer life. ABS is much more sketchy on this.
     After finding material that would keep the parts attached, now it was time to consentrate on actual printing.
     Most designs printed just fine, but larger prints seems to cause the filament to skip and miss sections of the print.
     I later found the skipping issue to be the retract distance was too much. This retraction of the filament is used to prevent the plastic from creating webs and such when moving from point to another without intending to lay down any plastic. when this retraction is too high, it cause the molten plastic to be pulled up into past the heat break. This now cools. And when enough plastic builds up into the colder area, it can be too much to push the filament through. That is when you hear the 'clicking' noise.
     I have now printed many different parts in PLA and at varying sizes and complexities with no issues.

Thursday, April 7, 2016

Circuit Boards

     Well, I have always tinkered with the idea of making my own printed circuit board. I read and researched everything from power layouts to interference avoidance. Even looking for tips and tricks.
     I made my first "circuit board" by making traces with a knife on a solid copper board. This was successful, but way less than ideal.
     Many years pass and I decide to take another look at making another board by etching. This is a lenthy process and I was doing it on the cheap and it didn't turn out as I envisioned.
     Many more years pass and again, I decided to take another gander at this. This time, focused on having the boards professionally made. I had an idea of making a dot matrix style LED clock display to replace the four digit, 7-segment, display I had setup with the Arduino clock.
     I assembled an rgb LED display and wired it to the Arduino, re-wrote the code the the dot matrix (vs 7-segment) and was happy with it. Although, it did take up ~50 i/o pins from the arduino to drive this display. So, let me throw some shift registers in there and drop that to six!
     I found and played with roughly six different pcb softwares before settling on one that I liked. PCBWeb is the one pcb design software that I settled with.
     I had to design two dual-layer boards to use the through-hole components that I had. I got them finished and was talking with a co-worker about it when he asked, "Can you put all of this on one board?".
I told him that I couldn't with the components that I have. If I did do it on one board, all components would have to be surface-mount.
     So, back to the drawing board to select components and design a single four-layer board.
     I finished laying out most of the board a few times, because I was finding errors in components selections. Some weren't available in the quantaties I wanted. Some weren't available in a resonable amount of time... etc, etc.
     I got all that sorted out and got the design finished. Now was selecting a pcb house to make them for me that wasn't going to cost a fortune. As this is my first pcb to be made.
     At first, it looked as though my only options were some manufacturers overseas. So, I searched only in the US and I found one about four miles from my house! Circuits West, Inc. had a 4-layer special for $59/board (3 min). I checked thier design requirements and my design fell well within what they could do. I placed my order with them. I also placed an order for the components from DigiKey.
     Four days later, I picked them up. My first professionally made pcbs!
     I got the parts in about the same time I got the boards and I started testing the board. All looked good. I started soldering the parts into place.

     I was testing sections of the LEDs as I got them into place. I found a few issues and corrected them in the PCB layout software and corrected the pcb.

     After all was in place and double-checked for shorts...it was time to power this up. It lit up just fine! I had to make some tweaks to the program and it ran great!

     This was an experience that I enjoyed.