Mar 02

So tell me team…. “How Long Will That Take?”

I was inspired to write this blog post in response to a post I came across today on LinkedIn about sizing software projects. (link below). Sizing software projects is the thing that most everyone gets wrong, its hard and almost impossible to get an accurate estimate, why is that?

Well apart from scope creep, budget changes and all the usual business variables mentioned by Patrick in his blog post, developers and product teams will never be consistent in their output, not even if you average it out over a long time which is what SCRUM/other agile methodologies suggest when trying to establish velocity – that simply does not work, it is a fallacy. Writing software is an iterative and creative process so “how someone feels” will change output, and I am not talking about how someone feels about the project or work, I am talking about how someone feels about their cat dying, or their wife being pregnant or political changes or the weather, or the office banter or how unwell/well they feel today, in fact “life” guarantees this. So I am going to be a bit outrageous here and suggest an alternative way of thinking about this. Let us start with asking the most important question – “what is the point of estimating”? there are only two possible answers to that question…

1. You are going to undertake some work which you will charge your client for so you need to know what to charge them.

The only possible way you can give your client a fixed price for work that is essentially a creative process is by substantially over-pricing the work estimate and giving yourself lots of fat in the deal to give you the best opportunity of making a profit at the end of it. If you think that you can ask a team of developers to tell you how long it is going to take so you can make a “fair” markup you’re deluded. The best option you have in this scenario is to work backwards, you need to understand the need the client has at a high level, then you need to establish the value that your customer is getting from the thing you would deliver, then you put a price on it, you are looking for the best possible price the customer is willing to pay, you should not at this point be trying to establish “how much will it cost”, you must be asking the customer “how much are you prepared to pay”. Once you have a number, now you can work with your developers, but instead of saying “how long will it take” you are asking “can it be done in this timeframe…”, that may seem a subtle difference but it is actually huge because in answering that your developers will take “ownership” of the delivery commitment and that is what you need to stand any chance of being successful. The risk you are taking is on your team, not the project – if your team succeeds then you and your business do, if they fail so do you.

2. Your organisation wants to know how much and how long this new software thing is going to take/cost so they can “budget” and control and cost overrun.

The reason to budget is because managers and finance people (and he people that own the actual money that gets spent) generally need to *know* how much it costs in order to feel like they are doing their job. This really comes from an age where output was quantifiable (manufacturing for example), but creative IP output is much harder to quantify because there are so many variables that are outside of your control.

Think about this, you wake up one day and have a great idea to write a piece of software that will change the world; you believe it is going to make you your fortune. You are so confident that you leave your day job, set up your business and your first day you sit down and start to change the world – what is the first thing you are going to do?

I am going to bet that you will NOT crack open Excel and start to do a time estimate and a budget – Instead you will most likely start making your software. So you get on with it, now project forwards, you have created your software and you start to sell it things go well, in fact so well that you have to hire a manager or two, then you go and raise some funding to go global with your idea. Now something important happens, instead of spending your time making that thing you believe in, now the people who invested money (which may well be yourself) will want to protect that investment so they put management controls in place, and when the question “To get this thing to the next level, what do we need to do” is asked of you, and you answer “We need to build X, Y and Z” the dreaded question comes – “How long will that take?” which roughly translates to “how much will that cost”, this is because the people asking that question are in fact trying to protect cash and de-risk the investment – they don’t believe in the thing you are building in the same way that you do, the thing is just a means to an end – profit (which by the way is a good thing).

Going back to that first day, if you had tried to budget and determined it was going to take you six months before you could sell your first one, and after six months you realise you were not even half way there and you had another 12 months to go – would you stop? Well you would make sure that you could pay the bills and survive of course, but if you decide to stop, it would not be because of your budget, you would stop because with hindsight you no longer believed the idea was as good as you first thought – otherwise you would plough on regardless right?

So back to the boardroom then, and the “How long will it take”? question. Well the answer to that question should be, “I have no idea – how important is it”? Because either its important and it has to get done or its not that important.

You would be a little more committal than that but you get the idea. If you assume that an acceptable level of estimating effort was going to be 25% of the overall development effort (which has been my experience in software development) and if you have a thing that needs to get done because its strategically important for the business to flourish – then how long it takes is irrelevant, its either strategically important and it gets done, or its not. So if it “just has to get done” what on earth are you trying to estimate how long it will take for – just get on with it and use that 25% for making the thing you are trying to make – just like you did in the first six months of your enterprise.

