Wednesday, 25 June 2014

2 x 2 SMD LED Matrix – Revisited

Okay, I’ve revisited this light to lower the power and increase the life expectancy of the circuit. This was a pretty easy fix, really. 9V was too high, so I removed the 9V snap and replaced it with a 2 wire to Dupont female connector, then I took an unused USB cable from a dead mouse and gave that a Dupont male connector. The USB connected directly to the PC should give a supply of about 5.1V, that’s a 3.9V reduction (more or less) so the excess energy won’t go into the generation of heat.
Picture 66_thumb[1]
2 wires connected to a Dupont female connectors and placed in a 2 pin block.
Picture 67_thumb[1]
USB cable with two Dupont male connectors in a 2 pin block (also some heat shrink to make it a little tidier).
Both the male and female connectors have a little pointer in the case, on both sides, I’ve used this to indicate positive.
Picture 68_thumb
Circuit connected to USB with the Dupont connectors.
Picture 69
Drawing about 5.1 V, the light is still bright enough to read by and it doesn’t get very hot at all. Yes, it still generates some heat from excess energy through the circuit, but the temperature is MUCH lower, so the circuit shouldn’t burn itself out now.
To give you an idea of the amount of light coming from the circuit, I’ve covered the LED with my thumb and you can see the light passing through my thumb still. This is the same as when you put your fingers over a torch, the red light shines through (blood, apparently, soaks up the green and blue light spectrum, so red gets through as a red light diffused by skin, connective tissue, blood and ligaments).
Picture 70
Next, in the lifecycle of this little project, will be the mounting of the circuit in some semi-transparent resin … I guess that’s as far as I’m going to take this project. After that (or before that … who can tell?), I’m going to work on an SMD pulsing light circuit. I’ll probably go with the NE555 version of the pulsing light circuit. Anyway, that’s it for now. Enjoy!

Tuesday, 24 June 2014

2 x 2 SMD LED Matrix

Today my new 48W Soldering Iron Controller arrived in the post. For just $28.45 on eBay, this is essentially the same iron that is being sold elsewhere for up to $50. The iron came from Sydney, so I’m protected by Australian Consumer laws, so I didn’t feel like it was very risky. Turns out, I’m right. The soldering iron seems to work just fine.
I turned my hand to two projects with the new iron.
In the post today, I also got my new 16x2 character LCD “LCD HD44780 1602 16x2 Character Display Module Blue Blacklight For Arduino” that I also bought on eBay (for $3.42 AUD). The LCD needs to have some header pins (16) soldered in so that you can connect it up to a solderless breadboard. This was no problem at all with the new soldering iron. The solder flowed very well and the iron heated up fairly quickly. I’m happy about that. No pictures of the LCD yet, I’m going to post separately on that later on.
The main thing that I wanted the temperature controlled iron for was so that I could try my hand at some SMD soldering.
A while back, I posted an article mentioning the SMD version of a 4 x 4 through hole component LED matrix (4 x 5 LED PCB) where I said that I was going to have a go at SMD at some later date … well, today is the date.
The circuit is simply a rework of the 4 x 5 matrix using SMD instead of through hole components. Also … it is only 2 x 2 (4) 0805 Super Bright LED, rather than 20.
Picture 64
You can see that my soldering isn’t all that neat, but on a circuit this small, it is neat enough. There are 4 x Super Bright White LED and 4 x 120Ω resistors. The SMD form factor is 0805, so they are about 2mm x 3mm in size (more or less). I also have a 9V battery snap soldered in to the circuit. 9V is a probably a bit high and I don’t have much hope that the circuit will last very long before it burns itself out. After a minute or two of power, the circuit is uncomfortably hot, it may be that I can sacrifice some lumens and increase the resistor size to give it a more comfortable lifespan.
I wanted a small light that I could attach to my magnifying glasses to help illuminate my work. I plan to mount the light in a white resin plug to diffuse the light somewhat …now I’m concerned that the resin will not be much use if the resistors burn up. Meh.
Picture 65
When powered, the LED are indeed Super Bright.
While I was soldering the LED in place, the technique that I used with these fiddly components was:
  1. lay the component down on the work mat
  2. Using the multimeter, work out the correct orientation for polarity
  3. Pre-solder the pad on one side
  4. Hold the component onto the solder with some spring tweezers
  5. Apply heat.
When the solder is hot enough to flow, the tweezers squeeze the component down to the board and the solder holds the component in place. After that, it was just a matter of soldering the other end down and then using some solder wick to tidy the job a bit.
I was thinking later that I could have used a small heat proof straight-edge to align the components in a more tidy way.
I need to get some more hydrogen peroxide and hydrochloric acid so that I can make another couple of boards, I’ve run out (pooh).
I’m still going to go ahead and mount the circuit in resin. But the next version of this circuit will use a smaller power supply and/or a greater sized resistor.
I need more practice at SMD hand soldering, but for now, I’m happy with the results.

Wednesday, 11 June 2014

Electrolytic Etcher Etched Instrument Panel

As promised, here is a picture of the completed Electrolytic Etcher


Here are the links to the previous articles that make up this project.

