× Gamma Spectroscopy

Detecting K-40 in bananas with Radiocode RC103

More
2 weeks 5 hours ago - 1 week 6 days ago #7243 by ChrisLX200
Rooting about in my metal stock I have 6-1/2" aluminium tube and 3" copper tube. Also have suitable sized aluminium tube for use instead of the copper but I thought copper was the better option? Anyway the aluminium is easier to work with I guess. 6-1/2" tube is too big to fit my lathe - I can turn rings of that size in the bed gap but not long lengths so it would just have to do as sawn on the bandsaw. I'll figure something out over the weekend.
Last edit: 1 week 6 days ago by ChrisLX200. Reason: correction

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago - 1 week 6 days ago #7245 by ChrisLX200
My ChatGTP 'assistant' confidently says using aluminium as the inner layer (tube) is a definite no-no for a number of reasons and Copper is the better alternative. Then it waffles on about using a copper foil inner liner completely ignoring there is already a 16g thick copper inner layer already. Sigh.

Edit: Well it changed it's mind after I challenged it and the 1.6mm copper tube is sufficient without any extra foil. Sadly, this arrangement (6.5 outer tube, 3 inner tube) would still only block some 38% of background K-40 activity. Not great for that particular experiment. However, it's much more effective blocking lower energy gamma rays.
Last edit: 1 week 6 days ago by ChrisLX200.

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago #7248 by Simomax
Sometimes you just have to back it into a corner and bend it's arm. 

I was incorrect when I said 'if you have aluminium, use that.' Copper is better than aluminium for reducing gamma & x-rays for general background shielding. For specific beta shielding then aluminium would be the better option.

Aluminium (low-density, needs more thickness):

  • 1 to 3 mm is usually enough to stop most high-energy betas and absorb soft X-rays.
  • Go for 3 mm if dealing with strong beta emitters like Sr-90 or Y-90.
Copper (denser, better at stopping X-rays and slowing betas):
  • 0.5 to 1 mm is usually sufficient.
  • For higher energy beta emitters, 1–2 mm adds extra safety and better X-ray absorption.

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago #7250 by ChrisLX200
Maybe I'm being a bit thick, but there doesn't seem to be an option to record a spectrum over a set period in the Radiacode Windows app? I want to leave it running and to just get on with it, that's easy with BecqMoni...

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago #7251 by Simomax
No, not thick. I don't think there is. It's never been an issue for me. I just set it up, and come back around the time I want to capture. Most of mine are longer than I intended, but doesn't really matter.

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago - 1 week 6 days ago #7252 by ChrisLX200
My AI assistant wrote me a snippet of Python code that would do it but it just seems odd such a basic function is missing.
My 7-day background capture is finished at 1am and I wasn't going to hang around to stop it manually :-)


ChatGPT's Python offering - to get the result into InterSpec:

import time
import serial
import xml.etree.ElementTree as ET
from datetime import datetime, timedelta

# === User Input ===
filename = input("Enter filename to save (e.g., Background_7day.xml): ").strip()
if not filename.endswith(".xml"):
    filename += ".xml"

try:
    hours = float(input("Enter capture duration in hours (e.g., 168 for 7 days): ").strip())
except ValueError:
    print("Invalid input for duration. Exiting.")
    exit(1)

# === Configuration ===
PORT = 'COM3'  # Change to match your system
BAUDRATE = 115200
CHANNELS = 1024  # Radiacode 103 spectrum size

# === Spectrum Commands (placeholders) ===
CMD_RESET_SPECTRUM = b'\x02\x0A\x00'  # Reset accumulation
CMD_GET_SPECTRUM = b'\x02\x09\x00'   # Get spectrum data

# === Connect to Radiacode ===
try:
    ser = serial.Serial(PORT, BAUDRATE, timeout=2)
    print(f"[{datetime.now()}] Connected to Radiacode on {PORT}")
except serial.SerialException as e:
    print(f"Failed to open port {PORT}: {e}")
    exit(1)

# === Reset Spectrum Accumulation ===
print(f"[{datetime.now()}] Resetting spectrum...")
ser.write(CMD_RESET_SPECTRUM)
time.sleep(1)

# === Accumulation Loop ===
start_time = datetime.utcnow()
end_time = start_time + timedelta(hours=hours)
print(f"[{start_time}] Starting accumulation for {hours} hours...")

try:
    while datetime.utcnow() < end_time:
        time.sleep(60)
except KeyboardInterrupt:
    print("\nCapture interrupted by user.")

# === Retrieve Final Spectrum ===
print(f"[{datetime.utcnow()}] Retrieving spectrum data...")
ser.write(CMD_GET_SPECTRUM)
raw = ser.read(CHANNELS * 2)  # 2 bytes per channel

# === Parse spectrum into channel list ===
spectrum =
for i in range(0, len(raw), 2):
    count = int.from_bytes(raw[i:i+2], byteorder='little')
    spectrum.append(count)

# === Build InterSpec-Compatible XML ===
root = ET.Element("Spectrum")
ET.SubElement(root, "Name").text = filename
ET.SubElement(root, "Description").text = f"{hours}-hour capture with Radiacode 103"
ET.SubElement(root, "DateTime").text = start_time.strftime("%Y-%m-%dT%H:%M:%SZ")
total_seconds = int(hours * 3600)
ET.SubElement(root, "RealTime").text = str(total_seconds)
ET.SubElement(root, "LiveTime").text = str(total_seconds)

channels_elem = ET.SubElement(root, "Channels")
for i, count in enumerate(spectrum):
    ch = ET.SubElement(channels_elem, "Channel")
    ch.set("Index", str(i))
    ch.text = str(count)

# === Save XML File ===
tree = ET.ElementTree(root)
tree.write(filename, encoding="utf-8", xml_declaration=True)
print(f"[{datetime.utcnow()}] Spectrum saved to {filename}")

ser.close()


 Edit: Nice try but it doesn't work - because Radiacode don't expose the USB interface so no COM port is listed for it. It's a bit wierd. Anyway, I'm going back to BecqMoni for my captures. The issue however (for me) is that the .xml file from BecqMoni is not in the correct format for analysis by InterSpec, but there is a solution to that in the form of a file convertor python script. More on that later I've got a headache.
  
Last edit: 1 week 6 days ago by ChrisLX200. Reason: Changed code

Please Log in or Create an account to join the conversation.

Time to create page: 0.173 seconds
Powered by Kunena Forum
Everything's free. Please support us by considering a donation. Log in first!
Solar powered Raspberry Pi 4 server stats: CPU 51% Memory 13% Swap 7% CPU temp=56.9'C Uptime 2 Days