Tuesday, March 8, 2022

Toubleshooting and Fixing a Hills NVC-DF1 camera ( Hikvision DS-2CD2132 )

My friend "Ned" had a broken security camera and asked me to take a look at it.  He had already taken apart the camera and had performed some troubleshooting on it.

  • The camera would power up over the DC 12 input but would not power up over PoE
  • The camera had two PCBs one for the Camera and one for power, when powering up the camera with a new power board it worked.
  • When he plugged the camera into PoE, it shorted out.


 At this point he came over and we pulled it apart to get a really good look at it.  Unfortunately I don't have any switches that provide PoE so "Ned" cut up an Ethernet cable so I could connect it up to my power supply which didn't put out enough volts even still but was good enough at 32V to test things ( PoE is around 40V ).

It was possible to power the power board separate from the Camera so we took it out. The next thing was to trace out where every thing was.

On the top of the board was the PoE chip and the Plug that had the Ethernet and the 12V DC jack.  Probing around with the continuity tester it was easy to see that the 12V and 44V inputs went to the back of the board.

As the 12V circuit was working fine it was ignored. The 40V circuit was another matter.  The voltage came into the bottom rectifier chip and then to a diode.  Checking continuity the + and - on the continuity chips were shorted out and across the diode.


I checked all of the other components for shorts and they seemed fine or within tolerances.  Except for the Capacitor on the 12V side, which I replaced immediately, without effect.

The Diode itself was marked as a 5PGG (5.0SMDJ58A Littlefuse) which is an ESD Suppressor/TVS Diode.  The diode should definitely not have had continuity both ways so it was the likely candidate.

So I took the part out and the short disappeared.


  It took a fair bit of heat to remove the part with my reflow station. So I added a bit of low melt solder to the pads to make putting the new part back on.  "Ned" in the meantime purchased a replacement part and when it arrived I put it back in and hey presto . . . still no short.

"Ned" took it home to test it and it worked first go.





 

Wednesday, February 16, 2022

Building the MEGA65 core for NEXYS4-DDR ( A7 )

The question here is, why build your own core?  Well there really isn't any reason for the average user to do this.  However if you're interested in dabbling with the code and trying to see how it works, building your own core is really the only way to learn.

If you don't want to build your own core, just get the official core from here:

https://files.mega65.org/html/main.php

So without further-a-do here it is, I hope you find it interesting even if it's not useful to you.

Development Board : NEXYS4-DDR

 

The NEXYS4-DDR development board uses the XC7A100T-1CSG324C fpga
 
It should be noted that this board has been replaced by the NEXYS A7.  
The website suggests this board is nearly identical. 
There are TWO versions of the A7 a 100T and a cheaper 50T.
You will need to more expensive100T version. 

Virtual Machine : VMware Workstation

 
For this exercise I will building my Dev box using VMware Workstation, simply because I have a workstation license and I build all of my Dev machines in individual VM's to stop software bloat. Feel free to use a virtual ( or bare metal ) platform of your choice.
 

Host VM OS : Ubuntu 20.04.3 LTS

 

Ubuntu 20.04.3 LTS is supported by Vivado so install this. I installed an older LTS version then upgraded, save yourself the hassle and just go straight to this version.


Vivado Software : Vivado ML Standard 2021.2


Free Standard version of Vivado ML.  Vivado ML Standard supports the XC7A100T.
You will need to make a free account on the website first. 

Let's do it!


Create a VM

 
The screenshots are pretty self explanatory.  Please use Ubuntu 20.04.3 LTS!
 



Vivado is BIG, so be sure to allocate enough disk space to install it.

Compiling cores is a very intensive process.  Allocate as much CPU and Memory as you can.

Installing Vivado ML

 
Before you start you need to create yourself a free account and then sign in.

Once complete you can go to this URL : 

The Free Standard edition is all that you need.

Grab the Linux Web Installer ( the full install is huge and you just don't need it ).

Once you have downloaded it, run the following commands to start the installer.



This is the same account you made right at the start to download the installer.

Just choose Vivado.

Standard Edition is what you need.

Remove all of the items you will not need to keep the install small.


The Mega65 Makefile expects the install to be in "/opt/Xilinx"



Installing other required software

 
Become the root user

Install the following software using apt:

  • apt install git
  • apt install libpng-dev 


 
You may also need to install "make" and "gcc" via apt, I did not need to for some reason (I may have installed them and forgotten)
  • apt install make
  • apt install gcc
 

Download, compile and install "exomizer"

 
This is a separate piece of software that you will need to manually download, compile and install







 

Finally time to get and compile the MEGA65 core

 
Clone the MEGA65 github repository 
 

 
You are now ready to build the core, start it, walk away and watch TV.

 
When complete the bin file will be here.