Monthly Archives: October 2015

Open Workbench Logic Sniffer case – Part 4 (Finale)

Published by:

The expansion module finally arrived this morning 🙂 and the glue seems to be mostly set.

2015-10-22 19.52.56

Here is the expansion module lined up next to the OWLS board, now to fit the headers and find a cable.

Luckily I had an old short IDE cable around that works. It over hangs 4 pins either side but it works.

2015-10-22 20.22.13

Here is both board in place in their respective connectors.

2015-10-22 20.26.56

this is it with the case fully done up, the board sits on a slight angle but it is all nice and snug.


Now all left to do is hook up the cables and give it a test.

2015-10-22 20.34.05 2015-10-22 22.42.22

Here is it hooked up doing some reading of SPI traffic on the Arduino, note that 3 switches have been set on the panel, this is grounding the un-used pins to avoid phantom signals due to floating lines.

I had to mess around and update the firmware to make it recognize the extra 16 channels, the bootloader didn’t work so I had to use a PICKit3 to flash the OWLS’ PIC directly.


Below are a couple of captures from the SPI bus reading channel 0 of a MCP3304 with a potentiometer on it.


Set to 5V in


Set to 0V in


That concludes the case project for the logic analyzer, I would say that it was successful and I feel much better using it without having to worry about shorting the board PCB.

I’ll be back with more projects and updates soon.

Open Workbench Logic Sniffer case – Part 3

Published by:

The glue is not quite set, even after 24 hours and the connectors had shifted so I’ve had to re-glue them 😛

The connectors were also too low set in respect to the OWLS board so I had to raise them up anyway.


The next thing I needed to do while I was working on it, was to find a way of keeping the platform that the OWLS board/s are on from sliding forwards when I try to plug in the USB, I decided to to make a small metal spacer that hold onto the platform and push against the in inside of the front panel, I decided to wrap tape around the end so it wouldn’t cut into the wires and come up with a way of it holding onto the platform.

2015-10-21 23.30.20

I basically folded a piece of metal over, used a nibbler to cut a notch out then opened it out.


2015-10-21 23.31.05

Here you can see the space in position, I checked it in the case and it seems to be correct.



2015-10-21 23.50.05

Concerning the connectors, I had to re-glue them as I mentioned above, and I used some cardboard to act as a spacer. I also dolloped some glue onto the spacer to hold it in place. This time to stop them shifting during the gluing, I have used a clamp over the edge of my desk. If this fails, then I’m falling back onto good old hot-glue 😛 I may even just add some for good luck. I don’t expect any heat within the case so I know that isn’t an issue using it.

So it’s time to wait once more for the glue to dry 😛 hopefully the expansion board arrives in the morning so I can get it all in the packed up in it’s case. If not, I will put it all together with it’s 16 channels and upgrade it at a later time. Though I will fit the header and make a cable so the upgrade will be quick.

I will check this again in the morning.

Open Workbench Logic Sniffer case – Part 2

Published by:

Ok, it’s been about 24 hours of the resin setting and it seems to be quite firm, though some parts are still tacky. That doesn’t matter as I’m going to be letting it set again after I do these next bits.

My mock up picture in the last post is slightly wrong, I depicted the expansion being on the right of the board (when looking at the headers) this would suggest the expansion becomes channel 17-32, where in fact the expansion is actually channels 1-16 and the OWLS board becomes channels 17-32.

 2015-10-20 22.51.07

Here you can see the DIP switches and the pins under them, that is where I will be plugging in my cable sets.

I will eventually fill gap in at the top of the dip switched, I may just fill it with hot-glue and colour it in black with a sharpie. I will most likely be putting a label over it with channel numbers.

The next thing to do is to make a way of having it easily disconnected from the OWLS in case we need to do any modifications to the board, especially as I know that I will need to modify the board because the expansion hasn’t arrived yet and I will need to fit a header for it.

I mounted some female headers onto some veroboard and attached the wires from the front panel (trimmed to appropriate lengths too)

2015-10-20 22.50.56

You can see here that the ground connection on each side is connected using a green wire, I only connect one ground from each set on the ribbon cables and have it all similarly connected on the front panel.

The blue plate was metal from the PS3 teardown, it was the bluray drive casing cut to shape with a part folded over on itself so I can make the connector stand off a little. I then put a little more resin on it to hold it in place, I’ve used a strip of pin headers to keep it all straight and aligned.

2015-10-20 22.57.32

This is the current state it is in, time for more waiting for glue to dry 😛

I realized that I didn’t show the case I was going to put it into in the previous post so I thought I would show it here.

This is the case that I took from the 33.6Kbps modem that I tore down in this video :


