texts: Is thermally conductive epoxy needed if long settling time is acceptable?

texts:
I'm using SMD based analog temperature measuremet ICs (a version of the old TMP36). It will be mounted on a tiny and thin (.5mm) PCB I've cut to hold the IC and a few  mfgr recommended parts and a 3 pin header. That assembly will be fixed with epoxy to a circular band of aluminum, which will be clipped around a 2 inch wide PVC pipe carrying water to and from a pool pump. The obvious purpose is to get a reasonable approximation, over time, of the water temperature flowing in the pipe.

So for my adhesive, and also to cover and shield the small PCB from the element, it seemed that thermally conductive and electrically insulating epoxy would be the first choice. But after seeing what I would call astronomical prices for small amounts of epoxies with these specifications, I'm thinking maybe I don't need it?

First of all, it seems to me I've often covered boards with many ordinary epoxies for moisture protection, and I've never found any that proved to be a bad electrical insulator.

Second, considering my aluminum strap will go around a 2" PVC pipe (whose wall thickness is already about 7mm thick) and considering I don't care if it takes 5 minutes or more to get a reasonable temp reading, and most important that I'm only looking for a reasonable approximation, I'm thinking just about any cheap epoxy will do.

Thoughts?


texts: Nodal Analysis ..Nodes between Battery and Resistance

texts:
I have the following circuit for which Nodal Analysis is performed

At this point

Isn't there a Node between the resistor and the battery?
How can i propery identify Nodes in this circuit?

UPDATE:
Please see the update

[![enter image description here][2]][2]

UPDATE#3


texts: I don't quite understand this circuit. Why are there 2 transistors? Wouldn't 1 transistor be enough? The blink LED triggers the first transistor every time it blinks. But, how I understand it, the first transistor only triggers the second transistor. Why are 2 transistors necessary in this circuit?


texts: non-blocking assignment does not work as expected in Verilog

texts:
I have a very simple Verilog code and it does not seem to work as expected:

Here is my code:

always @ (posedge clk, negedge resetn) begin
  if (resetn == 1'b0) begin
     var <= 1'b0;
  end else begin
     if (valid == 1'b1) begin
         var<= 1'b1;
     end else begin
         var <= 1'b0;
     end
  end
end

I expected that assuming resetn is H all along, when valid goes H the var becomes H in the next cycle. But in simulation, var becomes H in the same cycle. Why is that?

Here is a diagram as well:

next_state_d2 is my var

EDIT:
Testbench code:

initial begin
gclk = 1'b1;
resetn = 1'b1;
div_valid=1'b0;
#40 div_valid = 1'b1;
#40 div_valid = 1'b0;
end

always
#20 gclk = ~ gclk;


texts: Impedance for TTL Hsync and Vsync Pulses

texts:
I'm just finishing up a sync combiner and audio/video PCB. I'm trying to impedance match my traces and I've done so for the 75 ohm RGB lines. Now I'm looking at the TTL level Hsync and Vsync lines that go into a 74LS86, and from there are outputted to a 470 ohm resistor to bring the Csync down to 75 ohm levels.

My question is, can I use 75 ohm impedance traces for the TTL level sync lines or is there a more ideal value I should aim for? I've read 50 ohm, 60 ohm and 75 ohm from various sources so I'm confused. If the value is different, once the combined sync comes out would I switch the traces back to 75 ohm impedance due to the 470 ohm resistor bringing it down to 75 ohm?

Oh, and to make sure I'm getting the right information, I'm using this coplanar waveguide calculator (http://spok.ca/index.php/resources/tools/99-cpwcalc) and I'm a little confused with it. It asks for substrate height and the dielectric gap between the trace and the ground plane beside it. The height is the thickness of the board, such as 1.6mm I think. Is the gap only one side of the dielectric or both sides beside the trace combined?

Anyways, here's my circuit even though it isn't really needed to answer the question.


texts: Use of twisted pairs with fundamentally single-ended DUT

texts: Let's suppose I'm interested in measuring the voltage response of a DUT to some imposed voltages. The DUT takes V1, V2, V3 as inputs relative to some GND, and outputs V4 relative to the same GND. All signals are below 100 kHz, and there's a 4 m run of wire. Is there any benefit in using four twisted pairs (V1, GND), (V2, GND), (V3, GND), (V4, GND), where for each twisted pair, one of the leads is bonded to ground, and the twisted pair is either stimulated (in the case of an input) or sensed (in the case of an output) by a differential circuit. The DUT can not be extended with differential drivers (it will be deep inside a cryostat at 300 millikelvin.)


texts: Do I really need the open loop output impedance of an op amp?

texts:
There are several answers on the internet and here on how to calculate the output impedance of the opamp with a given feedback.

My intention, though, is to find this value with an open  loop configuration because is considered before feedback connection of the output. Like here, the output resistance saw before the Cgs:

Someone says that is written on the datasheet, but also could not. In this latter case we should need the internal circuitry to estimate it. Is that true? If so, how can I find this value from, for example, an LM324? That impedance seems to be not present inside the datasheet.

EDIT: But I may be wrong, in that circuit I need to model the output of the op amp as a voltage generator+output resistance. I was thinking to open loop only because the oputput of the system in which the feedback takes the signal is not the output of the opamp. But if I'm wrong, I can find the output resistance with the normal closed loop way. Would still be right even if the feedback of my circuit is a drop due to a current and not the output voltage directly from the opamp? I think the answer would be 'yes' because the output is still dependent on the output of the opamp, of course.


texts:
I am currently designing a PCB for a school team and the PCB has three modes of power. V_USB(5V), V_EXT(5V regulated) and V_Poe(5V). How do I go about creating a power selector that has the hierarchy (EXT-> PoE -> USB). I have looked long and hard for this and discovered some posts that help. For example, so far I think I can use of using this circuit:

with a P-MOSFET connected to the second supply(gate connected to first supply) that is normally off.
So it would go:
(PoE compared with USB, with Mosfet on USB)
compared with (EXT with whatever wins the first round(MOSFET here)

However, I scoured digikey for a P-MOSFET that is in depletion mode and I get 0 results.


texts:
I'm a bit stumped as to what's going on here.  I was previsouvly able to read (upload) the memory from the dspic33F and store it as a hex file.  This is the only way I can test the boot loader I'm working on right now.  In the last few hours I can no longer export the data read back to a hex file.

It appears that the programmer is connecting and reading back the file.

*****************************************************

Connecting to MPLAB ICD 3...
Firmware Suite Version.....01.28.72
Firmware type..............dsPIC33F/24F/24H

Target detected
Device ID Revision = 3040

The following memory area(s) will be read:
program memory: start address = 0x0, end address = 0x157ff
configuration memory
User Id Memory

Reading...
Read complete

But it fails to complete the "upload".

Connecting to programmer...
Uploading target memory...
The programmer could not be started: java.lang.ArrayIndexOutOfBoundsException

Has anyone seen this issue before, if what the heck did I do to make MPLABX die on me while exporting hex files.  It's also worth nothing that the IPE application does not give me the option to export the hex file either.

System Information

DSPIC33FJ128GP706A
ICD3
Windows 7 - N (x86) via Virtual Box running on OS X 7.8

Update

It works with my PICkit3... I'm guessing it's an issue with the ICD3??


texts: Forward and Reverse Bias regions for voltage versus current of diode

texts: Below I have the graph of the voltage of a diode versus its current. As you can see, the forward bias region is when Vd>0 and reverse bias when Vd<0. My question is: In which region does Vd=0 fall in?


texts: Can I bench test a N-channel MOSFET with battery, oscilloscope, and arduino alone (no applied load)?

texts:
I am having trouble getting some MOSFETs I have to behave like I expect, but I am just testing them with an oscilloscope, battery, and appropriately high voltage digital output on a microcontroller.

Do I need to attach a load such as a motor, solenoid, or light bulb to bench test a MOSFET?

I don't know how a MOSFET works physically, so if there is some sort of capacitance that needs to be charged inside the MOSFET for it to work (i.e. current received and charge stored from the source), then the oscilloscope might not be supplying this.

The MOSFET I am using is this.

EDIT:

This is the setup I have:  The battery is 6V, and the Gate is a wire.  If I hook up the wire to ground (drain pin) or 6V, the meter reads 0V and 6V respectively, so it does seem to be switching now that I removed the microcontroller.  This 6V is stable, and does not revert to 0V until the Gate is discharged to ground.  Interestingly, if I hook up the Gate to the source pin, I get 5.5V output, not 6V.  This 5.5V is stable (and needs to be "reset" by touching Gate jumper to ground).

simulate this circuit – Schematic created using CircuitLab
I found out that the strange stuff occurs while using my microcontroller to switch the MOSFET.  If I hook up the ground from my Teensy3.1 3V microcontroller to the MOSFET drain, the meter jumps up to 6V, as if it was switched on.   This 6V is also noticeably more noisy than the 6V of the battery.  This 6V is not stable, and the meter immediately drops to 0V when the microcontroller ground is disconnected.

If I instead connect the digital output (3V) of the microcontroller to the Gate of the MOSFET, the output of the meter jumps from 0 to 4.5V, with 1.5V square pulses I am sending from the microcontroller riding on top.  4.5V + 1.5V = 6V obviously, but confused. I expected the pulses read on the meter to be 6V in amplitude, from a baseline of 0V.  I checked and the control voltage pulses I am sending from the microcontroller are 3V as expected.

If I now connect the microcontroller ground to the drain of the MOSFET, the voltage meter output jumps to 6V, and these 1.5V square waves riding on top of the 4.5V disappear.  This effect is reversible.


texts: Why is the total length of wire in a circuit used to find the voltage drop between a battery and a load? Suppose the load is a distance l away from the battery. Wouldn't the voltage drop between the battery and the load be due to a length l of wire and not 2l? I understand that the current flows through a total distance of 2l of wire, but if the load is only a distance l away, why would it "see" a voltage drop due to 2l of wire? Is it possible to explain this with ohm's law and a simple circuit diagram?


texts: How critical is the layout of USB data lines / how does my layout look?

texts:
I'm laying out the USB data lines on my board at the moment, and I'm just trying to get an idea of how well off my design is gonna fare.  Here are the particulars:

4 layer board (from the top: signal, ground, split power planes, signal)
internal copper is 0.5oz, external copper is 1oz
prepreg between external foil and core is 7.8 mils thick
traces are 10 mil with differential pair spacing at 9.7 mils
MCU pin to parallel caps trace length is about 0.23 inches

I plan on having a sealed USB connector in my device's enclosure.  The connector I chose has a vertical header arrangement, so I'll have a board that I solder the connector to, and then between that and the main board, there will be a jumper cable.

As far as the differential impedance, based on the above specs, I figure I should be landing somewhere in the 91 - 92 ohms area.  Granted, the traces don't stay evenly spaced the whole time since they run through the parallel caps and series resistors before hitting the connector... but I tried the best I could.

Here's a shot of the board layout thus far:

How does this look?  The different in length between the pair of traces is below 5 mils.  What I'm concerned about is potentially messing up this whole differential impedance thing... and having the jumper cable between the board and the connector mess things up.


texts: MAX9032 comparator to drive an LED for TX line

texts: I have got a MAX9032 dual comparator in one of the projects that I am working on and I have one spare comparator that I can use to drive an LED when the microcontroller is transferring the data to the PC that is connected to the USB. Would the following circuit work? This is designed to light up the LED when the TX line goes low(High means Idle state).


texts: Is an (n+1/4) wavelength transmission line impedance transformer comparable to a 1/4 wavelength line of the same composition?

texts:
I use coaxial transmission line transformers for simple power splitting and combining networks. This is for connecting multiple resonant antennas in array configurations. It's a standard technique that uses a 1/4 wavelength section of coax to match end loads/sources of different impedance. It's become really common in the ham radio designs I'm looking at. Here's a brief note on that: physics behind the impedance matching performed in this case
Here is a practical example of one implementation: https://www.qsl.net/dk7zb/PVC-Yagis/2x25_ohm.htm, using 5/4 wavelength cables.
It's so well known and understood (although my theoretical understanding of it is limited), that I wouldn't have a question, except - many designs suggest that odd multiples of 1/4 wavelength should also work, e.g. 3/4, 5/4, 7/4, etc.
I find that intuitively hard to accept for the following reasons. I am somewhat confused and want to know the correct way to implement this. It seems logical to me, that at the end of a 1/4 wavelength transformer, the transformed impedance appears, and so it should be connected only to a coax of the target impedance, not the transformer impedance.
For example, to transform 25 ohm to 100 ohm, I can use 1/4 wavelength of sqrt(25*100) = 50 ohms cable. Call 25 ohms the source, if I want to continue the cable run, I should attach any length of 100 ohms cable to the transformer. That makes perfect sense to me, although I don't fully understand the principle of operation of the transformer itself and just accept that it is true.
But now I'm being told that I could just as well use for example, a 3/4 wavelength of 50 ohms (matching) cable. My conceptual problem is this: I could view that broken down into a series connection of 1/4 wavelength 50 ohms and 1/2 wavelength of 50 ohms. In the first case, there can be a 1/2 wavelength of 100 ohms cable plus any length in addition at the end of the transformer. In the second, there is an actual 1/2 wavelength of 50 ohms cable plus any length of 100 ohms after that.
Questions: How can both cases be valid, or is the theory of odd quarter wavelengths just wrong? If I use lengths like 7/4 wavelengths transformer, what are the consequences? Apparently people are using this without experiencing return losses, but what about signal loss due to the mis-match?


texts: Does anyone have an STM32F example for opamp follower mode (ideally STM32F3 Discovery)? I can get the PGA working but cannot find out how to connect it in simple follower mode.


texts: Isolating Digital IO from Microcontroller

texts:
I have designed an Embedded System in which the PCB has both Non-Isolated and Isolated DC DC converter.

I am taking a 24V DC Supply from a PLC Device. Converting it to 3.3V with a Non -Isolated DC DC Converter. However, I want to control a Relay (Output) and also Sense for Contact Closure (Voltage free input/Alarm input) with in the same device.

As shown in the block diagram, I have Isolated the 3.3V using a separate unregulated Isolated DC DC converter for Digital IO operations. I am using an optocoupler to isolate the Digital IO from the microcontroller circuitry.

My questions are:

I want to Control the Relay using the 24V tapped from the input of Non-Isolated DC DC converter. Does this configuration provide Isolation? or Should I use only the Isolated 3.3V to control the relay? (which won't catch relay startup voltage)
Since I have potential free Inputs, I can use either ground or positive voltage to sense the NC contacts of a relay. I think the 24V tapped from the Inputs will provide long distance sensing proper. But what happens to the Isolation?
This device will be DIN Rail mountable. If I have to use chassis ground, which ground should I share with Chassis ground? or is it even necessary as we will use only plastic enclosure?

Thanks in advance for any suggestions!

Update:
Here is the schematic of Input and Output:


texts:
I'm playing with a full-bridge driver:

Usually, you want to put an inverted PWM signal on IN1 and IN2 and take care of dead-time.
While writing the code for MCU I tried a simpler pattern:

put a PWM signal on the high-side MOSFET
keep on the low-side MOSFET

The motor moves smoothly and nicely, but I wonder which are the disadvantages of such a "lazy" control approach. Is there a name for this pattern?
UPDATE
When I say I keep the low-side MOSFET on I talk about the opposite MOSFET to the one that has PWM input.
Example:
CCW

IN1 -> PWM
IN2 -> keep low-side on

CW

IN1 -> keep low-side on
IN2 -> PWM


texts: Getting more information about a transformer

texts:
I'm trying to figure out more information about a small transformer on a old board that we are reverse engineering, can someone give me some advices about how can we reverse engineer this transformer? Do the numbers on it represent something?

4783
6610741


texts: How reliable is it to write eMMC before soldering it?

texts:
I am working on a pet project that has both an SPI NOR flash (for bootloader) and eMMC (OS image).

For SPI NOR I will provide a small connector to interface directly into it.

Now, since I have never used eMMC in projects I do not know the best/standard approach on this.

I see two options:

Write initial image before soldering eMMC. I will be using an assembly service, so I need to find one that will do this for me.
Provide in-circuit interface for writing an eMMC. Perhaps something like JTAG-UART-sized pin connector which will interface into eMMC directly, so I can write it without bringing up the entire board.

Now as far as I know, in bulk manufacturing the first option is used. However, I do not know how reliable it is. If the eMMC will be heated to over 200C, wouldn't that potentially damage the data already written on it?

Also, I think that in the second approach it is easier to rescue the board if I do something wrong.

So my question is - which is the standard approach? Maybe I am missing a 3rd option?

PS: I've checked a few development boards that I have and all of them come with JTAG/UART connectors, but I actually never used them for anything other than troubleshooting boot of the board. Is it possible to write eMMC over those connectors without making a new non-standard one? How is it done usually?


texts:
I need to measure inductors with a small DC bias current. Small is a relative term and here as in won't cause any significant voltage drop in the cables of the LCR meter but enough to put my inductor near saturation. There are a few high end production test models which has this built in but it's way above my price range. The ones which has DC bias are always rated in voltage only which makes perfect sense for a capacitor measurement but assuming my DC source does the constant current limitation, am I missing something? 10 V maximum, sure, but how much current can I pass though it? Will the L-measurement DC-block the DC voltage imposed by my external current over the resistance in the wire of the coil (DUT)?

Here is one example: datasheet


texts: Hardfault exception on stm32f7 arm microprocessor at RTX thread creation

texts:
I'm running a simple RTX thread program as follows. The problem is when it's running on STM32F7 DISCOVERY BOARDv through debug interface, it seems right after running the osThreadCreate (osThread(Thread), NULL); the program jumps to hardfault interrupt. It used to run fine before.

void Thread (void const *argument);
osThreadId tid_Thread;
osThreadDef (Thread, osPriorityNormal, 1, 0);

int Init_Thread (void) {

  tid_Thread = osThreadCreate (osThread(Thread), NULL);
  if (!tid_Thread) return(-1);

  return(0);
}

and my clock configuration is as follows:

static void SystemClock_Config(void)
{
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_OscInitTypeDef RCC_OscInitStruct;

  /* Enable HSE Oscillator and activate PLL with HSE as source */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  RCC_OscInitStruct.HSIState = RCC_HSI_OFF;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  RCC_OscInitStruct.PLL.PLLM = 25;
  RCC_OscInitStruct.PLL.PLLN = 432;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 9;
  if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }

  /* activate the OverDrive to reach the 216 Mhz Frequency */
  if(HAL_PWREx_EnableOverDrive() != HAL_OK)
  {
    Error_Handler();
  }

  RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
  if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK)
  {
    Error_Handler();
  }
}

and this is the handler my program jumps to(at stm32_746xx.s):

HardFault_Handler\
PROC
EXPORT  HardFault_Handler          [WEAK]
B       .
ENDP


texts: Dual Rail Switch Mode Power Supply Filtering

texts:
I'm looking at the datasheet for a dual rail SMPS I plan on using for analog circuits, and I'm wondering about how to interpret some recommended filtering circuits. I understand a simple filtering suggestion for the dual rail versions of this SMPS, shown here:

My analog ICs are noise sensitive, so I want to use more rigorous filtering than just input and output capacitors. The datasheet gives another filtering recommendation I plan on implementing:

On the output of the SMPS, should I use two output capacitors instead of the one shown in the datasheet, connecting them from the positive and negative supplies to the output ground? Also, will using a dual rail SMPS change the connections of CY1 and CY2? Note that the datasheet gives this second circuit as being an "EMC Recommended Circuit."

The full datasheet for this device is here


texts: Can two Radar motion sensor, running next to each other, result a false detection?

texts:
I have two CDM324 Radar motion sensors.

I want to run the two sensors close to each other.

The transmitted frequency is roughly 24 GHz and I am afraid that a small shift in one sensor transmitted frequency could enter the received path of the other sensor and it can be interpreted as a reflected signal (motion) even if there is no motion at all.

For example: the first and second sensor transmit at 24,000,100 Hz, 24,000.000 Hz, respectively. The second sensor can detect a doppler frequency of 100 Hz even if there is no motion.

I run the two sensors next to each other and I have no interference at all. Is it a chance? Could an interference happen? A false detection would be a problem for me?


texts: Digital multimeter - How does the wrong probe insert (input) alarm work?

texts:
I'm using a digital multimeter (UT61E) and it doesn't have the "Wrong Probe Insert" alarm feature.

I mean when I select the Voltage Measurement with the knob but leave the probes in the Current Terminal, it will sound an alarm and vice versa.

I made this mistake all the time, so I want to build a circuit to do this and mod it on my multimeter.

I've been googling for a while but can't find out how this circuit is made. Maybe a simple idea or some explanation of the principle would help me a lot.

I really don't understand how the meter knows if the probe is inserted or not?


texts:
SMPTE signals are (one of) the signals used to synchronize video and audio recordings from multiple cameras/recorders.

How does one go about generating such a signal?

I have a GPS-derived clock and 1PPS signal that the time should be based on.


texts: Low noise low ripple CC/CV power supply - modern replacement for ua723cn based regulator

texts:
Recently I had opportunity to buy old Philips PE15xx series lab power supply in not bad condition for about $120, but I was too late and someone else bought it.

The seller praised its very low noise, low ripple, low output impedance and good voltage and current regulation. I took a look at schematic in service manual to see how "good old linear power supply" is built. This is schematic found in service manual:

It uses UA723CN and some old school BJT transistors. Datasheet says that UA723C with 5uF Cref capacitor has 86dB supply rejection. It looks pretty good for a part that cost about $1 (UA723CD).
From ua723 datasheet:

I thought I might try to build a similar power supply for education purposes. I'm curious how it would perform compared with cheap chinese linear power supplies.
Of course price of PE1542 includes also high quality terminals, case, meters etc., but for educational purposes rebuilding just circuitry could be interesting.
My questions:

Is this (Phillips PE15xx) power supply really very good design? Or just my seller glorified it?

If it is - what can I use instead of ua723 and BDY (discontinued?) transistors to I build compareable low ripple low noise, good output CC/CV regulation power supply with modern parts?


texts: 32 x 8 Register file using generate statement for D-flip flops

texts:
My circuit has a grid of 32 x 8 D flip flops. each row should be producing a 32 bit vectors that contain the Q values from the D-ff's - which are then sent to a 8x1 MUX. The following code is me trying to properly generate the 32 x 8 D flip flops and test if I can get a vector out of them (the 32 bit I0 vector).

the circuit I'm trying to write the implementation for can be seen in the figure posted in this question:
https://stackoverflow.com/questions/22418555/test-bench-of-a-32x8-register-file-vhdl?rq=1

library ieee;
use ieee.std_logic_1164.all;

entity REG is
port (
    CLK         : in std_logic;
    WRT_REG_NUM : in std_logic_vector(2 downto 0);
    WRT_DATA    : in std_logic_vector(31 downto 0);
    READ_REG_A  : in std_logic_vector(2 downto 0);
    READ_REG_B  : in std_logic_vector(2 downto 0);
    PORT_A      : out std_logic_vector(31 downto 0);
    PORT_B      : out std_logic_vector(31 downto 0)
);
end REG;

architecture BEHV_32x8_REG of REG is
-- decoder component
component DCDR
    port (
        I_in    : in std_logic_vector(2 downto 0);
        O_out   : out std_logic_vector(7 downto 0)
    );
end component;
-- D flip flop component
component D_FF
    port (
        D_in    : in    std_logic;
        CLK     : in    std_logic;
        Q_out   : out   std_logic;
        QN_out  : out   std_logic   -- Q not
    );
end component;
-- MUX copmonent
component MUX
    port (
        S_in                            : in std_logic_vector(2 downto 0);
        I7, I6, I5, I4, I3, I2, I1, I0  : in std_logic_vector(31 downto 0);
        O_out                           : out std_logic_vector(31 downto 0)
    );
end component;

-- internal signals used
signal I_in     : std_logic_vector(2 downto 0);
signal O_out    : std_logic_vector(7 downto 0);
signal CLK_vals : std_logic_vector(7 downto 0);
signal I0       : std_logic_vector(31 downto 0);
signal QN_out   : std_logic_vector(31 downto 0);

begin

-- decoder instance
DCDR1 : DCDR port map(I_in, O_out);

GEN_D_FF1:
for ROW in 0 to 7 generate
    GEN_D_FF2:
    for COL in 0 to 31 generate
        DFF_X : D_FF port map(WRT_DATA(COL), CLK_vals(ROW), I0(COL), QN_out(COL));
    end generate GEN_D_FF2;
end generate GEN_D_FF1;

DCDR_AND : process
begin
    I_in <= WRT_REG_NUM;

    for I in 0 to 7 loop
        CLK_vals(I) <= O_out(I) and CLK;
    end loop;
    wait for 10 ns;
end process DCDR_AND;

end BEHV_32x8_REG;

EDIT: adding a screen shot of a simulation run

When I simulate the above code in ModelSim, I don't get any output for I0. Where is my design flawed? Am I violating any VHDL best practices? Assuming I can get this to function properly, how could I get 8 different 32-bit vectors (from each row of flip flops) to send to the MUX(s)?

I appreciate any advice I receive!


texts: Olimex ARM-USB-OCD-H with LPC-P1114 and LPC-P1227 boards questions

texts:
I'm having a big headache with ARM-USB-OCD-H with LPC-P1114 and LPC-P1227 Olimex boards.

After reading the Manual IAR I figured out that I need to configure my OpenOCD Server to use the ARM-USB-OCD-H programmer with my targets.

The configuration file for the ARM-USB-OCD-H are provided but there are no targets for LPC-P1114 or LPC-P1227 in TCL folder or board configuration files.
I tried to download the new OpenOCD version 0.7.0 but this version also doesn't have config files for these targets.

First question: ARM-USB-OCD-H is able to program and debug these NXP LPC targets?
Second question: Where can I get configuration files for these targets?


texts: Multiplexer with 5v select and 9v or more routing

texts: I need to route a 9v signal using a 5v or 3.3v microcontroller. Does anybody know of a multiplexer that supports this, or a circuit it could put in between the microcontroller and the multiplexer to make this happen. The multiplexers i have tried (TI cd4097b) will only route the signal up to the voltage of the select pins and not higher.


texts: MOSFET analog switch, Transmission Gate, Bilateral switch circuit questions

texts:
Below is an LTSpice simulation of two attempts at a Mosfet bilateral switch or 'transmission gate'.
The plot shows the switch (onoff) going from 0 to 5v (in blue) and a sine wave audio signal being moved up or down by the two circuits.

What I was hoping to see is the sine wave, only between the blue lines, and nothing either side.

Can anyone tell me what is wrong with these two circuits?

I know that I can use a CD4066 etc., or a relay, but now I've become obsessed with getting a working bilateral switch circuit.


texts: Connecting an always on LED to a raspberry pi

texts:
I'm new to electronics, so I thought I'd start simple and just connect an LED to the GPIO on the raspberry pi, to pin 1 (3.3v) and the ground pin.
But I'm having trouble calculating the resistor I need. On many websites it says the resisitor I need is about \$300\Omega\$, such as this one here, but none of the websites explain how to get to this value. I did physics at school and used the formula \$V=IR\$, and know that current is the same in all places in a series circuit.

The LED I have didnt come with any data, but looking on the Internet it suggest that the voltage drop across green LEDs is about 2.2v, and the max current is 20mA.

So the resistor will have a drop of 1.1v (the 3.3v from the source minus the 2.2v dropped across the LED), and the current through it should be 0.02A, so I did:

$$R=\frac{V}{I}$$
$$R=\frac{1.1}{0.02}=55\Omega$$

which is nothing like the \$300\Omega\$? what am I doing wrong or misunderstanding?


texts: Correct way to convert square signal to sine waveform

texts:
I have a square form signal that can change frequency from 100kHz to 200kHz (more precisely, the '1' is coded by 200kHz part (2 oscillations) and '0' is coded by 100kHz). The amplitude is about 2.5V. How can i change the waveform of the signal to sine, but preserve frequency changing? I think that the most common way is to use two integrators: passive (or active) to convert square to saw and then active (based on op-amp) to convert saw to sine. I'm not an electrical engineer, and this solution I've find by reading articles on the net. Is this correct or may be exists more correct or easier solutions? Just need to determine if I'm going the correct way.

Sorry for my bad english, stupid question and thanks in advance.


texts: Which kind of regulator/battery setup should I use for 5 volt microcontroller and transmitter circuitry for optimum performance?

texts:
I have a project which uses microcontrollers and a radio transmitter, both running at 5 V. The circuitry consumes less than 1 mA from the 5 V rail when idle, and 1 A when transmitting data using the radio transmitter. The transmission phases do not happen often, as the device spends most of the time in idle mode, usually transmitting only once every 24 hours for a few seconds (maximum 20 seconds).

Now I'm designing a battery input for the circuitry and I cannot decide whether to use 11 V battery packs (LiPo) with switching regulators, or LiFe batteries instead where I can get a low regulating voltage difference between input and output for the regulator (output of 6 to 7 V) and use a linear regulator with those lower voltage batteries.

Which of these setups gives more efficient results for regulation circuitry in this kind of use?

switching regulator with 11 V input, dropping the voltage down to 5 V; or
a linear regulator at (mostly) low current and maximum of 2 V voltage drop over it?

One of the main interests in addition to the battery life, is the simplicity of most linear regulators versus switching regulators, which reduces time spent on designing the product and saves space from the board. Switching regulators can also cause some radiation that might interfere with other circuitry and they are also more expensive.


texts: Using holes instead of vias for unused through-hole pins

texts:
I'm creating a footprint, in Eagle, for a USB-C connector. The part has 16 SMD pads and 16 duplicate through-hole pins.

The pins are very close to each other and the specs in the datasheet have annular rings that are too narrow for my PCB manufacturer. If I let the DRC grow their width to something acceptable for the manufacturer, they become too close to each other. I don't need to use those PTH pins since I'm only interested in the SMD pads.

I was thinking that I should just create (un-plated) holes instead of vias for those pins. The pins would just end up "floating" in those holes instead of being soldered in place - i.e. they wouldn't be electrically connected to anything. They don't seem to provide any structural role since the part has sturdy tabs that keep it in place.

Can you think of any issues with doing this? I could also just create a cutout around the group of PTH pins, but I'm trying to avoid cutouts and stick with drill hits for ease of manufacturing.


texts: Is it feasible to use powerbank for 100W speaker

texts:
I'm going to assemble portable speaker system, think street musician or small open-air party.
It needs to run for 2 hours. 100W-rated RMS speaker is enough from my experience, from same experience it can run that long with required loudness from small bike battery, someth. like 10Ah.
Given that lead battery is unlikely to discharge more than 50% of its capacity - I understand that 60 watt-hours is how much energy I need for a gig.

Xiaomi mi battery has very appealing price, and at 77 Wh , should theoretically do the job, I found how to get it to output 12V.

I'm not going to use DC-AC invertor, I'm either modifying powered speaker to run on 12V power, or would get car amplifier.

My question is -- would 1.5A that I can get from power bank be enough to power the speaker, particularly at peak loads, when the base gets loud.

If not, is there a way to work around it -- like putting high-capacity capacitor in the power line, or stacking 2 powerbanks.


texts:
I'm working on a project with the STM32F407 discovery board. My question is related to powering the board from external source. In the datasheet, it is specified that power can be provided either by USB through a host PC or through external power supply if USB is not connected, using the 5V or 3V pins.

My question is the following:

Can I use the USB port to power the board from a cell phone adapter that can output 5V/2A?

It is possible to power the board by this adapter (5V/2A) through the 5V pin without causing any harm?


texts: Effect of Isolated Power Supply EMI Filter Bypass Capacitor

texts:
I am using this isolated DC-DC converter as a power supply to ensure regulated 12.0V: Traco Power TEN60-1212N.
In the application notes, the following EMI filter is suggested:

with L1 = 3.3µH, C1,C4 = 6.8µF / 50v and C6,C7 = 1000pF / 2kV and C2,C3,C5 = NC.
In my application, I still have common ground (so it's not fully isolated, I just need the 12.0V):

My questions is about C6 and C7: What effect do these capacitors have?
In my circuit, C7 will naturally not be relevant.

(Context: The power supply provides a stable 12V under battery operation in an automotive setting, where the battery voltage can be very noisy and dip low when the starter operates. The output is used for the ignition coil and injection nozzle.)


texts: Battery Charger output based on input Voltage

texts: If a charger is rated at input 230 V 50 Hz and output 3V 100 mA, is given an input of 220 V, how will it affect the output charging current? Will it be lower than the rated output current or higher?


texts: Understanding data holes in a Intel HEX file

texts:
I am working on a secondary bootloader for a Renesas microcontroller.
Following are two consecutive records of the 11000+ records in the HEX file.
:04D1D000000000005B
:10D1DC0001030600001000000080000000000100A8

Decoding this the simpler :LLAAAATT way:
:04D1D000000000005B means:

Length of data: 0x04 bytes
Address to put data at: 0xD1D0 + Base address set previously, in this case it was 0xA0000
Record type: 00 Meaning, its a Data record.
Data: 00000000 which is 0x00, 0x00, 0x00 and 0x00 when represented as bytes.
Checksum of the record: 0x5B

:10D1DC0001030600001000000080000000000100A8 means:

Length of data: 0x10 bytes
Address to put data at: 0xD1DC + Base address set previously, in this case it was 0xA0000
Record type: 00 Meaning, its a Data record.
Data: 01030600001000000080000000000100 which is data that should be programmed from location 0xAD1DC
Checksum of the record: 0xA8

If we look at the addresses, we know what data is to be programmed from 0xAD1D0 to 0xAD1D3 which is 4 bytes. And we know, what data is to be programmed from 0xAD1DC to 0xAD1EC which is 16 bytes.
What should the memory between 0xAD1D4 to 0xAD1DB (both inclusive) which is 8 bytes be filled with? Is it 0xFF or 0x00?
I checked that these locations have no special significance and are not reserved locations as such.


texts:
I made an optocoupler by shrink tubing a generic photo resistor and a cold white led.

Then used it in the following setup to be able to control audio level to achieve tremolo effect:

simulate this circuit – Schematic created using CircuitLab

However with each LED blink a brief noisy crunch is heard. I have no idea, but it almost seems that photoresistor generates a small spike of current. Can this be true? Why does that happen and how can I prevent it?

Unfortunately I don't own an oscilloscope, so I can't confirm my theory


texts:
I want to place a DC motor on the driveshaft of a marine steam engine. Since i do not want to loose or add power to the drive but only having the motor there for backup reasons, i want to let the DC motor move without any magnetic resistance.

So the question is simple, how do i remove the magnetic resistance of the motor without adding more power.


texts: Is there a more optimized way of making an incrementer than a full adder?

texts: I'm designing a very simplistic microprocessor as a project to help learn VHDL. So I'm needing something to increment the 8 bit program counter. I will need to increment it by two. Is there a better (either faster or less logic required for equal speed) design than using an 8 bit full adder? I'm also interested for the same thing for if you only needed to increment the PC by 1.


texts: Different types of seal lead acid (SLA) battery chargers!

texts: I'm new here and want advice on battery chargers to buy for my 12v 18AH/20HR sla battery! I want to know if a 6v and 12v 1200 mAh battery charger could charge this battery and how long would I have to charge it for?! The charger does not have any light source indicating if it's on or off or when the battery if full either, is this good charger to buy?!


texts:
Is is possible to add color fill patterns to standard design layer colors in Altium Designer?   I can only find and use solid and transparent colors for all design layers, but cannot figure out if or how to give colors a fillstyle.

This example (taken from EAGLE ) shows a top metal pad (red) with solder mask over it ( grey with hatched pattern )      Is it possible to make design layers appear similarly hatched in Altium?


texts:
How do I convert 12vdc to 1.5vdc for flashing mini-lights on my HO Scale Railroad system?
The flasher will drive 2 alternately flashing bulbs (1.5 volts each)
The maximum output of flasher is 100mA @ 12vdc.


texts: I'm about to lay out a board that will connect to a 4 wire PT100 sensor. Are regular screw terminal block connectors OK or do I need something more specialist? I am mainly thinking about possible thermocouple effects and noise/shielding


texts: Step-up layout - Is important trace order?

texts:
I am adding step-up to my PCB and I wonder if I have to make trace order like in this design. I mean if input voltage has to go first through power inductor, then capacitor and finally step-up converter IC.

My design is following: Input (SW2_1) shares trace with IC (U4) then capacitor (C8) and power inductor
 (L1)

Schematic

EDIT: update layout (no silk)


texts:
I need to build a 250-350 MHz voltage controlled oscillator.

I have been checking out ring oscillators but they cannot reach these frequencies (max ~20 MHz).

Thus, I would like to know which are the usual designs for the range between 250-350 MHz. I suppose the best solution is a Colpitts oscillator, nevertheless I am not pretty sure if they are the only solution.

Some IC oscillator also would do the trick.


texts:
I'm getting started with LCD projects for Arduino, but for some reason, the LCD won't display characters.

I'm using this tutorial from the Arduino website, and this LCD with an Uno R3 board. This is the circuit diagram of my setup:

simulate this circuit – Schematic created using CircuitLab

I don't have any formal eduction in EE (yet), but I think that the issue may be that where the tutorial's diagram shows the LCD's first two pins as being Vss and Vcc, the actual pins on the LCD are marked Gnd and VDD, respectively.

The code I'm using is essentially the same as that provided on the tutorial page:

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}

It should display "hello, world!" on the LCD. However, when I power up the circuit, the display's backlight turns on, but no text appears. Around 3 seconds after powering up, all of the LCD's characters flash full white (the screen displays white-on-blue) for a fraction of a second, before returning to a blank, backlit screen indefinitely. Turning the potentiometer does nothing, although having it set to less than 10k ohms for any more than 5 seconds causes the chip underneath the display to overheat (I already burned out one display this way by setting the pot to about 5k ohms without noticing the damage being done).

Is this a common issue? Is there a solution, or an explanation for why this happens (a dud display)?


texts: What does Ethernet 100BASE-T signal look like?

texts: Hey guys what does the signal look like on the right of the transformer (T1) on the data lines {TXD_P, RXD_P}? Just trying to understand what it might look like...Is it a square wave? sine wave? Vmax? Vmin? Assuming a typical PoE signal from the PSE (48V).


texts:
I couldn't find for allpro obd uart if the RX pin should receive 3.3v or 5v from Arduino TX pin (since the Arduino will send 5v by default without voltage divider), so I was wondering if someone can help figuring that out.

I was looking datasheet for that microchip LCP15XX which is used on the board, and to me it looks it should be 3.3v but not 100% sure.


texts: Choosing Screw Terminals for connecting Arduino to other components

texts:
For connecting a 16 channel relay board to 16 devices running off 24VDC, and for connecting the relay board to Arduino, I am thinking of using screw terminals where one side of the terminals connect to the relay board's screw terminals, while the other side of the terminals connect to 24V devices.

Would using pairs of screw terminal block like the one shown here and the one shown here be suitable? 2 pairs of these blocks will connect Arduino to relay board, and 2 pairs will connect relay board to the devices they are controlling.

Would these be recommended for my use?


texts: STM32L152RE Schematic Verfication & Feedback

texts: I am making a custom PCB for an academic project. I will be grateful if somebody can verify the schematic I created for STM32L152RE and if I have made any mistakes. I will be using SWD to flash code to the STM32. The selected boot option is System Memory.


texts: Circuit works with BC557 PNP transistor, but not TIP32C?

texts:
I am high side switching a 5v collector with a 12v base.  On the emitter side is just an led and 10k ohm resistor to ground.  The base resistor was 1k ohm.

This circuit works just as I expected it with a BC557 PNP transistor, (when 12v base is removed led goes off, with 12v base applied led is on @ 5v) but as my intended load will have a current of 2A or so I need to use the tip32c instead.  Problem is, I have no voltage at all on the emitter pin when I try it. I've checked the pinout multiple times (EBC on bc557 and BCE on TIP32C) but it seems that not the issue.  I've also experiment with every combination of pinout.  I guess what's left is the base resistor, but does that need to be varied with the transistor?

Thanks


texts: What is this translucent heat-resistant insulation?

texts: On the picture from this question, what is the translucent insulation on the transformer center-tap made from? It looks like polyethylene, but it obviously isn't because PE would melt at soldering temperatures.


texts: Will the MOSFET survive with this negative gate voltage?

texts:
With this MOSFET the circuit's input is shown below and a function generator will be the input signal to turn on or off. I wonder if some one accidentally applies negative voltage like -10V to the gate would the MOSFET gets damaged?:

I couldn't infer this from the datasheet specs.


texts:
I want to determine the input pattern for the worst case tpHL of this CMOS gate.
I think there may be more than one input pattern that give worst case tpHL.
The following is my reasoning:
The petterns: 0010>0111, 1010>0111,0000>0111 and any other pattern where the initial state has D=0 (and final state 0111 or 1011), give worst case tpHL, as in these cases the 2 internal node capacitances (in red) are charged initially and need to be discharged in addition to load capacitance (in blue).
Is this reasoning correct or is there a difference in delay between all these input patterns that I'm not accounting for?


texts:
I want to create a power switch (on/off) for a hot-swap plug-in module that connects to my (future) PCB.

Got a MCU on board and a single 3.3V supply, fed from AA batteries with through a DC/DC, this is the supply VCC I also want to switch to the plug-in module.
I went with a P-channel MOSFET so I can do high-side switching ('cutting' the VCC instead of the return ground to the module).

Question is: which P-MOSFET I should choose that will allow working with such a low voltage on the Vgs side?
and also - will I need a BJT for 'pushing' the gate or I can connect the gate of the PMOS directly to the MCU logic IO pins?

Notes:
1. I am on a budget since this card will be going to mass-production so I need the lowest component count possible + cheapest & smallest possible parts.
2. I won't be needing more than 200mA fed to the plug-in module.

Your help is much appreciated.
Thanks


texts: Difference between Hirose U.FL and IPEX connectors

texts:
Both these connectors are used to connect antenna to Mini PCI cards.

Wikipedia does not explain the difference between those naming issues:

  U.FL, IPEX, IPAX, IPX,[1] AMC, MHF and UMCC is a miniature RF connector for high-frequency signals up to 6 GHz manufactured by Hirose Electric Group[2] and others. https://en.wikipedia.org/wiki/Hirose_U.FL

An acquaintance told me it's just a difference in the brand name. IPEX connectors are a bit cheaper and easier to obtain than U.FL (at least in China, it seems). Is it true? I cannot find any relevant information on the net or in the relevant datasheets.

Thanks.


texts: Pointers to Beginners (Robotics as Hobby)

texts:
I am interested in taking up robotics as a hobby. I am somewhat familiar with programming (not very advanced) and would like to get some pointers to recommended books / robotic kits that will help me get started. Something that is not too esoteric. I can hopefully get to that level later!

Specifically I am more interested in using WiFi for communications (as opposed to Bluetooth).

I did purchase Lego Mindstorm recently....but looking for additional resources.

Thanks!


texts:
There are some integrated circuits which output only digital value 0 or 1 regardless of the input for example:

simulate this circuit – Schematic created using CircuitLab

This outputs 1 regardless of the input. Where do we use them?


texts: Transferring data from FPGA to PC (new to FPGAs)

texts:
FPGA beginner here.

I have a Basys2 FPGA board(i code in verilog) and i wish to make it communicate with my PC. Currently it receives data from a slave device and stores it in an 64 bit register. However i want to send this data to my computer for processing, and process it in matlab.

I have done some research. It seems like i can either use EPP API of digilent or just use UART communication.[: seems like this is out of option now, since i don't have access to a UART translator]. However i can't find any explanatory enough examples about any of the methods. Existing examples seem to have a bunch of code "that just works". But lack of explanation makes me unable to adapt it for my

For example there is DeppGetReg(HIF hif, BYTE bAddr, BYTE* pbData, BOOL fOverlap) function on the API but i don't know what to input(specificly the address) to provide to it to read values from FPGA.Only document i could find was in this link. I am clueless on UART too.

Here are the available I/O ports of FPGA. The only USB port is used for programming the FPGA, not sure if i can also have communication via that port.

I would appreciate if you can give any ideas on where to start considering my FPGA board. Thanks in advance.


texts: How to provide external power supply for 8 servo motors?

texts:
When ever I switch on the power supply there is not enough power supply to servo motors. Voltage across each servo motor is 1.5 Volts only. Should the circuit must be changed?
Is there any better way of circuit design?


texts: AVRDUDE: Write EEPROM bytes without file

texts:
Is it possible to write EEPROM bytes via AVRDUDE and an AVRISP mkII directly from the command line without needing an EEPROM file read from another chip? Kind of like how you can specify the fuse bytes directly at the command line.

I need to be able to change a single byte of the EEPROM but would rather not mess with a file.


texts: I am not able to edit existing LTspice directives; I always need to create new

texts:
Once I place the directive command I will not be able to edit it -Rarely I will be-. So I always make a new directive when I need to edit the already existing ones.

I have re-installed LTspice, with no results plus it seems I cannot find any similar problem online. A colleague told me that he had a similar problem that is now fixed (somehow?). So I hope someone has encountered and solved the same problem.


texts:
I began working with Ethernet controllers and there is a recurring theme that keeps confusing me.

Currently I am incorporating the KSZ9031RNX into my design. The data sheet calls for digital and analog voltage supplies. My first thought is that I will need to incorporate a DAC in my PM circuitry.

However, when looking at the reference design for said chip, I notice that both supplies  come from the same DC source, only to be separated by a FB. So does this mean the IC is taking care of the digital to analog conversion? I am just trying to understand this so I can move on.Thanks in advance.


texts: How to test bench the seven segment correctly using ghdl?

texts:
I am trying to make a working test bench to this 7 segment, i am a student so i don't know a lot about vhdl, i was asked to do this task.
library ieee;
use ieee.std_logic_1164.all;

entity seg is
   Port (
   A,B,C,D : in std_logic;
   a_1,b_1,c_1,d_1,e_1,f_1,g_1 : out std_logic
   );
end seg;

architecture my_first_arch of seg is
begin
   a_1 <= A OR C OR (B AND D) OR (NOT B AND NOT D);
   b_1 <= (NOT B) OR (NOT C AND NOT D) OR (C AND D);
   c_1 <= B OR (NOT C) OR D;
   d_1 <= (NOT B AND NOT D) OR (C AND NOT D) OR (B AND NOT C AND D) OR (NOT B AND C) OR A;
   e_1 <= (NOT B AND NOT D) OR (C AND NOT D);
   f_1 <= A OR (NOT C AND NOT D) OR (B AND NOT C) OR (B AND NOT D);
   g_1 <= A OR (B AND NOT C) OR ( NOT B AND C) OR (C AND NOT D);
end my_first_arch;

i tried to do it like this, since i only know some of the basics
 LIBRARY ieee;
 USE ieee.std_logic_1164.all;

 -- note that the name of the entity must be the name of the test bench
 ENTITY seg_tb IS
 END seg_tb;

 ARCHITECTURE test OF seg_tb IS

 COMPONENT bcd_segment_comp
    Port (
        A,B,C,D : in std_logic;
        a_1, b_1, c_1, d_1, e_1, f_1, g_1 : out std_logic
    );
 END COMPONENT;

 --input signals
 signal A,B,C,D : std_logic;

 --output signals
 signal a_1, b_1, c_1, d_1, e_1, f_1, g_1 : std_logic;

 BEGIN

 s_segment_sim : bcd_segment_comp port map (
    A => A,
    B => B,
    C => C,
    D => D,
    a_1 => a_1,
    b_1 => b_1,
    c_1 => c_1,
    d_1 => d_1,
    e_1 => e_1,
    f_1 => f_1,
    g_1 => g_1
);

-- The actual test
-- To make eveything sequential
process begin
--give inputs unknown signals and wait for some time
    --A <= 'x';
    --B <= 'x';
    --C <= 'x';
    --D <= 'x';

    --wait for 100ns;

    --now testing all the inputs , woah that's gonna take a while

    -- 0000
    A <= '0';
    B <= '0';
    C <= '0';
    D <= '0';
    wait for 100 ns;

    --0001
    A <= '0';
    B <= '0';
    C <= '0';
    D <= '1';
    wait for 100 ns;

    --0010
    A <= '0';
    B <= '0';
    C <= '1';
    D <= '0';
    wait for 100 ns;

    --0011
    A <= '0';
    B <= '0';
    C <= '1';
    D <= '1';
    wait for 100 ns;

    --0100
    A <= '0';
    B <= '1';
    C <= '0';
    D <= '0';
    wait for 100 ns;

    --0101
    A <= '0';
    B <= '1';
    C <= '0';
    D <= '1';
    wait for 100 ns;

    --0110
    A <= '0';
    B <= '1';
    C <= '1';
    D <= '0';
    wait for 100 ns;

    --0111
    A <= '0';
    B <= '1';
    C <= '1';
    D <= '1';
    wait for 100 ns;

    --1000
    A <= '1';
    B <= '0';
    C <= '0';
    D <= '0';
    wait for 100 ns;

    --1001
    A <= '1';
    B <= '0';
    C <= '0';
    D <= '1';
    wait for 100 ns;

  --end of test
    assert false report "reached end of test";
    wait;

   end process;

end test;

for some reasons i don't get any output, i am testing using ghdl and for simulation i use gtkwave as i use linux.


texts: Is there a way to check if one or some of multiple lines is broken?

texts:
There is a product whose soldering process is often unreliable, and it has more than 50 I/O interfaces.
Some of them should be shorted, and some are independent.

I used to test it by a multimeter to see if there is any soldering problem like broken or shorted incorrectly. Nowadays we want to test it automatically and I thought it was easy. So at first I just design a board with a MCU with its GPIOs connecting to the board to be measured, and I pulled up one of it and check others were high or low to know they were shorted or broken.

However that didn't work, I noticed there are different kinds of components between them, including resistance, capacitance and diode. So I think I have to build many small multimeter into my board, which means I need lots of components on that board, since there are 50 or more I/O and more permutations, that's unacceptable for me.

I want to ask is there a way to test all of it Fast and accurate? Thanks a lot.


texts: Understanding the trancitor (transfer capacitor)

texts:
In one of my lecture class, one of my electronics professor told a little about a new technology called "trancitor" and told it is opposite of transistor.

He asks us to learn more about it on our own. When I googled it, it just shows that I have mistyped "transistor".

Was my professor wrong? If not any information regarding this would be great.

Edit: I found this report regarding this topic.

Thanks for the help....


texts:
I am running a battery powered device, and would like my microcontroller (PIC) to report on the supply voltage.

This is so I can determine how many batteries is used in the supply, and also the state of charge of the battery pack.

Supply voltage ranges from 4xD (either 1.2V nominal NiMH or 1.5V Alkalines making about 6V) to 12xAA (1.2V NiMH for 14.4V or 1.5V Alkaline for 18V).

My PIC is running off a regulated 5V supply.

I plan to use one of the ADC ports to measure the voltage, and therefore believe I should map the 18V f.s.d. to the range 0-5V, so roughly I'd need to divide the input voltage by 3.

I've heard of using a resistor voltage divider, but know that it can be wasteful in terms of energy consumed.

Wondering if there is a better way to achieve this voltage division without too much energy loss/wastage?

Thanks.


texts: Creating a raising edge to wake up the micro controller

texts:
Need help in understanding the following circuit.

The documentation says the STM32 micro controller can be woken up by a raising edge. My interpretation is that the pull up resistor connected between the 3.3V and the wakeup pin will pull the wakeup pin high on power on. But I am not able to understand the use of the second resistor between the wake up pin and the ground.


texts: 3 terminal 5V high side load switch with 3.3V control

texts:
So I wasn't thinking very hard when I designed a circuit to selectively power the analog portion of my design and ended up with this:

simulate this circuit – Schematic created using CircuitLab

So I have a SOT-23 on the board where the FET is, with no place for a resistor on the gate/base terminal. A normal enhancement mode N-channel FET would not work here, since there is no way to bootstrap the gate. Alternatively, a P-channel FET would not work, since there would be no way to turn off the FET because the microcontroller can't drive the gate close enough to 5V.

I thought about using a BJT, but there is no space on the PCB for a base resistor. Is there any part that would fit into a SOT-23 footprint that acts as a load switch in this situation (I can mess with the pin settings on the GPIO pin from the microcontroller).

The uC is a LPC4337 with programmable pull-up and pull-down resistors. The (short circuit) drive current is 87mA source and 77mA sink. The pull down current is 93uA and the pullup current is -62uA.

The analog load is fairly complex to characterize, but it consists of a IBIS4-14000C image sensor 53mA peak @ 3.3V and 2 * WM8216 video ADCs with 118mA peak @ 3.3V each. The 3.3V is supplied through a dedicated LDO for the analog portion, and the peak current is about 300mA. The highest voltage requirement is the V_reset for the sensor, which needs 4V supplied from the 5V switched analog regulated down to 4.0V through a TPS76301 LDO (300 mV dropout voltage). Therefore, the switched analog supply should not drop below 4.3V. The other voltages have negligible current.


texts: Does the op-amp integrator drift error due to offset voltage and bias currents depend on the configuration inverting or non-inverting?

texts:
I have made the following two circuits to check for integrator drift errors in LTSPICE.
I have grounded both inputs, so that only the offset voltage and bias currents are integrated. I expect ramps as outputs. But the outputs I get for inverting integrator has a very high slope and a non-inverting one has a lower slope. Why should that happen?


texts:
I write a simple software implementation of UART for my ATtiny. My CPU isn't fast, so I should choose low baudrate. Nevertheless I want to use as high baudrate as possible. And I can estimate the inaccuracy of a baudrate in the my implementation.

What is the maximum possible relative inaccuracy of a RS-232 baudrate for correct communication with other devices? Does the RS-232 standard define it?


texts: so currently I am trying to achieve a working electromagnet that will be powered by an AVR microcontroller and will be turned on and of when metal is sensed. Currently I have LED reflecting and sensing the block which passing through the photo diode and tells the AVR when to turn on the electromagnet. My problem is with the electromagnet. I have made my own and currently I need to put 9V through it with 0.5Amps. Now I know I cna use a mosfet as a switch to turn it on and off however I am not sure how to work out the values for the resistors in the circuit. I will be using a similar circuit to the one shown on this page http://www.embeddedrelated.com/showarticle/77.php. However I am unsure how to develope the resistor values I would need to ensure my magnet works correctly. Any help?


texts:
I think I'm mixed up a bit in NVIC of stm32 MCUs. I took a look in the SPI.h of the STM32F10x standard peripheral library. I don't know that why while there is SPI_I2S_IT_RXNE for checking the status of recieved buffer we have SPI_I2S_FLAG_RXNE flag for this porpuse?

look:


texts: What type of omni-directional antennas is used at an LTE base station, also known as eNode? and What is the orientation of such antennas? and how come the 3GPP path-loss model for such antennas is independent of orientation? (The path-loss model is: \$128+37.6\log_{10}(d/1000)\$ where \$d\$ is the distance from antenna in meters.)


texts: Electronically, how to control this 5v arduino-style relay board from a PC serial port

texts:
I have the following relay board (pictured below), and to activate any of the relays, you simply connect one of the IN1-IN8 pins to ground.  Easy.  The current going between gnd and INx is negligible, because of the transistors already on the board, so the current going through the serial port of the PC is not an issue.

How can I electronically use the serial port to to activate a relay on this board?  I'm not concerned about the software aspect of it.  The standard serial port has DTR and RTS (pin 4 and 7) that can be set high or low through software.  I believe that "high" on a serial port is -3 to -25 volts and "low" on a serial port is +3 to +25 volts.

Is there some easy way to use that to set IN1 to GND?  Look at the schematic below, and see if there is an easy way to accomplish this:

By the way, VCC and JD-VCC are connected together with the jumper, I'm not doing high voltage or concerned about isolation.


texts: Am I able to increase the current without also increasing the voltage?

texts:
Right now I have a bunch of motors (in blue on the diagram) that I believe are connected all in parallel. I tried hooking them up to the Arduino (3.3V-red and GND-black), but can't seem to get the motors to run. I think it might be a current issue but am not completely sure. The motors can only take 3.3V and I think they need a minimum of 230mA to run (I attached a picture of the motor information if needed). Is there a way that I can increase how much current that I am putting into the circuit? Or is there another issue aside from current that is preventing the motors from running? I was thinking about using capacitors but don't know how to include them in the circuitry. I'd prefer to keep the configuration in parallel for the practical purpose of the rest of the motors working if one decides not to.

Any help would be greatly appreciated! Please also let me know if you need more background information!


texts: Eagle: Autoroute only gnd and vcc net with using only vias

texts:
I'm struggling to get the Eagle Autorouter (Eagle 7.6) to route only the VCC (layer 2) and GND (layer 15) layer on a 4 layer board. I have created a net class for VCC and GND. Now I would like to have a separate "routing pass" for GND and for VCC.

What I want it to do is just add vias on all GND and VCC pads to the respective layer and don't create traces where possible (only for through hole components f.e.). E.g. use the shortest path to the respective layer instead of drawing and connecting traces to the PSU.

I tried setting the cost of all layer but the GND or VCC layer to 99 and the cost of vias to 0 but I always end up with all signals routed, not just the GND signals.

How do I accomplish this?


texts: Why do most rotary potentiometers have an opening?

texts: Is this opening not a bad thing because dust can get in? I'm thinking about putting a piece of tape on it.


texts: Why is the dB of the FFT plots exceeding 96dB for these signals sampled by an 16 bit ADC

texts:
There is a 16-bit data acquisition board and below is the recording of 120 seconds of voltage input at 500Hz sampling rate. The blue plot corresponds to the input voltage Vin and the green plot output voltage Vout is after 6Hz digital filter in time series:

And here below is the FFT of both input and output signals:

Basically I used the following code in Python to obtain the FFT plots:

plt.figure()
y = v_in
T = 1/sampling_rate
N = len(y)
yf = scipy.fftpack.fft(y)
xf = np.linspace(0.0, 1.0/(2.0*T), N//2)
amplitude = 2.0/N * np.abs(yf[:N//2])
pow = (N/sampling_rate)*amplitude*amplitude/2
plt.semilogx(xf, 20*np.log10(amplitude),'-b',  label="$Vin$")

y = v_out
T = 1/sampling_rate
N = len(y)
yf = scipy.fftpack.fft(y)
xf = np.linspace(0.0, 1.0/(2.0*T), N//2)
amplitude = 2.0/N * np.abs(yf[:N//2])
pow = (N/sampling_rate)*amplitude*amplitude/2
plt.semilogx(xf, 20*np.log10(amplitude), '-g',  label="$Vout$")
plt.legend(loc='upper right')

Here is my question:

The dynamic range of a 16 bit system is 96dB. This means max to min power ratio is 96dB or min to max ratio is -96dB.

How come then in my plots the 96dB is exceeded? I tried to figure out but couldn't find the reason.


texts: Help setting up a solar power system for a lake fountain

texts: I am trying to set up a fountain that will run off grid. I want to use a 100w solar power system to charge a deep cycle 12v battery. I am looking at a 120v 4.8 amp water pump. It will be ran 100 ft from the solar panel system. My question is how long will the pump run, how will it take the 100w solar panel to charge the battery, and how low should I let the battery get before I charge it. I plan on setting a 24h timer to run the pump in intervals of x hrs then letting it charge x hrs and repeating. Hoping to run 3-4 hours in the morning then again in the evening, (something like 5-9 then 2-6). Thanks for any help


texts: Finding a cheaper implementation for XNOR logic gate

texts:
I'm looking for ways to simplify a configuration in which the output of an AND gate flows into an XNOR gate along with a third variable.

The function of such a configuration is as follows;

f(a,b,c) = (a*b) XNOR c

Using boolean algebra, how would you write that expression out so that it could be easily simplified?

A schematic is pasted in below;

Cheers


texts: Help me to build some devices for measuring LEDs optical power[mW] with range (1 -100)mW included

texts:
I have an application of photoactivation device with 10-20 LEDs for every color;  with the following wavelengths : red 630-670nm ;yellow 575-595nm , green 510-540nm .
 In order to obtain an  uniform light I have to use diffuser-placed at certain distance, so the optical power from data sheet will be changed. So I need to build or buy (under 80 dollars) a device for measuring optical power [mW] of LEDs .
 I hope this will be quite simple question, I hope to obtain a real help this time.


texts: How do i solder qfn package using soldering iron?

texts: I don't have any soldering station but I need to solder the qfn package chip so how I solder it using a normal soldering iron.


texts: Altium Designer: ways to split schematic into several sheets

texts:
I just moved from KiCAD to Altium. For some reasons the schematic I was able to put on the single sheet in KiCAD spreaded into 4-5 sheets in Altium.

However this can be useful as I can put functional blocks into different sheets making the schematic more readable.

So what I intend is to have one PCB and several schematic sheets. Connections between sheets should be done via ports (Place -> Port).

However as I tried to transfer components and the netlist into PCB and I saw the window telling me that only one schematic sheet will be updated (while I have 4):

As I know I should make a top-level schematic sheet with a blocks representing the low-level schematic sheets (hierarchical schematic). It can be very useful for a big projects but for now (remember, I could put all schematic on the single A4 schematic sheet in KiCAD?) I'd prefer something easier.

In a tutorial video was mentioned that there is a "flat design" way. But I wasn't able to find any info how to implement this.

Actually I'd like to have only several sheets with no top level. Is it possible?


texts: Shielding not connected to USB connector causes tablet restarts

texts:
I have a custom USB cable, USB type A male on one end and a DB-9 connector on the other end (only using 4 pins). The shielding of the cable is connected to the USB connector but not the DB-9 connector, and when connected to a tablet (using the reverse cable DB-9 to MicroUSB), it causes the tablet to restart (but only if the computer used to connect is changed, plugging it back into the same computer has no effect).

After connecting the shielding to the DB-9, everything works fine. Any idea as to what could be causing the restarts?


texts:
I have a pipelined system that outputs serial samples on port A:

b0 b1 b2 b3 b4 b5 b6 ....

On the port B I want to have this, at the same time of port A:

b1 b2 b3 b4 b5 b6...

Practically the outputs are these:

A -> b0 b1 b2 b3 b4...

B -> b1 b2 b3 b4 b5...

How can I obtain this behavior without interruptions and holes between samples? I thought to using an async dual port RAM but I'm not sure..Maybe a dual edge register? Is these some way to use just one clock?

Thank you


texts: Switching between power sources- when getting to current threshold

texts:
I would like to switch between the two power sources- solar panel and battery.
In order to avoid the Raspberry Pi restarting \ damaging (when fed from solar panel), I though of making the switching this way:

if the current to the MOSFET's gate is lower than 100mA:MOSFET off (Pi will get current from battery)
if the current to the MOSFET's gate is bigger than 100mA:MOSFET on (Pi will get current from solar panel)

I made some reading about Ina219 current sensor but I think its not a good solution because when I will stop the current after the sensing, there is no way to bring it back- the sensor will have to sense more that 100mA and currently the solar panel is disconnected. so this solution, in this case, is only for detach the solar panel from the load :)
Ill be happy for ideas of making that switching so ~100mA is the threshold.
EDIT
This is the updated circuit
when the solar panel will produce ~0v, the MOSFET will be 'on' and th RPI will get current from the battery
My concern is if I need to worry about under voltage when the solar panel produces ~1v\2v. the RPI will not get current from the rechargeable battery..
This circuit is good for source (solar panel) connected or not connected. if I replace the solar panel with stable DC source, this circuit is good solution I guess. but in solar panel case, the voltage can be vary and too low for the RPI.
And the question is- I guess there is a need with controlling the MOSFET when the solar panel produces low voltage. ill be happy for a solution \ idea for that problem.
Thanks again


texts:
So we are given the equation:

Vout=Rf/Rs(V2-V1)

I'm just wondering how would we solve it when the Rf/Rs are different values like they are in this circuit:

simulate this circuit – Schematic created using CircuitLab

Would we just use nodal analysis after the 5V source @ Va?

So then formula would be:
Vout=(36k/12k)(Va-10V)?


texts: How do you build a machine in a solid block?

texts:
I'm aware that a number of mass produced electronics are embedded in a solid thermal resin of some form.

How reasonable is that for the home hacker?
What materials are used?
How do you do it?
Are there resources and examples available on the topic?
What are the pros and cons of such a project?


texts: Small lock actuator controlled by single lipo

texts:
I am working on a project, in which I have a small box, in which I need it to be locked from the inside. It will have a panel on the front to enter in a code to open it. It needs to be very small, with a small battery.

I was thinking of using a solenoid to have the pin extend, and go through a circular latch to keep it shut. I have seen that even the small solenoids draw a lot of current and am unsure if there is a better way.

I have also seen just linear actuators, driven by a servo/motor, but they seem quite weak for this.

It doesn't need to be really secure, it just needs to keep it shut and prevent easy opening of it. I also would like it to be powered by a single LiPo cell, as that makes it easier for the charging circuitry.

Thanks


texts: Can anybody please guide procedure to setup tool-chain for MSP430 in Linux (particularly Ubuntu)? I am using MSP430 launchpad (MSP-EXP430G2), and I need to setup compiler/build tools and debugger drivers.


texts: I would like to know how can I change power supply to my microcontroller in the case of power cut so I can use battery instead all this be done automatically?


texts:
I've lost touch with electronics. I used to be an electronics hobbyist in my childhood.

I have some old small hobby project circuits, which I want to repair. One of which is a remote-operated garage gate. It has many (8) old electro-mechanical relays which are dead. What should I replace them with? I just read on wikipedia about the new solid-state relays, are they costly? Are they available?


texts: How to transmit data from an analog multiplexer to an RS232 COM port on a PC

texts:
I am having trouble understanding how to design a circuit that will transmit multiple analog data signals to a computer through one RS232 COM port.

The analog data is a simple voltage reading from 12 different LEDs. The LEDs are triggered by relays that are controlled with software from the same computer that I will use to monitor the LEDs. Other software will be developed to read which LEDs have been triggered and if they are operating within a specified voltage range. For now I am just trying to understand the hardware aspect of transferring 12 analog signals through a single COM port.

My understanding is that an analog multiplexer can be used to combine the voltage signals and transmit them to the computer's com port through a voltage converter/serial interface like the MAX232. Is this possible without using a microcontroller chip? If not, what chip should I use to perform this task? I am trying to avoid using a microprocessor in the interest of keeping things as simple as possible.

Ultimately, I am looking for the simplest way to transmit multiple analog signals through a single COM port on a PC. Thanks in advance.


texts:
Fundamentally, a BJT is a very thin layer of P (or N) type semiconductor sandwiched between two thicker layers of N (respectively P) type semiconductor. There's nothing intrinsic to that design that would indicate the collector and the emitter have to be physically distinct. Is it possible to make a symmetric BJT, that can operate identically in forward and reverse mode? If so, are any manufactured on a commercial scale?

I understand that making a transistor symmetric would necessarily sacrifice some desirable traits. I don't understand why, or which traits (probably β at least), though; I just know that if there weren't advantages to making them asymmetric, they wouldn't be made asymmetric.


texts: Charging a Li-Ion Battery for Electric Scooter

texts:
I am trying to stimulate a Li-Ion battery charger for an an electric scooter. Here is a diagram of my circuit in LTSpice:

The topmost circuit is the oscillator. It creates a 0V to 12V square wave with 10 kHz frequency. The npn transistor here (2N3904) is the "inverter", i.e it shifts the square wave 180 degrees. Although this "new" signal is a bit distorted I found that it created the largest DC voltage (V_DC node). Here is a diagram of these two signals, which are responsible for switching the transistors in the circuit on the bottom left.

The circuit in the bottom left is the DC to AC converter and the one in the bottom center is the AC to DC converter. In between is the transformer. The DC to AC converter is located inside the charging station while the AC to DC converter is located inside the scooter. The transformer "exchanges" voltage from the station to the scooter. When I exclude the circuit on the bottom right, the waveforms are:

The circuit in the bottom right is my attempt at a shut off circuit / low voltage protection circuit. As a lithium battery charges up its terminal voltage increases.  When the battery reaches its capacity then the terminal voltage will fall at a slight rate as forward current is still being applied.  There are sense circuits out there that will detect this change in voltage rate from increasing to decreasing. This is what I was trying to make here and I am not sure if I succeeded. Here are the output voltage and current waveforms. Here, the 500 microFarad capacitor represents the battery:

Have I succeeded in creating such a shut off / low voltage protection circuit here? If not, what is "wrong" about by outputs and what should I expect? Additional, what circuits can I use to create such a circuit? Finally, can anyone provide a 12Volt Li-Ion battery LTSpice model, like a .lib or .txt file (I tried looking online but couldn't find any)?


texts: Is here a node missing when using the node voltage method?

texts:
I am currently learning the Node voltage method to get a better know how about circuits. Let's say you have the following circuit:

This is the workout example with all the nodes. IMHO, I disagree, I think there is one node missing and the circuit should be as follows:

I thought that the definition of a branch was that it could only contain 1 and only 1 element (doesn't matter what element it is). When using the first circuit the current source I5 and the resistor R4 would be in the same branch, right?

Question: Then why is this the final answer? Am I missing something? Is it wrong to add N3?


texts: What are different ways of remote communication two circuits?

texts:
I am doing a project which requires remote communication between a microcontroller and a circuit containing 2 stepper motors. I am using a PIC24FJ32MC101 because that's what I had laying around the house when I started. The project requires communication over a distance of about 6 inches where line of sight is not possible. The data transferred will be controlling stepper motors so the speed at which the data is transferred is not important. The connection should be able to be preprogrammed and does not require any pairing or connection setup such as Bluetooth does when powering on.

I am just starting out and I am getting overwhelmed by all the terminology such as UART, I2C, Bluetooth, Wifi, RF, infrared and many more. I am a little unclear which one of these are protocols and which are methods of remote communication such as RF and infrared.

For example, I think UART, I2C and Bluetooth are protocols but Bluetooth is also only wireless and UART can be both. So if I choose to use Bluetooth, do I have to also choose a data protocol like UART or I2C? If I choose RF chips do they require the same handshaking that Bluetooth does? That wouldn't really work for this application.

I also know that Infrared and RF are physical methods of data transfer but are there any more I should consider? Are there any popular chips that I should consider using with lots of documentation and tutorials?

I tried reading a lot online but felt more confused the more I dove in. If there is any good simplified reading of the overall problem of remote comm I would be glad to check it out.

Thank you for any help!

Edit: The communication needs to be wireless and is only 1 way. I was trying to get away without any processing on the receiving side but it is not an issue if a microcontroller is required there also. The transmitting side has a PIC24 as stated above.


texts:
I want to apply a bandpass filter on my IR receiver. The signal generated on the IR receiver is a square wave so I was thinking of applying a Bessel filter on it. For unity gain, the Q value is 0.5 according to this online source and the frequency response looks like a Bessel filter. So it would be helpful if I get some clarification.
Does unity gain Sallen-Key filter fulfill Bessel filter approximation?


texts: Creating logic gate for minimum comparison

texts:
Is there any way to create a (simple) logic gate to compare two integers which are stored in a temporary register?

Edit: It's okay for just one-digit long integers.


texts: DC/DC converter with 12 outputs, low noise?

texts:
I need to 5V to 5V. It might seem surprising but let me expain. I need to convert a voltage of 5V with 60mV ripple (coming from a PSU doing 120V AC to 5V DC) to say 5V with low ripple.

I'm however struggling to know how I would achieve that at a decent cost. I thought about doing a flyback boost converter to have 5V->6V and then having a LDO on each input subcircuit. I would need to reproduce this x12 times, so the cost would be steep for 12 flybacks ICs + 12 transformers + 12 LDOs.

Given the 12 supplies I must make must all be isolated from one another, the current consumption would be about 20mA per supply, the ripple must be very low, would you have suggestions on how to do this without breaking the bank too much?

Is it possible to have a single flyback IC with 12 outputs? Something like that?

More details for those who would ask questions on why I need this:
I have to make 6 input subcircuits for current sensing and 6 for voltage sensing.

The total of 12 inputs must be isolated.

All this is done using a 12 TI AMC1301 isolation amplifiers to either sense the current accross a shunt or the voltage accross a step-down transformer.

Since the AMC1301 is an isolation transformer it's fully differential and necessitates two supplies. It takes about 20 mA from each supply voltage.

I need 12 so it's about 240mA of current consumption. I'm mainly worried about the isolated side (the non isolated side can share the same supply.)

EDIT: I need about 2800VDC isolation for 1 minute.


texts: Verilog assign breaks the synthesis using Icestorm

texts:
well, i have this code that is giving a warning "Warning: No clocks found in design", and the FPGA is not doing nothing after flash:
module syncRX(clk, signal, detect);
    input clk, signal;
    output reg [7:0] detect = 0;
    reg [7:0] detect_sig = 0;

    always @(posedge signal)
     begin
        detect_sig <= detect_sig + 1;
     end
    assign detect = detect_sig;

endmodule // top

Seams the problem in the "assign" because with this modification works good:
module syncRX(clk, signal, detect);
    input clk, signal;
    output reg [7:0] detect = 0;
    //reg [7:0] detect_sig = 0;

    always @(posedge signal)
     begin
        detect <= detect + 1;
     end
    //assign detect = detect_sig;

endmodule // top

Anyone knows what is wrong in the first version?
Thanks!


texts:
My goal is to have an accurate measurement of the current temperature in my room, which I will use for a thermostat.
The problem I have is I bought this breakout board and soldered it to about 5cm long cables and I get too high temperature values (and not only offset, but in a range of about 1.5 degrees Celsius and nonlinear over the range I saw).

Using a laser thermometer I can see that the board is at 22 degC, while the room is at 20 degC. As a host processor I use a Raspberry Pi zero w, which I put a box on top, so it wouldn't distract the measurement.

Is there any reason, why I can't measure the actual room temperature? How is this done in 5$ cheap thermo-stations? They don't have to use extremely long cables or such an extreme isolation, do they?

So the setup looks as follows: I have used a laser thermometer, a cheap thermometer station and the sensor, all measuring right next to each other. If i measure the floor I get good understanding of laser+station, but the sensor breakout board is 1 degC higher than what the other two devices measure.


texts: Digital insulation meter measurement limits

texts:
A Meggar digital insulation meter user manual warns:

  "When using 500 V measurement to measure resistance less than 1.5 MΩ or 1000 V to measure resistance less than 5 MΩ, measurement time must not exceed 10 seconds."

The problem is that i need to make measurement beyond the 10 seconds - a measurement of 60 seconds and more.

I assume that when the measured resistance is less than 1.5 MΩ for 500 V and less than 5 MΩ for 1000 V, I might be able to exceed the 10 seconds, but how many seconds/minutes can
I make the measurement according to the measured resistance?
For instance, if i measured 10 MΩ with 500 V, can I make the measurement for 60 seconds, 3 minutes etc.? Is there a rule of thumb for this situation?


texts:
I am working with a homemade material. I can harvest a power from this system. Thus a load, plugged to short cut my material, is crossed by a current. I would like to really harvest this power, it means to keep it and use it when i want. Is a charge pump circuit a good system ? What kind of easy circuit can I use ?

Thanks, I am a chemist....


texts: What is the name of a fuse with a half spring?

texts:
I have an Atari 400/800 Power Supply that the fuse blew. I've pulled the fuse out, it's a 5A/250VAC fuse, but I've been unable to find a direct replacement, as I don't know the exact name for this fuse type.  It appears to be a slow blow, but with a half spring.  I plan on modifying the supply and adding a fuse holder instead of direct soldering in a replacement.

There is another thread that mentions this type, but I don't have enough reputation to comment and ask a follow up, so I've made this question here.
Harry mentions this fuse type as the second type in his post here:
Slow Blow vs Fast Acting Fuse


texts:
I'm soldering some cables on a PCB. They are are stranded, so I've first apply a bit of soldering on them and then solder them on my pcb.

The problem is, there's on some a bit of exposed copper on the basis (1 or 2 mm) and they are soldered really close.

For now I don't have any short but it's still dangerous as they can move and ends in a position where the 1-2mm exposed of two can touch.

My idea was to use hot glue on the base of the wire to isolate them and avoid the possibility of shorts.

Do you think it's a good idea or I should do something else ? Perhap's a soldering technic that could allow me to get better results ?

(I was thinking something like, apply the solder on the pcb without the wire, then reflow the solder with the soldering station and, while the solder is hot and liquid, put the wire)


texts:
I'm trying to read a PWM Signal.
I thought I could use a Voltage Divider and a ADC on MCU to "read" the PWM Input.
My PWM Signal is a 12V (13.8V Car Board Net) 100Hz Signal with a Duty of 90% or 10%
I attached the Voltage Divider.
If the Duty is on 90% the read value is mostly 4096 but flashes with 0 every few sec.
If the Duty is on 0% the read value is mostly 0 but flashes with 4096 every few sec.
For my project I just need to know if the Duty is on 10 or on 90% but with the flashes beween the readings I can't use it like now.


texts: I am a newbie in LTspice so the question can be seemed to be bit stupid, but I have build an LNA and now I want to calculate the noise figure of the system. I have run the .noise statement to calculate the noise density but is stuck with how to calculate the noise figure of the system. Can anyone help me out with that?


texts:
I'm trying to build a homemade electromagnet to show my son. I took speaker wire and wrapped it around a stick maybe about 40 times. Then I used a C cell battery to power it, however I saw no magnetic effect when I exposed it to some screws.

Questions:

Is a C cell battery not enough power for this?
Is speaker wire okay for this kind of application, or should I use magnet wire?
Should I get longer wire to have more coils?

Thanks for any suggestions.

mj


texts: Running a micro stepper motor by using arduino

texts:
The link below provides the info of the motor that I want to use. I've seen some ICs like L293,SN75441 and a board called EasyDriver are being used for driving the motor. Can the motor be microstepped by using both the ICs and the easy driver board? If so then do I have make any changes in the sketch? Can anyone suggest me the appropriate arduino board.

https://www.sparkfun.com/products/9238


texts: Substrate Connection when driving a Bi-Directional Switch

texts:
I am very confused about the way the below circuit functions. Below is an excerpt from a research paper which shows two NMOS transistors connected such that the body diodes face each other back to back. This is to form a bi-directional switch (low side), as it will be supplied with an AC voltage source.

My confusion arises from the way the bulk/substrate of the transistors are handled. The substrates of the MOSFETs are tied together. My understanding of the MOSFET's device physics is that, for forming the inversion layer of the MOSFET, the gate of the MOSFET has to be given a voltage higher than the substrate and also the body diode has to be reverse biased to avoid leakage. Taking note of these conditions, the bulk is connected to the lowest potential in case of an NMOS transistor and to the highest potential in case of a PMOS transistor. But generally speaking, the often told condition for turning on an NMOS device is Vgs>Vth, which still satisfies the bulk's requirement as it is most often connected to the source. Request your kind attention to my questions below:

Will the MOSFET turn on if I keep my bulk floating, but still ensuring Vgs>Vth?
If my understanding is correct and the bulk has to be connected to the lower potential, then in that case, how does the above circuit function when positive potential is applied at node SN.
Also, please note that the above circuit is implemented in Bi-CMOS process and there is a flexibility with the bulk connection. Can the above circuit be implemented using discrete components?
Isolated gate drive is recommended when driving a bi-directional switch http://goo.gl/0u5om2. Is there a way this can be done without isolated gate drive?

Thanks for reading.


texts: Got 2 gang light switch, common load, design circuit to know ON/OFF state of switches on each wire

texts:
Goal is to be able to use standard wall 2 gang light switch to:

a) provide line connection with either of two / both hot wires coming from the same 230VAC phase to the ceiling for AC-DC 48V PSU powering DC-DC buck driver, LED array.

b) be able to differentiate with MCU which one / both of hot wires is powering the lamp for setting one of 3 brightness levels according to the active combination of switches' states:

right switch - left switch - brightness
ON - OFF - minimal
OFF - ON - medium
ON - ON - maximum

So how do I design a circuit to know which of two switches is powering my lamp or whether both of them are ON?

MCU and other logic could be powered with a separate low power AC-DC module. Delay up to a second for detecting current state is acceptable.

Only ideas that I have involve shunt resistors, differential amplifiers, and etc. to measure and/or compare voltage drop that should be present only across resistors on active wire(s). This seems overall complicated and hard to account for 0-1A input current range.

UPD1: My case is not a planned installation, but rather conversion of 2x 150W incandescent lamps (thus existing 2 gang switch and 2 wires in the wall) to a single LED array. It is possible to change that wall switch with an alternative that fits existing 68mm cylindrical electrical box, but chances that I will find anything as fancy as DPDT switch are pretty low. I will take a look though.

My existing PSU is Meanwell LRS-200-48.

UPD2: I tried solution with relays (see finalized schematic below) and it works as intended. I do not have 230VAC relays at hand so I tried it with 3x SRD-05VDC-SL-C general purpose ones and NA05-T2S05-V AC-DC units (pdf) as a proof of concept. As expected there was ~1 second load brownout (while turning off SW2), which is acceptable IMO. I could buy something like 230VAC rated RTE24730 to lower the switching time, but I decided against it for 2 reasons. Firstly, it would consume ~1.6W per coil, instead I can operate 12V relay at 9V with 0.23W per coil. Secondly, it means waiting delivery from Mouser and spending 6-9 USD per relay, while I can buy 12VDC RTE24012 locally for 2-3 USD. And I still have to provide my MCU with power, so either this or a dedicated DC-DC converted from 48V that I'll probably would have to make myself. So buying couple of AP09N05-Zero is well worth $8. I tested these PSUs, they have great specs even without input&output filters and manufacturer is pretty ensuring comparing to something like HLK-PM09 / HLK-5M09 which floods the market.

D3, D5 are to ensure that MCU absolute maximum requirement for digital input of VCC+0.2V is not exceeded. This was for 5v AC-DC modules, so read a proper voltage divider here..

R2, R3 placed near input pins is to make sure there would be no 50hz noise (somehow I was reading up to 2VAC measured with 10MOhm DMM unless I loaded it with a simple 1.5mA LED).


texts:
I am testing my new PYNQ Z2 FPGA board with an external DAC and ADC connected. The datasheet for the converters says they are 12 bit, they are able to differentiate between 1 mV and has a range of 0-2 Volts. The handling of data between the board and conversters is in code that comes ready written with the board. I am no expert, so I have not yet found out how that is done, if it uses all the 12 bits, etc.
The only thing I am able to see now is values I write in Python to the DAC and values read in on the ADC. I was wondering if I am able to say something about the error just from these values. If the error is due to noise from the electrical mains or if some of the converters simply are gone bad.
The error seem to get bigger and bigger as the values increase. Here is a test with 20 values between 0 and 2 V. If I run the test two times, all the values are exactly the same. Could this be because the software written doesnt make use of all the bits, or is that not possible to say?
A plot where 500 points are used at the bottom.
Any hint is greatly appreciated!


texts: Unit conversion: dBμV to dBm, including measured frequency

texts: I'd like to ask for help with conversion of measured voltage V=10dBμV to dBm units. Voltage is measured on frequency f=0.33 GHz (measured with spectral analyser). I've found some sheets with bunch of formulas for calculations with Electromagnetic compatibility, but wasn't successful to find out, how to include frequency into that formulas. Thank you very much for help.


texts: Wiring for 10000W 220V SCR Voltage Regulator Speed Controller

texts:
I live in the US and have the Twist Lock Electrical Plug 4 Wire, 30 Amps, 125/250V, NEMA L14-30P. It has 2 hots, 1 ground, and 1 neutral wire. I saw the following scr controller on ebay and am confused how one might do the wiring. There's a wiring diagram on the side of the picture.

Am I supposed to combine 2 hots IN, shared neutral for both IN and OUT (COM slot), and 2 hot wires from OUT?

I'm used to the controllers that have 4 slots, 2 hots IN and 2 hots OUT.


texts: How does this slow turn-on regulator work?

texts:
I understand R1 & R2 are for feedback which the regulator uses to set output voltage. What is the purpose of the 50k ohm resistor, BJT, and the lower 10uF cap? Does the capacitor & resistor make some time constant the affects the feedback voltage?

If I may ask a semi-related question about the diode... I presume it's some sort of protection diode but what is it actually protecting?


texts: Is possible to update the firmware of the PN532 chip?

texts:
I want to know if is possible to update the firmware of the NFC chip PN532 from NXP. If it is, how can this be done?

If this isn't the appropriate Stack exchange site please move the question.


texts: Help me identify a sensor I got from a PCB

texts:
I am currently working on a blood pressure monitoring system(for a class) and I was handed an old, non working wrist blood pressure monitor to salvage any components I could. So I tore it down, took out the air valve and air pump. There was yet another component soldered to the PCB which had a hose inlet(which led to the cuff), so I figured it must be the pressure sensor. Indeed it was, see the attached images:

I figured it is a pressure sensitive resistor since it has only two pins, however the multimeter gave a reading exceeding 2000kOhm. I tried blowing into the inlet to simulate pressure rise, yielding no change in resistance whatsoever. From one of the attached images we can see that the two pins of the sensor were connected via some capacitors to the microcontroller. If anyone got any info on the name of this sensor, or maybe a similar one, it'd be appreciated.