Hayling Island

Hayling Island

Friday, November 29, 2013

Bye bye Weller, hello ByeBye

Well, had an epic fail with the soldering iron. However, we are nearly there. I braved the element and tried the Weller soldering pencil, and nothing happened. I found that somewhere in my travels, the heating element had decided to go open circuit. I disassembled, and found a horror story in there - clearly why the beast was on eBay in the first place.

Don't you just love it when people advertise things as 'sold as seen', but fail to mention when questioned something like 'it caught fire a while ago, took the controller PCB out and got extremely hot in places it's not meant to'.

Ah well, the controller is good, the display works, even the PID seems to function, and the temperature sensing is fine. I checked on eBay, and couldn't get close to affording a new Weller handle - but I found a Hakko, which is quite close. And then I found that the clones have been cloned, and there are even cheaper alternatives to Hakko - and the blogs seem to say that they are pretty much just as good as the Hakko clone of the Weller .. so one is on order. It's coming from China so I need to be patient for a few weeks.

So, needing to fix something, my attention turned to Domia's ByeBye Standby controllers. Now I have a lot of them in the home - mostly to control things where the socket is out of reach, or hidden or something. I have a ceiling fan and light - and I wanted to remote control it, so there's a Domia controller for that. My entire stack of test equipment all turns on with one controller. Much of the lounge lighting is on controllers - it is very convenient to press one button to turn on all of the side lights. Anyhoo, over the last couple of years they started failing. They turn on for a while, then click off again. I have now had six fail in this way, all in different load environments. Sometimes they recover for a while, but they start to fail again.

I took one apart, and had a prod around. Then I came across a polyester capacitor across the load side .. 220nF. Only rated at 275v though, a bit tender for 230v AC. My lovely LCR meter said its value was a mere 59nF ..
So I changed it (have a couple of suitable replacements in stick). Well, blow me down, it works.

I thought this is too good to be true, so I will try another one. It works as well.

Two for two ..

