Skip to content

Commit

Permalink
uradmonitor KIT 1.1 update
Browse files Browse the repository at this point in the history
  • Loading branch information
uradmonitor committed Oct 4, 2015
1 parent 2cfcf2c commit 30bb1fb
Show file tree
Hide file tree
Showing 35 changed files with 39,528 additions and 811 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# uradmonitor_kit1
An open source DIY Geiger Counter Kit that can be used to push data to the uRADMonitor network.
An open source DIY Geiger Counter Kit that can be used to push data to the uRADMonitor network or as a portable digital Dosimeter.
4 changes: 2 additions & 2 deletions code/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="de.innot.avreclipse.configuration.app.release.1267986628" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="de.innot.avreclipse.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=de.innot.avreclipse.buildArtefactType.app" description="" id="de.innot.avreclipse.configuration.app.release.1267986628" name="Release" parent="de.innot.avreclipse.configuration.app.release">
<configuration artifactName="${ProjName}" buildArtefactType="de.innot.avreclipse.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=de.innot.avreclipse.buildArtefactType.app,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" description="" id="de.innot.avreclipse.configuration.app.release.1267986628" name="Release" parent="de.innot.avreclipse.configuration.app.release">
<folderInfo id="de.innot.avreclipse.configuration.app.release.1267986628." name="/" resourcePath="">
<toolChain id="de.innot.avreclipse.toolchain.winavr.app.release.1673880329" name="AVR-GCC Toolchain" superClass="de.innot.avreclipse.toolchain.winavr.app.release">
<option id="de.innot.avreclipse.toolchain.options.toolchain.objcopy.flash.app.release.926801323" name="Generate HEX file for Flash memory" superClass="de.innot.avreclipse.toolchain.options.toolchain.objcopy.flash.app.release"/>
Expand Down
2 changes: 1 addition & 1 deletion code/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>uradmonitor-dip-C101</name>
<name>uradmonitor-kit1</name>
<comment></comment>
<projects>
</projects>
Expand Down
4 changes: 1 addition & 3 deletions code/Release/prog.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/sh
echo "*** writing fuses for 8MHz external crystal"
avrdude -p atmega328p -c usbasp -U lfuse:w:0xdc:m -U hfuse:w:0xdf:m -U efuse:w:0xFf:m -U lock:w:0xFF:m
echo "*** writing eeprom"
avrdude -p atmega328p -c usbasp -U eeprom:w:uradmonitor-dip-C101.eep:i
echo "*** writting flash"
avrdude -p atmega328p -c usbasp -U flash:w:uradmonitor-dip-C101.hex:i
avrdude -p atmega328p -c usbasp -U flash:w:uradmonitor-KIT1.0.hex:i
694 changes: 0 additions & 694 deletions code/Release/uradmonitor-dip-C101.hex

This file was deleted.

723 changes: 723 additions & 0 deletions code/Release/uradmonitor-kit1.hex

Large diffs are not rendered by default.

69 changes: 36 additions & 33 deletions code/inverter/inverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,42 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
****************************************************************************
*/

#pragma once

// This class assumes the inverter signal is connected to pin PB1 on an ATmega uC

****************************************************************************
*/

#pragma once

// This class assumes the inverter signal is connected to pin PB1 on an ATmega uC

/************************************************************************/
/* Configuration */
/************************************************************************/

#define INVERTER_DEFAULT_DUTY 11 // start with low duty to allow powering the unit from higher voltages as well
#define INVERTER_DUTY_MIN 10 // inverter duty cycle will not go below 1%
#define INVERTER_DUTY_MAX 490 // inverter duty cycle will not go above 49% - without discharge transistor!
#define INVERTER_FREQUENCY 18000UL // inverter frequency in Hertz
//extern uint32_t INVERTER_FREQUENCY;
// SBM20:350 - 475V
#define INVERTER_THRESHOLD 380 // inverter output voltage target
#define INVERTER_TOLERANCE 5 // tolerance for adjusting the duty cycle to control the voltage

class INVERTER {
uint16_t duty; // used to set the duty cycle to adjust the output voltage

void setDuty(uint16_t d);

public:

// CREATE Timer T1 PWM to drive inverter for regulated Geiger tube voltage
void initPWM();

// check tube voltage and adjust duty cycle to match tube given threshold level (400V)
// return false on critical error (when we hit the duty max), true if all ok
bool adjustDutyCycle(uint16_t measuredVoltage, uint16_t targetVoltage = INVERTER_THRESHOLD);

uint16_t getDuty();
/************************************************************************/

#define INVERTER_DEFAULT_DUTY 11 // start with low duty to allow powering the unit from higher voltages as well
#define INVERTER_DUTY_MIN 10 // inverter duty cycle will not go below 1%
#define INVERTER_DUTY_MAX 800 // inverter duty cycle will not go above 49% - without discharge transistor!
// use 12.5KHz for choke based inverter in KITV1.1
// use 16.5KHz for KITV1.0 with transformer
#define INVERTER_FREQUENCY 12500UL // inverter frequency in Hertz

//extern uint32_t INVERTER_FREQUENCY;
// SBM20:350 - 475V
#define INVERTER_THRESHOLD 380 // inverter output voltage target
#define INVERTER_TOLERANCE 5 // tolerance for adjusting the duty cycle to control the voltage

class INVERTER {
uint16_t duty; // used to set the duty cycle to adjust the output voltage

void setDuty(uint16_t d);

public:

// CREATE Timer T1 PWM to drive inverter for regulated Geiger tube voltage
void initPWM();

// check tube voltage and adjust duty cycle to match tube given threshold level (400V)
// return false on critical error (when we hit the duty max), true if all ok
bool adjustDutyCycle(uint16_t measuredVoltage, uint16_t targetVoltage = INVERTER_THRESHOLD);

uint16_t getDuty();
};
Empty file added code/misc/models.cpp
Empty file.
10 changes: 10 additions & 0 deletions code/misc/models.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

// define device models
#define MODEL_A 0x1
#define MODEL_B 0x2
#define MODEL_C 0x3
#define MODEL_A2 0x4
#define MODEL_KIT1 0x5
#define MODEL_D 0x6
//1=model_A, 2=model_B, 3=model_C, 4=model_A2, 9=model_0
Loading

0 comments on commit 30bb1fb

Please sign in to comment.