Thursday, November 26, 2020

OpenDDS Communication Local host / LAN/ WAN/ VPN windows PCs

 

Communication and running DDS application

Ini file explanation

Open DDS uses a .ini configuration file where define networked communication types and configurations
Refer chapter 7 of the developer guide for further information

Using DSCPInfoRep

This is can be done using one of the following methods

test_run.pl Perl script

This will create a process for publisher and subscriber executables and direct DSCPInfoRepo directory so that publisher and subscriber can fin each other in a local environment.

repo.ior

repo.ior is used in the above Perl script as well

running with DCPSInfoRepo.ior


Dev Command prompt 1
  • Command setenv in DDS directory
  • navigate bin folder use below Command to create DCPSInfoRepo.ior file
  • DCPSInfoRepo -o DCPSInfoRepo.ior
  • Copy this DCPSInfoRepo.ior into the project folder in order to subscriber and publisher can locate the dds directory
Dev Command prompt 2
  • Command setenv in DDS directory
  • Navigate to the project folder and use the following command
  • subscriber -DCPSConfigFile DCPSInfoRepo.ior
Dev Command prompt 3
  • Command setenv in DDS directory
  • Navigate to the project folder and use the following command
  • publisher -DCPSConfigFile DCPSInfoRepo.ior

dds_tcp_conf.ini running with tcp localhost

Dev Command prompt 1
  • Command setenv in DDS directory
  • navigate bin folder use below Command to run localhost
  • DCPSInfoRepo -ORBEndpoint iiop://localhost:12345 -d domain_ids
Dev Command prompt 2
  • Command setenv in DDS directory
  • Navigate to the project folder and use the following command
  • subscriber -DCPSConfigFile dds_tcp_conf.ini
Dev Command prompt 3
  • Command setenv in DDS repo
  • Navigate to the project folder and use the following command
  • publisher -DCPSConfigFile dds_tcp_conf.ini 

LAN/WAN

  • VPN also works tcp/ip and udp/ip
  • Multicasting will not support in VPNs
  • Replace ip address to localhost in .ini file
    • DCPSInfoRepo -ORBEndpoint iiop://192.168.89.3:12345 -d domain_ids 
  • The above line should be the same for both PCs in the .ini configure file
  • Run the DCPSInfoRepo program on the A machine, 
    • $ DDS_ROOT / bin / DCPSInfoRepo -ORBListenEndpoints iiop: //192.168.89.3:: 12345-ORBDebugLevel 10
    • This IP address is the IP address of the machine currently running on DCPSInfoRepo. The port number can be arbitrarily configured as long as it is not occupied.
  • A machine runs subscriber, ./subscriber -DCPSConfigFiledds_tcp_conf.ini
  • B machine runs publisher,. / Publisher -DCPSConfigFiledds_tcp_conf.ini

Firewall Exceptions for TCP

The following should be set in order to the firewall won't take down DDS data packets. allow following according to in control panel firewall exception so that OpenDDS will transfer file without any issue

Domain (VPN)
Public network
Private network
If none of the above works and if you don't receive the data packet you can try disabling firewalls
Network address translator should be disabled as well (NAT)

Sunday, November 15, 2020

A guide to reduce PCB board manufacturing cost

image


 PCB board manufacturing cost

  • Specification 5cm x 5cm PCB 5psc

PCBway

Double side (2 layer)

4 layers

6 layers

5$

49$

163$

  • PCB cost increases with the addition of layer count.


PCB board assembly cost 

  • cost of having components on both sides is double compared to single-sided component PCB Reference

  • 2X (Single side components PCB cost) = Both sides components PCB

  • The through-hole component in PCB increases production cost (extra labor cost is added apart from the assembly cost)

Material Type

FR-4 is the most commonly used material in PCBs.

Complex Shape

Complex board shape is likely to increase the cost

go with simple shapes like a square or rectangle.

Board Size

the bigger the board size, the more the cost of production. 

Board Complexity

Follow board manufacturers usually have minimum clearance requirements

Cuts & Slots

Some boards require unique interior designs. cuts on PCB properly to fit a device casing

these will increase the cost of producing a PCB.

Holes and Rings

Bigger hole diameters are preferable during PCB manufacturing as they require less precision during fabrication.

Tips to Save Money during the PCB Manufacturing Process

PCB Assembly is usually costly when ordered for small batches as compared to large batches. Board assemblies get drastic price changes during large volume production of boards.

By adopting onboard penalization, you could save a few bucks. For instance, when printed circuit boards are framed into panels, they produce PCBs that work faster and better. They also waste fewer PCB materials, and they decrease the lead time.

Smaller Board Size might reduce the PCB manufacturing cost, but it could make the board design quite complicated. Such complications would end up increasing the value of assembly because of the required precision equipment needed during assembly.


Thursday, November 12, 2020

Current Sense Amplifiers

 


image from


Current Sense Amplifiers

