OSHPark.com PCB Fabrication

OSHPark PCB
OSHPark Purple PCBs

It wasn’t until the last few years that ordering small-batch printed circuit boards became so affordable for the average low-budget hobbyist. Over the last few years several US and Chinese companies have sprung up that cater to the small quantity of circuit boards that a hobbyist usually needs for their projects.

One of these companies is OSH Park. OSH stands for “Open Source Hardware”. OSH Park is based in Portland, OR where members of the local maker/hobbyist scene founded Dorkbot PDX, which grew into a PCB service, and eventually OSH Park.

The nice things about OSH Park is that they have no setup cost. You pay a flat $5.00/sq in. for your circuit boards. They send you three copies of the finished product with free shipping about two weeks after you submit the order. The result is a nice quality purple PCB, with gold plated pads.

I’ve been using them both at work for cheap prototyping, and at home for my own personal projects. This particular board is part of a weather station kit that I’m working on. More info will follow when it’s closer to being complete.

Calibrating Test Equipment

<img class="wp-image-148" src="http://n1qq.com/wordpress/wp-content/uploads/2015/10/simpson_260-3a_02-300×154.jpg" alt="Simpson 260 Multimeter" width="351" height="180" srcset="http://n1qq.com/wordpress/wp-content/uploads/2015/10/simpson_260-3a_02-300×154.jpg 300w, http://n1qq.com/wordpress/wp-content/uploads/2015/10/simpson_260-3a_02-720×369.jpg 720w, http://n1qq.com/wordpress/wp-content/uploads/2015/10/simpson_260-3a_02-224×115 generic lexapro.jpg 224w, http://n1qq.com/wordpress/wp-content/uploads/2015/10/simpson_260-3a_02.jpg 741w” sizes=”(max-width: 351px) 100vw, 351px” />
Simpson 260 – A classic multimeter

For the average hobbyist equipment calibration is not something that would be of any great importance. However, if you do commercial electronics it is usually a requirement that you have your test equipment professionally calibrated. This usually means your multimeter and other test and measurement equipment needs to be sent to a calibration facility on a regular basis. Usually once a year, give or take.

Different types of projects will demand different levels of calibration. However, this is an interesting topic. In my work experience I have often seen requirements that calibrated equipment be used for testing devices. However, tolerance is not always given in these requirements. A person could use a meter calibrated to within 50% and (I suppose) would meet the requirement, even though 50% is a laughable tolerance.

Costs will vary depending on the equipment being calibrated, level of precision, and turnaround time needed. For a simple multimeter (volt-ohm-amp) expect to pay around $50 for a simple calibration.

My usual experience with having calibration done on equipment involves sending a meter to a calibration lab. They usually send it back with a new sticker on it, but don’t make any adjustments. This is because modern meters are remarkably stable. Almost always the meters are still well within tolerance levels when I send them off for calibration, so they do not require any adjustment.

In the end the average ham radio operator, or amateur electronics hobbyist will not likely have a need to spend the money to have their equipment calibrated. However, it is not prohibitively expensive, and there is certainly value in knowing that your test equipment is giving accurate measurements.

HF beacon using Arduino

I recently got a cheap 40MHz signal generator board off of ebay for a few bucks. This board is based on the Analog Devices AD9850, but the ones you find on eBay are probably knock-offs.

Parts List:
Source Code:

I modified some code I found online to use it to be able to send Morse code from the serial port on my computer using putty. Putty is a nice piece of free serial terminal software. The output power is very low (easily measured in microWatts with a small antenna) but after some impedance matching and a amplifier stage you could easily use this for a nice HF beacon project. Here is the code if you want to try it for yourself:

Arduino Code:
//Has the ability to send morse code from the serial port

#define WPM 20
#define pttOut 13
#define pwmOut 5
#define toneFrequency 400  //Hz
#define W_CLK 8       // Pin 8 - connect to AD9850 module word load clock pin (CLK)
#define FQ_UD 9       // Pin 9 - connect to freq update pin (FQ)
#define DATA 10       // Pin 10 - connect to serial data load pin (DATA)
#define RESET 11      // Pin 11 - connect to reset pin (RST)
#define txfrequency 14015000

byte morseLookup[] = {
	//Letters
	B01000001,B10001000,B10001010,B01100100,B00100000,B10000010,
	B01100110,B10000000,B01000000,B10000111,B01100101,B10000100,
	B01000011,B01000010,B01100111,B10000110,B10001101,B01100010,
	B01100000,B00100001,B01100001,B10000001,B01100011,B10001001,
	B10001011,B10001100,
	//Numbers
	B10111111,B10101111,B10100111,B10100011,B10100001,B10100000,
	B10110000,B10111000,B10111100,B10111110,B10111110,
	//Slash
	B10110010
};


void setup(){
	Serial.begin(9600);
	Serial.print("Loading...");
	pinMode(pttOut,OUTPUT);
	pinMode(pwmOut,OUTPUT);
	pinMode(4,OUTPUT);
	digitalWrite(4,LOW);
	pinMode(3,OUTPUT);
	digitalWrite(3,HIGH);
	setupDDS();
	delay(500);
	Serial.println(" complete");
}

void loop(){
	if(Serial.available()){sendSerialMessage();}
	transmitString("Test");
	delay(5000);
}

