texts: Interfacing FPGA to an external chip and timing constraints

texts:
I have designed a system using Artix-7 FPGA on a custom board. The goal is to transfer 32-bit data to an external onboard chip whose data bus is an inout port. First, a little background:

The external chip is driven by a 100MHz clock which is generated by the FPGA, let's call it o_clk. The FPGA generates this clock through an MMCM in the Memory Interface Generator (MIG IP) using the 200MHz differential system clock. The o_clk is looped back from the FPGA's output and is given to another ball as an input clock, let's call it i_clk.

The external chip receives the o_clk and sees data on this clock's rising edge. However, when the external chip sends data back to FPGA, the FPGA sees this data on the looped back i_clk. The idea behind doing so is that we can treat communications as source synchronous, in both the directions (remember, it is an inout port). Something like below:

FPGA --> EC is synchronous to FPGA because FPGA generates a clock
EC   --> FPGA is synchronous to EC because FPGA gets an external clock (virtually from EC)

To constrain this design, I have used the i_clk to set input delays on the io_data and have used the o_clk to constrain output on the same io_data bus. I have made sure I am using a forwarded clock (create_generated_clock)(using the ODDR2) for the set_output_delay constraint.

Here are my constraints:

create_clock -period 10.000 -name i_clk -waveform {0.000 5.000} [get_ports i_clk]
set_clock_groups -name loopback_grp -asynchronous -group [get_clocks i_clk] -group [get_clocks o_clk]

set_input_delay -clock i_fx3_pclk -max 8.000 [get_ports io_fx3_fdata]
set_input_delay -clock i_clk -min 2.000 [get_ports io_data]

set_output_delay -clock o_clk -max 2.000 [get_ports io_data]
set_output_delay -clock o_clk -min -0.500 [get_ports io_data]

The system seems to work properly when I run it on hardware, but I still have some doubts because I am still an amateur FPGA developer and this is my first big FPGA design.

My questions are:

Have I designed a good system?
Is it correct to treat the communication from EC --> FPGA as source synchronous? (The other direction is source sync because FPGA is providing clock if I am not wrong.!)
Are my constraints correct?


texts: In an nMOS, how does applying Vdd to the gate attract electrons forming a channel?

texts:
i've been trying to get my head around roughly how nMOS's work, this diagram has really been confusing me:

Now from what i understand, at first electrons cannot flow from source to drain due to the depletion layer that is formed, effectively creating a diode that is reverse biased. When turning the gate on, it attracts the electrons near the gate's electric field, shrinking the depletion layer and creating a channel which electrons can flow. However, what does not make sense to me is that if a voltage is applied to the gate won't it be negatively charged? Therefore repelling electrons? I feel like i'm missing something obvious.


texts: Which is faster, Executing a program from ROM or RAM?

texts:
Most of us who are from electronics background knows that SRAM is faster than DRAM. But when it comes to comparing RAM with ROM, i am unsure.

My question is related to micro-controller :
"If a code is executing directly from RAM/ROM, whose performance will be better ??
1) execution from RAM or
2) execution from ROM or
3) both will perform equal"

Also considering the fact that ROM are designed to have higher READ speeds. whereas for RAM, there is a trade off of read speed for having write capabilities.


texts: High Voltage Hysteresis Comparator Design

texts:
I am working on a control circuit which requires design of Hysteresis Comparator circuit. The voltage level are quite high for which I am getting confused as how to replicate these accurately. I have limited knowledge over linear integrated circuits but I recollected some theory and designed hysteresis comparator using feedback on non-inverting terminal; but for lesser voltage level. Below is the characteristic curve for comparator I require for your reference.

There is a 48 V DC reference voltage available and the hysteresis lower and higher thresholds are 54 V and 57 V respectively.The input voltage won't go beyond 60V. 2 % accuracy in the threshold values is acceptable. Please provide possible design solution for the requirement

I understand that these level have to be brought down to normal operating voltage levels for an Op-Amp. But I might have stuck with some incorrect parameter. Need some expertise on analog circuit design. I would love to get a clear idea where I am getting confused.


texts:
I'm new in Transistor-Level Design and for that reason, I have practiced and learned from designs that I found on google. When I tried to design a mux from scratch without relying on the design of others I came up with this Flip-Flop, but I don't know if it can work.

My question is if It can work? or, where does it fail?

In this design, I assume that the input signals are strong or were regenerated.

Thanks for your attention.

EDIT:

I have no experience using spice, so I don't know if my simulation is well implemented.

ngspice cir file

.include ./bsim4soi/nmos4p0.mod
.include ./bsim4soi/pmos4p0.mod

Vpwr Vdd 0 1.5
Vgnd Vss 0 0

Vgate clk Vss pulse (0 1.5 100p 25p 25p 200p 800p)
Vin   in  Vss pulse (0 1.5 880p 25p 25p 240p 5000p)

MP0 lock clk Vdd Vss P1 W=20u L=0.18u
MN0 lock clk Vss Vss N1 W=10u L=0.18u

MP1 q lock in Vss P1 W=20u L=0.18u
MN1 q w Vss Vss N1 W=10u L=0.18u

MP2 nq q Vdd Vss P1 W=20u L=0.18u
MN2 nq q Vss Vss N1 W=10u L=0.18u

MP3 q nq lock Vss P1 W=20u L=0.18u
MN3 q nq Vss Vss N1 W=10u L=0.18u

MP4 w q lock Vss P1 W=20u L=0.18u
MN4 w q Vss Vss N1 W=10u L=0.18u

.tran 3p 2400ps

.control
    run
    plot clk in q
.endc
.END


texts:
My VHDL design contains a FIFO generated by Coregen from Vivado 15.3. I try to debug the design with a ZeroDelay simulation. But the core is not Zerodelay and makes short changes (much shorter that a clock cycle - second signal in Image 1).
This is no problem for the function, but makes it hard to debug. If I zoom out, I can not see any more if the value stays the same or changes.

Is there a way to force the core to act as zero delay?


texts: Damaging a low voltage, 3-phase heating element possibe due to unstable voltage?

texts:
I have a furnace working on tungsten heating elements. The elements were damaged several times, and they are very expensive. The furnace can work at higher than 2000 C. I am wondering what the factors are that may damage the elements.

Is it possible to be damaged if the electricity is unstable? By means, if there is a high voltage or high current?

Also, there may be electrical arc during operation, so can it damage the elements?

Finally, how can I avoid the electrical arc?

The max temp is 2400 C.
In nitrogen atmosphere about 30 Torr.
The elements are mesh.
It's three phase.
The max volts must be 7 volt since there is a transformer which converts 12 kV.
It must be able to run for long time such as 100 hrs.

Usually, my furnace reaches 2000 C at 4 volt and 480 amp. However, last time the volt was 8 volt and the amp was 390-400. That means the resistance in the elements increased because they (elements) were degrading. But my question is that is it possible to damage the elements if the electricity is not stable? Or do you think the problem was with the element itself?


texts:
I was reading a tutorial on debouncing the outputs of a rotary-encoder which are read by a micro-controller.
Below is the circuit given:

The writer of the tutorial claims the following:

"In the above circuit we use a 1uF capacitor with an SN7414 Schmitt-trigger input NAND gates that clean up the switch-contact noise."

I have couple of questions regarding this claim and the circuit.

1-) I can understand the reason for the use of capacitors, they act as RC low pass filters and can filter bounces.
But how does the SN7414 Schmitt-trigger help debouncing here? Is that really needed or does it improve debouncing?

2-) In the above circuit the resistor and the capacitor forms a low-pass filter with a cut-off freq. fc.
What is the motivation/idea when it comes to sizing the capacitor here. Why 1uF?
I mean let's say we have a rotary-encoder and it is recommended to be used with 10k resistors.
Which parameter of the encoder from its data-sheet should be taken into account when sizing the capacitor.
Is there a method or reasoning between choosing the capacitance and a parameter in the data-sheet?


texts: MC34063 inverter stops switchng at low current and burns out through inductor

texts:
I fried a few MC34063 on the breadboard this evening.... was trying to make a 10V to -15V inverter to supply 30mA. It was working fine. However, the chips and inductor suddenly became hot when toggling the input power a few times. About 0.8A was flowing through the inductor when the chip failed. I thought the inductor core saturated, but simulations are also giving the same result if I lower the switching current. A similar circuit is below (actually I used 1mH 3.5Ohm inductor and Rsc=0.63Ohm (1Ohm turned out to be actualy 0.63Ohm)). The circuit below works fine if R3=1Ohm, but becomes weird if R3=2Ohm. Current flows into Vdd and out through Isns in the simulation (have not checked this in the failed parts). (Also, my timing cap was 1nF, not 330pF, it was running at about 33KHz, but oscilloscope showed gaps between clusters of square waves).

I checked with and without load on the breadboard, as well as simulation. Same results... and a pile of black chips (It took me a while to figure out). The inductor is fine, even after heating a bit each time.

So, what's going on? I know that MC34063 is an old design and all that, but this is like walking on eggshells. Everything works... till some kid toggles the power switch a few times...

edit: Schottky diode orientation is fine. Here is the figure from datasheet, for reference

I agree with all comments about the breadboard. But, can anyone explain why the simulation fails if I decrease the current by increasing Rsc, or if I decrease the inductor value? I suspect the same thing happened on the breadboard. The inductance decreased enough so the darlington continued to conduct. Why did the current sense not work, even in simulation?

edit: I simulated while ramping up the voltage from 2 to 5 to 10V, every 10ms, and this one seems to simulate fine without the inductor current going up and locking (all other values same as the first schematic). May be the input cap is part of the design. Although, I did manage to fry one chip when switching off power to the circuit, can't figure out how that could have happened. I'll put in the input cap and try to fry another chip.

edit: I'm accepting analogsystemsfr's answer for pointing me towards capacitors. Initially I had a 330uF 25V on the output. I replaced it with 100uF 25V and added an input cap 100uF 25V as per the datasheet (100uF). All Capacitors were old but had tested OK on LCR meter before use. Both 100uF started heating up today, and I checked all three caps after that. All three caps had gone bad (but inductor and chip had not heated, and I was still getting my -15V output, althout very slowly after switch on). Replaced input and output caps with new 100uF 50V, and then input with 1000uF 50V. All are working fine with no heating, and tested OK after use. I toggled the power button maybe 40-50 times, and the chip did not fry. So I guess it was the capacitor. I still have no idea why it went bad. I have -15V across the caps, so it should have been fine, unless my input 10V got added to it somehow and became 25V across the caps during switching. Repetitive 25V across an old 25V cap may have damaged it... is my best guess now. And that shorted cap possibly led to chip failure. [My LCR meter shows two of the failed caps as a pair of opposing diodes with Vf of ~3V, the third one shows missing part (so failed open). None of the caps bulged or smoked.]