I still plan to make a timber box for the etcher and use the brass instrument panel on that. I hope that I can make the box out of some nice species timber, like rosewood or similar, something with a warm red tone.

The etcher seems to work fairly well … maybe I’ll change the power supply to 9V rather than the present 6.8V. That should improve the etch time.

To recap, the etcher is simply a power supply with the positive supply regulated by a 5KΩ potentiometer. The electrical current then passes through the banana plug sockets into the work-piece while it is suspended in a saline solution. This, effectively, oxidises the exposed brass, etching it away. The etcher has a power indicator (LED) and an on/off switch. But it is a very basic circuit (see Musings – Part 2 for the circuit design).

I’ll probably rub some black shoe polish into the panel to improve its appearance. That’s it for the Electrolytic Etcher. If you’ve read this far, thanks for your patience.

Friday, 6 June 2014

Electrolytic Etcher–Instrument Panel–Etched

Well, after a long time, I have finally got around to etching and patinating the instrument panel for my Electrolytic Etcher. I haven’t played with this for about 6 months and a lot of water has passed under the bridge since the last time I had this out.

I had transfer printed the instrument panel ages ago and I just never got around to doing the etching. Ironically, because of the way that I designed the panel, the only satisfactory way to etch it was using acid. I used the same acid that I normally use for printed circuit board etching (hydrochloric acid x 1 : hydrogen peroxide x 2).

After etching the brass, I gave it a bath in cider vinegar and salt and then cooked it for a short while (about 10 minutes) … the baking paper started to smoulder and it set off the smoke alarm in my flat.

Next, I rubbed some blue and green paint into the surface to flood fill the etch and give me some contrast. It may look like a crap colour, I’m colour blind, so I won’t be able to gauge the “patina” until I can get someone with better colour vision to assess it.

Instrument Panel 01

Instrument Panel 02

The contrast is satisfactory and I think that the colour is OK too. I can read the panel, so it does what it needs to do.

I’m taking it home this weekend so that I can drill out the holes where the switches, plugs, power indicator LED and potentiometer come through the panel. Most of these bits of instrumentation will be used to hold the panel down to the project box.

It’s a bit of a pity that you can see the lines where the texture tiles fit together, maybe I’ll go over it with the Dremmel to “blur” the lines a little.

Overall, from design to finished panel has been a bit of a long journey. I really don’t think that I’ll need the etcher now. Still, it will also work to drive a polystyrene cutter (6.8V) and there isn’t anything that I need to change with the Etcher to make it work … just add some NiChrome wire between the Anode and Cathode, and we’re away.

I reckon that it looks suitably Steam Punk in design, so it fit’s the bill there. I may need to do some more work on the rest of the project box to make it look more Steam Punk … maybe replace the box altogether with an antique timber box, or I could make a timber box and give the box a Steam Punk feel.

Anyway, I’ll install the instrument panel onto the Electrolytic Etcher this weekend and post some photographs of it.

Tuesday, 3 June 2014

MAX7219 – Experimentation – Driving 2 LED

After receiving my delivery of MAX7219-ENG chips from eBay, I’ve been struggling to understand how to use this useful chip. Most of the information that I’ve found on the Internet shows how to connect the chip to an 8x8 dot matrix display, which is great … but … I can buy the dot matrix display with a driver board (including the MAX7219 chip), so why would I want to?
Maybe my intended use of the chip is a bit wrong … but, whatever. It will probably do what I want it to do.
The goal with this bit of experimentation is to connect the MAX7219-ENG to two LED and to write a simple Arduino sketch to run the MAX7219.
What I came up with is as follows:
2LED Driven by MAX7219 with Arduino UNO_bb
The Arduino is connected to the MAX via pin 9 (data), 10 (clock) and 11 (latch). I’ve also got 5V and Ground from the Arduino connected to the breadboard.
Pins 4 and 9 of the MAX connect to Ground.
Pin 19 connects to the 5V rail directly and pin 18 connects to the 5V rail via a 10kΩ resistor.
The two LED connect to the Digit drivers and Segment drivers.
Green LED connects to D0 (pin 2 of the MAX) to the cathode and SEG DP (pin 22 of the MAX) to the anode. The blue LED connects to D1 (pin 11 of the MAX) to the cathode and SEG A (pin 14 of the MAX) to its anode.
That’s pretty much all there is to it. Adding LED is a matter of Digit driver pin to cathode, Segment driver to anode. But that means we are really only driving a maximum of 8 LED per MAX7219. It would make more sense to build the LED into an array, but for this experiment, that’s what I want.
The above images show the Arduino Uno connected to the MAX7219 and 2 LEDS. I’ve taken shots from different views so that you can see how the project relates to the breadboard schematic above.
The sketch is pretty straight forward. Just remember that there is no array of LED to control, so we’re only interested in 0 and 1.
#include <ledcontrolms.h>
LedControl lc = LedControl(9, 10, 11, 0);

void setup()
lc.shutdown(0, false);
lc.setIntensity(0, 8);

void loop ()

