It’s been a while since I’ve posted to my blog, but here is a video I just uploaded showing how I reverse engineer digital circuits.
I’ve been doing this sort of thing for as long as I can remember and I find it very relaxing at times. Nothing better than throwing some nice music on and doing a bit of reverse engineering.
I was recently given a dot matrix LED display by a friend and decided to reverse engineer it so we both can run them, he still has one of his own.
There is a damaged chip on the board which meant that some of the displays didn’t display their 2 bottom rows but I will be tackling this issue in a later video. I will also be transferring the control to a PIC instead of the Arduino as it was not fast enough to get a good refresh rate, and this is without any external communication facilities being addressed.
I found myself some PSU’s at a flee market a few weeks back and decided to pull out the matching pair of 75V PSU’s for some inspection. Much to my delight, they both appear to work fine.
The only issues with them is the neon power indicators are not working (or barely working), and the voltage/current multiply switches for the analogue movements are crusty. And not to mention a non-standard power connector on the rear. These will all be replaced and updated in future videos.
I have decided to replace the analogue meters with LED modules (just waiting for them to be shipped from China on the slow boat) then I will hook them into to sense the output terminals and find a way to recess it in places of the old meters.
For the power indicator, I will find a voltage rail inside the PSU (most likely an opamp rail) and fit an LED in place of the neon lamp.
Please keep tuned for more!
You can subscribe to my YouTube channel to get updates on my progress too.
It’s been a while since I’ve released a video for this series, but I have been doing final tests for the term at college and was a little overwhelmed. But I did my last test yesterday and decided it was time to do an update.
As promised in the video, here is a flowchart showing how the software currently works. This is the basic idea of what goes on.
Do note that the Volts and Current pots on the front of the case do not directly set the current and voltage limits, rather they are read by the Arduino via the ADC and scaled and then that is outputted via the DAC to the actually regulation circuitry. This leaves the possibility of having the push-buttons setting the Voltage and Current instead.
Here is the Arduino code used in this episode, I will be cleaning it up for the final version:
// disable all devices to start with
// set up the LCD's number of columns and rows:
// Print a message to the LCD.
void set_dac(byte chan, unsigned int value,byte ga, byte shdn)
// 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;
The expansion module finally arrived this morning 🙂 and the glue seems to be mostly set.
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.
Here is both board in place in their respective connectors.
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.
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.
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.
I basically folded a piece of metal over, used a nibbler to cut a notch out then opened it out.
Here you can see the space in position, I checked it in the case and it seems to be correct.
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.