2015-10-20 22.57.41

I will check on this in the morning, hopefully it will be set enough so I can be put in the case before I go to college.


Open Workbench Logic Sniffer case – Part 1

Published by:

I have had my Open Workbench Logic Sniffer for quite a while and I have found it to be a very useful piece of kit. I have recently ordered an expansion to upgrade it to a 32 channel logic analyzer (up from 16), the little case which I put it in is going to be too small, so I have decided to put it into a bigger case.

I also have decided that I should create a front panel for this case because one issue that has always bugged me with the OWLS is that when you have unused channels, they seem to pick up “ghost” signals from the other lines. To remedy this I have put DIP switches on the panel which allow you to ground individual channels.

OWLS in case

Here is a mock up of how it will look in the case, the green boards will be fixed in place and the OWLS and it’s expansion will be able to unplug to allow me to do updates etc..

Below is a schematic of how the wiring is going to look. I only have 9 way DIP switches so each set has a non-functioning switch.


OWLS panel


I started by putting the DIP switched on some protoboard and the pin headers under it

2015-10-19 22.56.33

The wires were then soldered in place.

2015-10-19 22.56.25

I then made sure the front panel of the case had a good opening and put it in and used epoxy resin.


2015-10-19 23.13.27

This is how it currently sits at the time of this posting. I will check it in the morning and continue the build tomorrow.

PSU Project #8 – Transistor Voltage Regulation

Published by:

October 17th 2015

In this video I will be demonstrating regulating the voltage with a 2N3055 NPN Power transistor.

The basic idea is very simple, the transistor will compare the Vin with the output voltage via R1 and R2, it will then adjust the output which drives the transistor and will make corrections to the voltage that is being driven by it.

vreg with 3055

I also give a quick demonstration of this circuit being controlled by the MCP4822 DAC which is connected to my Arduino.

2015-10-17 01.12.43

You may have noticed that I have moved the DAC/ADC setup onto a new board which now uses the Arduino Nano as opposed to the Arduino Mega. This is getting it all in line for when I start to merge the analogue and digital side of things.

Arrival of the DE0-Nano

Published by:

My DE0-Nano finally arrived from Terasic,

this cute little development board cost me about $60 (or $100 without student discount), I had to wrangle a bit with FedEx to get it (You wait in all day for them, but the second you step out they arrive) but it’s finally here

I’m not the biggest fan of unboxing videos (mainly because I get jealous of what people unwrap) but I decided to throw one up to show everyone what you get and compare it to my old DE1 which I got about 5 or 6 years ago.

This board is not recommended for those unfamiliar with Altera technology or even FPGA/CPLD technology in general, it doesn’t come with a huge array of flashy lights or switched, if you want that then go for the DE0 (non-nano flavour) or if you want the full experience, look at the DE2 kit’s, they have plenty to play with. This one is designed for those who want to specifically attach their own circuits.

The De0-Nano consists:

  • Altera Cyclone IV FPGA which contains about 22,320 Logic Elements, 4 PLL’s, among other things.
  • 32MB SDRAM
  • 2Kb I2C EEPROM
  • 8 LED’s (Green), 2 pushbuttons, and 4 switch dipswitch.
  • ADI ADXL345 13-Bit 3-axis high resolution accelerometer
  • NS ADC128S022 12-Bit x 8-Channel ADC up to 200ksps

All in all, some nice toys to play with in a small package.

I’ll be definitely playing with this board and doing some more videos and blogs about it.

More info about the DE0-Nano can be found here on Terasic’s DE0-Nano page

PSU Project #7 – LCD’s

Published by:

September 19th 2015
In this quick video we discuss the use of LCD’s on the Arduino board.
The LCD’s we use are the standard 16×2 Hitachi based alphanumeric display and a 84×48 Nokia 3310 display.

PSU Project #7 – LCD’s

Hitachi based LCD:
Hitachi LCD to Arduino
This is the wiring diagram of the setup used in the demonstration of the Hitachi based LCD.
This Hitachi based display is a very commonly used display type, there is a library in the Arduino IDE by standard under the name of LiquidCrystal and there is example code that is used. Should I find myself restricted on space inside the Arduino then I may consider using this display as the character set is hardcoded into the Hitachi controller on the module thus saving us space in the code.
Nokia 3310 display:
Nokia 3310 LCD to Arduino
This is the wiring diagram of the setup used in the demonstration of the Nokia 3310 display.

The Nokia 3310 display uses a Philips PCD8544 driver chip but since it was mostly used in the Nokia 3310 cell-phone it is more commonly known by that name.