You need to ask the same question about how important is it and what is it worth to the business, this is the question that the people trying to de-risk are not wanting you to ask, because they will find that question as difficult to answer as you will trying to answer the “how long will it take” question. Of course for trivial stuff like defects and general maintenance/tactical incremental development work this does not really apply, but for big projects that have strategic importance the “how long will it take?” question is a nonsense question to ask because any answer you get will be either fictitious or grossly over estimated, and both of these are bad.

If you want to get something strategically important created, hire a great team and empower them to get on with it – if you are making them spend their time telling you how much it will cost to develop instead of developing it then you are failing – not them. As a manager, entrepreneur, director or investor, hire software developers to do what they do best – make software, it is your job to take and manage the investment risk, if the team fail then you either hired the wrong team or you did not manage the business well enough to sustain the effort required to make it happen, asking them for an estimate is just a way of getting a stick to beat and blame them when things are not going well.

I have been managing (arguably very loosely) software development projects and a software business for the best part of 20 years, and I have learned a few things along the way. Perhaps more importantly I have been doing this largely investing my own money, so I think I know both sides of the “How long does it take” question very well.

The article I responded to
https://www.linkedin.com/pulse/software-project-estimation-broken-patrick-austin

If you found this post useful or interesting, please consider giving me a tib.
Tibs are pocket-change for the internet™.
Oct 27

Update – DIY HP/Agilent 53131A 010 High Stability Timebase Option PCB’s Available

Following on from the project to build a DIY OCXO upgrade option for my HP/Agilent 53131A Frequency Counter I had a large number of requests for me to make the PCB’s available so others can built there own. I now have some PCB’s and are making them available for sale. I will also be making some fully assembled and tested/verified boards including an OCXO, ready-made cable and mounting stand-off’s, there will only be a limited number of these so if you are interested, let me know, first come first serve and when they are gone they are gone.

Now, someone made a comment on hackaday stating that the reason why these OCXO’s are on e-bay is because they are no good. Well I can understand why one could draw that conclusion but having now played with in access of 50 of these OCXO’s I can tell you that they all pretty much violently agree with each other and they also agree with the Rubidium Frequency Standard I have, so given they are from different sources and all free-running I am pretty comfortable they are good and usable quality devices. I read a lot on the net about “burn in time” and the general consensus seems to be, the longer you age and heat a crystal oscillator the more stable (in terms of drift) it becomes. Now I don’t know how true that is, but if it is true, then by definition, using recovered OCXO’s must actually be a good thing. Of course if you feel the need to pay a couple of hundred dollars for a new OCXO then you can of course do that – but I am pretty sure that it does NOT guarantee you any better performance, it just buys you the right to get compensated if you happen to find it does not meet the performance specifications quoted by the manufacturer and it might make you feel a little more confident. Anyway I guess the results speak for themselves and for a home lab these OCXO’s are more than good enough I think.

Here is a short video showing the various configurations built and working as well as a quick overview of the PCB its self and the configuration options.

The Schematic

OCXO Rev 1F

The PCB

This is the revision “1F” board. When I designed the board, I picked a few of the OCXO types that are available on the second-hand (salvaged) market and designed it to accommodate these. My original plan was to support four types of OCXO, the Oscilloquartz 8663-XS that I used in my own counter, a Datum 105243-002, and Isotemp OCXO-131 and a Trimble 34310-T(2). However, when I laid the board out I did not have the Trimble 34310-T(2) device to hand and made a (wrong) assumption about the footprint – which is a bad schoolboy error I know – the upshot being that while this board has a footprint and markings for the Trimble 34310-T(2) it does not fit, the pins are about 1mm out and therefore the board IS NOT suitable for that particular device. It is feasible to drill holes, the pads are just about big enough but assuming there is some demand for these boards I will order a second batch with the footprint corrected.

|OCXOBoard-1f

The following OCXO’s are known (and shown in the video) to work. Any others might work but thats up to you to verify 🙂

  • Oscilloquartz 8663-XS
  • Isotemp OCXO131-100
  • Isotemp OCXO131-191
  • Datum 105243-002