for(int i = 0; i < 16; i++)
lc.setLed(0, 1, 1, false);
lc.setIntensity(0, i);
lc.setLed(0, 0, 0, true);
for(int i = 15; i > 0; i--)
lc.setLed(0, 1, 1, true);
lc.setIntensity(0, i);
lc.setLed(0, 0, 0, true);


And, here’s the project running…

ARDUINO and MAX7219 controlling two LED

The sketch doesn’t do quite what I want it to do, but for the sake of the experiment … it works.

What I wanted it to do was for the green LED to cycle low to high and then the blue LED to cycle, kinda a glow and fade oscillation. I’m OK with it, I will spend some more time working out what I did wrong with the sketch sometime later.

Monday, 2 June 2014

Arduino Uno Tutorials – 8 – Shift Register

I like this project from the Freetronics tutorials because it gives me a means of programming multiple LED from a single sketch.
I can split the LED up into groups for different things in my project, and simply control them as a single array.
The Freetronics project goes in to some detail about bits, bytes, binary numbers, etc. However, there are loads of good bits of pertinent information on binary numbers, conversion etc. on the interweb. The main things to understand to use the 74HC595 shift register are:

  • 1 input (bit) – 8 outputs (byte),
  • The 8 outputs are either On (1) or off (0),
  • The output is represented in binary format,
  • The UNO doesn’t really understand binary numbers > 255. Here’s a quick primer for a byte of binary numbers. Binary is a base 2 numbering system, compared with decimal, which  is base 10. Each digit in a binary number is twice as big as the next number … so, one digit is = 2, two digits = 4 (2*2), three digits = 8 (4*2), four digits = 16 (8*2) and so forth.
  • 1 = 0 or 1
  • 2 = 00, 01, 11, 10
  • 3 = 000, 001, 010, 011, 111, 110, 101, 100
  • etc.. I recommend the Wiki Answers pages on converting Decimal to Binary and Binary to Decimal. Mostly, binary to decimal, because each digit represents an LED and 0 and 1 represents High or Low states for the LED. You need to tell your Arduino the state of the LED via a decimal number. On the other hand, you COULD pass it a hexadecimal number, but then you’d be converting Binary to Decimal to Hexadecimal and, really … who want’s to? There’s also a great Wiki Answers page on converting Decimal to Hexadecimal too.
    Quick Alternative!

    Windows Calculator …

    Launch WIndows Calculator, click on View and select “Programmer”
    Select Bin mode
    Enter your 8 digits representing the LED states … for example, every second LED is High, so every second digit is a 1 (Windows calculator will strip the leading 0 for you … thanks Windows).
    Now here’s the tricky bit …. click the Dec (base 10) option and … presto … 85 is displayed. Click the Hex (base 16) option and … magically … 55 is displayed. You can pass either 85 or 0x55. If your number is less than 256 (0 to 255) then you could pass it in binary in the sketch by preceding the binary number with “b”, so b01010101 would work.. Apparently, you could also do it in octal (base 8), but I haven’t tried. Check out the Arduino reference Integer Constants page for more information on using these bases in your sketch.
    The Freetronics project has a fairly straight forward hardware set-up where you are connecting the data pin to 2, the latch pin to 3 and the clock pin to 4, Pin 16 is connected to 5V, OE pin is attached to Ground. Next, the output pins are connected to their respective LED and the LED are connected to ground. Refer to the Freetronics project for the breadboard layout. On the Arduino site, it is recommended that you connect a 0.1uF capacitor to the latch pin if you are getting some flickering in your LED output. The capacitor is there to smooth the pulses.
    I didn’t get any flickering when I used some decent LED. When I used the LED that came with the Freetronics experimenters kit, I needed the capacitor.
    Picture 56
    The above picture is the circuit with the 74HC595 on the right and the spooky green LED to the left of the shift register.
    This is the second time that I wired this circuit up and it worked without any real problems both times. I’d say that this is a pretty easy circuit to wire.
    The lighting is low in this image (and the video) so that you can see the LED. At normal white balance and lighting, there’s just a glow.
    I’ll try this again with a second shift register … when my eBay order arrives!
    Splitting the LED up for different uses (some in a running lights scenario, some just blinking) simply means allocating the control differently. Again, when I have the second shift register, I’ll write another article to show you what I mean.
    The Freetronics sketch for the project is as follows:
    int dataPin = 2;
    int latchPin = 3;
    int clockPin = 4;
    void setup()
    {   pinMode(dataPin, OUTPUT);   pinMode(latchPin, OUTPUT);   pinMode(clockPin, OUTPUT);
    void loop()
    {   for(int currentValue = 0; currentValue < 256; currentValue ++)   {       digitalWrite(latchPin, LOW);       shiftOut(dataPin, clockPin, MSBFIRST, currentValue);       digitalWrite(latchPin, HIGH);       delay(100);   }

    It differs from the Arduino website sketch in that the Arduino sketch connects the data to digital 14, clock pin to digital 12 and the latch to digital 8. Freetronics, Analog, Arduino … digital.

    Freetronics Project 8 – Shift Register using Arduino Uno and the 74HC595
  • Paypal Donations

    Donations to help me to keep up the lunacy are greatly appreciated, but NOT mandatory.