Hacking a Strobe Light Controller

Not too long ago I bought some white strobe lights with a strobe controller of Amazon. This exact controller is spread all over Amazon and eBay but only provides strobe patterns that I didn’t particularly like. So it’s time for a hack.

The strobe lights I purchased were white in color but they have the same kit in other colors like red, blue, amber, green and purple. Or a combination of those colors. The controller, however, remains the same regardless of color.

To hack this controller turned out to be way easier than ever expected. The on board IC and the ATtiny45 (or the tuny85) appear to have a similar pin layout. Vcc and GND are where they are supposed to be and the input and outputs make it straight onto I/O Pins. The only unfortunate thing is that the third button is connected to the pin corresponding to the Reset pin on the Atmel MCU. The reset functionality can be disabled, however, if you need that third input. I chose to use it in its function as a Reset to disable the strobing pattern. But first things first, this is what the controller looks like opened:

Original controller with IC still installed

Original controller with IC still installed

The first step is to remove the original IC. I cut all the pins of the IC and then carefully desoldered each pin individually using solder wick and vacuum suction.

IC desoldered

IC desoldered

To make programming and experimentation easier, I decided to solder a 8 pin IC socket in place of the old IC. You don’t have to use one if you don’t intent to change anything later on.

IC socket soldered in place of the original IC

IC socket soldered in place of the original IC

Lastly, the programmed ATtiny45 is inserted into the socket and the light show can begin. The software part is discussed further down int his article.

ATtiny45 socketed in,  in place of the original IC

ATtiny45 socketed in, in place of the original IC

So what do the new strobing patterns look like you ask? Like this:


Let’s talk about the software. I wrote the few lines of code in BASCOM AVR. A demo version of BASCOM AVR is available for download on the internet. But of course you can write your own code using the Arduino or any other environment that supports ATtiny45s. If you don’t want to spend the time compiling this project, you can download the .hex and .bin files right here.

Here is the BASCOM code I used:

‘ Atmel ATtiny45
$regfile = "attiny45.dat"

‘ Fuse-bits 8 MHz int. div. by 8
$prog &HFF , &H42 , &HDF , &HFF

‘ 1 MHz internal clock
$crystal = 1000000

‘ PortB is Output

Config Portb.= Output
Config Portb.= Output

Config Portb.= Input
Config Portb.= Input
Config Portb.= Input


Pinb.= 1
Pinb.= 1

Dim Buff1 As Bit
Dim Buff2 As Bit
Buff1 = 0
Buff2 = 0


‘ Start flashing
Do

   If Pinb.= 0 Then Buff1 = Not Buff1
   If Pinb.= 0 Then Buff2 = Not Buff2

   ‘ Debounce

   Waitms 25

   If Buff1 = 1 Then Gosub Pattern1

   If Buff2 = 1 Then Gosub Pattern2


Loop


Pattern1:

   Portb.= 1
   Portb.= 1
   Waitms 125
   Portb.= 0
   Portb.= 0
   Waitms 75
   Portb.= 1
   Portb.= 1
   Waitms 125
   Portb.= 0
   Portb.= 0
   Waitms 75

   Portb.= 1
   Waitms 75
   Portb.= 0
   Waitms 50
   Portb.= 1
   Waitms 50
   Portb.= 0
   Waitms 50

   Portb.= 1
   Waitms 75
   Portb.= 0
   Waitms 50
   Portb.= 1
   Waitms 50
   Portb.= 0
   Waitms 50

Return

Pattern2:

   Portb.= 1
   Waitms 75
   Portb.= 0
   Waitms 50
   Portb.= 1
   Waitms 75
   Portb.= 0
   Waitms 75

   Portb.= 1
   Waitms 75
   Portb.= 0
   Waitms 50
   Portb.= 1
   Waitms 75
   Portb.= 0
   Waitms 75
Return

 

Secondary Surveillance Radar | An Introduction

Quick introduction to Secondary Surveillance Radar and how it works. After explaining the absolute basics, I am showing how one can simulate transponder responses using off-the-shelf test equipment. RTL1090 is used to verify the generated signals as valid.