Oscilloquartz 8663-XS

This is the first OCXO I used, its more expensive than most and seems good quality and very precise. It works off of 12v and provides a nice clean sine wave output. The voltage control input works on the 0-10V range. I could not find any data on the XS version so I don’t know what its performance specifications are. I have included a download for this device but it does not cover the XS version specifically. The data sheet states that this device requires 0-10v for the frequency control, and testing seems to bear this out too. However, to get the counter to calibrate properly I selected the 0-5v range on the DAC.

Oscilloquartz  OCXO8663-pins

IMG_6182

Datum 105243-002

This was another OCXO that I included on the board for Andy (who built the first 3Ghz pre-scaller option board), again a nice device but its specified to work on 24V and the Oven and Oscillator have separate power connections. This is the only OCXO that has a built in trim pot which allows you to set the window for the voltage control range. Although this device is specified to run at 24V, I tested its operation at 12V and it works perfectly. I did put a four-pin plug onto the board to allow you to give it a separate 24V supply but it really does not need it. I do not have any data sheet for this device but it outputs a square wave which is not as nice as having a sine wave on the output – but for this application it does not matter at all. The Frequency control input on this device is very sensitive and while it works without problem at +/-10v its centred around 2V and 0-5v works just fine.

IMG_6161  OCXO-DATUM-pins copy

IMG_6181

Isotemp OCXO131-1xx

This is a small, compact device and comes in two variants, the OCXO131-191 which is a 12V version and the OCXO131-100 which is a 5V version, and while both share the same PCB footprint and pinouts the case for the 5v variant is taller at 18mm high where as the 12v version is a compact 11mm high. These also provide a square wave output. Both versions of the device require 0-5v on the frequency control input although to get the counter to properly calibrate I had to configure it for the +/-5V option.

Isotemp-ocxos  OCXO131-pins

IMG_6180

Kit of Parts

Some people asked me about providing a kit of parts. I am not really geared up to do that in a time-efficient way so apart from the bare PCB, I will not be able to provide individual parts or components.

Fully Built and Tested Option

I am planning to have a limited number of these option boards fully built and tested with all the components and the OCXO pre-installed as well as a suitable cable and mounting stand-off’s, ready to install and use in your counter 531xx HP counter. I do not have an exact cost for these as I still have to source some of the components but they are likely to be be in the £75 to £95 range. I will post an update when I have these available which should be in about 2-3 weeks time.

UPDATE: I now have some fully assembled and tested boards complete with cable and mounting parts needed for a simple plug-and-play 53100 series counter upgrade. (the boards will be black, the board shown in the photo was as a result of a screw-up by the PCB supplier)

_MG_9150

_MG_9141

Bill of Materials

RefDesPart NoNotes
C1, C2, C4, C6, C7, C8, C10, C11100nF0805 SMD Jellybean part
C121uF0805 SMD Jellybean part – Could probably use 100nF with no problem
C3, C5, C947uF 16vElectrolytic. Farnell Part No: 197-3306
J2IDC2X8MFarnell Part No: 231-0066
L1, L2, L5100uHFarnell Part No: 935-8056
L3, L41uHFarnell Part No: 221-5638
R1, R2100R0805 SMD Jellybean part
R3, R4220R0805 SMD Jellybean part
R8220R0805 SMD Jellybean part – This is not needed unless you want to mess with the comparator bias
U1LM361MVery fast differential comparator
U4ADR4550You can use a REF02 or numerous other 5V reference parts here, the pinout is pretty standard
U5AD7243ARThis is the most expensive and hard to get part

Bare PCB’s Available

UPDATE: After my first trip to the post office today I have had to amend the pricing because of the outrageous postal charges, I have been told that I cannot send something thats not made of paper as a letter! that means for my friends outside of the UK the postage is more expensive, sorry about that. The good news is, the postage does not go up with the number of boards. I hope you understand.

UK Orders

For the sake of simplicity I have opted for a flat price of £10 each, which includes postage in the UK. If you want more than two boards please contact me directly via e-mail because the weight starts to impact postage.

 1 x HP/Agilent 53131A-010/GS OCXO Option Bare PCB Rev 1F inc. Postage£10
 2 x HP/Agilent 53131A-010/GS OCXO Option Bare PCB’s Rev 1F inc. Postage£20
 HP/Agilent 53131A-010/GS Rev 1G Fully Built and Tested with Trimble 34310-T OCXO, Cable and Mounting Kit£80.00 + £10.00 P&P

