Thursday, 9 May 2013

Finally back to this blog...

I know it's been a while since I've posted but after just finishing my voyage on STS Young Endeavor and now I have some more drive to get some cool stuff done. I've almost finished compiling LFS on my server so soon I'll have some more free time to work on stuff and I've just ordered an AVR programmer and some op-amps from adafruit.com so when they arrive I'll be atarting to get some projects happening.

Stay posted
Cheers,
Rex

Sunday, 20 January 2013

Busy time at AJ 2013

While I was having an amazing time at the 23rd Australian Scout Jamboree I had a chance to get my Amateur Radio licence. This means that soon there should be another pile of radio related posts coming soon.

Sunday, 23 December 2012

DSO Block Digram

Here's a little block digram I did up to help me work out the best way to connect the ADC(s), RAM and CPU. If anyone out there has any suggestions please leave a comment.

Wednesday, 19 December 2012

DSO Revelations

So today while doing the thoroughly mentally stimulating task of watering trees at work all day I had an epiphany. I am building a Digital Storage Oscilloscope ie. I can have 2 programs that run and have them mutually exclusive. A capture program that reads the state of the ADC(s) and pushes them to a more stable memory location(seperate section of RAM, Main HDD[my be a section of flash memory on board] or Dedicated section of Flash memory). The pseudo-code for this would be along the lines of:
Reset counter
While Stop = False do
Move state_of_ADC to register0
Move register0 to Permanent_Location[counter]
counter = counter +1
EndWhile

This would give a sampling rate that can be calculated fairly easily. The instructions are fairly basic so they should each only take 1 cycle to execute. Therefore 5 cycles are required to monitor the state. Therefore we just divide the clockspeed of the CPU by 5 to give us the sampling frequency(assuming CPU at 1GHz):
1GHz/5=200MHz
That's a 200MHz sampling rate. The only problem with this method is that the only real way to change the sample rate is to change the CPU's clock speed... But if I'm going to build a radio from scratch then I dare say I'll get used to adjusting frequencies with a voltage...

The other program would be a GUI that allows the "settings" to be adjusted and a graph to be displayed. The "settings" would only effect the display. Unless I decide to implement software controllable attenuation or something useful like that. The attenuation would be done before the ADC and would be instructed to attenuate through the communication bus from the ADC which is activated for reverse transmission by sending a pin to say -5V which shouldn't happen in any other situation.

Anyway is anyone finds this helpful/instructive/wrong don't hesitate to leave a comment, more comments inspires me to write more :)

p.s. If anyone sees the HTML tags wrong or wants me to go through the tags I used here let me know any I'll put something up.

Sunday, 9 December 2012

Not a thermocouple? :/