Third one; I am a little low on 220nF, have a 22nF one instead (it can't be doing much more than contact bounce suppression, can it?) - but it doesn't work. Ah, wait a minute - of course, it is dropping the mains voltage. That's why the value is so critical - when the capacitance went low with ageing and a bit of overvoltage, the power supply was soft, so turning the relay on would cause the power to dip, letting the relay go again.

So, off to Maplins. Oh, perhaps not, they are getting a little low on anything that is even vaguely off-track. Still, it is now added to my next order. In case you want to see what one looks like, here are some I removed earlier ..



Sunday, November 24, 2013

Stuck with an op-amp that doesn't

A short post to say that I have a bit of a problem with an op-amp that won't. For the Weller soldering iron, I have a constant current source that puts a known current through the PTC sensor in the soldering pencil itself. It works, runs a little less than a milliamp and generates about 15mV across the PTC. So, to digitise in the AVR, I want to make it a bit bigger - perhaps 70x. An op-amp with feedback is easy enough, right? So I have an op-amp with some filtering. And the output saturates to a rail. And writing this I just realised what I have done wrong.

When I look at the (virtual ground) input without the op-amp in place, it's 15mV. When I plug the op-amp in, and there are no other ways of voltage getting there, it reads 180mV. Normally the op-amp would keep the virtual ground at ground because it's fed from two opposite power rails. Ah. Yes, forgot that.

And now fixed - we have life. I 'calibrated' the PTC by putting it in iced water, and then in boiling water to give me an offset and a slope. So I have some scale factors, have plugged them in and it kind of works. Or at least it is trying to turn the heater on the iron to match the desired temperature.

Some point, I have to work up the courage to connect the iron's heater to the logic triac, and see if it really does work. Maybe tomorrow .. I can feel a Call of Duty session coming on. 

Friday, November 15, 2013

Weller, weller, weller boom

I bought a dead Weller soldering iron from that auction site. I have always wanted a posh soldering pencil, and now there is more lead-free around I need a soldering iron I can wind the temperature up a bit on. So, another project in waiting is to replace the electronics in the Weller with an AVR, a bit of PID code and a few gizmos.

To show the selected temperature, I dug out some old HP TIL311 displays from my junk box, so I have decided to use those. My first attempts at knocking up a circuit caused a very, very hot 5v regulator so I have decided to go for a switching regulator instead.

And here it is .. I've used this design before, so I know it works, it is reliable and is very efficient so no more burned fingers on the heatsink.



The soldering iron has a heating element, and a temperature sensitive coil of wire. The circuit - culled from many, many sources and kind of joined up into the simplest possible design (since there is not much room inside a Weller soldering iron itself) is like this. I've made a constant current source from a transistor and an LED, and that current passes through the temperature sensor. The small voltage across the element is amplified a bit, and filtered a lot before feeding the integrated ADC in the AVR.

I couldn't decide whether to write the code in C, and use AVRISP to program it, or to do the Arduino thing. So, I have put both styles of connector on the board. I've added three terminals for a pot to control the temperature ..easy enough to read that.

So anyway, the soldering iron is I believe an EC1201 pencil (40W) .. the base was (before it caught fire) an EC2100. According to a few web sites, the sensor is an EC229, with a room temperature resistance of about 21-22 ohms. I am calibrating it using boiling water and the usual cold water / ice mix allowed to stabilise at room temperature. Turns out that the relationship is roughly linear, and is something like resistance = 20.7+(TempInCelcius/12). I might increase the gain of the amp so that I get a few volts into the AVR.

The five pin connector on the solder pencil has two gold pins for the temperature sensor, one ground pin connected to the barrel, and two ordinary steel-coloured pins for the 24v heater. 



Wednesday, November 13, 2013

re: Virtualbox

Google is your friend.

The hang seems to be at the point of bringing up the sata drivers. Ah, I see so there is some competition between a config for stand-along booting, and running as a VM. If you want to run it as a VM, you should install windows under a VM and not try to boot an existing installation.

There are lots of people who have apparently solved the problem, but this involves heavy Windows petting. If it were Linux, or AIX, or pretty much anything apart from Windows hacking I would probably be doing it, and not typing about not doing it.

I can't bring myself to do it. Oh bother .. what do I do about running old Lattice tools then - the ones that won't WINE? I suppose if I get desperate I could boot into Windows etc. A quandary I shall ponder on.

Tuesday, November 12, 2013

Virtualbox

And another aside ..

There is the odd design tool that only runs under Windows. The legacy Lattice tools are a good example. Now my big Linux box here running Mint 15 does have the capability to reboot into WIndows XP. It takes a very long time, since I do it so rarely that I have to wait an age for it to load this or that patch, install, update AV definitions and so on. Also, my linux box stops while I am doing so.

I read about virtualbox, and thought that would be quite a good thing to install. So I did .. and it kind of works. I didn't want to reinstall Windows on the drive it was on, since it already worked and I doubt I could either find the CD or my licence any more. So, I found some nice web sites that took me through the process of finding the drive without reinstalling.

And here it is installed, and about to boot up the windows box ..


So I launch the partition, and it stays with the following on the screen until hell shall freeze over. 
Any clues how to find out what is going on? 




Text mode VGA+

Just in case anyone is interested, I developed a text-mode VGA controller for the modular synth. I decided that I wanted some way of displaying activity on the midi to cv interface, and a way of controlling any other groovy things I plugged in. I had a 12 inch IBM monitor from a retail POS. It seems capable of running at 800 x 600 60Hz, which is a dot rate of about 40MHz.

I bought a logic analyser from Seeed Studios - Jack Gasset's Open Logic Sniffer, and for some reason I had decided to buy two. So, I had an FPGA development board, kind of. It uses a Xilinx Spartan-3 xc3s250e-4vq100 chip, which has plenty of capability.

By the by, OLS makes an excellent logic analyser. I bought it to fix an HP1630G logic analyser with .. that had a dead CRT, and the cheapest CRT I could find was 150 Euro for this peculiar vertically scanning beast. So I decided to knock up a converter in a CPLD to take the twisted old signals from the scope, convert it into VGA form and drive an LCD. I found some fast cache memory from an old motherboard for the RAM, and I was well into it. However, I came across a nasty timing issue, and decided to buy an OLS to help me find it. Of course the OLS has far more capabilities than the HP1630G, so my enthusiasm for fixing noisy, huge old HP engine faded slightly. 

I started by designing a Johnson Ring - old school to the core. I drove that with a DCM, and fed that into a brief emulation of a 6845 CRTC; really just a bunch of counters with pre-determined reset points. I found a base ROM font from the internet, and downloaded that into one of the RAM blocks.

// ROM with synchonous read (inferring Block RAM)
// character ROM
//  - 8-by-16 (8-by-2^4) font
//  - 128 (2^7) characters
//  - ROM size: 512-by-8 (2^11-by-8) bits
//              16K bits: 1 BRAM

I used four of the other blocks for a large character memory and an attribute memory - so each text position on the screen has a byte for a character code, and another for how the character should be displayed. Four bits for the colour, one bit each for reverse video, underscore and column separator (Ah, can't forget that wonderful little addition from the 5250 - very useful for continuous underscore) and one bit for a 'big character' using four character cells on even boundaries.
800 x 600 works out at 88 columns by 37 rows plus a bit of spacing.

I knocked up a colour serialiser which feeds two bits per colour going out, and I knocked up a quick buffered wing that has a 15-pin connector on it. After a bit of hacking of Verilog - my first time out for any serious stuff - it works.

Next steps are to add a bus controller on it, and some way of feeding data in to it. Since it really is for text mode, I can use something simple like USB 2.0 ... or even serial to be honest. I'll only be driving it from an AVR.


Sunday, November 10, 2013

And so it begins ..

Well what with having the puppies pretty much sold now, and light at the end of the tunnel from the work life I find my mind turning back to the modular synth. I dug out the linear power supply I made for the purpose 15 years ago, found out what was wrong with it;

It's a 15-0-15 power supply based on linear regulators with external bypass transistors. The circuit, originally published with the Formant synth from Elektor relies on having two separate windings on the transformer. Turns out the potted one I was using didn't - I must have done an incomplete job of probing with Rita (the digital multimeter is called Rita the Meter. Actually they all are to avoid confusion, with the exception of the tiny little 4.5 digit autoranging one which came all the way from China for a stupidly low price, and she is called Lita)

So, one new transformer later it's up and running. The first device I have powered with it is a mixer - Soundcraft Compact 10 from *bay - only cost me a tenner or so. As with many lower end professional audio products, the power supply had gone to Silicon Heaven in dramatic style. I've since disconnected the original PSU, feeding from the Formant PSU and all happy. Being a heavy load for the PSU it's also given me the chance to see if the performance under load is OK. It is ..
I will probably attach the mixer to the synth anyway, since you always need to integrate audio sources and sinks together. It also looks pretty with lots of colored knobs.

I have decided that the second step on the way is to make the MIDI-CV converter. I have decided to use an FPGA board I have, coupled to a new daughter board with the MIDI interface on, a touch LCD display and an AD5668, so I have eight channels of CV coming out. I'll probably use ZPUino as a soft processor. I already have a VGA interface on there, so I can use a small retail color display from IBM as a general purpose monitor. I remember working on text mode color display adapters for IBM many years ago, and what took months then to code up and have assembled in TTL took me about four hours to get going with a Xilinx FPGA and their free tools.

Ah, will need a 5v PSU. Well, I have many of those around the place - I wonder if I use a switcher, will that break through into the audio path?