top02

Radioactive@Home

is a Polish science project using the distributed computing capabilities of the BOINC platform. The main goal of the project is to create a free and continuously updated map of radiation levels available for everyone, by gathering information about gamma radiation using sensors connected to the computers of volunteers willing to participate in the project. Project is completely non-commercial, participating will be free of charge (excluding cost of detector) and the software will be licensed under the GNU General Public License (GPL).

Paypal Donation

New detector prototype

Some time ago, an idea emerged to design an alternative detector for Radioactive@Home project. Current design caused some problems sometimes, so I decided to challenge the problem and come up with my own solution. Unfortunately I was busy with my day job so the work was a step by step on the evenings. Currently the prototype is at he stage where it can be plugged in for the project, so it is a high time to publish schematics and some info.

1. Analysis

The biggest problem of the current detector is USB, done by software using vUSB libraries on AVR Processor. I've worked with it a few times, and it could cause problems with some USB ports, so I would like to propose to use a microcontroller with built-in hardware USB interface. I chose PIC18F14K50, which has such interface. It is a simple microchip microcontroller that is quite cheap and has good resources. Additionally, producer made available libraries to use USB with examples. Based on these examples we can handle easily building a system which is detected by the OS as a HID without the need for the drivers, and allows us to control LED from the application on a PC. For these examples we have well documented codes, worth to use for USB handling. Another problem of the current design is a transformer. The MC34063 is sometimes acting very weird. After browsing through the documentation, i came up with an idea the microcontroller can handle the transformer key. The tests ware promising, so I further developed this solution.

2. Specification

New detector diagram

Currently the prototype does not support alternative power source other than 5v from USB port, in time there will be a battery option added.
The 5V from the USB port through ferrite filters is passed on to the microcontroller VCC5CPU and to the analog segment for impulses detection VCC5OP. Additionally through polimer fuse F1 the 5V is passed on to the segment of the transformer key VCC5DCDC. This fuse allows us to safeguard against overriding power supply line of a USB port in case the transformer blocks with the key on. During my software development I've managed to have such a situation a few times. C8 and C9 capacitors are filtering internal power supply of the USB microcontroller.

Currently the prototype does not support alternative power source other than 5v from USB port, in time there will be a battery option added.

Power
The 5V from the USB port through ferrite filters is passed on to the microcontroller VCC5CPU and to the analog segment for impulses detection VCC5OP. Additionally through polimer fuse F1 the 5V is passed on to the segment of the transformer key VCC5DCDC. This fuse allows us to safeguard against overriding power supply line of a USB port in case the transformer blocks with the key on. During my software development I've managed to have such a situation a few times. C8 and C9 capacitors are filtering internal power supply of the USB microcontroller.

In the first design the prototype did not have the ferrite filters on the power supply, and the capacitors ware a one 10uF ceramic at the processor, 10uF ceramic at the transformer and 10uF at the amplifier, And it worked stable. But to be on the safer side, I've added some more sophisticated filtering.

The detector has standard 2x16 LCD display and a LED instead of a buzzer (it was getting annoying. On finished prototype the buzzer will be added. LCD backlit is always on, but i will add the ability to turn it off. The assembly of these elements itself does not need an explanation, n another version of the prototype, to save on the lines of the microcontroller, the display will be connected via 74HCT595 or similar shift register. Lines of the USB port are connected as in the documentation, the D1 element is optional, and safeguards the lines of the port for the over-voltage. This microcontroller shares the USB lines with the ICSP programming lines, which made the testing a bit hard. To program the microcontroller we can use ICD2, ICD3, PICkit2 or its clones, PICkit 3. Theoretically the upgrade of the program can be done via USB port, but i didn't test it as it requires to put a bootloader in the code, and I'm not sure if i understand this part correctly.

The detector has a DC/DC transformer built on a microcontroller, built in PWM block is operating a key of a transformer, Filling the PWM is done by software basing on an output voltage. Of course the 400V is reduced by divisors R4, R5, R6, C13 to a value tolerated by ADC transformer. Additionally the voltage is measured on R18 resistor. This way the software is checking the current on the key. I was able to use another ability of the controller. It has a built in comparators, which can shut off the PWM if the voltage exceeds predefined value. So it is another safeguard against over-current on the key. The software control over transformer gives us a lot of possibilities, we can freely modify the algorithms of regulation, depending on the conditions and usage. For example i created an algorithm which with higher pulses reduced average current of the key to 2,5-3A! In the future version with additional power source, we can measure its voltage, then the algorithms of the transformer can adapt the max fill level of the PWM so as to avoid saturation of transformer and instability. Measuring 5V form the USB is also useful, we can detect low performance of the USB and change the way of controlling the transformer. Impulse detection segment is a copy of a original, I've increased the values of a C15, because it seemed a little to low, I've expanded the 400V supply filter. Impulses after detection and forming are directed to input of a internal T1 counter of the microcontroller.

3. Software

Software of a LCD, transformer was not a problem, the work began with USB. In the beginning the communication over USB didn't seem complicated, using examples i was able to display the measuring results on the window application on a PC. The problems started wen i tried to comply to the project needs. The examples from microchip used additional endpoints to communicate and the original detector used rapports form the EP0 endpoint. It was clear that without learning the USB it was impossible to do. After few evenings with a help from TJM it started to work, but i memorized the code of the USB libraries. To comply with the project application was a challenge, a little reverse engineering, because i had to learn the cod of v2.01 detector on the AVR, and the application of the project

4. Whats next

The detector is in an early prototype faze, it has been working for 48 hours stable. In the nearest future i will tr to design a PCB and have a couple made. I will hand out the prototypes for testing. After testing it will be worth to take on the VID/PID cause now the detector is using the original ones, and it should not use them, krzyszp promised to take care of it. In the future i will try to look into more feature-rich versions.

I hope I've clarified the details of the design.

Ryszard Korczyk