texts:
I have an SD/HD/3G-SDI output driven by a LMH0303, pretty much stock standard application circuit straight out of the datasheet.
The SDI datastream is generated by an XC7K70T FPGA, so I have great control over pixel clock frequency and video data.
When connected to a Sony Trimaster EL SDI monitor, the output video is stable and flawless. When connected to a Macro Blue SDI monitor, the display is on for 10-15 seconds, then loses signal, re-locks after a few seconds and so on.
PLLs inside the FPGA are locked, and the 74.25 MHz reference clock for 1080p30 is coming from a precision, low-jitter source (Si5324), in which the PLL is also locked.
Any ideas what else, other than jitter, can cause this behavior?


texts: How to combine a charger for LIPO battery with a boost step-up voltage converter?

texts:
I want to power a device with up to 4A at 5V from a single-cell LIPO battery of 3.7V 5000mAh and be able to charge it. The idea is to have everything packed up inside a case, so I don't want to rely on an external charger and instead be able to charge it from USB2.0.

To convert the power from the battery to the device (from 3.7V to 5V), I plan to use a boost converter capable of supplying up to 4A ouput current (such as a XL6009 converter).

However, I don't know how and where to add a charger (such as this one, or any other one that would fit).

I'm not very versed in electrical engineering. Please help :)
Thank you.

EDIT: I found this charger which allow to charge the battery while offering a direct output connection to the device. How can I be sure that the output connection can support the ~6A @ 3.7V current drawn from the battery ?


texts: Trying to program EPROMs with GQ-4X - 9/10 are failing with a few random bits wrong

texts:
I have a bunch of old/cheap EPROMs which i am trying to program.
To do this, I am using an GQ-4X.

Starting with blank EPROMs (using a UV eraser thew blank checking them), my hit rate seems to be able 9 fails out of 10, with the failed ones having the odd bits not correct here and there.

I tried burning them quickly, slowly, double write, multiple times. all with the same poor results.

Any clues as to what might be happening? I always thought EPROM where pretty tough but are the cheap chinese ones just bad?
Thanks


texts: What is the reason why USB plugs connect power before data

texts:
I am designing USB unplugging/plugging hardware and I wanted to know why USB plugs are designed such that the power leads make a connection before the data.  Is it purely to ensure that data is not able to connect at the same time and/or before the power is connected?
Because I'm not actually physically unplugging the connector, is the pin offset connection delay purely because of mechanical issues, or is it ok if they connect at the same time because there are no mechanical interactions happening with my hardware (it's all done through ICs/FETs).  My current version (without a delay) works, but I'm really wondering if it would be better (more in spec) were I to implement a delay when reconnecting power and data.


texts: What is the maximum current at which I can drive my stepper motor?

texts:
I am using Oriental's PK-243-03A stepper motor in bipolar series configuration. The rated current of the motor is 0.31A/phase according to its datasheet. My question is if I am supplying it with 12V, then what is the maximum current I can run my motor on? For both the phases to be on i.e. in full stepping my motor should draw 0.62A, isn't it? Is it okay if I supply my motor 2.5A? I have seen people saying that its okay to drive stepper on higher currents, like this guy here on this forum

http://www.cnczone.com/forums/stepper-motors-drives/129864-doubt-regarding-stepper-motor-current-rating.html

But I have also read some totally contradicting views regarding high currents like in this article here http://smoothieware.org/cnc-mill-guide, it says

  Each stepper motor model has a precise current rating. You can drive
  your stepper motor at a lower current, which will make it more silent,
  but also less powerful. But you can not drive the motor at a higher
  current than it is rated at, this would cause overheating, and
  possibly skipped steps

What is the correct way? higher currents or no higher currents? Really confused.


texts: How many Bluetooth modules can work in one room?

texts: I know that Bluetooth has a large band of frequencies but how much interference is there between them? How many of them can i have in a 25m2 small room without them interfering with each other under constant transmission load (each paired+load)?


texts:
I have a sensor board placed in box with an ESP8266 and 220V to 5V adaptor board which both are considerable heat sources. But sensor is very far away from them at least 5cm.

When I do not close the box it measure air temperature correctly. But when I close the box, it increases by 1 Celcius or so. Also box has air nozzles.

What I wonder is, there a billions of room temperature devices in a box sold on stores. How do they make the right measurement? Is there something like a constant temperature offset can be substracted and real temperature inside the room can be found?


texts:
If we use an ideal capacitor to charge another ideal capacitor, my intuition tells me no heat is generated since capacitors are just storage elements. It shouldn't consume energy.

But in order to solve this question, I used two equations (conservation of charge and equal voltage for both capacitors at equilibrium) to find that energy had indeed been lost.

What's the mechanism by which heat is lost in this case? Is it the energy required to push the charges closer together on C1? Is it energy spent to accelerate charges, to make it move? Am I right in claiming that no "heat" is generated?

I noticed that the energy lost equals that stored in the "equivalent" series capacitance if it was charged to \$V_0\$. Is there any reasoning why it is so?


texts:
I'm wondering why, in a standard house, instead of using many low power AC-DC rectifier, there isn't a big (like 12V 20~50A) AC-DC rectifier which supplies some wall socket with a DC voltage?
In the long run this should be less expensive, given the fact that AC to DC in one big apparatus is done better than in many low-quality transformers, right?

Also, modern chip DC voltage regulators have efficiency of >90%, so smaller (or even larger) voltages are still efficient and possible.

So we could use a 12V socket to charge a phone, desktop computer, laptop, radio etc... and still have an AC socket to move washing machine engine and other things that work better with an AC supply.

Why isn't this done?

edit: real question is:
is it convenient, given a standard family (2 laptop, 1 desktop, 4 smarthpone, 1 big tv and some minor electonic) to do so?


texts: avrispMKII short circuit protection triggering when programming

texts:
I'm trying to burn the arduino bootloader onto a chip that's been pre programmed to use 16mhz crystal. Trouble is everytime I try pprogramming using avrdude it gies the following error then a red status led starts flashing which means a short accord to the datasheet but that not possible because my scope is tell me the chip is oscillating fine. ?My dmm tells me the avr is drawing 30ma and the datasheet says it only allows 25mA. So how do I get round this issue? I only have an avr on the breadboard.

`avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check

Has anyone else had this issue or am I doing something wrong?


texts:
I am currently designing a circuit, where output is switched on and off as obstacle passes IR (Infrared) beam, produced by IR LED and received by IR sensor (IR photo-transistor). The problem is that IR sensor is greatly affected by light from surrounding sources, like celling lamp. IR sensor's output is compared with comparator and if IR sensor is greatly illuminated by white light, comparator switches on the output as if IR LED would illuminate on sensor's surface.

simulate this circuit – Schematic created using CircuitLab

Is it normal for IR sensor to react to visible light the same way it reacts to IR radiation?

This is kind of a problem since sensor of this circuit is constantly exposed to visible light and sometimes as an obstacle passes the IR beam, comparator just won't switch off the output because there is too much radiation from visible light.

Is there any other way to detect obstacle as it passes and breaks the IR beam of radiation without receiving part (sensor at input of comparator) being influenced by surroundings light sources, which produce visible light?

Both IR LED as sensor and IR sensor (photo-transistor) react the same way as they are being illuminated by visible light. I still don't get it why IR sensor detects visible light as it should only detect IR radiation, I think.

Would replacing IR LED and IR sensor with UV LED and UV sensor solve my issue?


texts:
My current problem, as a noob, is kind of an OR problem.
If you feel the urge to call me an idiot or any other choice name. Pleace feel free but I would appriciate if you can explain why. Still trying to lern.
I have one relay and two “power” sources. The first is power from a cellphone charger and the second is the HIGH signal from a GPIO on a Raspberry pi.

If any one of them supplies power the relay is “on”.
If both supplies power the relay is “on”
If cellphone charger is disconnected and the GPIO is LOW the relay is off.

I have tried to isolate the schematics in the image below.

Will this work? Do I need the 2 diodes? Why/Why not?
The following is a complete schema of my assassin solution.
As you can see there is a Adafruit Powerboost 1000c. https://www.adafruit.com/product/2465. The EN pin is relevant to this question.
According to documentation:
EN - this is the 'enable' pin. By default it is pulled 'high' to VS. To turn off the booster, connect this pin to ground. The switch can be as small as you like, it is just a signal. Contrast this to an inline power switch which would have to be able to handle up to 2A of current! When the chip is disabled the output is completely disconnected from the input.
The pink parts are the parts relevant to this question.
The photo on the far right is a little box that controls the radiators in my cabin. Just added it so you get the full picture.

Please help a noob.


texts: Switch power on/off when SD card is inserted/removed in slot

texts:
I have ESP32 and I'm using it to read/write data from an SD card that is directly connected over SPI. This works fine. Now I want to switch on the ESP32 automatically by switching on the 3.3v power supply when an SD card is connected. When the SD card is beeing disconnnected, the power should be switched off.

I've tried to accomplish this using a 2N2222 transistor but I'm stuck now. My plan was place the ESP32 on the collector and GND on the emmiter. I wanted the base to be switched by a connection from the GND pin of the SD card (using a 220ohm resistor between SD card GND pin the power supplies GND to get part of the current to the base). This leads to the transistor switching just fine, but with this setup the SPI doesn't work anymore.

What can I do to make this work. Is there another way to switch on/off power when an SD card is connected?

Sorry for the bad schematics, its my first try.

simulate this circuit – Schematic created using CircuitLab


texts: Best way to prototype a TDFN package chip (MAX9814 and MAX9820)?

texts: For my engineering project, we wanted to use the gain control and amplifier available on these two chips, but are finding difficulty with prototyping them as they are so tiny. One of the chips is a 14 pin (MAX9814) and the other is a 10 pin (MAX9820), the 14 pin having a .4mm pitch and the 10 pin having a .5mm pitch. We initially were going to have custom PCB printed using an eagle footprint since we couldn't find any adapters, but still have no method of soldering these chips in place after we obtain that. Any ideas?


texts: Are these long 5525 barrel jack proprietary?

texts:
I have tried to connect a 12v DC adaptor and also a battery pack to my telescope unsuccessfully. Sadly it seems Celestron DC jack needs to be around 2mm longer than common 5525 DC ports.
I was wondering what are those long ports are called and if Celestron is using an uncommon port to make customers buy its products or there is a technical reason for that?
Celestron DC5525 connector with ~14mm head.

Celestron DC5525 connector with 10mm head


texts: What is the fault with my hbdridge design in the below circuit using pchanel and n chanel mosfets?

texts:
In the image...

Q1,Q2 - p channel mosfet (IXTH11P50)
Q3, Q4,Q5 - n channel mosfet (IRFP460N)

The problem I faced here was...when I test the circuit with 12 volt dc supply, and my load is two leds, it works very fine...
When i connect my supply voltage to 300 volts dc with  lamp load and when  I just turn ON Q1 and Q4(by connecting the pin 1 to 5volt supply and pin 2 to ground )just for checking..the lamp lights up without any fault. Same as when I turn on Q2 and Q3 it also works fine.

when I connect the pins 1 and 2 of optocouplers to microcontroller where the microcontroller alternatively makes the pins 1 and 2 high with a frequency of 2.5HZ (ON time of 400 ms). When i connect my supply voltage to 12 volts with leds as load it is working fine.

But with the frequency of 2.5HZ  i connect my supply voltage to 300volts DC and lamp load..its not working at all..the mosfet gets bursted each time. A short ciruit is prevailed either left or right side mosfets. So please suggest me some ideas or the fault am doing with this circuit.
 I have added two images ..one is for 12 volt dc with leds as load just for testing the circuit..
And the other image is for 300 volts dc with lamp load.

In the lamp load circuit..there will be a 50k resistor with a n chanel mosfet attached,  to its drain. The idea here is to make the voltage divider network when the Q5 mosfet turns on.. so the voltage divided with this network will be 286 volts ..then 300-286 = 14 volts for Q1 gate to source. This happens when we turn on Q5 mosfet. If Q5 is turned off then no current flows through 50K resistor and Q5 and no voltage divider exists and 300 volts will headup to gate which means there is no voltage difference between gate and source for Q1.

Please see to my circuitry part and suggest me with some ideas to clear my fault.

Thanks Regards.


texts: Schmitt Trigger Level Translation from Encoder

texts:
This is my first time using an encoder as well as a Schmitt trigger. Typically, I would do debouncing in software, but I want a hardware solution for the sake of learning how to do so.

The encoder I am using is:
PEC11L-4115F-S0020

Hex Inverter w/ Schmitt Trigger Input: SN74LVC3G14DCTR

End Goal: Use the encoder as an input knob similar to an oscilloscope for changing and accepting settings in the final application.

The encoder datasheet shows the encoder being pulled up to 5V, but my MCU is an nRF52832 being powered by 3v3, so I would like to translate the 5V output from the encoder to 3v3. Then I'll utilize the Quadrature Decoder peripheral on chip.

Does the circuit I've drawn make sense since the inverter is being supplied with 3v3? It'll output 3v3 when the input is low and 0 when input is high?

I am aware that the nRF52 has a digital debouncing option as well, but I would like to stick to a hardware implementation.

Additionally, the switch to the left is an integrated momentary switch with the encoder.


texts: How to mirror a large component in Eagle

texts:
I am using the Arduino shield pin component and I cant flip it, because it goes out of the area bounds...

Is there a way to force it to flip and then go into move mode so I can place it within the bounds? or force it to flip and then snap to the in bounds? or ? I spent 2 hours trying to get it positioned right using rotations but I really just need it mirrored and I have been unable to mirror it


texts: How does an oscilloscope synchronize its screen refresh to the waveform?

texts:
Say I am using a DSO to measure a waveform whose frequency is on the order of megahertz.  I am certain that my DSO cannot refresh its screen that quickly, but it is obviously possible to stabilize a portion of the wave.  For instance, I can display a sine wave from a frequency generator and view a single period of the wave, which would correspond to a 1 microsecond snapshot if the frequency is 1MHz.
So my question is: what is the scope doing behind the scenes to ensure that it is stabilizing the waveform?  How much information gets rejected, and how does that happen?  How is this different for analog scopes without digital control?


texts: Using 240v mains on/off as input to microcontroller

texts:
I have a light switch that switches 240v (UK) mains. Instead of using that to directly control a light, I want to use it as an input to a controller board so I can also automate the lighting. (It's low voltage LED lighting driven via a transformer although that doesn't really affect my question).

My question is what is the best and safe way to use switched 240v mains power as an input to a low voltage microcontroller circuit? It would be best to use the existing switch to switch a low voltage control signal but I can't change the wiring at at this time so the only input I have to my control is a switched 240v mains power line.

I have other power available where the controller is so I'm not intending to power this via the original light power, I just want to see if I can use it as a control line without extensive rewiring work for now.


texts: How do I fix my multimeter, which doesn't seem able to measure resistance?

texts:
I've got a Caltek CM1200 multimeter, which I bought ages ago.
http://www.caltek.com.hk/cm1200.htm

It can measure voltage perfectly. I'm pretty sure the battery works, as it displays 0 when you go to a voltage with nothing connected to the probes.

When I move the dial to the resistance measuring area, the display shows nothing. Completely blank (I expect something meaning infinite).

If I connect the two probes (plugged into the bottom two sockets, marked V/Ohm/mA and COM) to each other, it is still blank (I expect zero).

What is wrong with my multimeter, or am I missing something at how to measure resistance?


texts: De-coupling capacitor and Bulk capacitor

texts: How does de-coupling and bulk capacitors work? what difference do they make adding them to the circuit.. Can anyone help me using a simple circuit that shows the effect of decoupling and bulk capacitors on a circuit? (I need an explanation such as the first circuit must not contain these capacitors and results must be shown and the second circuit will contain them and would like to see and compare the effect of adding them).


texts: Powering LEDs through microcontroller pins and transistors

texts:
I'm working on my first ever PCB, and would like to include two 7-segment displays. The device will be powered from mains, so power consumption is not an issue. I have chosen the Broadcom HDSM-293L, with a forward voltage of 2.1V and a maximum current of 25 mA per segment.

The microcontroller I'm using is an STM32F030K6T6, which should be able to deliver 25 mA per pin.

To be able to show seperate digits on the displays I need to be able to toggle the common cathode outputs, but the uC can't sink the current of several LEDs into a single pin, so I'm using transistors for this purpose - a subject I'm not entirely comfortable with. Online tutorials have told me that BJP NPN's are suitable for the purpose, so I've chosen the ON Semiconductor MBT3904DW1T1G, a package of two such transistors suited for 200mA.

The below schematic shows how I've wired GPIOs from the microcontroller through 56Ohm resistors to each anode, and connected the cathodes to the collector of the transistors. I've also connected GPIOs through 1K resistors to the transistor gates.

Is this a sensible way of powering the 7-Segment displays? Are the components I've chosen suited for the task? And is everything correctly connected safe in terms of amount of current?

Thanks for any help!

EDIT: Several people in the comments pointed out that the maximum sourcable current across all the IO pins of the STM is 80 mA. To address this, I'd like to change out the LED resistors for 120 ohm ones, which should reduce the current draw for each segment to 10 mA for a maximum of 70 mA at a time (I don't need the dots).


texts: Is there a way to recreate or buy this battery? ICR14500 3.7v

texts:
I'm trying to repair a soap dispenser: https://www.simplehuman.com/products/foam-sensor-pump
I opened it up and found the battery was damaged, and I wanted to see if I could replace it. Before I opened it up, I was trying to find a product with the wiring already there. I was able to find batteries with the same specs, but nothing with wires already attached.  Will I be able to build a battery myself by like taping wires to either end of a battery? It's unclear what's inside of the blue plastic wrapping


texts:
I am trying to use a FET to switch on a boost converter.

simulate this circuit – Schematic created using CircuitLab

From reading I have found that people like to use IRFML8244TRPBF for logic level FET's. I have about 200mA of current draw from the boost converter.

Will this turn on when I apply 3.3V to the gate? Does anyone have any better part suggestions?


texts: I want to design a spacer pcb with no copper on either side

texts: I want to design a 2.5" x 0.7" spacer pcb in the free version of Eagle, with no copper or components on either side with four (unplated) 0.116" diameter holes. Eagle won't generate a board if the schematic is empty. And Eagle CAD doesn't list a 0.116" drill in the drill size drop down window.  Any ideas on how to do the above?  Thanks!


texts: Reading analog sensor as a microphone signal (via sound card)

texts:
I was thinking and studying on how an analog-digital-converter works and just realised that the sound card of every computer-devices is exactly that one.

My question is: how can I read an analog sensor (piezoelectric sensor, photoresistor, etc) as a microphone sensor (with any kind of sound software) without damaging the sound card? Do I have to take any kind of shrewdness? And what if I have to amply the signal?


texts:
I am new to the PIC programming, and in below program trying to blink LED for specific range of resistance. But when i have debug , i found it out that while loop established to wait till conversion happens in ADC_Read() is not getting completed.Please Help. attached circuit diagram too with this thread.

#include<pic.h>
#include<htc.h>

#define _XTAL_FREQ 2000000

void delay(int cnt)
{
    while(cnt--);
}

void ADC_Init()
{
 ADCON0=0X81;
 ADCON1=0XCE;
}

int ADC_Read(unsigned int ch)
{
    ADCON0=0X81;
    ADCON1=0XCE;
    int result;

    delay(50);

    ADON=1;
    while(ADON==1);
    result=ADRESH;
    result=result<<8;
    result=result|ADRESL;
    return(result);

}

int main()
{
    unsigned int adcValue;
    TRISA=0X01;
    PORTB=0X00;
    TRISB0=0X00;

    ADC_Init();
    while(1)
    {
        adcValue=ADC_Read(0);
        if(adcValue>=300 && adcValue<=500)
        {
            RB0=1;
        }
        else
        {
            RB0=0;
        }
    }
  return 0;
}


texts: What are the technology and design parameters that mostly affect yield?

texts:
I understand that when an integrated circuit is manufactured we speak of yield as the ratio of 'good' devices over manufactured devices.

Since 'good' is quite ambiguous I am going to limit the question a bit.

First of all we are not speaking of what happens to a singulated device when it leaves the FAB. Packaging, trimming, soldering should not be taken in account here. A 'good' device is something that a manufacturer would put in a package, possibly in an ATE machine, to try and sell it.

A device can be born dead for a number of reasons, which might be mitigated both through careful design and careful manufacturing in FAB. There finally are some parameters that usually are not in control of the designer or the manufacturer.

To give a couple of examples:

Redundancy in the design can mitigate the effects of a dead gate
Keeping the machines clean avoids particles that would contaminate the silicon
Chip area though is usually something that can be changed not much

My question then is:

What are the technology and design parameter that mostly affect yield? Is it just about die size? Does the feature size has anything to do with that? Is it better to make a smaller chip with smaller features (if possible), or vice versa?


texts: Single ended to differential conversion with voltage divider

texts:
Let's assume I have an AD-converter that expects a differential signal with zero common mode voltage and I want to connect a single ended signal source.

If the AD has it's own isolated ground, couldn't I just use a voltage divider to drive the AD ground to the center of the signal?
In fact, since the AD already has the same impedance to ground on both input lines internally, shouldn't this happen 'automatically' even without an external divider? (I actually tried this, it didn't work)

Since I don't see this kind of interfacing anywhere if I look up single ended to differential conversion, I assume my understanding of the matter is a bit naive.

What would be a robust and simple way to connect a single ended signal (can be static) to a differential AD with zero common mode?

simulate this circuit – Schematic created using CircuitLab


texts: Adding 4-bit numbers to 16-bit shift register

texts:
I am trying to find a way to add four 4-bit binary numbers to a 16-bit shift register, one(group of 4 bits) by one. This way I can store 4 decimal numbers(0-9) in the register, adding them by pushing 1 of 10 buttons labeled from "0" to "9"(simple push buttons).

I thought of something but I think it's wrong:

Step one: load 4-bit data

Step two: shift them four times

Step three: load 4-bit data again

But the simulator say it does not know the values of the shifted bits.

Another way would be adding the numbers bit by bit, using only the "shift" and the "input pin", but it won't be easy since there's a clock.

What is the best way of doing it?


texts: I need to create pad on the copper zone like as shown on the picture in Orcad PCB Editor 16.6

texts:
I am noob in Orcad PCB Design, I need a solution for creating pad on top of the copper zone as you can saw on picture, i need to create pad like that. I am using Orcad 16.6. Kindly give me the answer
Thank you[


texts: Cheap and safe way to dim 100+ 60W Incandescent bulbs

texts:
For my wedding reception, we are building ~25 lighting fixtures with 4 bulbs each (fixture per table for dinner). For aesthetic and budget reasons, these are 60w "Edison-style" bulbs which we want to dim in order to give a cozy, intimate feeling .

If budget were no question, I would wire a dimmer into each fixture and wire the bulbs in parallel from the dimmer (or just put them all on DMX...) BUT, budget is already tight and the cheapest dimmers I can find are $6.

What I am considering now is wiring each fixture in series which will cut power/brightness by 4 to start but I believe we will want to go less bright.

Reading the following: Permanently dimming an incandescent light bulb, it seems like using an appropriately sized capacitor would be safer than using a resistor which will get hot but that's where I get a bit lost - size of capacitor and how many I'd need.

To cut brightness by half, do I assume a bulb resistance of 220ohm (60W / 115V)? Which then leads to a 1.2uf capacitor, yes? Or should I be calculating for 4x that since there are 4 bulbs in series?

Or is there a better/safer/cheaper way to go about this?


texts:
I am interfacing a PIC16F877 with a 5V DC relay. I hooked up the relay to the same 5v that power up my PIC with the appropriate transistor, diode, voltage to power up an LED to NC and LED to NO, I hooked up an LM35(Tempreature sensor) to my PIC and an LCD to check what is going on, i wrote my code and everything is working perfectly.

However, when i try to switch the relay with my pic the reading on the LCD changes dramatically, so if Room tempreature is about 20C it will show 2C or 3C.

EDIT:
I tried to hook up the LCD to a different voltage source and same behavior happened, then i tried to make a current buffer with an UA741 and 2n2222 and same behavior.

following is the schematic:

When i run the simulation everything is working fine, but in real hardware its outputting a different Temperature on the LCD than when i remove the relay.

IDEAS?


texts: How to find out whether I have a unipolar or a bipolar stepper motor?

texts:
I have one stepper motor.

There are six wires coming out of that.

How can I find out weather I have a bipolar or a unipolar stepper motor?

Note: Related, but not a duplicate: Unipolar and Bipolar Stepper motors


texts: Why are Erlang B and Erlang C formulas different?

texts:
Erlang B determines the probability that a call is blocked and is defined as:

$$Pr[blocking]= {{A^C \over C!} \over {\sum_{k = 0}^{C} {A^k \over k!}}}$$

while Erlang C determines the probability that a call is delayed and is defined as:

$$Pr[delay>0]= {{A^C \over C!} \over {A^C+C!(1-{A\over C})\sum_{k = 0}^{C-1} {A^k \over k!}}}$$

But, the only difference lies in the fact that we use Erlang B when a user is denied access due to the unavailability of a channel. Whereas, we use Erlang C when a user is denied access due to the unavailability of a channel and further, put in a queue.

So my question is why do both formulas need to be different? In both cases, we are determining the probability if a channel would be available or not regardless of the fact that the user is put in a queue. This sounds intuitively right, right?


texts: Given a known power supply, what are safe ranges for the volts/amps/ohms of connected components?

texts:
I'm new to hardware and am coming from a software background. I have an SoC that will be powered by a supply generating 5V and 1A. I'm trying to figure out what are the safe ranges of volts/amps/ohms that I can use for various components that I'll be connecting to this SoC. For instance, say I want to add a transceiver to the SoC so that it can communicate with some other device:

Does the transceiver need to be rated above or below or exactly at 5V?
Does the transceiver need to be rated above or below or exactly at 1A?
Any resistance/ohm regulations/ranges that I need to consider?

I guess I'm trying to learn how to make a decision like the following:

  My power supply is 5V and 1A. I see that Transceiver A is rated for 3V and 500mA. Perhaps its fine that its only rated for 500mA and that it will be receiving 1A, but perhaps it's not fine that its only rated for 3V but it will be receiving 5V. Hence, I would not want to use this particular transceiver.

Even if the logic in the blurb above is wrong (from an electrical standpoint), it underscores what I'm trying to understand here: given a known power supply, how do component ratings (for volts, amps, ohms) affect my decision of whether to use them or not?


texts: Effect of Battery charging with un equal batteries in parallel

texts:
I have 24 VDC  to 220 VAC  Inverter and two 90 Ampere Batteries now I feel that backup is not what I need now I intend to connect these two existing batteries in parallel to give total of 12 volts and 180 or 170 amp and add a new single 150 Ampere battery.

Now Question is that what effect would be there on charging?

ups cuts of charging on 28vdc.

What I feel that if we have unbalanced battery ampere rating in parallel then first smaller one gets full and the overflow current helps the bigger battery to fill then .Am I wrong?


texts: How much faster would optical computation be?

texts: If (when) we could figure out a way to do computations with light as opposed to electrons within circuits, how much faster would our computers be?


texts: VHDL Programming error. “couldn't implement registers for assignments on this clock edge”

texts:
I am new to VHDL and I'm trying to attempt to create an accelerator and speedometer. I want to use push buttons and 7 segments to implement. I want to be able to shift into each case statement and execute until a button is pressed. It will not simulate with the clock taken out, and the error above happens when I try to put a clock in. Any help?

    LIBRARY IEEE;
USE IEEE.NUMERIC_STD.ALL;
USE IEEE.STD_LOGIC_1164.all;
USE IEEE.STD_LOGIC_UNSIGNED.all;

ENTITY GearCounterFirst IS
PORT(
  Clk : IN STD_LOGIC;
  Gas: IN STD_LOGIC;
  Speed : BUFFER STD_LOGIC_VECTOR (7 downto 0);
  Acc : BUFFER STD_LOGIC_VECTOR(4 downto 0);
  up: IN STD_LOGIC;
  down: IN STD_LOGIC;
  trans: BUFFER STD_LOGIC_VECTOR (2 downto 0)
  );
  END GearCounterFirst;

ARCHITECTURE Behavior OF GearCounterFirst IS
BEGIN
PROCESS (Clk,Speed, Gas, up, down, trans)
BEGIN

    trans <= "000";

            if (up = '1' and rising_edge(Clk)) then
                trans <= trans + '1';
            else
                trans <= trans;
            end if;

            if (down = '1' and rising_edge(Clk)) then
                trans <= trans - '1';
            else
                trans <= trans;
            end if;

case trans is
    when "000" =>
        if (gas = '1' and rising_edge(Clk)) then
            Speed <= Speed +4;
            Acc <= "11111";
        end if;

        if (gas = '0' and rising_edge(Clk)) then
            Speed <= Speed -4;
            Acc <= "00000";
        end if;
    when "001" =>
        if (gas = '1' and rising_edge(Clk)) then
            Speed <= Speed -3;
            Acc <= "01111";
        end if;

        if (gas = '0' and rising_edge(Clk)) then
            Speed <= Speed -3;
            Acc <= "00000";
        end if;

    when "010" =>
        if (gas = '1') then
            Speed <= Speed +2;
            Acc <= "00111";
        end if;

        if (gas = '0') then
            Speed <= Speed +1;
            Acc <= "00000";
        end if;

    when "011" =>
        if (gas = '1') then
            Speed <= Speed +1;
            Acc <= "00011";
        end if;

        if (gas = '0') then
            Speed <= Speed -1;
            Acc <= "00000";
        end if;

    when "100" =>
        if (gas = '1') then
            Speed <= Speed +1;
            Acc <= "00001";
        end if;

        if (gas = '0') then
            Speed <= Speed -1;
            Acc <= "00000";
        end if;
    when others =>
            Speed <= Speed -1;
            Acc <= "00000";
end case;

END PROCESS;
END Behavior;


texts: How can create a simple circuit that will drain a battery in a few hours

texts:
My son and I are working on his school project. He wants to examine the effect of temperature on battery performance (longevity). He thought he could just put an LED on a battery and watch. We soon discovered that there is more complexity than we would  have thought.

First we just put a lead from the LED on each side of an AA 1.5 v battery. Nothing happened. Then we tried two AA in series and the LED came on and promptly blew. Then we put each side of a LED on a CR2032 3v lithium battery and all worked well. It worked too well. More than 24 hours later the light was not dim. We then set up a breadboard with a vibrating motor in series with the LED. The LED went out after about 60 seconds and the motor kept on spinning but slower than it had at first. Now I have set up the LED in series with a 1000 ohm resistor (I think). Will the LED light go out any sooner or will it just burn dimmer for longer?

I have thought of getting incandescent bulbs or simple old-fashioned flashlights.

We want to setup the circuit in three temperatures and replicate the observations 3 times.


texts: Designing a Silicon Photomultiplier Read-Out circuit

texts:
I'm designing a Silicon Photomultiplier circuit with an amplifier. The base circuit can be shown below.

simulate this circuit – Schematic created using CircuitLab

This was from SensL's recommended circuit layout for their Silicon Photomultiplier, the MicroFJ-60035-TSV. However, this is for one photomultiplier. I designed a board with four photomultipliers, each with their own op amp circuit, but I was wondering, if I used 4 photomultipliers and had their output go to one op amp, would there be any design considerations to think about? You can see the proposed schematic below, though the -30V bias was left out since it would be the same as the previous circuit. At first, I thought that this would act like a summing amplifier, with each photomultiplier contributing a voltage to the op amp; depending on the output voltage, you can detect how many photomultipliers 'fired'. Does this idea seem reasonable, or is there something I'm not taking into consideration?

simulate this circuit

EDIT: Below is a revised circuit used in LTspice. I tried modeling the photomultiplier with a pulsed current source in parallel with a capacitor and resistor

simulate this circuit


texts:
I'm replacing the AVR of a Honda EX4500s. However, the new AVR came with a 4-prong coupler plus two other wires (red and white), as opposed to the original 3-prong coupler (just like the 4-prong, but one socket doesn't have a contact) plus a red, white, and green wire. I'd guess that the extra contact/wire in the new AVR is the equivalent of the separate green bullet plug on the old AVR, and that I could just remove, resolder, and reconnect? I don't know if this is actually electrically correct, so I'd never just try it of course (for those who will blow me up with "caution" comments before I get myself blown up).
Pics (old original first, new last):


texts: Third order filter - I need to verify calculations

texts:
I need to construct a Butterworth high pass filter from two sections: one of second order and one of first order with a cut-off frequency of \$12\, KHz\$.
The second order section is as follows:

The transfer function of this section I calculated:

\$ H(s)=\frac{s^2}{\frac{1}{R_2R_4C_1C_3}+\frac{1}{R_4C_1}s+\frac{1}{R_4C_3}s+s^2}\$

The first order section is as follows:

The transfer function of this section calculated by me is:

\$H(s)=\frac{1+\frac{R_2}{R_3}}{1+\frac{1}{R_1C_1s}}=\frac{\big(1+\frac{R_2}{R_3}\big)s}{s+\frac{1}{R_1C_1}}\$

Through the Butterworth polynomials:

\$H_{LP}(S)=\frac{1}{S^2+S+1}\frac{1}{S+1}\$

To transform into a high pass, I have to make the transformation:

\$ S\rightarrow \frac{\omega_C}{s}\$

\$H_{HP}(s)=\frac{1}{\frac{{\omega_C}^2}{s^2}+\frac{\omega_C}{s}+1}\frac{1}{\frac{\omega_C}{s}+1}=\frac{s^2}{{\omega_C}^2+\omega_Cs+s^2}\frac{s}{\omega_C+s}\$

The coefficients are matched and a system of equations is made:

System of equations for the first order section:
\$1+\frac{R_2}{R_3}=1 \rightarrow R_2=0; R_3=\infty\$ (Buffer)

\$\frac{1}{R_1C_1}=\omega_C\leftrightarrow \frac{1}{R_1C_1}=75398,22\$

I considered that \$C_1=100\,nF\$. So:

\$R_1=132,63\,\Omega\$

System of equations for the second order section:

\$\frac{1}{R_2R_4C_1C_3}={\omega_C}^2\$

\$\big(\frac{1}{R_4C_1}+\frac{1}{R_4C_3}\big)=\omega_C\$

I considered that: \$C_3=100\,nF\$

So:

\$\frac{1}{R_2R_4C_3}=568,49 \rightarrow R_2=66,31\,\Omega\$

\$\big(\frac{1}{R_4\times 10^{-7}}+\frac{1}{R_4\times 10^{-7}}\big)=75398,22\rightarrow R_4=265,26\Omega\$

The final circuit which is supposed to have a cutoff frequency \$f0=12\,KHz\$ is as follows:

I would like if you could check the calculations and if you could tell me if this circuit I built has the correct cut-off frequency.

Error of Qucs simulator:


texts:
I have two questions concerning the placement of the inductor in an led driver circuit using the AL8860 by Diodes Inc..
I'm refering to the typical application circuit below:

In their layout guidelines they recommend to "place the inductor as close to the device as possible" and while I understand why this is done with specific components like e.g. bypass capacitors, I don't understand why I would have to do so with an inductor in this case. As the inductor's purpose is to smoothen the current so that the switching regulator has enough time to do its work, I would have expected that it doesn't matter where exactly the inductor is placed.

question: Why does the inductor's location matter and does the inductor have an additional purpose?
question: Why can't I or can I reverse the position of the leds and the inductor?


texts: PIC MCU and LCD display 16x2 - strange behavior

texts:
I have a LCD display 16x2 connected to a PIC32MX470F512L. On PIC32 I configure all the 6 pins used to interface with the LCD as open drain outputs on 5V tolerant pins, I have 4.7K pull-up on each line (DB4-DB7, EN and RS), as the hardware schematic shows.

A start up of the PIC there is at least 4 seconds (initialization of other hardware connected to the PIC) before the PIC interact with the LCD. For the initialization of the LCD I send:

0x02; /* send for 4 bit initialization of LCD */

0x28; /* 2 line, 5*7 matrix in 4-bit mode */

0x0C; /* Display on cursor off*/

0x06; /* Increment cursor (shift cursor to right)*/

0x01; /* Clear display screen*/

My clock for writing to the pins of LCD is slow speed. When I write to LCD, I set up the logical levels of the pins DB4-DB7 and RS (command/data) according to what is to be writen, wait at least 1ms, put EN (LCD clock) to 1, wait at least 1 ms, put EN to 0, wait at least 1ms before put EN to 1 again (the start of the next character/command)

I did a firmware where the PIC writes "SIMPLE TEST" on the second line of LCD after its initialization.

The behavior is:

(1) I program the PIC and when it start the code, the string "SIMPLE TEST" is shown on the LCD (picture attached)

(2) I program the PIC again and when it start the code, it doens't show the second line string ("SIMPLE TEST"), and the first line LCD is full of dots (picture attached)
This is the loop: (1), (2), (1), (2), (1), (2)....

On each reset of the PIC, after each reprogramming (without change anything in code), the results are 1,2,1,2...
Reseting the PIC via SoftReset() gives the same loop.
One time it works, one time it does not work, in loop.
What can be the reason of this, it should always work...


texts: What is Positive and Negative Mux input in ADC

texts:
I am trying to understand the use of Positive and Negative Mux input in ADC, I have recenlty bought Atsamd21-Xplained board from Atmel and trying to get multiple pins ADC using ASF4 and with Atmel Start.
While i was exploring the concept of ADC on Samd21,i came up with Positive Mux Input Selection and Negative Mux Input Selection drop down menus while configuring ADC in Atmel Start

I have came with the information that these are used for inputting into ADC.
But what is the purpose.?Why it's used.?How can i configure for a single pin ADC and Multiple.?
My other question is : How can i read Analog values from multiple ADC pins on ATsamd21 with ASF4 and Atmel Start.

Thank you.


texts: Simplest adapter resistors to charge a phone while the phone is an OTG host

texts:
I tried to make a micro USB to USB-C adapter by making the connections shown with red lines below (so 11 of the 24 USB-C pins are used and other pins float).  This is the view looking into the USB-C plug (as if you are the matched USB-C receptacle) and the 4 connections at the top connect to the GND, VBUS, D-, and D+ on the micro-USB receptacle (ID floats).

My USB-C phone then charges, but unfortunately does not notice when a keyboard gets connected to the micro USB (through a normal OTG hub with charging).  For me, the spec isn't clear about data because it focuses more on power delivery...should I really not get data with this setup?  If not, can I add an "Ra" resistor on VCONN (or some other pin) to get data?  Sorry if I'm the only one who can't read the spec well, but I'm just trying to find the cheapest way to charge and use a keyboard simultaneously.

(For the record, adding a 5kohm resistor from CC1 to GND makes the micro USB keyboard work, but then I cannot simultaneously charge the phone.)


texts:
I simulated the two multivibrator models in CMOS technology using the cadence tool. I was expecting the model 2 with Schmitt trigger(ST) will show robustness in  PVT (Process Voltage temperature) analysis as compared to model 1 due to ST. But this was not the case both the Models shows the same response to PVT variation analysis means their outputs were stable under varying PVT conditions. Could anyone address my queries:

Is Schmitt trigger in Model 2 having an edge over model 1?


texts: How to determine if an unmarked device is 110V or 220V?

texts:
I have a Chinese laser power supply that the mfg insisted was 110VAC input. The fan runs and everything seems ok, but I only get a fraction of the power out of it (3ma instead of 27ma max). I suspect that it is actually 220V. Is there a way to determine what voltage input a power supply needs? I will open it up if necessary (waiting a day and discharging all the high voltage capacitors of course).

I can tie it into the 220v in my shop, but if it is not rated for 220v it will likely destroy it. Is there any way to know before that point?

Here is the video of my initial test if it is helpful:
https://www.youtube.com/watch?v=xOA96iQiC1c


texts: Interface/pinout of a smartphone camera module?

texts:
I am wondering where, if any, I can get information regarding interfacing/connecting with a smartphone camera module. For example, this camera module is a replacement for SGS4 and I can clearly see that it had a connector. Does anyone knows where I can find manufacturers of such modules, and hopefully how to connect and use them in a different project using a microcontroller (or similar?)

Thank you


texts:
For one of my PhD project I have to measure power consumption from different electric wheelchairs during various tasks and recor these measurment for later studies. I have not much experience in electronics so I am not sure where to start!  I will neeed to measure current and voltage in a non invasive way and have a system that can be moved faast among the different wheelchairs.
Could someone give me some guidance in terms of what sensors could be more appropriate and how I could do something like this?

Thanks


texts: Can 1000w inverter with a peak power of 2000w be able to power a 160L refrigerator,. ( Power ratting of the fridge is 130w/1.3a ).


texts: Positive-negative voltage from dual supply

texts:
I'm trying to build a low cost hifi (Hiraga Le Monstre) but I have two old computer PSUs at hand so I tried to use it as power source. The Monstre needs +12V and -12V, computer PSUs have both, but the negative output can only supply 0.8A or so, which is probably not enough.

My idea was this. PSUs are supposed to be galvanic isolated. Which means I should be able to connect one's GND to the other's 12V and use it as a floating common ground without burning something and getting -12V referenced to the common at the original GND. Seems like my plan fails somewhere. I was cautious and connected the two PSUs through a 630mA fuse, which burned when I turned them on. Both units worked independantly so they didn't break, only the fuse burned.

What was I missing? Or any ideas how to get it done safely?


texts: Deign Finite State Machine - result doesn't look like what I want -vhdl

texts:
everyone. I design a Finite State Machine and try to implement it using VHDL, but the result confuses me. I take too much time on this but I still cannot solve this. Could you give me some advice ?

The logic of State Machine as below:

if flag = '0', then cnt <= cnt + '1' ;
if cnt equals 12, the process will be reset.
I write the VHDL code for this, as below:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.all ;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity getCANID is
    generic ( IDNUM : natural := 11) ;
    port ( clk_sample, rst  : in std_logic ;
             start          : in std_logic ;
             flag   : in std_logic ;
             cnt_dis                : out std_logic_vector(3 downto 0) );

end getCANID;

architecture Behavioral of getCANID is
    type State is (s0, s1, s2, s3) ;
    signal present_state, next_state : State ;
    signal cnt : std_logic_vector(3 downto 0) ;
begin
    state_clocked : process(clk_sample, rst)
    begin
        if rst = '1' then
            present_state <= s0 ;
        elsif clk_sample'event and clk_sample = '1' then
            present_state <= next_state ;
        end if ;
    end process ;

    state_comb : process(present_state, start, flag)
    begin
        case present_state is
            when s0 => cnt <= (others=>'0') ;
                if start = '1' then
                    next_state <= s1 ;
                end if ;
            when s1 => cnt <= (others=>'0') ;
                if flag = '0' then
                    cnt <= cnt + '1';
                    next_state <= s2 ;
                else
                    next_state <= s3 ;
                end if ;
            when s2 =>
                    if cnt = (IDNUM + 1) then
                        next_state <= s0 ;
                    else
                        if flag = '0' then
                            cnt <= cnt + '1';
                            next_state <= s2 ;
                        else
                            next_state <= s3 ;
                        end if ;
                    end if ;
          when s3 =>
                if cnt = (IDNUM + 1) then
                    next_state <= s0 ;
                else
                    if flag = '0' then
                        cnt <= cnt + '1';
                        next_state <= s2 ;
                    else
                        next_state <= s3 ;
                    end if ;
                end if ;
        end case ;
    end process ;

    cnt_dis <= cnt ;
end Behavioral;

I write a testbench to simulate this simple proj. but the result is what I want.

I think the cnt should keep increasing when flag equals '0' at every rising edge of the clock. The result seems confusing. Could you help me?

The development tool is:
Xilinx ISE 14.7


texts: I wanted to design a clock based system that would do a task at a certain time, but I do not possess a microcontroller like Arduino due to lockdown(Corona pandemic). My task involves making a motor run at 6 am in the morning. I know that USB can give 5V supply to the motor(I have a motor that can handle 5V and actually needs 5V). Now what I am asking is, is it possible to manipulate or write a program and load it in phone that would turn on the motor connected to the phone via USB(the USB portion of the micro USB cable has been cut off to expose the 5V line). The motor would turn on when clock in phone strikes 6 am. So how can I achieve this control mechanism?


texts: How to find replacement for a discontinued thermistor component?

texts:
I am in need of a thermistor with characteristics, such as those of now discontinued KTY84-130 (link to datasheet). I am after the exceptional linearity it features and also temperature range, up to ~ 250-300 °C. Its low price was also a plus.

How do I find out what's a good replacement thermistor I could use instead?


texts: Is this a good design & layout of an active differential 'scope probe?

texts:
This question is an extension of Homebrew differential 'scope probe. I thought I should make this a new question though.

I need to measure a 100Mb/s LVDS signal to check its integrity. I will try to get hold of a 'scope with a 600MHz bandwidth, but I need a differential probe, and can't afford a real one. So I have designed a solution using the THS3201DBVT 1.8GHz current feedback op amp.

This is my first design using a current feedback amp, and my first high bandwidth design. I would be very grateful for any feedback (pun, sorry).

Added: Thanks to The Photon for suggesting removing the ground plane under the input pins of the OpAmps. Here's the layer just below the top layer, showing the new cutouts. The same thing has been done to the other layers too.


texts:
I'm trying to figure out possible methods in sending GPS location in my project to the server and one possible option is still mystery to me. I hope someone will be able to clarify it.

The most common option as I understand is to have something like this GPS module and send gathered information via GSM module connected to this.

However, I see many travelers on Facebook use something like SPOT devices. According to the website they can send position back to user without GSM connection. So how this can be done? Are there some other GPS modules beside the ones like on Adafruit? I've checked different websites and cannot find any with transmitting capabilities. The one idea I have is suggested by one of their products - satellite phone. Maybe they just use instead of GSM signal satellite signal (I have no idea what's the name of that).


texts: Why are power losses in fiber-optical cables so high?

texts:
Suppose we have two arbitrary points A and B. Transmission between these points is over optical-fiber. We don´t care the wavelength, distance  and other stuff.
Now suppose we have total attenuation of 16 dB in average between these 2 points. According to general decibel formula:
$$ 10\log_{10}\left(\frac{P_\text{out}}{P_\text{in}}\right) = 16\,\text{dB}$$
When we solve the formula and the relationship between power out and power in:
$$10^{-1.6}=\frac{P_\text{out}}{P_\text{in}}=0.025$$
It means to the customer, only 0.025 of the power sent from the source (ISP, and so on) arrives. That means if we want to the customers to receive 1 watt, we need to sent at least 40 watts:
$$P_\text{in} = \frac{1\,\text{W}}{0.025}=40\,\text{W}$$
Does this really happen?  Do companies spend hundreds of watts so that only a few watts reach customers because of attenuation? Does that make sense?


texts: Where do companies get miniature GPS electronics from?

texts:
When I look at something like Adafruit's ultimate GPS, it's small, but it connects to "big" hardware, compared to the GPS watches in the store.  Where do companies like Garmin or Samsung get the tiny electronics to put GPS into a watch?  Is it all proprietary, or can a regular person get it?

Edit:  Maybe the better question is how do they fit it into a watch?  It's not the chip per se, it's what they connect it to (I think).


texts: How to reduce tape hiss while recording a cassette tape with digital data as source

texts:
I bought a few Maxell cassette tapes, a portable Sony cassette tapes recorder (with the possibility to record also from an external microphone: in my case, a jack connected to the PC) and - as already said - I have a male-to-male jack to connect the recorder to the line out of the PC.

I tried to record something (a few FLACs on Audacity) after having set the volume loud enough but not so much that it would make the recording sound distorded and, while it seems that the audio is correctly recorded, I can hear a lot of tape hiss. By a lot, I mean quite a lot more than the one I can hear in old tapes I have at home.

Are there any tricks (in Audacity or not) to reduce it? Thank you very much!


texts: Strange behaviour of dc power supply unit- Voltage increases as loading is increased. What could be the reason?

texts:
I was testing an SMPS converter( efficiency test) with varying load current. The input voltage  to the converter is held constant by a standard dc power supply unit in lab.

As a general trend , I see the input voltage ( from dc power supply unit) dips slightly as loading is increased.
 But for few readings I see an increase in input voltage( from previous reading) as loading is increased.

Is there any valid reason for this behaviour? We have checked multiple times and see this behaviour for couple of readings.

Edit: We got the expected results while performing the same test next day.:)


texts: Why is static-dissipative (sometimes mislabelled "anti-static") polythene pink?

texts:
Is it related to the anti-static properties (and therefore "all" pink bags are static-dissipative)?

Or is it simply a distinguishing colour added during manufacture which may also be applied to normal polythene?


texts: PIC16: How do I modify the configuration words?

texts:
As I understand, the configuration words are different to the standard 8 bit registers. They are 14 bit wide, and they can only be accessed in "programming mode".

From reading the datasheet I do not understand how to enter programming mode and then modify the configuration word. Can I modify the programming word from my C code (e.g. within the main function), or should I somehow instruct my programmer (PICKIT 3) to do some magic before the main function is reached?


texts:
In many simple microcontroller power controller applications, I see controllers that work in an "increment/decrement" on error with hysteresis implemented e.g.

if(targetvoltage<errorvoltage) PWM_Output++;
else if(targetvoltage>(errorvoltage+hysteresis)) PWM_Output--;
SetPWMOutput(PWM_Output);

It seems to be somewhere between a bang bang controller and a PI controller (error is integrated kind of and stored in PWM_Output, P scaling is most likely done by the transistor driver) but its not quite either. What kind of controller would this be?

Obviously its not a particularly fast controller but it seems to work OK for some of the applications I've tried.


texts:
I am writing a delay subroutine in assembly language for the MSP430. I want to know how to calculate the number that have to put in Register R10 in order to achieve a 20ms delay. Thanks

Delay    mov     #Number,R10 ;20 ms delay
L1       dec     R10
         jnz     L1
         ret


texts: Do energy storage systems really improve the quality of the energy?

texts: I know that an ESS (energy storage system) improve power quality issues avoiding interruptions, controlling the voltage and the frequency, injecting reactive power into the grid thanks to the capacitors in their inverters etc... but, inverters produce also harmonics, right? So, is it really correct to say that ESS improve power quality issues?


texts: I am working on repairing a TRS-80 Model 4P and would like to test to see if a buffer is working. The problem is the line keeps being held high and I would like to pull it low to see if it is working. Can I/what resistor could I use to pull the line low temporarily(few seconds)?


texts:
I need to use some sort of jumper to allow heavy current from terminal block to the relay pins:

Dimensions shown in mm. I want to replace this trace with a jumper, preferably SMD. Going through datasheets, I found these:

High resistance makes this almost useless. I want the current handling capacity around 25 A. This components gives 10 A for 30 degree C rise. There are other packages available at different price but they don't make much sense for my project.

I checked current sensing shunt resistors which are available in 1 mohm resistance and 5 W power handling capacity for almost the same price. Should I go for these instead of jumpers?


texts: Board Assembly double sided vs single sided

texts:
I am willing to manufacture a PCB from China, but  I am wondering how much the cost will be deference between double-sided or single-sided assembly, rough estimation will help.
Thanks


texts: What is the oscillator used for on HT12E/D?

texts: Every tutorial I've found on the internet connects the oscillator in and the oscillator out with a resistor. What can these ports be used for?


texts: How can I do this source transformation/Reduce this circuit?

texts:
I've seen and solved many examples but I'm stuck here . Maybe I'm confused as to what is parallel and what is in series here.

I can do the transformations up to the 1A current source but I can't isolate a parallel resistance for it so I can transform. It's most likely simple . Can I add it with the current source on the left as if it has zero resistance ?

PS:This is from the unsolved problems section of a textbook I'm studying and it is no homework.


texts:
I have to use a TFT panel but I have never used any before and I really can't get how it works and how I can interface it with a microcontroller.

I found INT057ATFT which seems to have an integrated TFT controller so I guess I just interface it with the 8080 interface of my microcontroller.

But I have been advised to use a TFT like the TM056KDH01 and this one I really don't get how I can interface it with a microcontroller. On the pin descriptions I don't even see the RGB pins.

Could you explain me how these screens work and how to use and interface them?
For the microcontroller I will choose it depending on the screen I take so I don't have made my choice yet. I will take something which is possible to interface with the screen.

Another thing is: is there any advantages using one or the other type?

After some research I found out that it would not be easy to interface a tft panel with an RGB digital interface with the microcontroller. Then I thought about using a tft controller and I found the SSD1963 which seems great because it can drive tft with a resolution up to 800/480 but it needs 3.3V supply AND 1.2V supply.

Does anyone know about another controller with the same caracteristic but with only the 3.3V supply?


texts:
I am modelling an Automatic Cruise Control model in Simulink. I used the PID block and tuned the parameters by trial and error. Now the tuned PID controller works for input speed ranges from 40 kph to 165 kph.  The problem is that when I enter the desired speed value to be less than 40 kph, it no longer works!

What could be the problem? Also, as I am using blocks from simscape to build my vehicle model, I don't know the transfer function.


texts: Difference between DMM and oscilloscope measurements

texts:
I have a 220 - 14 V transformer, but when I hook it up to oscilloscope or DMM they show different values. DMM shows 11.8V and oscilloscope shows 17.2.

Ok, this is cheap Chinese transformer, so it can possibly be not accurate, but what the hell with readings? I know my equipment kinda low-class and low-accuracy, but how can it have such a big difference? What is the reason and what reading is more accurate?


texts: What's the current rating of this meter?

texts:
It's a meter to measure the consumed amount of electricity (Electrometer). If you go to this link and click on "View Feature". It's written like  5(60) A.

I think it means it can measure up to 60 amps. But what does the number 5 refer to?

The wire that is connected to this meter can carry up to 150A. Should the circuit breaker be 60A or 150A?


texts: Is the impedance controlled board necessary for my camera board?

texts:
Could you please let me know if my board needs impedance control?
I'm designing a camera board using the IMX225LQR image sensor. After drawing schematic I contacted a company for PCB design and sample manufacture. But they asked me if I need an impedance controlled board which makes additional costs of $200~$300. I have no idea if I really this.

The system clock frequency of the image sensor will be between 27~72Mhz. And this camera board would not have any MCUs and RAMs. I would provide the system clock from outside of this board using PWM of STM32F407. The size of this board is 40mm x 50mm which means the line of trace shouldn't be so long.

this is the data sheet of the image sensor
- http://www.ryida.com/upfile/IMX225LQR-C_E_TechnicalDatasheet_Rev0.2.pdf


texts:
On all about circuits I keep seeing E in tables like this:

In the table I and R make sense with the units. But the E doesn't. So where does it come from?

I was looking at this article on superposition theorem..


texts: Detecting the placement of my finger on an invisible grid

texts:
Yes, a similar question was asked before, but mine is different. Let me explain what I am thinking of.

Suppose I have an invisible 3 x 3 grid on my desk, is there any way I can detect which square I place my finger on? To clarify, when I say invisible, I mean I cannot see it, but the computer knows it is there, and I have a general idea where the 9 squares should be.

If it makes it any easier, imagine the grid is drawn on a piece of paper, and I need to detect which square I place my finger on without attaching anything to the individual squares.

The way I thought I could accomplish this task is to use one of those distance sensors, one for each row (or column). So I have three distance sensors, and depending on how far away my finger is from the sensor corresponding to row which my finger is on, it gives me a reading to indicate the exact square. This method seems simple, but the drawbacks for me are that the device will be too bulky if I use the commonly known HC-SR04 sensor (is there a smaller one?), and would be a nuisance to extrapolate to, say, a 20 x 20 grid (not to mention expensive).

Is there a cheap method I can apply to measure distance or position somehow on an invisible grid?


texts: prevent metavalues for input ports in VHDL simulation

texts:
In my VHDL design I have entities with port definitions similar to this:

entity dummy is
  port( cpl : cplxRecord_t )
end entity

type cplxRecord_t is record
   r1 : anotherRecord_t;
   vec: unsigned;
   lin: std_logic;
   ...
end record

in the architecture I use some standard functions for unsigned, e.g. to_integer(cpl.vec). These complain during simulation startup Metavalue detected. Returning .... I would like to eliminate the cause of these warnings. So far my only idea is to assign a default value to that port. However having to define each element feels like a bad solution, making htis a maintenance headache when elements are added to/removed from the record. Is there some way to initialize the port with all '0' (Zero)?

Q: How do I prevent Metavalue detected warnings, caused by unsigned ports being uninitialized U during design loading and processesd by to_integer?

P.S.: I am using modelsim. And this font makes it hard to differntiate between letter o and zero. O0o


texts:
I currently try to read a register from an acceleration sensor (ADXL345). i try to simulate the SPI procedure with software. I wrote a readRegister function:

uint8_t readRegister(uint8_t reg) {
    uint8_t i, k;
    uint8_t res = 0;
    GPIOD->ODR &= ~(1<<CS);
    delay_ms(2);

    // write register address
    GPIOD->DDR |= (1<<SDIO);            // SDIO as output
    for(i=0; i<8; i++) {
            GPIOD->ODR &= ~(1<<SCLK);
            if(reg & (1<<7)) {
                    GPIOD->ODR |= (1<<SDIO);
            } else {
                    GPIOD->ODR &= ~(1<<SDIO);
            }
            delay_ms(1);
            GPIOD->ODR |= (1<<SCLK);
            delay_ms(1);
            reg <<= 1;
    }

    // read result
    GPIOD->DDR &= ~(1<<SDIO);           // set SDIO as input
    for(k=0; k<8; k++) {        // loop over data bits
            res <<= 1;
            GPIOD->ODR &= ~(1<<SCLK);
            delay_ms(1);
            GPIOD->ODR |= (1<<SCLK);
            if(GPIOD->IDR & (1<<SDIO)) {
                    res |= 1;
            }
            delay_ms(1);
    }

    GPIOD->ODR |= (1<<CS);
    return res;
}

The function returns 227 (so 11100011) instead of 119 (01110111) even though i wrote 119 to it with this code:

void enableADXL345(){
    uint8_t write;
    uint8_t addr;
    uint8_t data;
    uint8_t result;
    uint16_t write_command;
    uint8_t read_command;

    addr = 0x31;
    data = 0x04;
    write_command = (write | addr) << 8 | data; //set SPI 3-wire
    writeCommand(write_command);

    addr = 0x27;
    data = 0x77;
    write_command = (write | addr) << 8 | data; //write something
    writeCommand(write_command);

    read_command = (0b10000000 | addr);
    result = readRegister(read_command); //read something
}

This is my write function:

void writeCommand(uint16_t cmd){
    uint16_t i;

    GPIOD->ODR &= ~(1<<CS);
    delay_ms(2);
    GPIOD->DDR |= (1<<SDIO);  //SDIO as output
    for(i = 0; i < 16; i++){ //start to transfer the register we want to read
        GPIOD->ODR &= ~(1<<SCLK);
        if(cmd & (1<<7)){
            GPIOD->ODR |= (1<<SDIO);
        } else {
            GPIOD->ODR &= ~(1<<SDIO);
        }
        GPIOD->ODR |= (1<<SCLK);
        delay_ms(1);
        cmd <<= 1;
    }
    GPIOD->ODR |= (1<<CS);
}

This is the SPI-read/write as described in the datasheet:


texts: How to remove multiple if else to handle data easily

texts:
I am doing a project which has a custom made board based on PIC32 MCU. It has 30 Inputs and 10 Output. I have to monitor inputs and send there information to UART. Each inputs is defined a code. For example: if input 1 is ON,then data to be send is 11 {'1'--> Input 1, '1' --> ON}. If input 1 is OFF, then data to be send is 10 {'1'--> Input 1, '0' --> OFF}. Similarly is 24th input is on, then 241, if its off, then 240 and same goes for all the inputs.

Now the final data to be send over UART will contain information about all the inputs:

10 20 30 41 50 61.....271 280 291 300

As I am beginner in programming, what I have done to achieve above syntax is I have defined variables for every inputs.

char input1ON[]  = "11";
char input1OFF[] = "10";
bool input1Stat  =  false;

char input2ON[]  = "21";
char input2OFF[] = "20";
bool input2Stat  = false;

and same for complete 30 inputs. Now in main function:

if(PORTDbits.RD6 == 1)  // if input1 is high
{
  input1Stat = true; //make input1 status true
}
if(PORTDbits.RD6 == 0) //if input1 is low
{
  input1Stat = false; //make input1 status false
}
if(PORTDbits.RD7 == 1)  // if input2 is high
{
  input2Stat = true; //make input2 status true
}
if(PORTDbits.RD7 == 0) //if input2 is low
{
  input2Stat = false; //make input2 status false
}
/*
* same goes for rest of the inputs
*/

then after all the if statements, I am checking if input1stat is true then strcat it, like below:

if(input1Stat == true) //if input 1 status is true
{
  strcat(inputs,input1ON); //concatenate input1ON variable with inputs variable
}
else
  strcat(inputs,input1OFF); //concatenate input1OFF variable with inputs variable

if(input2Stat == true) //if input 2 status is true
{
  strcat(inputs,input2ON); //concatenate input2ON variable with inputs variable
}
else
  strcat(inputs,input2OFF); //concatenate input2OFF variable with inputs variable

So at the end I am just putting inputs to UART:

putsUART1(inputs);

so as a result I am getting the above string of data on UART. But the problem is there are many if else statements in my code which is making the code unreadable. I think there may be some other way of handling this. As I am beginner, I don't know how to remove all these if else statements. Any one can just give a demo to remove all the if else statements. Thanks.

EDIT

Input 1 and Input 2 is nothing but PORTDbits.RD5 & PORTDbits.RD6. I used Input 1 and Input 2 just for demo. I have made the changes.


texts: USB Interfacing of TETRA device with microcontroller

texts: I am trying to interface my TETRA device with the microcontroller using the USB interface. The microcontroller will act as a usb host while the TETRA will act as a USB device. I am using STM32F469I-DISCO development board. The microcontroller which I am using supports the USB interfacing too. Is it possible to have such kind of interfacing with this TETRA device? Please note , this TETRA device needs a specific USB driver (provided by the company) to install and run while connecting the TETRA device with the PC COM port, but now I want to connect it with the microcontroller development board. Does the development board can support only those USB devices which don't require a driver to run?


texts: EL Wire vs EL Panel, difference in voltage and frequency needed?

texts:
I am currently researching Electroluminescent Inverters/Drivers for a project. There is many accounts that EL Wire needs a higher voltage and frequency than an EL panel or tape needs. (300vpp vs 150vpp, 2000hz vs 400hz, typical/average numbers). Considering that phosphor is phosphor, and two capacitors of the same arbitrary value should act the same, why is this? Why would 1 square inch of EL Wire differ from 1 square inch of EL panel/tape?

I do understand that a higher voltage can drive a larger run and a higher frequency can make it brighter, but all things considered equal, why would the form factor of the two matter?

As Electroluminescent displays are essentially capacitors, I don't understand how the different frequencies matter.


texts: I can't get the equation of a karnaugh map

texts:
MD\F 0    1
00   0    1
01   0    1
11   1    1
10   0    0
this is a karnaugh map.
Now , I take in horizontal  1 1 .
As a result I have  M*D.
The F is 0 if we see that it means NOT F and we have 1 so F it remains F.
The F I can erase it ,is that right?
I have the equation for horizontal
M*D + ..
After this,I want  after +  of that equation to fill it with the vertically the 1 1 I have.
As we see vertically I have 1.As a result we have F.
that means our equation goes like this
M*D + F
After this I feel I don't make it right.I look at MD in the first row are
     M D      and we have F
     0 0                  1

so it is not M  NOT D.Lets write it M' D'
for the second row 01 of the MD
it is 01 and in the vertically we have 1.
NOT M *D ,lets write this M'*D
that comes to this
the equation  is
M*D +  F(M'D' * M'*D).
I simplify the equation so it is
M*D +F*M'

Is right the equation?


texts:
This is a follow up to a previous question I had answered.  I'd like to show the following diagram.

Here, I have laid out (crudely) a diagram that has 120v-110vAC from the wall going to a push button switch that controls an Edison bulb and has an integrated LED on the switch.  The wiring diagram for the switch is as follows:

and here's what the switch looks like ideally when operated.

Can anyone recommend a power supply that will allow for me to both wire in parallel my switch taking 120v-110vAC from the wall and output to Edison bulb (per my diagram) and that also has an output of 5v or 12vDC for the LED that is integrated into my push button switch?  I'm looking for something that is of an extremely small form factor.  Max dimensions have to be 1/2" width :1/4" height and can be up to 3.5" long to fit inside my project space.

I had contemplated taking apart an apple USB wall block, wiring it in parallel with my switch, and then using the USB output to run power to the light.  Unfortunately, I'm not sure how to best to insulate the exposed guts of the wall block or if this is even a smart/safe idea.  (any thoughts on that are appreciated).

I would honestly be willing to build my own if I knew enough of what I was doing and because I only need it to power 1 LED.  I feel like with such a light load I should be able to use something in an extremely small form factor.  I just want to be safe.  I don't want to create a fire or electrocution hazard.


texts:
I'm willing to design an AC power meter, which can measure power from a solar inverter to the utility grid and vice versa. I am using a grid-tied solar inverter to supply the load. This meter should measure power in both directions, whether the inverter is retrieving current from the utility grid or it is supplying the utility grid with current. So the question is what is the best way to detect current flow direction to determine power consumption from grid or power generation to the grid?

I've read on some websites that I could use a Hall-Sensor to detect the magnetic field of the current on the wires so that I could tell in which direction the current is flowing.  Are there any other recommended methods?


texts: Transmitting sinewave from function generator wirelessly

texts:
I am trying to transmit wirelessly a sine wave signal of frequency from 50 to 200kHz. This signal is coming from a dedicated laboratory function generator. How can I transmit this signal and how can I then read it with an oscilloscope, with as little components as possible ?

Thanks


texts:
I've built a simple half-wave rectifier using the following components.

\$10\$k\$\Omega\$ resistor
1N914 diode
1 kHz sinusoidal source

I'm measuring the voltage across the resistor with an oscilloscope.

This is the wave I get with the source set to a magnitude of 1.5 V:

\

Bust as soon as I increase the magnitude of the source above 3.0V, this starts to happen.
\

Can anyone explain what is happening here? Is this expected behaviour, or have I made a mistake?


texts: Replace IRF7101 with IRF7301 power mosfets

texts:
I need to replace a burnt IRF7101
(datasheet link) power MOSFET. Is IRF7301 (datasheet link) a good equivalent replacement component? I cannot find the old one in any local store and I need it fixed as soon as possible.
Thanks!


texts: will a battery drain charge if connected to a breadboard open circuit and no load

texts: Can you please let me know practically is it possible to drain the charges of the battery if the terminals are attached to a breadboard on two different columns and without load. Ideally if its open circuit it should not.


texts: Where is the antenna in this remote control board?

texts: This is a PCB of a (radio?) remote control.


texts: Simulate power of intermodulation products

texts:
I would like to predict if in- and out-of-band interference will hurt my ability to read signals in the 902-928MHz spectrum.

I recorded the maximum received interference power from 10MHz to 3GHz with a spectrum analyzer connected to my antenna. I think if I model the input to my system as a two-tone signal made of the \$i^{th}\$ interferer and my desired signal, I will be able to predict the power of each of the intermodulation products and harmonics in my spectrum.

For example, with an uneven two-tone input to a non-linear system, the second-order IM products will be:

$$
V_{in} = Acos(\omega_1 t) + Bcos(\omega_2 t) \\
V_{out}(x) \approx a_0 + a_1 x + a_2 x^2 + a_3x^3 \\
V_{out, 2nd}(x) = (1/2~a_2A^2)cos(3\omega_1 t) + (1/2~a_2B^2)cos(3\omega_2 t)
$$

However, I am not sure how to translate the last formula to "real life". The spec sheet for an LNA has measures like the IIP3 point, not the non-linear coefficients \$ a_0, a_1\$. I did find a formula to estimate the power of the 3rd order IM products, using the IIP3:

$$
P_{out} = 3 P_{in} - 2 IIP3
$$

Is there an IIP formula for predicting the power of other IM products and harmonics? Failing that, is there a way to simulate the power of all the products and harmonics with Matlab's RF Toolbox or Excel?

For context, I am an intern helping design the RF front end for a wireless networking startup. I don't have much experience with RF, but I've been doing some reading on interference and LNA design.


texts: power supply with Battery Backup -MOSFET reverse polarity does not work as intended

texts:
simulate this circuit – Schematic created using CircuitLab

This is my battery backup system for a laptop pc running 24/7.

So normally the Load is powered from primary supply and the battery is being charged.When the primary power is lost its sensed by the switching circuit turns on the boost converter.

I don't mind a momentary power loss when the switching happens.

Current design is using a diode (schottky?) to block the power going back so it doesn't trigger the power sense circuit or charge the battery when under battery power.

What i need to know

Is there a way to make this system work without adding a diode so there wont be a voltage drop from primary power to load (MOSFET?)
what type of circuit is suitable for the switching circuit?

some points to consider

I cant change the input voltage or Load
Boost Converter output voltage is adjustable

Also i would prefer not to use any mechanical switching such as relays.

Edit 1:

First Attempt

by adding a MOSFET on the high side of the main power connection

Using MOSFET reverse polarity protection doesn't work as intended because  when boost converter is active current is fed back in to the charger

simulate this circuit


texts:
I'm designing low-power sensor modules which will be spread over a reasonably small area. The modules are all battery powered and should operate for a decently long time without having to recharge/replace the batteries (the longer the better, think at least a few weeks if not months or years). The idea is that every half hour or hour the module will wake from low-power mode, take some samples, and transmit the data to a central data-logger. The central data-logger will likely be wall-powered so low-power consumption isn't as necessary. I don't expect any modules to be any further than 100m from the central logger, likely much less.

I've identified some possible transceiver modules that potentially could work:

ALPHA-TRX433S, 433 MHz
ALPHA-TRX915S, 915 MHz
Microchip MRF89XAM8A, 868 MHz
Microchip MRF89XAM9A, 915 MHz

From what I've read, these modules all operate in FCC unregulated bands and should be safe to use. The Alpha modules advertise 300m range, but I can't figure out what the expected max range of the Microchip modules would be. How would I go about calculating this?

Also, since I do have my choice of bands, which should I pick and why (i.e. what do I get from 915 MHz over 433 MHz and what do I lose)? In order of what parameters I would consider most important:

Low-power
Transmission range (more is better, within reason)
Immunity to other environmental factors (i.e. wifi/cell networks, running microwave ovens, walls/physical obstacles, temperature, etc.). The target use is in a residential environment and there will likely be significant temperature variations (say -20C to 50C).
Data rate. This isn't terribly important as I'm expecting very little data per sample (few bytes at most).

Another question I have is how to handle multiple modules trying to transmit data at the same time. I have a few thoughts about how to mitigate this, but I'm not sure which solution to proceed with:

Use a random time offset for when data is transmitted. The hope is that collisions will simply be avoided. This would probably be the simplest to implement and potentially will use the least power. However, this doesn't guarantee that there will be no collisions. Also, getting a good randomness source or unique pseudo-random seed may cause problems, though not unsolvable.
On wake-up and attempting to transmit, check to see if there are any transmission currently in progress. Just wait for the end of the transmission before sending data. The problem then becomes how do I handle multiple sensors in the wait state, as they could potentially both decide that the last transmission has ended and both begin transmitting at the same time.
Some other solution.


texts:
I am trying to calculate power dissipation of the IC for thermal analysis of the PCB. I have calculated the power consumption but not sure which current values to be considered for calculating power dissipation of particular IC.

Power Consumption = Vcc * Icc

Need help. Thanks in advance!!


texts: I had set up multiple receivers and I was recording the same signal on all of them. I then stacked all of these signals. I have read that to improve the signal to noise ratio, mean and median of this stacked distribution are used (with median being the better indicator.) However I was wondering if mode of the distribution is also used?


texts: Using a motor as a generator: How fast does it need to rotate?

texts:
I have a dc motor with the following specifications:

Operating Temperature: -10°C ~ +60°C
Rated Voltage: 6.0VDC
Rated Load: 10 g*cm
No-load Current: 70 mA max
No-load Speed: 9100 ±1800 rpm
Loaded Current: 250 mA max
Loaded Speed: 4500 ±1500 rpm
Starting Torque: 20 g*cm
Starting Voltage: 2.0
Stall Current: 500mA max
Body Size: 27.5mm x 20mm x 15mm
Shaft Size: 8mm x 2mm diameter
Weight: 17.5 grams

Now, suppose I wanted to use it as a generator.  How fast (in RPM's) would this motor need to rotate in order to obtain the rated voltage?  What current can I expect at this speed?


texts: Is it possible to make a USB device that would alter mouse data on the fly?

texts:
I have a friend who is struggling to find mouse drivers/manufacturers that support various options for dyslexia. Inverting the X and Y axes are a simple feature that most programs and drivers are ignorant of.

The thought occurred to me that it might be possible to construct a small USB device (similar to a thumb drive or PS/2 adapter) that a user could plug a USB mouse into and, using a couple of DIP switches, invert one or both axes.

I have a basic familiarity with programming (C#/C+) and electronics, but am not sure if there is a standard protocol for USB mice.

I'd prefer to avoid using a serial converter (though I know it has a more or less standard protocol). Has anyone used USB mice with a custom electronics project, or can explain whether constructing a USB-to-USB adapter to invert movement is possible?


texts: Is this code implying a latch and unsafe (verilog)?

texts:
I am getting started with verilog and I wrote this code here to test if a number if prime.  I know it could be a lot more efficient but it is just for practice.  The way test for primeness is when the reset signal gets sent I initialize the register div to 2.  I then increment it by 1 each clock cycle while it is not divisible by the number I am testing.  Once it becomes divisible (in this case it is either a factor where the number is not prime or the number in which case it is prime) I want to keep the register at the same value.  This is the issue.  Am I implying a latch here. I know that I am assigning a value to div in each branch of the if statement but I am not sure if I should be assigning it to itself.

module prime(
    input [31:0] n,
    input clk,
    input reset,
    output done,
    output is_prime);

    reg [32:0] div;
    assign is_prime = div == n;
    assign done = n % div == 0;

    always @(posedge clk) begin
        if(reset) begin
            div <= 2;
        end
        else if(n % div == 0) begin
            div <= div; //does this cause a latch
        end
        else begin
            div <= div + 1;
        end
    end

endmodule