Example code for this display can be found here at the Arduino playground site. (opens in new window)
This is the code that I used in the demonstration. I did however make changes to the code:
The lines that read:
#define PIN_SDIN  4
#define PIN_SCLK  3

Were changed to:

#define PIN_SDIN  11
#define PIN_SCLK  13
This allowed it to work it my wiring shown above.
Note: I have since moved it back to pins 4 and 3, it seems to be fine now. I decided to do this to ensure that 11 and 13 were available for SPI communications on normal (non-mega) Arduino’s, this is important as I’m going to base most of it around the Arduino Nano.

PSU Project #6 – Operational Amplifiers

Published by:

September 30th 2015
In this video I will briefly be discussing the Operational Amplifier and it’s functions.
I will be covering the basic configurations that may be used in out power supply design.
This is by no means an exhaustive lesson on OPAMP’s, that would take many hours of video footage and knowledge that I do not possess at this point in time, but it should be sufficient enough to allow a beginner to start using them in circuits.

PSU Project #6 – Operational Amplifiers

Open loop:
  Vout = ((IN+)-(IN-))*Aol
  Aol is the gain of the OPAMP
Negative feedback:
  Vout = -(Rf/Ri)*Vin
Positive feedback
Vout = (1+(Rf/Ri))*Vin
Multi-Channel / Summing Amplifier
Vout = (-(Rf/Ri1)*Vin1) + (-(Rf/Ri2)*Vin2)
          further stages can be added if needed, just add them at the end of the formula.
Unity Gain / Buffer
Vout = Vin
Differential Amplifier
Vout = (Vin2-Vin1)*(Ra/Rb)

PSU Project #5 – Arduino SPI

Published by:

September 19th 2015
In this video I get the hardware SPI up and running on the Arduino and write code for the MCP3304 and MCP4822
The example Arduino code further down the page will read channel 0 of the ADC and output it to both channels of the DAC.
I recorded this with a Sony DCR-SR300 camcorder I borrowed from the college, turns out that it’s not a HD recorder. I didn’t realize this until I was nearly done editing. I will make sure I get a HD camera for next time.

Arduino code (can be downloaded here):
#include "SPI.h"

#define DAC_CS 9 // DAC chip-select
#define ADC_CS 10 // ADC chip-select

void setup() {
 //set pin modes 
 pinMode(DAC_CS, OUTPUT); 
 pinMode(ADC_CS, OUTPUT); 
 // disable all devices to start with 
 digitalWrite(ADC_CS, HIGH); 
 digitalWrite(DAC_CS, HIGH); 

void set_dac(byte chan, unsigned int value,byte ga, byte shdn)
 byte b,c,conf;
 // ga : 0=2x (0-4096v), 1=1x (0-2.048v)
 // shdn : 0 = shutdown DAC channel, 1 = output available
 // [ A'/B , x , GA', SHDN', D11, D10, D9, D8 ]
 conf=(chan&0x01)<<7; // mask out channel number and shift it to bit 7
 conf=conf|(ga&0x01)<<5; // mask out gain select and shift it to bit 5 and or it to conf
 conf=conf|(shdn&0x01)<<4; // mask out shutdown select and shift it to bit 4 and or it to conf
 conf=conf|(value>>8); // or in the top nibble of value left in conf
 b = value; // bottom byte of value
 SPI.beginTransaction(SPISettings(15000000, MSBFIRST, SPI_MODE0));
 digitalWrite (DAC_CS, LOW); // enable DAC
 SPI.transfer(conf); // send configuration and top nibble of value
 SPI.transfer(b); // send bottom byte
 digitalWrite (DAC_CS, HIGH); // disable DAC


unsigned int get_adc(byte chan)
 unsigned int a,b,c,conf;
 conf=conf=((chan&0b00000111)<<1)|0b00110000; // create configuration byte
 SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
 digitalWrite (ADC_CS, LOW); // enable ADC
 SPI.transfer(conf); // send configuration byte
 b = SPI.transfer(0x00); // receive sign bit & top 4 bits 
 c = SPI.transfer(0x00); // receive lower 8 bits
 digitalWrite (ADC_CS, HIGH); // disable ADC
 b = b&0b00011111; // filter out unwanted stuff from high byte
 a = (b*0x100)+c; // convert 2 8-bit numbers into a single 16-bit number

unsigned int get_adc_avg(byte chan)
 long tempx = 0;
 byte ax = 0;
 for (ax=0;ax<10;ax++)
 return (tempx);

void loop() 
 unsigned int xx;
 set_dac(0, (get_adc_avg(0)/2),0, 1);
 set_dac(1, (get_adc_avg(0)/2),0, 1);