// transfers a byte, a bit at a time, LSB first to the 9850 via serial DATA line
void tfr_byte(byte data)
{
	for (int i=0; i<8; i++, data>>=1) {
		digitalWrite(DATA, data & 0x01);
		pulseHigh(W_CLK);   //after each bit sent, CLK is pulsed high
	}
}

void sendFrequency(double frequency) {// frequency calc from datasheet page 8 =  * /2^32
	int32_t freq = frequency * 4294967295/125000000;  // note 125 MHz clock on 9850
	for (int b=0; b<4; b++, freq>>=8) {
		tfr_byte(freq & 0xFF);
	}
	tfr_byte(0x000);   // Final control byte, all 0 for 9850 chip
	pulseHigh(FQ_UD);  // Done!  Should see output
}

void pulseHigh(int pin){
	digitalWrite(pin, HIGH);
	digitalWrite(pin, LOW);
}

void setupDDS(){
	pinMode(FQ_UD, OUTPUT);
	pinMode(W_CLK, OUTPUT);
	pinMode(DATA, OUTPUT);
	pinMode(RESET, OUTPUT);
	pulseHigh(RESET);
	pulseHigh(W_CLK);
	pulseHigh(FQ_UD);  // this pulse enables serial mode - Datasheet page 12 figure 10
}

void sendSerialMessage(){//Gets a string from the serial port, and send it out via morse code
	delay(10);
	char message[64];
	int length = 0;
  
	while(Serial.available() && length < 64){ message[length] = Serial.read(); length++; message[length] = '\0'; } transmitString(message); } void transmitString(char* message){ for(int i = 0; message[i] != '\0'; i++){ Serial.print(message[i]); transmitChar(message[i]); } Serial.println(); wordSpace(); } void transmitChar(char character){ int lookupValue; if(character > 64 && character < 91){ //Capital Letter (0-25) lookupValue = character - 65; } else if(character > 96 && character < 123){ //Lower Case Letter (0-25) lookupValue = character - 97; } else if(character > 47 && character < 58){ //Number (26-36) lookupValue = character - 48 + 26; } else if(character == 47){ // slash (37) lookupValue = 37; } else if(character == 32){ // space wordSpace(); return; } else{ return; //Invalid Character } byte length = (morseLookup[lookupValue] & B11100000) >> 5;
	byte pattern = morseLookup[lookupValue] & B00011111;
	byte mask = 1 << length-1;
	for(int i = 0; i < length; i++){ if(mask & morseLookup[lookupValue]){ dash(); } else{ dot(); } mask = mask >> 1;
	}
	charSpace();
}

void dot(){
	digitalWrite(pttOut,HIGH);
	sendFrequency(txfrequency);
	tone(pwmOut,toneFrequency);
	delay(1200/WPM);
	digitalWrite(pttOut,LOW);
	sendFrequency(0);
	noTone(pwmOut);
	delay(1200/WPM);
}

void dash(){
	digitalWrite(pttOut,HIGH);
	sendFrequency(txfrequency);
	tone(pwmOut,toneFrequency);
	delay(3 * 1200 / WPM);
	digitalWrite(pttOut,LOW);
	sendFrequency(0);
	noTone(pwmOut);
	delay(1200 / WPM);
}

void charSpace(){
	delay(2 * 1200 / WPM);
}

void wordSpace(){
	delay(7 * 1200/WPM);
}

Homemade ECG machine using infrared

ecgSome interesting projects that I recently found online showed people using infrared phototransistors and op-amps to build basic light-based ECG machines. I thought that I’d try it for myself just to see how well it would work. It was certainly interesting to build this little circuit on a breadboard. Perhaps I’ll build on this design in the future, but I havn’t done so yet. The output signal is a bit noisy, but using an Arduino as an A/D converter I was able to capture my heartbeatĀ and convert it into audio using Goldwave. This design was based on a circuit posted by Scott Harden.

Bench Power Supply Part 2

Now that I’ve got my specs figured out, it’s time to start some high level design. This will allow me to get the layout of the power supply set before diving into the small details. Hopefully this will make the design process more efficient. One of the biggest things that will affect this high-level design is one particular design specification lexapro 10 mg. That is, the call for a switching knock-down stage. The reason I chose to include this is efficiency. Many lab power supplies I’ve seen out there have one thing in common: Many of them use linear regulators like the LM7805 or LM317. These are good devices, but they all have very low efficiency, especially when the dropout voltage is high. Enter switching regulators. Switching regulators can have very high efficiency (upwards of 95%) which allows for higher current handling, and less heat dissipation. However, they have a drawback. Switching regulators typically have more noise on their outputs. They may be OK for some circuitry, but this inherent noise will not do for the lab power supply I intend to build. To get the best of both worlds, I plan to use both types of regulators in my design. The switching regulator will take care of most of the voltage dropout first, while leaving about 2-3 volts for the non-switching (a.k.a. linear) portion to drop second. This will reduce power dissipated in the non-switching section of the power supply, which has numerous advantages, including (hopefully) eliminating the need for a noisy fan, as I’d like to make this thing as small, quiet, and cool as possible. This would definitely not be possible without the switching section in front. Now, it’s time to make some initial part choices:

Parts List:

Linear Output transistor: P-Channel MOSFET IRF9540
Switching Regulator: LM2679-ADJ
Switching Regulator Inductor: Digikey# 553-1121-ND
Switching Regulator Capacitor: Digikey# P15372CT-ND
Current Sensor: ACS712
This should help lay the groundwork of the power supply. Next we’ll look at putting in some control circuitry, including op-amps and so on…