Non-UK Orders

If you are outside of the UK it costs me £3.50 for a small parcel so I have opted for a flat price of £9 for each board – but postage is on top of that. If you want more than three boards please contact me directly via e-mail.

 1 x HP/Agilent 53131A-010/GS OCXO Option Bare PCB Rev 1F£12.50
 2 x HP/Agilent 53131A-010/GS OCXO Option Bare PCB’s Rev 1F£21.50
 HP/Agilent 53131A-010/GS Rev 1G Fully Built and Tested with Trimble 34310-T OCXO, Cable and Mounting Kit£80.00 + P&P to be agreed
If you found this post useful or interesting, please consider giving me a tib.
Tibs are pocket-change for the internet™.
Sep 22

Racal-Dana 199x DIY High Stability DIY Timebase Hack for under $25

Having played with a number of OCXO’s and a Rubidium standard I tried (after repairing it) to calibrate the standard timebase in my Racal-Dana 1999 counter which is actually a simple TCXO. I could get pretty close but it was touchy and not easy to be totally precise. In response to that vlog article a number of people suggested it would be nice to do an OCXO modification to the Racal counter so I decided to do exactly that, and I done it on a budget too…

One of the problems with this counter is the lack of any 12v supply that is able to provide enough current to drive the OCXO’s oven, so I had a look around and found an OCXO made by Isotemp model OCXO131-100 that runs on 5V which is perfect for this build because the counter has a good 5v supply that can easily drive the additional current required – I have provided a download link for the data sheet for the OCXO I used below below. I ordered one from a seller on e-bay and used that as the basis for the hack.

The other key component needed to implement a stable OCXO board for this counter is a “temperature stable” variable voltage between about 1 and 4 volts, this is used to fine tune the OCXO to allow the oscillator to be calibrated. To get me a suitable reference voltage I have used a MAX6198A, chosen simply because I had some to hand – but also because they have pretty darn good temperature stability too.

Schematic

Here is the schematic I used to create the OCXO board.
Racal-Dana-OCXO-Mod

Data Sheets


Other Information

* The SMD Adaptors I used can be got from here: SMD Adapters – Set #1/

Catch you next time…

If you found this post useful or interesting, please consider giving me a tib.
Tibs are pocket-change for the internet™.
Aug 26

DIY HP/Agilent 53131A 010 High Stability Timebase Option

Having obtained a reasonably reliable 10MHz lab reference (see here) I decided to calibrate my Frequency Counter only to find that the stock oscillator provided in the HP 53151A is absolutely terrible – a joke even! I looked around for an “010 High Stability Timebase Option” but they are rare — and if you can find one not installed in a counter they are very expensive – in the few hundred dollars range at least — and buying one from HP is, well, expensive in the extreme. There are many second-hand 10MHz OCXO modules available, these are mostly stripped from old telecommunications, satellite or cellular equipment so they are plentiful and relatively cheap to buy too. I decided to make a clone 010 option board for my counter using a second-hand OCXO bought from e-bay. I designed a PCB to get a professional finish as well as a reliable upgrade for my counter. The main goal was to make an option board that just like the original could be automatically calibrated using the internal software and front panel controls so I had to use the same DAC chip (which is now obsolete) and basic topology of the original option board to make it work.

The result speaks for its self – with the OCXO running as the timebase, the counter is able to measure the 10MHz source it was calibrated with to a precision of 100th of one cycle with no error!

The schematic is pretty simple and self-explainatory. The counter seems to need a differential square wave clock drive, this is created using a high-speed differential output comparator part LM361. The DAC is an AD7243 part from Analog Devices, this part is now obsolete and not recommended for new designs but they are still available from various sources, albeit quite expensive parts. It would have been possible to design in a newer part but for the small number of units I wanted to make, it seemed a bit pointless to go to the effort as the recommended newer part actually requires different serial signalling, and this would have required some kind of serial protocol converter micro controller. The DAC is driven by the counters microprocessor to calibrate and tune the timebase. The ADR4550 provides a high stability 5V reference for the ADC. The rest of the circuitry is basically power supply and signal filtering.

