Welcome to the N1IR Electronics Website. Totally off the cuff, one take, unrehearsed video projects for anyone interested in amateur radio, electronic design, makers, hardware hackers and science.


Get off you duff and build something!
Training the hand and mind since 1982.

Thursday, February 20, 2014

Two projects one pic

Hi,

Here is my last project, I just redid the whole floor in the lab (got to clean up the glue) and my upcoming project CX-333 with LMR-400UF cable.


Automatic Battery Voltage Entry in Excel

Hi all,
Sorry it been a while since the last post, I’ve been working on some bitcoin mining with a laptop on solar power! So far made $5 a month with just spare parts laying around and on my network dead time.

Anyway here is a new project I was just working on, I wanted a way to plot the capacity on my larger 80 Ah Lead acid batteries. In years past I would hook up a load and a voltmeter and read every 10 minutes and enter in the voltage by hand in excel. This is okay  but I wanted a better autonomous way to enter in the voltages. I looked into commercial meters and other stuff, way to expensive.

Then I cam across the Arduino Micro at my local radio shack, I was floored RS had arduino stuff. Well anyway the micro has a USB keyboard and mouse library.

So with a very simple program I was able to read A0 and print it out via USB keyboard to excel, here is the program.

const int analogInPin = A0;
int sensorValue = 0;

void setup() {
Keyboard.begin();
}
void loop() {
delay (5000);
sensorValue = analogRead(analogInPin);
Keyboard.println("=NOW()");
delay (100);
Keyboard.press(KEY_TAB);
Keyboard.release(KEY_TAB);
delay (100);
Keyboard.press(KEY_UP_ARROW);
Keyboard.release(KEY_UP_ARROW);
delay (100);
Keyboard.print(sensorValue); 
delay (100);
Keyboard.press(KEY_DOWN_ARROW);
Keyboard.release(KEY_DOWN_ARROW);
delay (100);
Keyboard.press(KEY_LEFT_ARROW);
Keyboard.release(KEY_LEFT_ARROW);


delay (5000);
}

A bit about the program I used LibreOffice so the =NOW() is a time stamp function, also as soon as you plug in the USB it will start entering data make sure your on A1 block in excel when starting

Be careful with the delay, if the delay is too small it will be difficult to program, hit the reset button while programming to "break" in.

You can see it in the video below:





Here is the circuit, I used (3) 100K precision resistor .1% this is to eliminate the need to calibrate, should be close enough. I am monitoring a 9 Volt battery for test with no load. 

The Math okay the A to D has 1024 steps from 0 to 5 Volts so take 5/1024 = about 4.88 mV/Step.

So VIN = ((A2DValue*.00488)*3) for this circuit.





Overall I was impressed by the Mico, other projects I have in mind with the micro:

Password keeper (press a button and output a large password)
Automatic data entry in web apps (end boring same data entry)










Saturday, February 1, 2014

Logic Demo Board

I've been teaching both the technician and general licence class for amateur radio for a while and have always run into the problem of describing digital logic gate. So I decided to make a very simple demonstration board with various glue logic, AND, NOR, Etc.

Thanks to my student Kim for milling and assembly.


Top Side
 


 Bottom
 
The top switch is power, the bottom two switches are inputs to the gate with LED to indicate the state, the LED top of the IC is the output.


This lay is not traditional, we used thru hole components in a surface mount configuration, I did this so the student can see the connections and trace out the circuit. The switches we used were a donated parts from MASSA Products, LEDS and battery holder were donated from Sager Electronics.