How about it? Experiments of the third kind , take 999999.

How about it? Experiments of the third kind , take 999999. Update Source code and diagram sketches

Things are moving on, and I wrote the main board software in asm. All it does is test if some voltages are in range, and processes error messages from the PIC micro controller in the little black box, and sounds an alarm if something is not right. You can also via the terminal talk to BOTH PICs, each has there own command set, and will show you status, ADC steps, voltages, last error message, and there is a wide choice of test and debug commands [1]. If an error occurs a beeper sounds with different beeps for each error, you can then connect a terminal and it will then display what the problem was, in the best case i twas 'ready, one year data acquired'.

Here is the PIC 18F14K22 source code for the little black box with the tritium light:

formatting link

And here is the source code for the PIC 18F14K22 in the main board that handles the alarms:

formatting link

This is not the final code, I still have some issue with false alarm I need to look into.

Here is the black box circuit diagram sketch:

formatting link
I forgot to draw the 2 220pF caps across the 120M in the opamp feedback.

Here is the circuit diagram sketch of the main board:

formatting link

I know nobody can read those ;-), and some even have holes in them, but I can.

I though the asm sources would be nice for people like J. Larkin to read in bed in the evening as debug puzzle, maybe he will find that false alarm issue.

[1] There is a command to dump the acquired data, it is protected with a PIN code, as now it takes very long and would disturb the clock tick. So this command can only be executed when data is complete. But if you want to mess up things you can use command 'r' and keep the 'r' key pressed, and it will basically step through all the acquired data. The safe way is to use command 'R' to inspect a data point at any time.

Here is a 'session', I typed 'h' for help from the black box processor, then I typed 's' for status from the black box.

Then ctrl H for help from the main board processor. and then I typed ctrl S for status from the main board.

Alarm silence switch was activated, waiting for timeout!, seconds left: 2 Alarm silence switch was activated, waiting for timeout!, seconds left: 1 Alarm active

Panteltje (c) tritium decay experiment-0.1 RS232 commands 115200 Bd 1 start bit, 8 data bits, 1 stop bit: C debug mode on, reads and prints ADC values and current PWM value continuously. c debug mode off. DnnnnENTER set day. E dump acquired data. GnnnENTER set clock calibration, set timer1 reload, default 219, saved in EEPROM. HnnENTER set hour. h help, this help. InnENTER set seconds between PWM increase or decrease by temperature controller, 1/igain, default 1, saved in EEPROM. MnnENTER set minute. PnnnENTER set PWM pulse width start value, saved in EEPROM RnnnnENTER display data entry nnnn (0 to 10922). r display next data entry, from value set by R. s status, print PWM, clock calibration (timer1_reload), time, temperature setpoint, igain. TnnnnENTER set temperature setpoint, saved in EEPROM. Y65535ENTER restart acquisition at zero, resets clock and data pointers to zero, data in external EEPROM is left untouched until one hour passes. PWM 74 clock calbration 219 on time 0 days 0:1-23 data pointer 0 temperature setpoint 490 igain 1

Panteltje (c) tritium decay experiment-0.1 RS232 commands 115200 Bd 1 start bit, 8 data bits, 1 stop bit: main board processor menu ctrl X debug mode on, reads and prints ADC values continuously. ctrl A debug mode off. ctrl H help, this help. ctrl S status, prints external voltage, battery voltage, PIC supply voltage, battery present {B) or not (_), silence_switch state, silence(S) or normal(N), latest tri_pic alarm code. The following code sequences will trigger an alarm beep (lower case control is OK): ctrl G A acquisition complete alarm. ctrl G B brownout alarm. ctrl G D data verify error alarm. ctrl G E PIC internal EEPROM verify error alarm. ctrl G F framing error. ctrl G I no iic ack alarm. ctrl G T temperature out of range alarm. ctrl G W watchdog alarm. Normally these codes are send by the PIC in the tritium light box if an error occurs, it is however possible to enter these codes at the terminal for test purposes. Uexternal 12.2 V Ubat 4.7 V UPIC 3.4 V Latest tri_pic alarm was: none

Some remark about the hardware: The RS232 out is logic level ORed for both PICs, so both can talk to you. The RS232 in goes to black box PIC, and the main board PIC sees both the terminal RS232 and the black box PIC RS232 also via an OR. The OR gates are realized with 1n4148 diodes, not because Jim claimed nobody uses diode ORs... I heard that :-) and I use them a lot.

Anyways, that makes writing software very tricky, as theoretically, and most certainly also in practice, things can go in a loop. Because of that you will find funny escape sequences in the source that use BELL signal as escape signal for error message codes, and a BELL followed by a CRLF sequence as 'no action code'. Just when you read that code in bed late at night [do not start] dreaming about it...

So, a lot more testing is needed, anything can still change, but basically the unit is complete. I expect very few hardware changes.

Reply to
Jan Panteltje
Loading thread data ...

How about it? Experiments of the third kind , take 999999. Update Fridge test 100% a success!

Today I did the low temperature test. The design was to keep the hotplate stable to -5C environment. A first test in the fridge at 10°C made no difference.. So I decided to put it into the freeze box of the fridge,

formatting link

How many stars means how many degrees below zero?

formatting link

I dunno, but the little the car thermometer showed about -15°C

Left it for some hours, to adapt to that temperature, again nothing happened...

formatting link
The numbers are from left to right: External reference voltage (for check), temperature sensor voltage - setpoint is 490 for 40°C here, 1 count is about 1/2 or 1/3 degree C -, first light channel, second light channel (the dark side is not blacked out yet), and the heater PWM. Normal PWM is about 54 at room temperature, now it went up to and oscillates around about 150, The maximum PWM is 255... So it seems we are even good for -20°C or lower.. As this is to run indoors we can only hope that never really happens, but climate chance freaks may expect that within the one year measuring period perhaps ;-) Oops, should not have touched that subject., You can see the 1 ADC step noise for the light sensors, this are 1 second samples, data points are averaged over 3600 samples (one hour).

So next should be the oven test:

formatting link
But in fact it already had the full sunshine hot test...

This is the power it was drawing at -15°C:

formatting link
That would empty the batteries fast if a mains failure happened, 350mA, still good for 4 hours on new alkalines I think.

FYI the pizza is mushrooms and cheese, and the ice cream Straciatella. Not sure that influences the results a lot.

Reply to
Jan Panteltje

Good and stable, the error value (PWM) changes a little bit reflecting the single bit fluctuation in feedback reading, as one might expect.

I take it all numbers except PWM remain constant (within a count) up at room temperature?

Oops, no little circle, this works though:

formatting link

Much more current and you could set the pizza on top of the box and have dinner!

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

On a sunny day (Fri, 27 Apr 2012 20:28:48 -0500) it happened "Tim Williams" wrote in :

Yes, same picture exactly.

OK, the 'modified' by godaddy reduced resolution jpgs are also there for all pictures.

I was wondering if the few watt heat in the freezer compartment did raise temperature, I could hear the freezer running almost the whole time. But so few watts will not even heat a cuppa coffee.

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.