The PCB layout was designed to accommodate different OCXO footprints making it flexible. As well as supporting OCXO’s there are footprints for SMA connectors and you can even use a low-cost TCXO which cannot be automatically calibrated but is still a considerably better option than the oscillator built into the counter.

PCB’s Available : See here

The finished board fits really neatly inside the counter, and even fits around my previous Hard Power Switch Modification project.

Various Pictures

IMG_6028.JPG
IMG_6028.JPG
IMG_6026.JPG
IMG_6026.JPG
IMG_6031.JPG
IMG_6031.JPG
IMG_6034.JPG
IMG_6034.JPG
IMG_6024.JPG
IMG_6024.JPG
IMG_6038.JPG
IMG_6038.JPG

Catch you next time….

If you found this post useful or interesting, please consider giving me a tib.
Tibs are pocket-change for the internet™.
Aug 24

Five Decade Programmable Capacitor – A Low Cost Solution

As a follow-up to a previous blog post where I created a seven decade programmable resistor substation for use during electronic circuit prototyping and development, I thought I would expand on the concept and develop a decade capacitor solution to complement the decade resistor board. This new board is a five decade programmable capacitance and is in exactly the same form factor as the previous resistor project. The capacitance can be programmed in the range of 100pF through 9.9999uF in 1000pF increments. The tolerance of the capacitance is five (5%) percent.

My goal was to keep costs down while making the board usable and functional and reliable so I continued to use the 0.1″ jumpers I had used for the resistor board. However, to achieve a programmable capacitance you need to use small capacitors and parallel them to obtain the desired value, and the challenge here was how to achieve that with jumpers. In the end I took the simple approach and provided 10 jumpers for each decade, but instead of a two-pin header row I used a three pin header row so each of the 10 jumpers has an “on” (1) or “off” (0) position. I concede that the board is slightly more difficult to use than the resistor board, and thats simply because of the number of jumpers – dialling in a value involves moving multiple jumpers per decade. However, with the cost to use high quality switches I felt that the infrequent nature of use for the board, it was a reasonable compromise both in terms of design theme consistency and cost.

When working on linear circuits, in particular around op amps, PSU’s and other circuitry that needs response tuning, having a decade capacitance to hand when prototyping is a very valuable tool – not for day to day use of course, but when you are doing that specific job that needs this, its worth its weight in gold.

If you are interested in one of these boards I have had a bunch of them made and am selling them. You can buy them on http://tindie.com or if you prefer on e-bay – simply search for “gerrysweeney” on either system to find the items.

Catch you next time…

If you found this post useful or interesting, please consider giving me a tib.
Tibs are pocket-change for the internet™.
Aug 10

10MHz Rubidium Frequency Standard and Signal Distribution Amp Follow-Up

This is a follow-up to my previous article here. When testing the 1 PPS output I found some strange output which needed further investigation. I also decided to make further use of the micro controller and status LED to indicate the 1 PPS signal to provide a degree of visual confidence that the frequency standard was working.

Various Pictures

IMG_5966.JPG
IMG_5966.JPG
IMG_5965.JPG
IMG_5965.JPG
IMG_5964.JPG
IMG_5964.JPG
IMG_5963.JPG
IMG_5963.JPG
IMG_5962.JPG
IMG_5962.JPG
IMG_5961.JPG
IMG_5961.JPG
IMG_5960.JPG
IMG_5960.JPG
IMG_5959.JPG
IMG_5959.JPG
IMG_5958.JPG
IMG_5958.JPG
IMG_5956.JPG
IMG_5956.JPG
IMG_5957.JPG
IMG_5957.JPG
IMG_5954.JPG
IMG_5954.JPG
IMG_5955.JPG
IMG_5955.JPG

The 1 PPS Channel
Here is the outline schematic of the digital channel of the video amp that is now used for the 1 PPS signal.

The fast comparator used in this circuit is an LT1016