Main types

Hall effect current sensor — higher ampere ranges

Shunt current sensors — lower ampere ranges

Applications

Motor drives

  • H bridge motor feedback control, speed and torque control
  • 3 phase motor feedback control, speed and torque control

Load Current limiting applications

Solenoids

Led driver — brightness control applications

Special characteristics

  • Higher voltage CMV - Common mode voltage
  • High CMRR - Common-mode rejection ratio
  • Common mode Pwm rejection - Mesure current in PWM signals

Common parameters

  • Bandwidth
  • Supply voltage
  • Gain setting
  • Gain bandwidth
  • Input noise
  • CMRR

High side current sense


Low side current sense



Isolated current sense 


Bidirectional current sense 








 


Is repairing an old laptop battery pack by replacing dead cells with new cells good Idea

 

image from

Is repairing an old laptop battery pack by replacing dead cells with new cells good Idea?

Some people replace dead cells with new cells in old laptop batteries.

Laptop batteries contains usually 18650 3.7 li-ion cells, capacity depends on the manufacturer, usually 2500mAh–3000mAh

Old laptop batteries anyway have low capacity compared to a new battery,

Approx → 1/2C of original C (C-capacity)

Original C (capacity) = 2900mAh

Then after 2 years of use, capacity will drop to somewhere around 1900mAh

what is a dead cell?→ A cell cannot charge anymore/zero capacity/ a cell short circuit itself/ a cell with very high internal resistance

Then the newly replaced battery has higher capacitance compared to other reduced capacity batteries

Laptop batteries are in series

Batteries connected in series must be as close to identical as possible,

To make sure that the individual cells in each battery charge and discharge together and are ‘balanced’ (have the same voltage).

Putting different capacity batteries is series will lead to disaster because the lower capacity battery will charge up faster and become grossly overcharged,

This will lead it to heat and release gasses that cannot be replaced — and perhaps even explode!

Batteries lose performance and may go out of balance as they age. even new batteries cannot be balanced 100%, but they do around >95%

Therefore for best performance, only combine batteries that have the same age and usage, the older weaker ones will not provide the expected capacity.

 

Guide Select Load Capacitors For Crystals

 

Crystal Load Capacitors !!! for ICs

What is a Load Capacitor? for a crystal

Load capacitance is the amount of external circuit capacitance in parallel with the crystal itself.

Above “load capacitors” are actually in series (with GND.) in the circuit loop so their “Equivalent” Load Capacitance,(Ceq=1/2C) is one-half (1/2) of the C value.

Then the IC input and trace capacitance to the ground are summed to get the total or “Load Capacitance” the rating you will find on 32.768 kHz (or any ) Crystals.

If chip datasheet suggesting you choose a crystal rated for 12.5 pF with 1.5pF allotted for Cinput + stray. This implies you put the parts close to the pins and do not use a ground plane under the traces which adds a few pF but depends on details. (0.5pF/mm type)

 

Active Filters vs Passive Filters

 




Active Filters vs Passive Filters

Active filters contain op-amp, resistors, capacitors and inductors while

Passive filters have resistors, capacitors, and inductors

Active filters

Pros

  • isolates loading effects
  • useful when having multiple filtering stages
  • ability to provide signal gain
  • higher input and lower output impedances
  • independent of the source and load impedances

Cons

  • increases cost
  • increases space usage for components
  • require an external power supply,

Passive filters

Pros

  • minimum space consumption
  • inexpensive
  • operate only on the signal input

Cons

  • loading effects on the next stage of the filter
  • strongly affected by the source impedance
  • no power gain is available

 

12 Windows 10 fresh installation

 

Windows 10 fresh installation



Windows 10 bootable DVD or pen drive

  • Download windows 10 medication tool from Microsoft
  • Make the bootable drive with the above tool

Check boot option on PC by navigating to the boot menu

  • In boot menu set legacy to top raw to USB/Removable drive
  • Some laptops if no windows in the primary SATA slot then the default is set already set to USB flash drive as the boot
  • Once the boot is selected to USB press f10 to save and retreat pc from the boot menu

windows installer will start now

  • Set personalization according to your requirements
  • Windows 10 pro /home/education N version will not install windows applications such as windows media player etc.

Hard drive partition

  • Press new and make partition accordingly for data partitions
  • Drive 0 is C drive (OS drive)

Reference

How to do a Clean Install of Windows 10 the Easy Way
The Windows 10 upgrade process drags old files, settings, and programs from your previous Windows system to your new…www.howtogeek.com

How to create custom partition to install Windows 10 * Pureinfotech
Although you can resize a partition at any time on Windows 10, if you're planning to create a dual boot system, or you…pureinfotech.com

LeetCode C++ Cheat Sheet June

🎯 Core Patterns & Representative Questions 1. Arrays & Hashing Two Sum – hash map → O(n) Contains Duplicate , Product of A...