If you want the arb waveform file for the 7777 Mode A response, here it is:

https://baltic-lab.com/wp-content/uploads/2015/12/SQUAWK_7777_IDENT.zip

 

Instrument Landing System Testing

This video shows how easy it is to test an Instrument Landing System, ILS for short, receiver for localizer and glideslope accuracy.

This video was shot in DNxHD using the Blackmagic HyperDeck shuttle I showed in another video (https://www.youtube.com/watch?v=cc83-Cc-vtw). After editing in Adobe Premiere and finishing it off in SpeedGrade, I exported it to h.264 at a variable bitrate averaging 35 Mbps. Please let me know if you see an increase in image quality.

 

ILS Localizer / Glide Slope Test Signal Generation

In a previous video I have shown how to generate test signals for a VOR radio navigation system for aircraft.. This article will take a look at another radionavigation system, the Instrument Landing system or “ILS” for short. The ILS is used by aircraft around the world every single day. It is designed to guide aircraft safely to a runway even with bad or no visibility.

In order to provide both lateral and vertical guidance, the ILS consist out of two individual subsystems. The part used for lateral guidance is called the localizer. For the vertical guidance component the term is glide slope. Both localizer and glide slope use a surprisingly simple way of telling on aircraft where to go. The localizer and glide slope each consist out of two independent transmitters with the same frequency and a special antenna array. The antenna arrays each create a radiation pattern with two sidelobes. One sidelobe per transmitter. One sidelobe is fed by a transmitter modulated with a 90 Hz signal and the other sidelobe is fed by carrier modulated with a 150 Hz signal. The antenna pattern is so that the two sidelobes overlap with equal intensity when the aircraft is exactly on the intended path. An AM receiver tuned to the frequency of either the localizer or glide slope will “hear” both the 90 Hz and 150 Hz tones with equal intensity when on the right path. Sounds complicated? Let’s try a picture:

So how does the airplane (and the pilot) know where to go? The ILS receivers simply compare the intensity for the 90 Hz and 150 Hz signals and display the difference. This is done independently for the localizer and the glide slope. If the 90 Hz and 150 Hz tone intensity is exactly the same, the plane is on the right path. But if one signal becomes stronger than the other, the plane is off the desired path. In the case of the localizer for instance, the 90 HZ tone will be stronger if the aircraft is off to the left of the desired course. And accordingly, the airplane is off to the right of the desired course if the 150 Hz tone is stronger. For the glide slope a stronger 90 Hz tone means that the plane is above the intended glide path. For a dominant 150 Hz tone on the glide slope, the plane is below the intended glide path. Simple, isn’t it?

It’s so simple that even some handheld airband radios can decode ILS signals and offer a backup for on board instruments in case of an instrument or electrical failure. An example for such radios are the Yaesu FTA-550 (localizer only) and the FTA-750 (localizer, glide slope and GPS). I recently bought a FTA-550 and when it arrived, I wanted to test it. Unfortunately, I live out of reach of a ILS localizer. But no problem, I’m an engineer.

Tektronix AFG3102 with resistive combiner used as baseband generator

Tektronix AFG3102 with resistive combiner used as baseband generator

To generate the 90 Hz and 150 Hz signals, I used by Tektronix AFG3102 signal generator. The two signals were fed into a resistive combiner and from there directly into the external modulation input of my HP8657D. The HP8657D signal generator was set to amplitude modulation and a frequency in the airband, 110 MHz in this case. When you do experiments like this, make sure that you use very low power, a frequency that is not used in your area and abide all communications laws. The last thing you want to do is to interfere with a real aircraft. It is advisable to use a shielded connection to the radio regardless of power.

HP8657D used as VHF AM modulated Signal Generator

HP8657D used as VHF AM modulated Signal Generator

With equal amplitude of the 90 and 150 Hz signal, the localizer needle of your ILS receiver should be exactly in the center. As you can see on the picture, my FTA-550 passed this test with flying colors. You can test the glide slope portion of your receiver in the same fashion. The glide slope transmitters transmit on UHF. So that the pilot isn’t bothered with entering two frequencies, the VHF localizer and UHF glide slope frequencies are paired so that only the VHF frequency needs to be known. IF you want to test the glide slope portion of the receiver, you need to look up the UHF glide slope frequency corresponding to your VHF localizer. You can look-up ILS frequency pairs on the internet [2].

Equal signal amplitude = exactly on centerline

Equal signal amplitude = exactly on centerline

If we lower the 90 Hz signal’s amplitude, we expect the receiver to show us to the right of the correct course. As you can see on the following picture, the FTA-550 masters this test as well.

A dominant 150 Hz signal means we are to the right of the runway centerline

A dominant 150 Hz signal means we are to the right of the runway centerline

This article is a great example how complex avionics systems can be tested with inexpensive and readily available test equipment. Avionics shops spend tons of money on specialized test equipment. Some are required to be compliant with the law, some aren’t. But on the avionics test market there appears to be a large gap between “super old and cheap” and “brand new but very expensive” when it comes to specialized test sets. Using standard off-the-shelf test equipment may be an alternative to get state of the art test sets for little money.

Links and Sources:

[1] “Instrument Landing System”, Wikipedia: http://en.wikipedia.org/wiki/Instrument_landing_system
[2] “Instrument Landing System (ILS) Frequencies”, Radioreference.com: http://wiki.radioreference.com/

 

First PCB Manufacturing Run with Dirty PCBs

In an earlier article I gave an introduction to DipTrace and in another article I showed how to correctly export a layout files for the PCB manufacturing service Dirty PCB. Besides familiarizing myself with DipTrace, I also used the articles as a chance to test Dirty PCBs. I have never used that service before. As a reminder, Dirty PCB offers a low-profile PCB manufacturing service in China with minimum customer service and support for rock bottom prices [1].

Selected options for my order

Selected options for my order

So what exactly did I order? I ordered a ten 2cm x 4.8cm boards, red in color, 1.2 mm thick with HASL finish. Technically speaking, I didn’t order 10. I ordered what’s called a Protopack which will give you about 10 PCBs. Could be a bit more, could be a bit less. You’re kind of taking a gamble on the quantity but for $ 14 it is junk cheap either way. If you must have exactly ten, you can of course just order 10 and pay $ 28 instead. But in my case the Protopack actually worked in my favor, more about that later. I paid an additional $ 19 for shipping via DHL China. Free shipping is available but may take a bit longer.

Timeline of my Dirty PCB order

Timeline of my Dirty PCB order

The order was submitted on a Friday afternoon and I updated the files multiple times. On the following Sunday the files were sent to the manufacturing house and on Thursday they were shipped. That’s a pretty quick turnaround for a super cheap Chinese manufacturing house. Actual pick-up by DHL China was on Saturday. The shipping speed was just incredible, DHL only took 2 days to deliver, despite the first day after pick-up being a Sunday.

Stack of PCBs from Dirty PCBs

Stack of PCBs from Dirty PCBs

So what’s the quality of the board? For $ 33 delivered I naturally didn’t expect much. But I was wrong. First off, I received 12 PCBs. So the Protopack definitely worked in my favor over ordering a guaranteed 10 pack for twice the price. Asides from some minor imperfections on the “J2” outline, the silk-screen is of very good quality. Even the small text is clearly readable. I’ve often had issues with crappy silk-screen even with “high quality” services so this really impressed me. The vias also look very satisfactory.

Assembled Linear Regulator

Assembled Linear Regulator

After this successful test I sent of a more complex design to Dirty PCB. It has 50 Ohms striplines, a more complex solder stop mask around the striplines, some ground via stitching and Electroless nickel immersion gold (ENIG) finish. I can’t wait to see how well they will turn out.

Links and Sources:

[1] Dirty PCB: http://dirtypcbs.com/

 

Video Distribution Amplifier | 10 MHz Reference Distribution

Three Sigma VDA-100 Video Distribution Amplifiers (DA) have been sitting on my shelf for a while. The DAs have been waiting to be repurposed for something useful. When Jackson Labs sent me a custom variant of the FireFly-IIA GPS-Locked double ovenized 10 MHZ reference oscillator, I decided to repurpose one of the VDA-100 as a 10 MHz reference distribution amplifier.

Having a 10 MHz reference in the lab is a good start. But if you have to feed more than one device with the 10 MHz reference signal, some means of distributing the 10 MHz reference signal is needed. The quickest and cheapest approach is just to daisy chain all instruments using BNC T-connectors. This method can cause rapid signal degradation due to mismatches and reflections rather quickly. The cleaner but still pretty inexpensive approach is to use a simple RF splitter. Unfortunately, this may not work for too many devices as the signal level might dip below the needed value for each instrument. The best approach is to use a professional distribution amplifier to isolate the reference input ports of the instruments and to provide a consistent amplitude.

Sigma VDA-100A | Front

Sigma VDA-100A | Front

Buying a professional 10 MHz Distribution Amplifier (DA) is pretty expensive. Luckily, old analog video DAs, such as the Sigma VDA-100, can be bought on eBay for little money. With a bandwidth of ~30 MHz they work just fine for 10 MHz reference distribution. The only real catch is that they are designed for an impedance of 75 Ohms, a common value for video systems. But there are some ways around it, more about that later.

Sigma VDA-100A | Back

Sigma VDA-100A | Back

The Sigma VDA-100A offers 6 buffered outputs. Two looped-through inputs allow multiple of these amplifiers to be daisy chained together. The ones I bought of eBay even came with a convenient 19″ tray designed to hold three of these Video Distribution Amplifiers. The gain can be adjusted from the front using a small screwdriver. Some models of the VDA-100 have signal taps on the front-panel to check both the input and output signal for quality.

VDA-100A | Open PCB View (Top)

VDA-100A | Open PCB View (Top)

The PCB inside of the Sigma VDA-100 looks extremely clean and well designed. This comes as no surprise as professional broadcast equipment is usually designed this way. There are 6 x 75 Ohm output resistors, R24 through R31. Since they are responsible for setting the output impedance, simply replacing them with 50 Ohm (or 49.9 Ohm) 1 % resistors should convert this DA for use with 50 Ohm systems.

VDA-100A | Open PCB View (Bottom)

VDA-100A | Open PCB View (Bottom)

Please note that the input ports are high-impedance ports, NOT 75 Ohms. One can either leave it as it is and accept an impedance mismatch or – the way I did it – solder a 75 Ohm shunt resistor across the input port. This modification is not pictured as I took the pictures for illustration purposes much later from a second VDA-100A. One important thing to know is that most analog video DAs do not have the bandwidth to carry a 10 MHz square wave signal. Only sine wave signals are suitable for this setup. In case you are using a reference that puts out a square wave, you need to convert it to a sine wave. This can be done by using an inline low pass or band pass filter. Back when I was using a different Jackson Labs GPS-Locked TCXO with square wave output, I used a Mini Circuits BBP-10.7+ to get a clean sine wave.

50 / 75 Ohm Impedance Matching Pads & 10.7 MHz Band Pass

50 / 75 Ohm Impedance Matching Pads & 10.7 MHz Band Pass

For my setup I decided to leave the output ports at 75 Ohms impedance. Why? Because I had tons of high quality 75 Ohm impedance cable left over from a former broadcast transmitter side. And from a former project I had a stash of Mini Circuits BMP-5075R+ BNC 75 Ohm to 50 Ohm impedance matching pads left over. But if you are on a tight budget I suggest you replace the output resistors R24 through R31 instead and run 50 Ohm impedance coax to your equipment. In my case I used 75 Ohm impedance cable and plugged it through a Mini Circuits BMP-5075R+ each into my instruments. Note that some instruments have a 10 MHz input and 10 MHz output port. For professional equipment, the 10 MHz output is often a buffered output of the 10 MHz input. Therefore you can use this to daisy chain some equipment that’s physically located close to each other. In my setup I never daisy chained more than 3 devices and I always check the signal quality using my Tektronix MDO4104B-6.

75 Ohm vs. 50 Ohm BNC Connectors

75 Ohm vs. 50 Ohm BNC Connectors

The picture above shows the difference between a 75 Ohm impedance BNC connector (left side) and a 50 Ohm impedance BNC connector (right side). The cable on the right side is a professional 75 Ohm impedance coax cable used in broadcast TV installations. The cable is designed to carry HD SDI (Serial Digital Interface) signals at a data rate of 1.485 Gbit/s. Recycling these high-quality cable leftovers saved me lots of time that I would otherwise have to spend crimping new cables.

Sigma VDA-100A | Installed in 19" Tray

Sigma VDA-100A | Installed in 19″ Tray

The three VDA-100A that I bought of eBay happened to come with a convenient 19″ tray. Installing the Jackson Labs FireFly-IIA proved rather easy. It was a perfect job for 25 mm x M3 standoffs and a bit of epoxy glue.

25mm x M3 Standoff

25mm x M3 Standoff

Of course I could have drilled holes in the bottom of the tray but the epoxy glue is not only pretty stable but it’s also easy to use. To get the dimensions just right, I mounted the FireFly-IIA with M3 nuts on the standoffs, applied epoxy glue very liberally to the standoffs and let it sit overnight. Before I glued everything in place I used some sandpaper to roughen the surface up and provide a better grip for the epoxy glue. It worked very well and the installation was surprisingly tough.

Full 10 MHz Reference Distribution Amplifier Setup

Full 10 MHz Reference Distribution Amplifier Setup

My final setup is pictured above. The FireFly-IIA is sitting on the right. It’s connected to a GPS antenna via MCX to BNC adapter. A serial data port is also available for configuration and NMEA position data output. A 50 Ohm MCX to BNC jumper connects the FireFly-IIA to a 50 Ohm to 75 Ohm minimum loss pad. From there a 75 Ohm jumper takes the reference signal into the amplifier. Of course I could have adjusted the input impedance of the VDA-100 to 50 Ohms and connected the FireFly-IIA directly. But I wanted to make sure that there is at least some isolation between the DA and the FireFly-IIA. And a matching pad provides at least some small amount of isolation. This will become an important fact when several of these DAs are daisy chained. Additionally it is less confusing if all ports of the DA have the same impedance.

The green output cable is connected to my Tektronix MDO4104B-6. Using the gain adjust potentiometer on the front of the VDA- and the MDO4104B-6 I adjusted the output signal to about 1.5 Vpp into a 50 Ohm load via 75 Ohm to 50 Ohm matching pad. This level provided the maximum level without visible signal distortion. A quick test with all my test equipment confirmed that this level was sufficient.

HP8657D Signal Generator and EIP548A Frequency Counter Synchronized

HP8657D Signal Generator and EIP548A Frequency Counter Synchronized

The above picture shows my HP 8657D signal generator and a EIP 548A frequency counter synchronized to the same reference signal. The frequency dialed into the HP 8657D is 1023.456789 MHz. The EIP frequency counter shows this value exactly.

HP8657D Signal Generator and MCA3027 Frequency Counter Synchronized

HP8657D Signal Generator and MCA3027 Frequency Counter Synchronized

But just accuracy down to the 1 Hz digit wasn’t convincing enough for me. My Tektronix MCA3027 measures down to a 0.1 mHz digit. Synchronized via 10 MHz reference, it shows 3.3 mHz more than the selected frequency on the HP 8657D. Now that’s impressive! So if you’re looking for an inexpensive 10 MHz reference distribution amplifier, an old analog analog video DA may just be the way to go.

This setup works well for me but your requirements and specifications may vary. My primary suggestion would be to not mix 75 Ohm and 50 Ohm systems the way I did unless you have a good reason (e.g. availability of suitable coax) to do otherwise. The best way would probably be to replace the 75 Ohm resistors with 50 or 49.9 Ohm type 1% precision resistors.

Links and Sources:

[1] Jackson Labs, FireFly-IIA: http://www.jackson-labs.com/