The Micro-controller
When I first tried to implement this I used (or tried to use) the edge trigger interrupt capability which on the face of it should have been the perfect solution. However, no matter what I tried I could not get it to work, the best I managed to achieve was getting it to work some of the time, but it was very random. I suspect this was down to the way in which the PIC12X handles interrupts and context state saving implemented by the compiler, I read somewhere on the microchip forums that this issue *could* be resolved by upgrading to the PRO version of the compiler…..hmmmmmmm. Anyway, I decided to change tact and poll for the 1PPS signal which meant I also had to construct a really simple pulse stretcher circuit to ensure I was able to catch each pulse. Not as elegant as an interrupt-driven solution but it works. I think the more advanced PIC18Fxxx series micro controllers would have worked using interrupts but those are big chips and I was already committed to the PIC12F675.

Here is the schematic for the micro controller which now also monitors the 1 PPS output of the RBS. The shaded area is what has been added to the circuit since the previous article.

Here is the firmware source code with the 1PPS implementation added. Its implemented as a simple state machine in run mode, I have tried to keep the code simple to read.

#include <xc.h>

// PIC12F675 Configuration Bit Settings

// CONFIG
#pragma config FOSC  = INTRCIO  // Oscillator Selection bits (Internal oscillator: GPIO on GP4/GP5)
#pragma config WDTE  = OFF      // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF      // Power-Up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = OFF      // GP3/MCLR pin function select (GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD)
#pragma config BOREN = OFF      // Brown-out Detect Enable bit (BOD disabled)
#pragma config CP    = OFF      // Code Protection bit (Program Memory code protection is disabled)
#pragma config CPD   = OFF      // Data Code Protection bit (Data memory code protection is disabled)

// IMPLEMENTATION STRATEGY
//
// PIN ASSIGNMENTS
//   2 = RFS_RDY signal from Pin 6 (GPIO5)
//   4 - 1PPS signal
//   5 - Front Panel LED
//

// We are running the chip at 4Mhz
#define XTAL_FREQ 4000000

#define CLK_1PPS GPIObits.GPIO4
#define LED_STATUS GPIObits.GPIO2
#define RFS_READY GPIObits.GPIO5

void main(void)
{
    // Used as LED state machine control variable
    char _led_state = 0;

    ADCON0bits.ADON = 0;    // Turn off the ADC
    ANSELbits.ANS = 0;      // Make all inputs digital
    VRCON = 0;              // Turn off the internal voltage reference
    CMCON = 0x7;            // Turn off the comparator

    // Set up our I/O pins
    TRISIObits.TRISIO2 = 0; // Make GPIO2 an output - LED
    TRISIObits.TRISIO4 = 1; // Make GPIO4 an input - 1PPS counter input
    TRISIObits.TRISIO5 = 1; // Make GPIO5 an input - RFS_READY

    while(1)
    {
        if(RFS_READY == 0)
        {
            // This is when we are in run mode.

            // We are polling the 1 PPS signal, if we sense a "1" we set the
            // _led_state variable to the number of 10ms periods you want. In
            // this case I want about 80ms. Once this is set the state machine
            // below will hold the LED on and wait 10ms until ir reaches 2,
            // and then normal state resumes, the end result being an LED thats
            // lit normally, and pulses brightly for about 80ms on each 1pps
            // count.
            if(CLK_1PPS == 1)
                _led_state = 10;

            // This is a simple state machine that will run the LED
            // at one third power by outputting a 33% duty cycle square
            // wave. Each time around the loop the state variable will
            // count 0-1-2-0-1-2...etc LED on for 0, and off 1 & 2.
            // When the 1PPS interrypt is fired, the state machine
            // holds the LED on at full brightness (100% duty)
            switch(_led_state)
            {
            case 0:
                LED_STATUS = 1;
                _led_state = 1;
                break;

            case 1:
                LED_STATUS = 0;
                _led_state = 2;
                break;

            case 2:
                LED_STATUS = 0;
                _led_state = 0;
                break;

            default:
                _led_state--;
                LED_STATUS = 1;
                _delay(10000);
                break;
            }
        }
        else
        {
            // If we get in here we are in warm-up mode. We blink the
            // LED with a short on period (20%) and a long off period (80%)
            // about three blinks a second.
            if(LED_STATUS == 0)
            {
                LED_STATUS = 1;
                _delay(75000);
            }
            else
            {
                LED_STATUS = 0;
                _delay(300000);
            }
        }
    }
}

Catch you next time….

If you found this post useful or interesting, please consider giving me a tib.
Tibs are pocket-change for the internet™.