I just wired up a test harness to see what voltage the smoke machine would cut off current to the heating coil when I stopped(pretty unusual) and thought(don't know where this came from...) I should probably test it without anything connected to the PCB just to see what happens. So I did and lo and behold, it thought it was up to temperature... Check the voltage accross the pins... 2.5-3V there... Resistance of the temperature probe? 3 ohms... Hmmm... might not be a thermocouple... time for some more tests...

Attach the probe to PCB... heater turns on... remove it heater turns off... I can hear the relay ticking so that's not what caused it to overheat... some more research needed methinks... Wikipedia here I come...

mV Voltage Divider

Rather than just getting a high resistance to drop the voltage I realized that a higher current would also. By putting a resistor in parallel with the potentiometer I can increase the current flowing through the first resistor and use a smaller, more available resistor there to drop the same voltage.
This is the schematic I did up in KTechLab to test my theory. the 1M resistor represents the smoke machine input. the max. voltage possible with this arrangement is about 30mV(50mV with a 5V supply). This means I should be able to supply the required 25mV for my max. temperature.

Saturday, 8 December 2012

Thermocouple woes

Looking at the Wikipedia page on thermocouples I found this table:
TypeTemperature range °C (continuous)Temperature range °C (short term)Tolerance class one (°C)Tolerance class two (°C)IEC Color codeBS Color codeANSI Color code
K0 to +1100−180 to +1300±1.5 between −40 °C and 375 °C
±0.004×T between 375 °C and 1000 °C
±2.5 between −40 °C and 333 °C
±0.0075×T between 333 °C and 1200 °C
IEC Type K Thermocouple.svg
BS Type K Thermocouple.svg
MC 96.1 K Thermocouple Grade Color Code.svg
J0 to +750−180 to +800±1.5 between −40 °C and 375 °C
±0.004×T between 375 °C and 750 °C
±2.5 between −40 °C and 333 °C
±0.0075×T between 333 °C and 750 °C
IEC Type J Thermocouple.svg
BS Type J Thermocouple.svg
MC 96.1 J Thermocouple Grade Color Code.svg
N0 to +1100−270 to +1300±1.5 between −40 °C and 375 °C
±0.004×T between 375 °C and 1000 °C
±2.5 between −40 °C and 333 °C
±0.0075×T between 333 °C and 1200 °C
IEC Type N Thermocouple.svg
BS Type N Thermocouple.svg
MC 96.1 N Thermocouple Grade Color Code.svg
R0 to +1600−50 to +1700±1.0 between 0 °C and 1100 °C
±[1 + 0.003×(T − 1100)] between 1100 °C and 1600 °C
±1.5 between 0 °C and 600 °C
±0.0025×T between 600 °C and 1600 °C
BS Type N Thermocouple.svg
BS Type R Thermocouple.svg
Not defined.
S0 to 1600−50 to +1750±1.0 between 0 °C and 1100 °C
±[1 + 0.003×(T − 1100)] between 1100 °C and 1600 °C
±1.5 between 0 °C and 600 °C
±0.0025×T between 600 °C and 1600 °C
BS Type R Thermocouple.svg
Not defined.
B+200 to +17000 to +1820Not Available±0.0025×T between 600 °C and 1700 °CNo standard use copper wireNo standard use copper wireNot defined.
T−185 to +300−250 to +400±0.5 between −40 °C and 125 °C
±0.004×T between 125 °C and 350 °C
±1.0 between −40 °C and 133 °C
±0.0075×T between 133 °C and 350 °C
IEC Type T Thermocouple.svg
BS Type T Thermocouple.svg
MC 96.1 T Thermocouple Grade Color Code.svg
E0 to +800−40 to +900±1.5 between −40 °C and 375 °C
±0.004×T between 375 °C and 800 °C
±2.5 between −40 °C and 333 °C
±0.0075×T between 333 °C and 900 °C
IEC Type E Thermocouple.svg
BS Type E Thermocouple.svg
MC 96.1 E Thermocouple Grade Color Code.svg
Chromel/AuFe−272 to +300n/aReproducibility 0.2% of the voltage; each sensor needs individual calibration.
I also had a closer look at the sheaths that the wires for the thermocouple are insulated with. The one going to the +ve port had red lines and the one to the -ve port had what appeared to be black lines in it. The background colour is white.

Based on that table then and if we assume the black is actually a very dark blue then the thermocouple used is most likely going to have been a K type which appear to be fairly popular so it should be easy to find a new one.

With 41 µV/°C I can calculate the maximum voltage I'll need to be able to spoof the thermocouple up to 600°C. I picked this as it shouldn't even go close but in case it does I can still test it.

With 3.3V avaliable from an old ATX PSU and (with some help from here) a voltage of 25.703mV(measuring 600°C reference 20°C) accross the thermocouple:

Voltage drop across fog machine=0.025703V
Voltage drop across resistors=3.274297V
Current flow from fog machine=V/R
                                                 =0.025703/1000 000
                                                 =0.000000026A
Resistance required=V/I
                               =3.274297/0.000000026
                               =125934500Ω
                               =125934.500kΩ
                               =125.934500MΩ
Which is pretty close to 126MΩ

However when I run this through KTechLab (Better than a SPICE simulator for a quick calculation) 10MΩ seems to be enough... perhaps I neglected to calculate current flow through the resistance array? I'll re-post once I have more info...