texts: Quartus, Modelsim, VHDL - Viewing Internal Signals

texts:
This question is rather specific which makes it rather hard to answer.

I'm using Quartus Prime software from Altera to do an FPGA design in VHDL.  Quartus exports to Modelsim for the simulation.  I'm writing individual VHDL modules then linking them together in the Quartus Prime schematic editor.  I realize the "pro" way is to structures/hierarchies in VHDL directly so it's more portable, but I'd rather shoot myself in the face than have to do that.

I can run testbenches for individual modules or for the hierarchy as a whole.

The Question:  When running a testbench/simulation for the hierarchy as a whole, I'd like to be able to view the signal connections between modules and even more ideal the internal signals of each module to debug.  As of now I'm having to manually add extra output ports for debugging, which is annoying and requires me to modify everything.

Here is a picture of the schematic:

As you can see, the two signals running between the output of the RX_UART VHDL module and the RX_Data_Controller VHDL module have two output pins declared "DB_DATA_PARALLEL" and "DB_DATA_VALID".  Optimally I'd like to not have to add these so I can find problems happening between modules.

When a gate-level simulation is run to simulate their interaction, it looks as follows in Modelsim:

So is anyone aware of how to accomplish what I'm looking to do?  I think it will be very hard to scale up to simulating larger designs if I can't see between or inside modules.  Both modules are state machines, so it'd be nice to be able to view which state each module is in during the Simulation.

Thank you very much in advance and I appreciate your time.


texts: Why am I getting incorrect results via DC test performed in Matlab/Simulink?

texts:
I am performing DC test in Simulink to find the stator resistance.
The three phase SCIM parameters are taken as:

The setup in the Simulink is shown below:

The %error is too much (25%).
Can anyone tell me where am I going wrong?
Edit: when I changed the value of gain from 1/2 to 2/3(which should be in case of delta connection) I am getting the correct results what is happening?


texts:
I have a comparator output who is normally high and goes low from time to time.

I need a latch which will change its output from high to low when the comparator's output change to low (and keep it low even if the comparator's output goes back to high).

I also need to have an second input to the latch to reset its output to high.

If the first input (the one connected to the comparator's output) is still low when I want to reset the latch I need its output to stay low.

+------+-------+-------+--------+
| Step | Input | Reset | Output |
+------+-------+-------+--------+
|    1 |     1 |     0 |      1 |
|    2 |     0 |     0 |      0 |
|    3 |     0 |     1 |      0 |
|    4 |     0 |     0 |      0 |
|    5 |     1 |     0 |      0 |
|    6 |     1 |     1 |      1 |
|    7 |     1 |     0 |      1 |
+------+-------+-------+--------+

The main constraints are:

low PCB real estate
low parts count (I'll need a dozen of those latches)
low power consumption
5V logic

NB: the reset input can be the opposite way, it would not be a problem as it is from a simple debounced switch.

NB²: the reset is common to all the latches (giving this info in case it can reduce the part count)


texts: I need to validate the 200 mA @ 24 VAC claim on a Transformer/Power Supply. I have some resistors but I don't know how to proceed. Help anyone?


texts:
I'm looking to have several devices attached to a long (total ~10 m) powered i2c bus. The bus would be regulated to 5V at one end and the whole system will operate in exposed outdoor conditions on a balcony (i.e. limited protection from weather exposure and humans/squirrels poking it occasionally). Each individual device on the bus will contain an MCU and a suite of sensors.

This question is specifically about protecting the device ports (power/signal) on the bus from over voltage. Other concerns such as mechanical protection, coating, UV resistance, thermal dissipation in hot summers are out of scope.

I have a reverse polarity protection on the input to each device using a p-ch mosfet (it has already prevented me from frying a couple of micros during testing and development...) but I'm wondering if I should add additional protection on the power/signal lines in the form of a TVS and/or zener. I'm thinking about coupling from nearby lightning strikes/weather/mains and ESD from curious humans and "wildlife" on the balcony (is that a thing?).

Are such protections a reasonable thing to add or am I overestimating the possible damage?


texts: A signal that can be transformed by Fourier transform and its frequency

texts:
A signal A, which is in time domain, can be transformed by Fourier transform into its frequency contents.

Then, is the signal A's frequency the highest frequency part of its Fourier transform? (i.e. is the signal itself oscillating at the frequency of its highest Fourier transform frequency part?)


texts:
Under DYNAMIC CHARACTERISTICS for BT137 is Tgt value set to typically 2us.

If I then look under BTA16, I see no mention of the pulse width.

Is there a minimum pulse width as a standard value for all triac and thyristor, where there is nothing else mentioned?

And, will a to rapid trigger pulse destroy the gate?


texts:
I want to integrate an analog signal with +- 5v differential output with my rasberry pi 4b. I have 3 inputs.

I am quite new to ADCs and drowning in information instead of finding a solution.

Can someone point me in the right direction?


texts:
I have a question about the formula provided on the application notes of the HB100 sensor. It is:
$$f_d = 2v \frac{f_t}c\cos(\vartheta)$$
where \$f_d\$ is the doppler frequency, \$v\$ the velocity of the object, \$c\$ the speed of light and \$\vartheta\$ is an angle formed between the intersection of the object axis and the axis of the observer (see image below).

The application note says

  if the target is moving straight toward or away from HB100 the formula is simplified to \$f_d = 19.49v\$ (\$v\$ in km/h).

I can't derive this formula, in this condition theta angle is zero, so \$\cos(0) = 1\$ and the formula I derived is about:

$$f_d = 70.17v$$

Could someone explain how the formula reported in the application note is derived?

The application note can be found here


texts:
I am trying to simulate a simple circuit using a simulation program like SPICE. In the beginning of the circuit I have a pulse train voltage source, later it is connected to a normal LPF. The voltage source frequency is set as 1 kHz, my question is how to increase this frequency?

The only options that I have is to change the time of the cycle and the voltage. If I set 1 ms and 5V, the frequency will be 1 kHz.

If I change the time to 0.5 ms, the result will be 5V for 0.5 ms and the rest is 0. (The second cycle will not start after 0.5 ms, so the frequency is same 1 kHz). Strange!

How do I increase the frequency of the voltage source?


texts: I need to design a custom FFC cable for an electronic device (about 10cm and 34pins) I messaged a manufacturer who could make custom ffc but he needs a layout or something and I don't have experience in that, what software do I use (free software) and how do I know what FFC connectors to use and what material? , I'm a noobie in this stuff


texts: Difference between n-channel MOSFET and p-channel MOSFET in a buck-boost converter

texts:
From TI's Understanding Buck-Boost Power Stages in Switch Mode Power Supplies:

My question: why is a floating drive needed for an n-channel MOSFET but not for a p-channel MOSFET?


texts: How is wafer dicing economical (for small ICs)?

texts:
Is my understanding that, for a given technology, the cost of making a silicon wafer is pretty much fixed, in the sense that it will not change no matter how much you fill the space (how many ICs you can squeeze in a single wafer.)
Once the wafer is finished, it will come the time to dice the wafer to separate all the ICs. My understanding here is that a saw comes in and cuts between the dies separating them.

This saw will have a finite thickness, even though I wasn't able to find a figure on the internet. For the sake of the argument let's say that a reasonable thickness is 0.5mm.
There are some very small ICs out there. Once again, I wasn't able to find a precise figure, but let's say that my IC is 1x1mm.
Let's now take a look at one cell.

It appears that, for every square millimeter of useful product, we are wasting 1.25 square millimeters by sawing them off, getting a yeld even smaller than 50%.
This won't be an issue for big dies as the percentual drop in yield would be far less, but how did the industry got arround this problem for small die ICs? Sorry if the numbers aren't accurate, this is just an example, I don't know how realistic it is.


texts: Some people say that the best way to model an XOR is to use NMOS pass logic. Others say its better to use a transmission gate (or simply, pass logic). The only difference I could find in these implementations was the number of transistors required and that won't matter too much in a simple design with, say, five XORs. However, I maybe wrong and there may be some other parameters that have to be maintained when modelling an XOR. Any thoughts?


texts: Why place capacitors in front of the line to a (headphone) audio speaker?

texts:
I'm using this module based on the popular bluetooth module CSR8635
https://www.tinyosshop.com/index.php?route=product/product&product_id=875

I was wondering why, in the right-hand side of the circuit, there are two capacitors before the speaker.

In building this circuit, I have found that leaving out these capacitors result in no sound whatsoever. Tinier capacitors give less sound while higher valued capacitors give more sound. In fact, it seems the audio quality also rises with the size of the capacitor? Why is this?

Why does the audio signal become more "intelligible" after the capacitor?
 How does the capacitor value affect the frequencies that resonate inside the speaker? Shouldn't the capacitor act as a LPF and filter out any high frequencies?


texts: Sensing circuit not working as planned with op amps

texts:
I am trying to design a circuit that uses OP Amps as voltage followers for use in a sensing circuit. The circuits ultimate purpose is the sensor side would be placed in water. The sensor would then be used to detect voids in the water. With the voids being open circuits ideally causing the OP amps to output max voltage and outputting close to 0 volts when the sensor is "shorted" by water.

I thought my above circuit would work but it keeps inconsistently either doing the opposite or not working at all. Is it something wrong with the OP Amps (TL074) I'm using, which I find it hard to believe that all 10 of the ones I have are bad, or is my circuit just not designed right?

EDIT 1: The way we were testing the circuit for now was simply by shorting each channels to ground and reading the DAQ output. I.E. Shorting channel 0 to Ground on Sensor side and reading between 0 and ground with a voltmeter. Haven't used actual water yet as we figured it was essentially the same.

We're using +/-15V for the Vcc for the Op amps as well since I forgot to include that earlier.


texts: Is there a Multiplex with X inputs to control X outputs?

texts:
I want to use a multiplex to controll my circuit. I just want something that can be a switch between an input and output. I thought to create this circuit:

simulate this circuit – Schematic created using CircuitLab

Because I will use video signal, it can be very sensitive to noise. I want to imagine that this circuit will be the same than have a cable connected direct from one camera to one transmitter.

I just imagined it start from 0000. So, every transmitter will NOT have the any video signal. If I send one clock, I will have 0001 and "Camera1" connect with "transmitter 1". More clocks and I will have 1111 and every camera X is connected with the transmitter X.

What is the multiplexer am I looking? Anyone know what I need to buy?


texts: What is a lightning arrestor? How they work? And where we have to use this in our electrical power system? I think i have saw this at the output of transformer. And also i have notice that, even though we use lightning arrestor, but lightning occur to the transformer. Why this happen?


texts:
I'm curious,  with a transistor being equivalent to two diodes,  could one wire a single PNP with a pull down diode to be an OR gate? My thinking is as follows:

Is this right, or wrong.  Why?


texts:
I'm looking for a timer that starts when power is removed.

Here is the use case:

The head light on dirt bike my turns off with the engine.

This good when it's parked.

This is very bad when doing 45 mph and running out of gas at night.

So I would like to hook up a timer to the head light so that the light will come on with the engine and stay on for 30~60 seconds after I hit the kill switch. Or run out of gas, which ever comes first.

I know they exist out in the wild: http://www.grainger.com/Grainger/MACROMATIC-Time-Delay-Relay-5WMK1

Building my own would be a good opportunity to learn something. I could do it with an micro controller but that seams like over kill.

Any ideas on where to start?


texts: I want to buy some solenoid valves for watering system and attach it to Raspberry. I have choice of Solenoid valve with 12DC and 220AC. Is there any difference between them? I mean, maybe 220AC valve works more reliable?


texts:
What is the recommended way to make solid connections to the pins below?
Can the soldering be avoided, and if not, what component should be used to provide the plug/unplug connection?


texts: Physical meaning of reflection coefficient being complex

texts:
Below is a wikipedia section about reflection coefficient in electrical engineering:

source: https://en.wikipedia.org/wiki/Reflection_coefficient

It says that the incident to reflected wave ratio is complex. What does it indicate in practice here being complex?


texts: My first full contact-less power meter doubts

texts:
I need to measure power consumption of an industrial machine, it is supplied with 3-phase plus neutral connections, 220V per phase. They said there is a voltage stabilizator device between the power network and the machine inputs, so I thought to consider a fixed voltage of 220V and only measure the current with an current transformer. The measurement needs to be fully non-intrusive/invasive.
I don't need precision on this, if I can estimate the power consumption on each phase, that's ok.
There is heating power resistences to be measured inside the machine on one phase and also a monophasic motor on another. The other phase I don't know yet what it will be connected to it internally.
What's my idea to measure AC current? Currently I choose a 100A:50mA current transformer, its output goes to a resistence to convert to voltage, then the signal goes to a precision full wave rectifier, then I plan the measure its output with the ESP32 12bit ADC at around 10Ksamples/sec. ESP32 ADC voltage reference is 1.1V and I know that the conversion is not so much linear on it, if really required I will add external ADC with a good voltage reference.

At the output of the split core current transformer I suppose there will be a maximum of 50mA peak, so 50mA * 13.6R = 680mV. Also I though that in practice I will need to use a 150A:75mA CT in worst case. 75mA * 13.6R = 1020mV. That's why I did not increased the resistence value. My preference is an adaptive circuit that can work with single 3.3V supply.
How I would measure RMS current? For a period of 1 second, take 10.000 samples (each 100us), convert the ADC value of each measurement to current value in A, square them, summ all, divide by 10.000 and finally make a square root off all. Is there something wrong with this?
I did some research on web about contact-less AC voltage measurement, and it seems very difficult to me, some methods like capacitive coupling measurement.
I though to only measure RMS current and multiply by fixed 220V to obtain apparent power, due to the voltage stabilizator used on the machines. I think doing this, to estimate the power on the heating resistences it would be ok, because this kind of load is almost only resistive, and it should be considered that the machine do phase control on them to control the heating amount. I think there is very low or no phase difference between current and voltage on it (do these resistences have inductive properties like a wirewound one?), with a good power factor. The problem is to measure the monophasic motor, the current-voltage phases will be different, correct? A big doubt that I have is if it is possible, for the motor voltage supply, to correct the power factor of it using a capacitor, to make less difference on their phases, increasing power factor.
The final objective is to measure power consumption and estimate the costs to operate such machines. Main difficult is on how measure AC voltage without make contact with the wires.
What could I do?
Regards.


texts:
I am currently trying to understand the working of the CAN bus. I understand that when we connect a CAN bus logger to the OBD2 port in a car we will be able to view the CAN traffic (raw CAN frames) and in order to get specific information from ECUs, we can send a request with ID 0x7DF and would get a response with IDs between 0x7E8 to 0x7EF.
Is 0x7E8 actually the ID of the responding ECU or is it a general-purpose address just to relay the response back to the sender?
Further, why 0x7DF has been chosen to send a request?
Is there a specific reason?


texts: Intel 8259A: why use A0 when there's nothing to address?

texts:
I am in the process of writing a driver for the Intel 8259A PIC and using the corresponding datasheet for reference.

The datasheet contains a picture of the controller and its connection to the system bus:

I roughly understand the pins and connection but I cannot wrap my head around one: the A0 line.

It has two descriptions in the datasheet. The first one is as follows:

  A0

  This input signal is used in conjunction with WR and RD signals to
  write commands into various command registers, as well as reading the
  various status registers of the chip. This line can be tied directly
  to one of the address lines.

Taking a look at the ICWs (Initialization Command Words), I can understand how the A0 is used to "[...] write commands [...]." Address lines are designated with a leading "A" and a trailing number, which equals their position in the array of address lines, beginning at 0. Therefore, A0 means the very first address line of the address bus.

But address lines are used to address primary memory, that is, RAM. The Intel 8259A does not access RAM directly, though.
So why is that bit called A0 and how can it "[...] be tied directly to one of the address lines [...]"?

And why 0, specifically, if the second description says this:

  A0 ADDRESS LINE: This pin acts in conjunction with the CS, WR, and RD pins. It is used by the 8259A to decipher various Command Words the
  CPU writes and status the CPU wishes to read. It is typically
  connected to the CPU A0 address line (A1 for 8086, 8088).

(2nd emphasis added.)

So, it's A1 for x86 and A0 for those other 8259A-compatible processors only? Why A1 for x86 then? That means powers of 2, which I do not see the use for in this context.

What's the purpose of that A0 bit and its name here?


texts: finding corner frequency using .MEASURE in LTSpice

texts:
I wanted to find the corner frequency of this circuit :

I run the simulation but couldn't find the frequency using .MEAS AC f FIND frequency WHEN V(o)=-3dB command.
I am getting this error in SPICE Error Log :
Measurement "f" FAIL'ed

Date: Wed Jan 27 11:59:28 2021
Total elapsed time: 0.067 seconds.

tnom = 27
temp = 27
method = trap
totiter = 0
traniter = 0
tranpoints = 0
accept = 0
rejected = 0
matrix size = 3
fillins = 0
solver = Normal

I am able to find approx corner frequency at -3dB using AC analysis using this command .ac dec 1000 1 1Meg


texts:
I am planning to control 8x 7-segments LED displays (Kingbright SC15-11EWA) with a MAX7221 Serially Interfaced, 8-Digit LED Display Driver. However, as you can see in the datasheet, the SC15-11EWA has only one LED for the dot whereas it has 2 for the other segments, but the MAX7221 has only one lightness/current control for all the segments.

In order to fix the dot point dissymmetry, I would like to add a 2V voltage drop device that would be common to all the displays' dot points. For now, I use a orange LED with mask tape on it, but I'm worried about durability, especially if all points are on : it should receives 160mA (if I'm not mistaken) and so it will burn very soon.

I was thinking about using a 2V zener instead, but don't find one easily available through-hole with enough current rating.

Is there another solution? What do you recommend to fix the dissymmetry in my case?


texts: Can a bypass capacitor be omitted if the IC is very close to the output cap of the supply?

texts:
I was wondering if I can ommit the dedicated bypass of a specific IC if the IC is very close to the output capacitor of the supply rail?

In the image above, I have an LDO and its 0.1 µF output capacitor. The IC in the bottom corner is supposed to have its own 0.1 µF bypass. But I feel placing it would be very redundant since it's so close to the LDO's output cap. Distance between the pads are less than 1 mm.


texts: Power supply schematic - Question about LM358 setup

texts:
I have been working on an Arduino DC programmable power supply using:

MPC4725 (Digital to Analog Converter)
LM358 (Operational Amplifiers)
IRFZ44N (Mosfet)

Wanting to add a current limiter feature, I found a circuit pretty interesting described here:

https://justaddelectrons.com/blogi/variable-voltage-bench-supply-with-current-limiting/

However, I cannot understand the point of having the 10 kOhms resistor at the non inverting input... Do you have any ideas?

Other question is about the 100nF capacitor with 1kOhm resistor. It seems to me that it is some kind of pass band filter... Do you agree with that?

Thank you for your help


texts:
I have eight different kV motors that I need to run from the same source. I cannot change the topology to have different sources for each motor. Ideally something that simply turns the relays on one at a time for five minutes at a time would be fine. I need to ensure with a degree of certainty that:

Two or more motors cannot be run at the same time
Between switching motors there should be a small dead time.

I cannot use a cheap (/chinese) relay board controller but it needs to come from a reputable supplier. I have read alot about using two contactors to INTERLOCK a motor to go forward and reverse but cannot find a way to daisy chain them. However the word interlock is defined for two devices, so it might be that I am missing the correct terminology to find the component.

Does anyone know of any topologies, hierarchies or components that could resolve this for me?


texts: What is USON package? Is it the same with UTDFN

texts:
What is USON package? Is it the same as UTDFN (ultra thin dual flat no lead)?
What is the typical pin formation for 8-pin component?

4 pin on 2 side?
2 pin on 4 side?

What's the different with QFN?


texts: What is an amp (and other such basic questions) in the simplest possible terms?

texts:
I understand that this is a really basic question, but, I've been unable to really understand electrical terminology for some reason. What exactly is an amp? How does it correspond to a watt?

And:
How does a watt correspond to a volt?
What does the frequency of electricity refer to? (Hz, 50/60)

Please be as specific, and laymeny as possible :).

Thank you!

Edit:
Since I didn't get anyone yelling at me for talking about adding a few more questions, here goes:

What is a volt? My understanding of it is the difference between the neutral and phase, but, this doesn't make it any clearer. If anyone can help out with more information, with an analogy or two, plus some technical information, I'd appreciate it very much!

What does the "earth"/ground portion of the circuit do? How does it help safety? If it helps safety, why aren't all plugs 3-pin instead of 2-pin?

Hypothetical:

If I plugged in two wires to a socket, and put the other end into something conductive (for instance, a bucket of water), assuming the breaker doesn't go off (if it would, why would it?) after I remove said wires(or turn off the socket), does the water "hold" the charge? Is it in any way unsafe?

For what it's worth, I'm assuming no. The current flows from phase-neutral, the water simply facilitates this. Right? If I'm right, I assume this means that I am in some way "using" the electricity? How does this differ if I for instance put the wires up against a block of wood? How does it differ if I stick the wires on myself?

I apologize if some of these questions show a fundamental mis-understanding of electricity. If they do, smack me across the head and point me to a resource that will educate me and help me answer such questions myself. These questions have plagued the back of my mind for a while, but I've never found the right place to ask.

I have more such questions, both hypothetical, and real (how does a stabilizer work, why is it required? Why do motors require 2x as much electricity to start up vs to run? Why can't this be optimized/why hasn't it been fixed yet?). I'm hoping I'll be able to answer the hypothetical ones myself once I gain more of an understanding, with your help.

I hope questions at these level (and their answers) are useful to at least one other person!

Again, Thanks to whoever helps me out!


texts: What should be my approach in solving this op amp circuit

texts: The final answer is (D)..how should I approach this question to solve it..what concept am I lacking?


texts: Will this design cause corrosion from a ground loop?

texts:
simulate this circuit – Schematic created using CircuitLab

The design is an undersea light.

The connector provides the customer ground-line-neutral.
The line and neutral are connected to an LED driver board.
The green ground wire is connected to the ground plane of the driver board.
The ground plane of the driver board is screwed to the first housing component with good contact
A 3 inch ground wire is run to a second housing component which is isolated from the first by hard a nodize.
Both housing components are wetted by seawater.

This was tested in fresh water for 3 months with no issues. But a prototype version with soft anodize started to corrode pretty quickly at high temperature.

Will the cause galvanic corrosion as-described?
Will this cause galvanic corrosion when (not if!) the anodize is damaged?
If the housing were not connected to the earth ground, what would be the purpose of the earth ground?


texts: What type of oscillator circuits are used in Capactive proximity sensors?

texts:
Capacitive proximity sensors rely on a change of capacitance to alter the resonant frequency of the oscillator circuit. However I'm unsure as to what type is generally used in industrial type sensors.

The types of oscillator I'm most familiar with are LC type such as Colpitts and RC type such as Wein Bridge.

Which of these (if at all) are used more commonly in industrial type capacitive proximity sensors?


texts: What is the purpose of this sense pin in dual MOSFET package?

texts:
No info available in datasheet
http://www.aosmd.com/res/data_sheets/AONP36336.pdf


texts:
A pcb we've been asked to look at has two 15k 1W resistors in parallel with a 15A AC motor. Silly as it sounds, we're a little stumped why they're there. It's probably bloomin' obvious, but we can't settle on an answer. I don't get out much and certainly don't associate with the wild AC motor crowd. So...braking maybe? Some kind of protection for when the circuit breaker opens? Or to keep racket away from the micro side? Or just decorative? They do look fun and festive.

simulate this circuit – Schematic created using CircuitLab


texts: What is the maximum capacitance allowed on SMBus? Why was the VIL fixed to a maximum of 0.8V?

texts:
How to interpret the significance of DC specification in SMBus?
Why is the VIH value has been fixed to a minimum of 2.1V?


texts:
This is a controller I was going to make to operate a 2 wire LED as a side marker / turn signal light on my off road (so, no need to get bent out of shape about FMVSS and DOT requirements) Jeep. The problem is that it is wired from the factory with a single filament bulb and two powered circuits using a floating ground. The obviously won't work, because you can't reverse polarity through an LED like you can with a filament bulb. I have done the same thing before with some standard automotive diodes and relays, but I wanted a more elegant solution and this is more fun (not to mention this way is actually cheaper and takes up way less space). So, yes this is a complex solution to a simple problem, but I like doing stuff like this and learning along the way.

EDIT - I re-drew the circuit using the XOR gate. will it work properly as designed now?
REVISION - (edited as recommended)

The idea here is that the marker and turn signal functions work normally when used separately, but when the marker is on the turn signal will cause it to "blink" off.

I added diodes and capacitors in the power lines after reading the cautions on the product data sheets to do so in order to keep the gates and the relay more stable. They may not be necessary, but for a few bucks it's better safe than sorry.

I just wanted to see if the people on here thought it would function properly the way I have it drawn before I go prototyping it. THANKS!

simulate this circuit – Schematic created using CircuitLab

EDIT #2: here is the original seriously flawed schematic for discussion reference purposes -

simulate this circuit


texts: Why does stronger magnets improve a dc motor?

texts:
I know that it interferes with torque somehow? But is there anything else?
Thanks so much for taking the time to answer.


texts:
I'm learning some concepts about OpenVPX. One thing I am a bit confused about is the notion of a radial clock versus a bussed clock. I'm not getting many helpful google hits.

Can someone explain the architectural difference, and maybe why you'd choose one versus the other?


texts: Interpretation of IEC 61000-3-6 (Assessment of emission limits for the connection of distorting installations to MV, HV and EHV power systems)

texts:
Based on the installation I want to calculate the acceptable current harmonics related to my installation. IEC 61000-3-6 says:

  For each customer only a fraction of the global emission limits GhMV+LV will be allowed. A reasonable approach is to take the ratio between the agreed power Si and the total supply capability St of the MV system. Such a criterion is related to the fact that the agreed power of a customer is often linked with his share in the investment costs of the power system.

  where

  \$EUhi = Gh_{MV+LV} \cdot \sqrt[\alpha]{\frac{S_i}{S_t}}\$

  EUhi is the harmonic voltage emission limit of order h for the installation (i) directly supplied at MV (%),

  GhMV+LV is the maximum global contribution of the total of MV and LV installations that can be supplied from the considered MV system to the hth harmonic voltage in the MV system,

  Si = Pi /cosϕi is the agreed power of customer installation i, or the MVA rating of the considered distorting installation (either load or generation),
  St is the total supply capacity of the considered system including provision for future load growth,

  St is the sum of the capacity allocations of all installations including that of downstream installations that are or can be connected to the considered system, taking diversity into consideration). St
  might also include the contribution from dispersed generation, however more detailed consideration will be required to determine its firm contribution to St and its effective contribution to the short-circuit power as well,

  α is the summation law exponent (see Table).

Finally, they divide EUhi by the grid harmonics impedance Zhi (a property of the grid, to my understanding independent from my installation) in order to get the acceptable current harmonics for the customer installation. An example of the calculation is given e.g. in Appendix A of this paper.

I have problems to understand the following issue which I am working on:

Let's assume I have a 10 kV distribution with capacity St=20 MW, and I would install two converters of Si = 2 MW each. One converter's acceptable 5th harmonic would be e.g. 5% which would be 0.05 * 160 A  = 8 A. So both converters would together contribute 16 A of a 5th harmonic.

If I would, alternatively, install a single converter of Si = 4 MW, according to the above equation, EUhi would increase (e.g. from \$\sqrt[1.4]{\frac{2 MW}{20 MW}} = 0.193\$ to \$\sqrt[1.4]{\frac{4 MW}{20 MW}} = 0.317\$ for alpha = 1.4), and the 4 MW converter would then be allowed of contribute 1.64 higher current harmonics at the 5th harmonic, which would be 0.05 * 1.64 * 320 A = 26 A.

Is my interpretation of IEC 61000-3-6 wrong? Do I misunderstand something? Or is it really like that? If it is correct, how does it make sense?


texts: Generic name for Molex(tm) Mini-Fit Jr(tm)? Standard definition?

texts:
The PC industry uses a large variety of power connectors which were originally introduced by Molex, using their trademarked (and search-engine unfriendly) brand name "Molex Mini-Fit Jr".  This started with the venerable ATX power supply connector shown below:

And continued with a wide variety of other power connectors, notably the 6-pin and 8-pin PCIe auxiliary power connectors used by GPUs (pictures below).

Question:

  What is the non-trademarked generic name for this family of connectors?

These connectors are manufactured by several other companies (AMP, TE, FCI, Amphenol, etc) so it's not a Molex-proprietary technology, and I don't think it would have become so widespread if it were anyways.  But the other manufacturers list their products under nothing more than a long sequence of digits, like TE's "1586041-6".

I would like to be able to search for connectors in this family without limiting myself to Molex products, which are the only ones that can use the trademarked term "Mini-Fit Jr".  There must be a generic term; I'm not a lawyer and don't want to devolve this into amateur legal debates, but my understanding is that in order to maintain a trademark ("Kleenex", "Xerox") there must be a generic term for the product ("Tissue", "Photocopier"); if one doesn't exist then Molex can't enforce their trademark on "Mini-Fit(tm) Jr(tm)"

Additionally, I'm hoping to find the standard that specifies these connectors.  After using and examining a lot of them, there appears to be a method to the madness of the keying.  You'll notice that some of the pins are square and some are chamfered.  Right off the bat that prevents upside-down insertion so long as the male connector (which has a female housing) contains at least one chamfered pin.  However it also helps prevent insertion of incompatible connectors: for the vast majority of connectors in this family, each column of two pins has one chamfered and one un-chamfered pin.  This means that for a two-row connector with n pins there are 2^(n/2) possible keyings.  The ATX connector above is a great example of this.  Another example is the 6-pin male PCIe connector shown below:

However there are exceptions!  I've come across GPUs before with the connector below that have two chamfered pins in the middle column:

These require a cable that also has two chamfered pins (chamfered male requires chamfered female, but square male will mate with either chamfered or square female) like this one:

Clearly there are a lot of subtleties here.  Molex has an irritating habit of not fully describing the connector in the product name; for example the connector above is "Conn Power HDR 6 POS 4.2mm Solder ST Thru-Hole 6 Terminal 1 Port" which does not distinguish between the (at least) two possible incompatible keyings!

All of this brings me to the second question:

  Is there a standard that names the possible keyings so that a particular keying can be searched for?

A lot of great information on this topic (but, unfortunately, not the answer to my question) can be found at All about the various PC power supply cables and connectors


texts: Need details on 35-year old Unisonic VFD (from a calculator)

texts:
I have a very old Vacuum Fluorescent Display that I took out of a Unisonic Calculator, that I'd like to resurrect in a clock.

It's a cylindrical glass tube, about 4 inches long and 1/2 inch wide - with roughly 10 digits and about 15 wires coming out of it.

Is there a good way to determine which wires are which?  Other post suggest that they work somewhat like vacuum tubes, so different voltage and currents are needed for the various wires.

I'd hate to connect the wrong wires to the wrong voltage and blow it up.  The calculator was a Unisonic 700 or 800 series calculator from the mid-1970s.


texts: 75 : 300 Ω Balun for 50 Ω matching at 900 MHz

texts:
I have a Murata Balun available DXP18BN7514T to match an unbalanced 50Ω source to a 300Ω differential load over about 50 - 60 MHz bandwidth. Unfortunately the DXP18BN7514T is specified as a 75 : 300 Ω Balun.
I have some options available, some being more convenient than others, so :

I could use a suitable 50 : 75 Ω Balun / transformer and complete the match to 50 Ω this way. Problem is that most such transformers available from Mini-Circuits or Macom are wire-wound, large and fairly high profile components relative to the rest of the design. Otherwise have not been able to source an SMD solution that is readily available so far ...
I could do a discrete component match of the unbalanced 75Ω to the unbalanced 50Ω, but this will be more involved and more time consuming, and also require extra discrete components, calling for a broad-band match due to the 60MHz bandwidth. Extra difficulty is that typical S-parameters are not readily available for the DXP18BN7514T.

There may be a third or fourth option that I've not thought about ... What would one recommend, keeping in mind that simplicity and use of readily available components is prefered, over a more complicated solution (even though the later is not completely excluded...)
thanks in advance for any suggestions...


texts: I need to heat a tin strip for my project. The resistance of that strip is 2.23 what should be the current if the voltage is 12v or 9v

texts: I have been working on one project the need of project is to heat the tin strip of 2.23 ohms resistance. The tin strip should be enough heated to seal a plastic bag. So what should be my current supply if the voltage is 12V or 9V.


texts: Representing parts with many connected pins in Altium schematic views?

texts:
I haven't been able to find many resources on designing schematic views of parts with large numbers of pins in Altium. The Symbol Wizard (Tools > Symbol Wizard), which allows you to copy and paste large numbers of pin names, and creating multiple sub-parts are certainly both helpful, but is there a good way to deal with large numbers of pins that are internally connected?

When a part has more than 100 ground connections, how do you represent them in a schematic view?


texts: Custom 18650 lithium ion charger using PWM to control output current - is it safe?

texts:
I am trying to design a custom charger for 18650 lithium-ion battery in 4S configuration. Custom in the sense that it could be programmed to vary its output current. The goal is to build a charger that could charge a range of 4S configurations, for example, a 4S1P to 4S8P battery packs. A simplified diagram is provided below:

Suppose i use a 6A power source. If the battery pack has 4S2P configuration, i could press some buttons on the charger to set it to that configuration and the charger would output only 2A max current. Similarly, if the battery configuration is 4S4P or 4S8P, i would press some buttons and the charger would output 3A or 6A max current respectively.
The problem is that i only know of a single method to control the output current, that is PWM. I do understand that i can control the average output current using the PWM duty cycle. So if choose a 33% duty cycle i almost achieve an output of around 2A.
My question is that although above mentioned duty cycle (33%) would provide a 2A output current (supposing a 6A source) to charge the 4S2P battey pack, is it really safe? I mean the "pulse" mechanism of PWM does reduce the average output but not the actual output. I mean the "pulse" will still push the maximum current (6A) for a certain period of time.
So i actually have two questions:

Is this (PWM) method safe for such a scenario? I mean can i use PWM to charge a 4S2P battery pack using a 6A power source using 33% (approx.) duty cycle and stay assured that it is safe? I am kind of repeating my self here but my concern is that even after using the PWM duty cycle, the microcontroller will still push full 6A pulses for brief periods. Are those pulses "normal" or would these damage the battery? If this is not safe, what alteration can be made to make it safe or is this method not usable at all in this scenario?
Is there any other feasible alternate way to control the charging current, for example, getting a range of actual output current (not average) from 1A to 6A? If there is, please point me to a relevant resource so that i can dig further.


texts: Sound Chip Audio Amplification Circuit YM2612 + TDA1308

texts:
I've been working on a project for connecting a Yamaha YM2612 to an arduino and triggering sounds to be played from the chip.  I'm having trouble on the audio part of the circuit.  I've worked out a lot of the noise in my original circuit but I'm having trouble getting the level of amplification I want (not anything huge, just something line level you can use for headphones).  A while back, I modded my Sega Genesis with a custom mod called the Mega Amp (I'll link schematic below).  That works 100% and has no problems with making the signal clear and loud.  I figured I could just rework that circuit for this project, but I'm not getting the volume or clarity I expected.  I'm not sure if this is due to there being something else in the actual Sega console but I don't think it is.  I've looked into op-amps and think I have an ok enough understanding of how they work, but I might not be seeing something important.  Here is the schematic of what I have on my breadboard as well as the mega amp mod that I used.  I broke the mod down into just the parts I think I needed. For the time being, I've only been testing this by hooking up one of the audio outputs on the Yamaha chip and running this through my computer's sound card.  Any help and insight for this would be immensely appreciated!  I'm still learning and would like to know more! :D

Breadboard circuit: https://gyazo.com/b69beac00f659da8f619841d61877566

Mega Amp mod circuit: https://i.imgur.com/DDulM2r.png

TDA1308 datasheet: https://www.nxp.com/docs/en/data-sheet/TDA1308.pdf

YM2612 Pinout: http://partnumber.datasheet.netdna-cdn.com/pdfhtml/0870/865751/page1.png


texts: How to Create an RGB LED Display for Raspberry Pi?

texts:
I'm relatively new to hardware. I have some basic concepts down and I've only done some basic circuitry, but I really want to jump into the deep end - it's how I learn best. I'm not sure how simple this project is, but I like a good challenge.

Essentially I want to build an RGB LED display, perhaps 32 columns of 18 LED's (a total of 576 bulbs). I'm hoping to control the display by sending data through a program I'll create on my Raspberry Pi (512 MB, model B) - in other words, I want to control each LED and not simply feed it a video stream.

I need to be able to control each individual LED and it's brightness. I'm looking at buying the "RL5-RGB-C-2 Clear TriColor" LED's, where each bulb has three inputs for red, green, and blue respectively.

I have found some basic tutorials on creating single colour LED displays, but none that show me how to create an RGB display of this size using the GPIO (or any other bus, for that matter) on the Raspberry Pi, as well as allowing me to control brightness of each LED.

I'm just wondering where I should start or if anybody could point me in the right direction. I'm also open to suggestions regarding the Arduino.


texts: What are the maintenance steps for PCBs?

texts:
If I have a multimeter that can measure current, voltage, capacitors, resistors, ..etc., how can I detect the damaged component(s) in a PCB?

I try to visually detect if there are any damaged components such as a blown fuse, broken resistor, black components (due to excessive heat), weak wire welding, or sockets that are uninstalled properly.
I try to find if there are any short circuits using the multimeter. I test the terminals of every transistor, resistor, ...etc.
The worst part is that I measure the values of each component and see if the measured value matches the written value or not. But "loading effect" here is very annoying because I might measure a damaged capacitor but the measurement is close to the right one due to loading effect. I might measure a healthy capacitor but the measurement is incorrect due to loading effect as well.
I don't know how to test ICs.
Sometimes, I meet new weird components that I've never seen before. Of course, I don't know how to test them.

The three approaches that I mentioned are not effective at all especially when it's a big PCB and have a lot of components.

So how can I do effective maintenance to different electrical devices?


texts: Calculating the individual transient behaviour of capacitors in series

texts:
I'm giving the circuit below, and am told that after a long time at 'a', the switch moves to 'b'.

I've already calculated \$v_0(t) = 80 - 40e^{-1000t} V\$. Now I'm asked to find \$v_1(t)\$, the voltlage of the \$0.2\mu F\$ capacitor.

Correct me if I'm wrong, but I think that the capacitor takes a portion of the total charge of the two capacitors in proportion to it's capacitance. Thus, each capacitor takes a portion of the total voltage based on the ratio of the other capacitor and the total capacitance. So \$v_1(t)=64-32e^{-t/\tau}V\$.

However I'm not sure how to calculate the time constant. Could you help?


texts: Low power tube headphone amplifier design

texts:
I have never worked or even listened to tubes/valves before, so its about time I did.

I wanted a simple design to work with being my first tube project, and have found this from diyaudioprojects.com:

After reading some forum posts about this amp, the main complaints seem to be:

Poor power supply ripple/noise rejection
Difficulty obtaining 6v at the source of the mosfet.
Low output volume before unpleasant distortion.

Seems to me adjusting each pot on the anode to adjust mosfet bias also changes amplification gain of the tube for each channel, but being a dual triode design I guess these values are very close tolerance anyway, being the same tube.

So I have set out to improve the design. Here's what I ended up with:

I have made quite a few modifications:

Doubled the supply voltage to 24v to provide more headroom.
R5, C4 and C5 have been added for ripple rejection.
0.1uf caps have been added for RF suppression.
C6 ac couples the signal to a separate resistor mosfet biasing arrangement.
R3 and D1 added for mosfet gate protection.
the LM317 has been replaced with matched mosfet, transistor and current sensing/control resistor (R6).

My question is, are the modifications worth the added component count/complexity? As this is all simulated, will this work and sound good when built?

I have no idea when it comes to tubes so I feel I need help.

Thakyou all.


texts: Why does electrical charge concentrate at sharp points?

texts:
Think of a metal object with one side round and the other side sharp.
And we charge the metal either negatively or positively.

Why is charge more concentrated at the sharp point?

Why Don't electrons repel each other stronger at sharp point? So that they go away from the sharp point?


texts: Please review my first PCB schematic | ESP8266 + led-strip

texts:
I wanted to create module based on ESP8266 to manage led-strips. Since I have both RGB(WS2811) and white LEDs I wanted to create universal PCB to be able to use both kinds of strips.

Here is schematic:

I did some tests on breadboard with ESP-02, DC-DC converter and RGB, but since I didn't have anything else I couldn't test how switches are working, how mosfet is handling white strip and if resistors are placed correctly.

All missing parts are ordered now, but since it is few weeks of waiting I thought I could order PCB as well. Because this design wasn't tested I wanted to ask you for review and some suggestions before I send it to OSH Park.

https://hackaday.io/project/5646-5-wifi-rgb-enabled-led-dimmer-w-esp8266 was an inspiration for me.

EDIT: schematic updated after suggestions from Olin


texts:
Can anyone please tell me which is the maximum voltage and current that can be provided by the signal generator HP 83650B ?

I need that information and don't know where to find it


texts: How to switch between two DC power sources powering a motor on an electric vehicle?

texts:
Background: For a university final project, my student group is investigating the possiblility of powering a motorcycle with two seperate batteries, each of a different chemistry (Lead-acid and Lithium-ion). The idea behind the design is to try and achieve a design which costs less to produce but has the same range as one that uses exclusively Li-ion. We want to power the bike with li-ion at low power demands (e.g. cruising or gentle acceleration) and then switch from the li-ion to lead-acid powered for times when a higher power is needed (harsh accelerationa and high top speeds for a short time). Initially we were hoping to simply disconnect the first power source then switch over to the second. However after speaking to a professor here he advised that the controller would register a 0A current and switch off meaning the whole system would need to be reset before it could start working again. Obviously this is not suitable for an electric vehicle.

So my question is: Is it possible to power a single motor with one power source then quickly switch to another power source (of equal voltage) without damaging any components and ideally not losing power for an extended amount of time while switching? Also we would ideally want to make sure that the unused power source is completely disconnected and not using any power when not in use.

Sorry for my inexperience and if any of the above didn't make too much sense, electronics isn't my strong suit (mechanical engineer).

I've had a read of existing questions related to mine but can't seem to find any relevant ones, if anyone has any knowledge of some that would be very helpful. Also if anyone knows of any existing work that has done something similar that would also be really useful.

Thanks!


texts: Are Verilog always blocks synthesized so that the sensitivity list items are settled by the time the block behavior is carried out?

texts:
In other words, if signal goes high and triggers the always block, will the block be synthesized in a way that the behavior in the if (signal)... block is reliably performed (since signal is now high)? Or will this behavior only be reliably performed after a clk rising edge when signal is already high?

always @ (posedge clk, posedge signal)
begin
    if (signal)
    begin
        // do stuff
    end
end

I've simulated similar code in Active-HDL, showing that // do stuff is performed after a signal rising edge.

My prior experience with HDL makes me uneasy about this code, but I'm new to Verilog and wanted to clear up any misconceptions.

Related questions:

Is synthesis of code like this vendor-specific?
Are VHDL sensitivity lists
handled in a markedly different way?

I am trying to implement something like a SPI slave peripheral, so the two important inputs are the chip select and the clock. Since the clock will only ever be used a relatively long time before and after the chip select changes state, I'm using them both in the sensitivity list with the chip select being essentially an asynchronous set, as you suggest. Ordinarily I'd bring signals in synched with a shift reg to sequence behavior, but I don't have access to a particularly fast clock, so I'm trying to understand better to create a safe way to sequence things.


texts: Sending wifi connection info to an unconnected device

texts:
Is there a way to use a wifi connected device (phone, tablet, PC...) to send the required connection info (SSID, password) to an unconnected device through the same network? I'm prompted to ask the question after reading the following text from this link (http://myube.co/smart-dimmer):

  The first time you launch the Ube app, you’ll be prompted to select your Wi-Fi SSID and then to enter your Wi-Fi password (if you have one – and we hope you do.)
  The Ube app will encrypt and send this information to the Ube dimmer
  The dimmer will join your Wi-Fi network and then you’ll see a notification in the Ube app that a new dimmer was found.

Maybe they are using something other than wifi to send the connection info?

I'm trying to design a device that will have no UI and may not even be user accessible (ie. no QSS button) but will need to connect to the wifi. Is there another way to do this?


texts: Using Karnaugh maps to construct and simplify Boolean expressions

texts:
I'm trying to construct a circuit based on K-maps (see picture) - and I must do so only through two-level logic (excluding inverters).

Some of the K-maps naturally came out in two-level logic, but a few of them didn't. I used AND-OR logic by taking 1's. For the ones that exceeded two logic levels I got the following:

1st column, 4th map: $$AB+ \bar{A}\bar{B}C+A\bar{B}\bar{C}$$
This would require 3 AND gates (first level), a two-input OR (second level; we don't have three-input OR gates), and another two-input OR (third level).

2nd column, 2nd map: $$ A\bar{B}\bar{C}+ABC+\bar{A}B\bar{C}$$
Again, this would be over two levels.

2nd column, 3rd map: $$\bar{A}\bar{B}\bar{C}+AC+AB\bar{C}$$
Once more, over two levels.

Is there a way to reduce these expressions further? I thought the point of using K-maps was to get Boolean expressions in their simplest form; well at least most of the time.


texts: How can rms voltage change with a change frequency but Peak to peak voltage still stay constant?

texts:
Can the rms AC voltage change with frequency?

I have connected a DSO to the audio oscillator(having 10V p-p). Peak to peak voltage remains constant on changing frequency(10 Hz to 100KHz) but on measuring the rms voltage with a multimeter, the voltage varies drastically(falls off from 3.4V at 500Hz to 0.5V at 50KHz).

Is something wrong with the oscillator/multimeter? Can AC rms voltage vary even when peak to peak value remains constant?


texts: If the anode attracts negative ions and the cathode postive ions. Then why do electrons flow from anode to cathode?

texts:
I know that in a battery:
The anode is where oxidation takes place (the anode losses electrons).
The cathode is where reduction takes place (the cathode gains electrons).
But I am confused why is the anode called anode if it is providing electrons instead of attracting them?
Why do we say Cathode is negative and Anode is positive if the former takes electrons and the latter provides them?


texts: Is it bad to route a trace edge of a rectangular pad?

texts:
I got a quick friendly critic from someone in production for the below trace that I should not route the trace from the edge of a pad. What he said that it would create an extra force to the trace that might cause problem especially for smaller pad size in the production.

I could not really clearly understand what is the problem. If there is a force in the trace direction, I can imagine that it may break the trace, but is it something may occur during the pick and place machine or is it an after production concern? Could anyone please help me to understand what kind of problem may occur and how likely is it to happen?


texts: Arduino LilyPad Input Voltages Below the Input Voltage in Specs

texts:
The LilyPad spec page says:

Input Voltage   2.7-5.5 V

I understand that an input voltage greater than 5.5 V would damage the device, but what if it's below 2.7 V? Will it just be unable to accurately detect it?


texts: Is this LED fixture safe for use with its current fabrication?

texts:
My father is currently interested in investing into a Ukrainian LED fixture manufacturer, and after he bought home a sample, I'm scared. There are 94 LEDs paired up with diodes, all in series, connected directly to mains voltage. The LEDs and diodes are covered with epoxy, however the ends of the diodes stick out just enough to do some damage.

I told him that the LEDs closer to the ends will die out much faster than the rest, resulting in damaging the rest of the LEDs due to fact that they no longer provide a suitable voltage. On top of that, the diodes will most likely heat up, and in addition to the heat from the LEDs, the components will get damaged considerably faster. The lifetime estimate for this unit is 50'000 hours, however I highly doubt that it will be usable past 20'000 hours. Plus, I'm pretty sure that there are quite a few laws which were violated.

Here are some photos:

Just a couple of notes:

No, I don't have a link for the product page
Yes, there is absolutely no other circuitry
And yes, they told my dad that this could be certified for the EU and
Switzerland...

Your input in this matter would be greatly appreciated.


texts: I took a look at a few answer such as this and this, where they say the collector saturation current is entirely dependent on an external source. What happens if the source is 1kV or 10kV? doesn't the transistor has its own collector current saturation? For reference, I want to design a NOT gate and need to choose the values for R and R2 (see here).


texts:
I am designing a simple on/off type 230V AC voltage control application which with a load of less than 2A. I have been using relays controlled by microcontrollers in my other designs on daily basis, but due to space constraint, I am thinking of using Triac in this design.
I selected BT134-600E , I am concerned about is the life expectancy of the circuit.
My expectation is 5 years mean life expectancy with 8-10 Hrs of operation/day.
Can anyone suggest what precautions I need to take to make sure the Triac lasts for at least 5 years?
Also, other suggestions are welcome.


texts: Calculate cutoff frequency of a digital IIR filter

texts:
I have an ADC with 1 kS/s and would like to append a digital anti-aliasing filter to it as I have to downsample the data to 10 Hz.

As it's on an FPGA and I don't have any multipliers, I thought the easiest way would be a recursive averaging IIR filter:

$$ y = \alpha x[n] + (1-\alpha)y[n-1]$$

But how can I calculate the cutoff frequency of such a filter depending on \$\alpha\$ and \$f_s\$?


texts:
I have been working on a simple circuit which performs XOR operation.
The problem is that I am seeing a noise-like graph when both inputs are set to 1 (5V) and I have been doing a research on what it could be but I have failed to find any explanation.
At first I was curious to see whether if the simulation program (Falstad simulator) added computer generated noise for some kind of "close to real life testing" purposes(?) but I figured that it would be unnecessary and there was no source to prove such point.
What could this graph possibly be indicating?
Note: Although the transistor on the schematic is displayed as BC547, it is not chosen to be this exact transistor in the simulator, instead the simulator uses default NPN transistor characteristics, not staying loyal to characteristics of this spesific transistor.
Here is the circuit diagram:

Here is the graph of Vout (which is V_LED):


texts: Testing spice model for common mode rejection ratio?

texts:
I've been trying to create a circuit to simulate common mode rejection ratio of an op amp to test the spice model's accuracy. While I've seen online that being able to use exact resistors only a simulator could use can be very helpful in determining CMRR, I can't seem to get a circuit to work. Anything I try either doesn't converge in simulation or doesn't give an accurate results. Any help would be appreciated.

EDIT:

simulate this circuit – Schematic created using CircuitLab

I included a circuit schematic of my most recent iteration. I figured that I would extract the AC RMS voltage from the input vs output and calculate the common mode gain from the circuit. I first had the R2 resistor grounded but thought after that it should be ground w.r.t the AC common mode signal, so I attached it to my common mode signal generator.

I think it might be worth mentioning that at first I tried to connect a sine wave into the input rails via two 1k resistors and measured the open loop gain but it didn't converge.


texts: Why are speakers found to be 8 ohm and 12 ohm, where do these standard values come from

texts: I can see that there are speakers of various sizes with various power ratings. However, they usually seem to be 8 ohm or 12 ohm. What does this refer to? And why are they created to be this way? I mean why do 7 ohm or 10 ohm not exist?


texts: On off button for my microcontroller board

texts:
Here is my charger unit and voltage regulator for powering a MCU board that I designed. I'd like to ask, how can I add an on/off button which allow charging the batteries even we turn off the system but close the power for the other modules?

My idea was adding a button right after battery charger unit (Beginning of voltage regulator TPS7353). If my idea is true, should I directly connect the button or does it need a resistor?

I'd be so happy if you answer :)


texts: Safe insert/removal of XBee from circuit

texts:
Is it safe to remove an XBee or similar radio module while the host is still powered up?

I am trying to build a programming jig using an ARM11. The peripheral board is connected with TTL level UART and SPI.

What precautions should I take when swapping boards? Is a ZIF socket neccesary?


texts:
I would like to know if the schematic below would work to keep a 12V SLA battery at or close to float voltage to be used as a backup battery? R1 will limit the charge current to the battery, but am I right in thinking it is calculated by R1 = (Vin-Vzener) / Icharge and how much should the trickle charge current be?

simulate this circuit – Schematic created using CircuitLab


texts: How to generate a double PWM with a microcontroller?

texts:
I need to light a LED during a sequence with a microcontroller. The sequence is as follows :

I need to turn on/off the LED with a given frequency (PWM  1). It will be between 1 and 200 Hz.
When the LED is on, I have to control its brightness with a second PWM (the duty cycle will set the brightness, it must go from 1 to 100 %).

I have never done this kind of thing : is it possible ? If yes what is the best approach to do it ?

I have not chosen any particular microcontroller yet. I might chose one from STM32 family. The thing is that I need to control 4 different LED, and those LED are high-output LED.

Thank you in advance. :)


texts: Root locus for an open loop transfer function?

texts:
The function, rlocus(), in MATLAB is used for closed loop system roots for variation in gain K. However, I am curious if there is a similar function for variation in parameter of open loop function. I have tried using the pzmap()  function and iterating to vary RL & IL. Unfortunately, it doesn't plot enough points on the graph. Are there any functions that will allow me to plot an open loop transfer function? I am trying to plot the transfer function below:

\$ T(s)= \frac{(RL+sIL)(3s^3+12s^2+12s+4)}{8s^4IL+s^3(28IL+8RL+3)+4s^2(7IL+7RL+3)+4s(2IL+7RL+3)+8RL+4}\$

Thank you for your help.


texts: Tool to calculate cascaded but independent single-pole RC hi-pass filters

texts:
I frequently use a single op-amp stage for both gain and hi-pass filtering.  I normally implement 2 independent single-pole low-pass filters: the input to the op-amp and the ground end of the negative-feedback gain-set resistor.  Circuit example follows:

simulate this circuit – Schematic created using CircuitLab

RC network R1, C1 is a high-pass filter set at about 159 Hz.

RC network R2, C2 is another high-pass filter at about 159 Hz, except that the filter flattens out as the frequency drops to the point where the amplifier gain approaches unity.

Cascading these filters in this fashion does NOT result in a -3dB break-point at 159 Hz.

I use this type of circuit on a regular basis but I always wind up iterating component values until I reach the desired break-point frequency.

My question is: is there a technique that I can use to calculate component values that give me a closer approximation to my desired break frequency?

Just to be clear: I'm looking for a tool that allows me to calculate the effect of two cascaded but otherwise independent single-pole filters rather than the standard tools that calculate the component values for a two-pole filter.

This particular project is redoing a design done by someone else who just didn't get it right.

The circuit contains 4 functional blocks: a gain stage, a band-pass filter, a true-RMS detector and a 4-20mA transmitter stage.  I have the opportunity to include 3- single pole RC filters within the signal flow: 2 stages exactly as shown above and a 3rd stage between the band-pass filter output and the true-RMS detector input.

I fully understand that cascading multiple single-pole filters like this does not give me the ideal response.  However, what they give me is a response that is "Good Enough".  Adding these filters takes the design from barely working to working quite well.

I don't mind iterating component values to take me to my desired break-point frequencies.  I'm just looking for a tool that gets me there quicker.

As mentioned earlier, this is a trick that I use quite often in my designs because it costs almost nothing to include but can result in radically better performance.


texts: Can you base a computer around a 32-bit microcontroller?

texts: We all have(mostly) 32-bit machines at our homes. But the 32-bit machines have a microprocessor in them. I was reading an article about the ARM Cortex. Its a 32-bit microcontroller. Now that intrigued a question inside me. Microcontrollers were made to decrease the external circuitry around a microprocessor, then the microprocessors became more powerful while microcontrollers remained in there 8 bit forms for too long a while. But now that we have 32-bit microcontrollers can't we have like a computer based around those things?


texts: Mixing Reverse Polarity Protection PMOS with a Piezo Element

texts:
I have a circuit that powers some leds when vibrations are detected. I am trying to integrate a PMOS for reverse polarity battery protection.

When the PMOS is present the circuit simulation fails as soon as the piezo (simulated using V1+R1) sine wave starts i.e. TDelay secs. Without the PMOS the circuit works as expected but I don't have any reverse polarity protection.

Is the piezo closing the PMOS?

The full circuit


texts: Where is the voltage drop? / How can I test circuit this without using an actual battery?

texts:
I've put together the following circuit, it's just a rechargable LED torch, just to try load sharing:

simulate this circuit – Schematic created using CircuitLab

BAT1 is a LiPo battery, 5.2 V comes from the AC adapter when the thing is being charged. There's a charging circuit connected, but I'm using a module, so I couldn't include that in the schematic, but I think it should be irrelevant as the battery is basically disconnected in this configuration.

The voltage drop on D1 was around 0.2 V, but the voltage between V1 and ground was around 3.9. The battery was at 3.7-3.8 V at the time, but like I said, it should be irrelevant.

What am I missing? Where could that additional 1 V voltage drop come from?
Is my battery safe, and completely disconnected from the load?
Can you recommend a test setup so I can check this without actually using a LiPo battery?

It is entirely possible that I've messed up assembling the circuit, I'll probably build another later anyway.


texts:
I've got a bluetooth audio receiver in my car and am finding it annoying that it turns off immediately after the ignition is turned off.  For example if we're stopped for a while I prefer to turn the engine off, but this will stop any music.  I am thinking of putting a decoupling super-cap in parallel with the USB device (an iClever Himbox HB01).

Would that generally work, any issues to worry about?

Not sure how much current the device actually draws, but datasheets from similar looking chips suggest about 30mA, so a 5F cap should give me about 10 minutes—presuming I'm understand what I'm calculating.

These larger caps seem to be quite expensive, I've found an Eaton PHV-5R4V505-R for £7 so was wondering whether other alternatives would be cheaper and not too complicated?


texts: Are anti-static bags needed for storing electronic components?

texts:
Should I keep the sensors in the anti-static bags or are the bags only needed when shipping?

As the anti-static bags are inconvenient and often too big to put the sensor into a compartment in my electronics box.


texts: Winding a custom transformer with coil former

texts:
For a project I'm building a DC/DC convertor for converting 600VDC to 5VDC. Through the use of the TI Webench I was able to create a design, but it requires a custom wound transformer. The transformer report (provided by the TI Webench) reads as follows:

I've gathered the necessary components, designed the PCB and soldered everything, but now I'm stuck on how I need to wind the transformer.
As the transformer report states I've bought some transformer cores (B66305G0000X127), a transformer coil former (B66202B1108T001) and some transformer yokes to keep everything together (B66202A2010X000). I've also bought the correct wires to use for this transformer.

Below is a picture of the cores, former and yoke (respectively, from left to right). Also a picture of how to assemble these pieces (I think) is included.

Now my question is how do I route the wires through to create the correct transformer? Just all the way around the yokes? Or do I just wind everything around the coil former, and then add the cores around them? I've tried Google'ing this many times without a result, so some explanation or some websites with information would be greatly appreciated. Thanks in advance!


texts: How to use a CAN database .dbc with STM32F using Keil Uvision?

texts:
I am a beginner in software / firmware development, I've only just got away from Arduino and onto STM32F105. I am using Keil Uvision to develop my code.

I have built a simple CAN Bus gateway using 2 CAN transceivers. I have wrote some firmware that passes certain IDs from one channel to the other and vise versa and certain data is changed and transmitted onto the other channel. All works fine.

But I am now working on a more complex project involving at least 30IDs on each channel each having complex data with complex multipliers and bit fields etc.

I have created a CAN Bus database in the industry standard Vector .dbc file for both networks.

But I'm struggling on how to interface the .dbc file with my code, I can't find any libraries or even any info on how to go about this.

I would consider another IDE but my only experience is with Keil so I would like it not to be too much of a learning curve.

My question is, is there any libraries for Keil that let me import a .dbc file or any documentation on how to do so. Or what other IDEs have that capability to work with a .dbc file?


texts: Can you use the Arduino as an AVR programmer?


texts: Overview of typicals RAID/wear leveling algorithms used in SSD controllers

texts:
I am trying to understand SSD controller design. I am particularly interested in the physical distribution of data to several NAND chips/dies.

Can somebody point me towards an "idiot's guide to SSD engineering"? ;-)

Or alternatively a description of the RAID/wear leveling algorithms used in SSD controllers. Early ones (pre-TRIM) would be perfectly fine.


texts:
I was reading an article someone modified an arduino and is running in low power mode.

  An Arduino Uno runs less than one day on a 9 V battery because it uses about 45 mA current. Using an Arduino Pro Mini, with a simple modification, the power consumption goes down to 54 μA (0.054 mA) with the 3.3 V version or 23 μA (0.023 mA) with the 5 V version, in power-down sleep. That is 4 years on a 9 V battery with 1,200 mAh capacity or 2,000 times more efficient than the Arduino Uno. After removing the voltage regulator, the power consumption is only 4.5 μA for the 3.3 V version and 5.8 μA for the 5 V version, in power-down sleep.

He claims he can run the arduino (obviously it is doing nothing) for 4 years.  Ignoring leakage and other things aside, how can I do the math to verify this claim?


texts: Need help identifying components! Hardware

texts:
So recently I have come across a schematic diagram with pictures, but some of the parts in the build (A quadruped robot, more information in the hackaday link below) are not in the schematic, and I can't tell what are these components called, any ideas? Picture is quite vague but its the only thing I can work with. Schematic diagram is here https://cdn.hackaday.io/images/9979261594143410055.png
Link to where I got the pictures: https://hackaday.io/project/171456-diy-hobby-servos-quadruped-robot


texts: Can SPI SS pin be used as PWM output by slave on ATMEGA328p-AU?

texts:
Working on designing an ESC for BLDC motor and I need 6PWM. I am using ATMEGA328p-AU. I need to program the M328p after its in the PCB so I need to leave some pin outs for SPI. But some PWM and SPI pins are same. I applied a switch/buffer between MISO and MOSI. But to enable the SPI mode, I would always need the SS pin as input while also need it in PWM. What can I do?
If possible can I change SS pin?


texts: How to explain basic transistor, diode etc. principles to High Schoolers

texts:
I have an electronics/science club at my school, and I was trying to explain basic principles of how transistors can act as a switch and amplify and then build a little water-detector circuit the next week. I was having a hard time explaining to them and they just couldn't quite understand.

Are there any suggestions on how to explain electronic concepts (specifically transistors) on a level to be understandable by high-schoolers?


texts: What is the difference between a 30 V power supply and a ±15 V power supply?

texts: I need to get a ±15 V power supply and I am wondering where to find it. Should I get a 30V DC power supply in its place?


texts: I am designing a driver circuit for S/PDIF, and in a couple different places, like this one, it specifies an amplitude of 500 mVtt.  I'm not familiar with those units, and googling gives me nothing.  However, I do see it specified as 500 mVpp in a few places, but I want to make sure one or the other isn't a mistranscription.  Are they the same thing?  Is mVtt a European term perhaps?  What does the tt stand for?


texts: Is it safe to toggle a led strip powered with 12v ATX PSU line?

texts:
I connected a segment of a led strip (12v) to a line coming from a standard ATX PSU (12v line, of course). I just wonder if it is safe to put a toggle switch to turn on/off the led strip, or may be this really simple circuit requires additional components.
I should say the ATX PSU is actually powering a PC and I want to power also the led strip, and turn it on/off while pc (psu) in on.


texts: How can I measure the power given to a USB WiFi adapter's antenna in dBm or mW?

texts:
I have an Alfa AWUS036ACH USB WiFi adapter, and would like to know how much power is being given to the antennas (in dBm or mW). The Amazon link to it is here: https://www.amazon.com/Long-Range-Dual-Band-Wireless-External-Antennas/dp/B00VEEBOPG

Is there some sort of tool or meter I can screw into the adapter in place of the antenna(s) that would give me a reading of the power in dBm or mW? Perhaps some sort of multimeter?

I understand how this is different from antenna gain, which is not what I'm after. I'm just wondering how to measure the Wattage coming from the little antenna ports.


texts: What is the effect of not grounding a power supply to a servo?

texts: So I am working on a project which basically involves controlling a servo with a raspberry pi. I noticed that when I forgot to connect the ground cable (image below) the servo still whirred to life and in fact continued ticking and buzzing more noticeably than when I connected the ground cable. What is happening here and did my forgetfulness damage my servo/my pi? (as I cant get my servo to move but I think it is a software issue with RPIO being broken for RPi3)


texts: I need to replace a damaged 120V-12V transformer that is a European sourced Comelit Model 542012/A, also marked as "Class 2 Transformer" supplying power to a halogen table lamp. My question is what is the meaning/importance of the "Class 2" designation?


texts: 3.3V signals to a shift register IC with a 5V supply

texts: I have an SN74HC595N shift register that I want to have output 5V on the Q outputs. If I power it with 5V on VCC, can I tie the SER, SRCLK, etc. pins directly to the 3.3V digital outputs on my microcontroller? I wasn't sure if I needed a transistor between each microcontroller pin, or if the lower voltage would be acceptable directly to the IC.


texts: Is it possible to store charge in a capacitor with lower voltage to another capacitor with higher voltage?

texts: As in the figure above, C1 is charged to V1 volts while C2 is charged up V2 volts which is higher than V1. Is there any circuit that can store all the charge in the C1 to C2? After the process, C1 will be equal to or close to GND and C2 will be equal to or close to V2 + V1 volts. Is it possible?


texts:
Is there a common netlist format that is portable between different schematic/pcb/EDA/CAD tools, and if so where is the format or reference so I can implement it?

If not, does each package implement it differently, or are there a few standards that, if implemented, might give greater compatibility with a broad range of tools?


texts: No or wrong NMEA checksum for GPS data from MT3339


texts: How to configure Coide to use DSP library for STM32f3?

texts:
I am struggling to use the DSP library provided by ST for my STM32f3 discovery board.
I am using Coide. I started by including arm_math.h since all the DSP library files refer to it.

I am getting these errors a lot(they are all in the arm_math.h file).

  unknown type name 'INLINE'  expected '=', ',', ';', 'asm' or
  '__attribute' before 'clip_q63_to_q31'

I have been searching for almost two days now and I can't find any useful solution. I am using currently yagarto as a compiler.


texts: Do VHDL procedure and function only infer combinatorial logic?

texts:
Are VHDL procedure and function only able to infer combinatorial logic even of they are called from within a process that is clk edge sensitive?

If so, is there really no way for them to infer registers?


texts: Should I charge an in-series 6-pack of Li-ion batteries at 4.2v 1A or 25v 1A?

texts:
I have a 6-pack of 18650 Li-Ion cells connected in series, so it gives around 22v dc output.

To charge a single Li-Ion cell I need a 4.2v 1-1.5A charger, simple stuff. But to charge the whole 6-pack, do I still use 4.2V for all of them, do I use 25v, or do I charge all of them at 4.2v separately?

The cells are taken out from a single laptop battery, so they're identical.


texts: Can someone give a detailed explanation of what happens when a square wave passes through a high pass filter?

texts:
I got asked the question at an Analog devices intern interview " Draw the output across the capacitor if a square wave is the input to a high pass filter " . It was the only one I couldn't answer properly.

To my mind an ideal high pass filter should block any low frequencies, and as a square is composed of the odd harmonics of the fundamental , I presumed the output would just look more  sinusoidal.

When I researched afterwards , none of the explainations online seemed to fully explain how positive and negative spikes on output occur ( even if input doesn't go negative ) .

Am I missing something here ? I didn't take into consideration the phase shift that occurs in non linear filters . Is this part of the reason the output presents itself as spikes at low frequencies ?


texts: What's the difference between these flip-flops? (images attached)

texts:
I was trying to understand how does this edge-triggered D flip-flop work:

It's very complicated, so I decided to remove Preset and Clear inputs to simplify circuit and to see what it would be like.
I've got this:

I tested this circuit and it works just like a simple edge-triggered D flip-flop without those inputs. But then I recall, that I already studied such a circuit. It looks like this:

And I wonder what is the difference between these circuits? Is first circuit (on second screen) was invented just to implement Preset and Clear inputs? Maybe it is stupid question, but I can't just go on and forget about it.


texts: Hardware advice for simple wireless embedded application

texts:
Now, I am going to learn embedded programming in microcontroller. I am going to create a device that will receive signal from wireless transmitter. The range will be less than 30 meters. So, I have some questions about toolkit.

What type of transmitter and receiver should I use that receive and send signal up to 30 meter?
What kind of microcontroller and board should I use to create embedded system?
Do I need any other circuit or device like antenna or anything else?

I am new in microcontroller.


texts:
So I have really been hitting the example code hard this week in an attempt to better understand some HDL design basics, specifically FPGAs with VHDL. The book I am using (if anyone is interested) is "FPGA PROTOTYPING BY VHDL EXAMPLES" by Pong P. Chu.

After a few examples, I am starting to wonder.

How does someone initially design a digital system for HDL?

(Flowchart/Block diagram? Signal list? etc)

For example, I love to use Logisim to flesh out simple digital circuits. The graphical interface is easy to follow and I can get on-the-fly simulations without all the synthesis. But when I am satisfied with my Logisim design, I find it difficult to transfer that design into HDL.

Is there a way to understand how you should structure your HDL design, or does it just come with practice?


texts:
I am trying to write a little counter in VHDL using the two process methodology. However it is not working.
Could someone explain me why?

   library IEEE;
   use IEEE.std_logic_1164.all;
   use IEEE.std_logic_arith.all;
   USE ieee.numeric_std.ALL;
   use IEEE.std_logic_unsigned.all;

   entity myCounter is
   port(
    clk: in std_logic;
    clkEnable:in std_logic;
    reset:in std_logic;
   );
   end myCounter;

   architecture Behavioral of myCounteris

   TYPE STATE_TYPE IS (counterDecr, countIncr, resetCounter);

   signal stateMachine: STATE_TYPE:=counterDecr;
   signal nextState: STATE_TYPE:=counterDecr;

   signal counter: integer:=15;

   signal test: std_logic:='0';

   begin

synchronous: process(clk)begin
        if(clkEnable='1')then
            if(rising_edge(clk))then
                if(reset='1')then
                    stateMachine<=counterDecr;
                else
                    stateMachine<=nextState;
                end if;

            end if;
        end if;
end process;

combin:process(stateMachine)begin
            counter<=counter-1;
            nextState<=counterDecr;
            test<= not test;
end process;
   end;


texts: How to use a single DC battery meter display for multiple 18650 cells in DIY charger

texts:
I am building an 8-cell 18650 charger using 8x TP4056 charging modules and I would like to use a single battery capacity meter to monitor the current voltage and current draw for each cell independently.
I.e. I want a toggle switch to alternate between each of the 8 battery outputs.
I've considered using a rotary switch of some kind or an Arduino, but the latter option seems unnecessarily complicated.
I'm using a battery meter similar to the one below:
https://www.banggood.com/18650-26650-Lithium-Li-ion-Battery-Tester-LCD-Meter-Voltage-Current-Capacity-p-1044589.html?akmClientCountry=AU&cur_warehouse=CN.
This works fine for a single cell battery charger but is there an analogue solution to toggle between each battery?
The circuit will be similar to the below image but without the multiple voltmeters and with a single display in their place.


texts: Vcc and gnd in microcontroller on proteus

texts: The microcontroller power pins (Vcc,gnd) in the proteus are set to 5 volts by default. I have basic regulator circuit (my vcc 3.3 volt). How can I use my circuit for microcontroller power supply?


texts:
Working in the home electrical installation, the usual light with a pair of two way switches.

Installation seems ok, things does what is expected. However, measuring with the voltmeter, I measure 80V between neutral and the line between switches "passive" (the one that, taken into account the position of the commutators, should not carry power), 230V in the active. Same if I measure from earth cable.

I do not understand why of this 80V voltage.

Worst, even if I isolate completely both sides of the cable, still 40V are measured.

Some explanation about these measures?

Additional information:

circuit is: power line (220V) <=> two way switch 1 <=> two  wires <=> two way switch 2 <=> single wire <=> load (lamp) <=> neutral line

Wires between switches are about 5 m long, all wires running together inside a protective corrugate: power, neutral, earth and the two lines between switches.

a) Measuring with the multimeter, 40V-80V appears between one of the wires inter-switches and neutral or earth wire (where I expected near 0V), 230 v in the other one (this is ok).

b) Using as "measure" tool a simple incandescent bulb, no light where the multimeter says 80V.

c) Using as "measure" tool my hand (accidentally and, in fact, the reason I started to measure the state with the multimeter), an small discharge (how much sensitive is the hand?).

d) if I connect a wire between the line with the 80V and the earth wire, the voltage falls to 0V (at least ohm law still working) and security differential device doesn't triggers.

e) If I connect a 40W bulb lamp between the wire with 80V and earth, voltage falls to 0V, bulb made no light.
Thanks.


texts:
I am wanting for safety a uC to determine a few environmental checks before a device is allowed to be activated, it is a relatively low voltage (2V) however high current (4A) load (powered by a beefy constant current regulator)

A relay requires some current to initiate and inductive kickback protection on the uC's side, so I do not wish to implement something such as that if there are other options. I had looked at some power nFETs to do this instead and do not understand some points.

Will 4A flow through the power nFET even though it may be located after the load? A simulation (i.e. falstad) shows current being the same before and after the load and through the nFET. If this is true, I will have to add heatsinking, however does not make much sense to me as the load will "use" the 4A mostly?

Can the nFET allow 2V to flow through it without much trouble when switched on by my uC, i.e. is without too much resistance?

nFET something simple like this: http://www.fairchildsemi.com/ds/FD%2FFDPF5N50T.pdf


texts: Gyro questions numbers not staying steady at stand still

texts:
I am using a Parallax L3G4200D 3 axis Gyro. When a gyro is left on a flat surface with nothing interacting with it at all the outputs from it should all be “0″ correct? Mine is jumping around between numbers. For example “X_L = 0″ and “X_H = 17219″ with a “delay(500)” between refresh the X_H will jump around while X_L stays pretty much at 0 but will occasionally jump very high. Do you think this is a problem with the sensor or something code related? If I pick up the Gyro and shake it around all of the numbers start updating like its functioning correctly. Below is the output I am talking about this is when it is flat and nothing interacting with it:

Value of X is: 20
Value of Y is: 85
Value of Z is: 147168
Y_L equals: 0
Y_H equals: 9766
X_L equals: 2313
X_H equals: 0
Z_L equals: 34782
Z_H equals: 65535
The temperature is: 75

Value of X is: 22
Value of Y is: 49
Value of Z is: 147167
Y_L equals: 0
Y_H equals: 5654
X_L equals: 3855
X_H equals: 0
Z_L equals: 51143
Z_H equals: 65535
The temperature is: 75

Value of X is: 29
Value of Y is: 76
Value of Z is: 147168
Y_L equals: 0
Y_H equals: 8995
X_L equals: 65021
X_H equals: 65535
Z_L equals: 46260
Z_H equals: 65535
The temperature is: 77

Here is the code I am using to get the values I am using the I2C Library for the Pi from HERE

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>

#include <wiringPi.h>
#include <wiringPiI2C.h>

#define CTRL_REG1 0x20
#define CTRL_REG2 0x21
#define CTRL_REG3 0x22
#define CTRL_REG4 0x23

int fd;
int x = 0;
int y = 0;
int z = 0;
int main (){

    fd = wiringPiI2CSetup(0x69); // I2C address of gyro
    wiringPiI2CWriteReg8(fd, CTRL_REG1, 0x1F); //Turn on all axes, disable power down
    wiringPiI2CWriteReg8(fd, CTRL_REG3, 0x08); //Enable control ready signal
    wiringPiI2CWriteReg8(fd, CTRL_REG4, 0x80); // Set scale (500 deg/sec)
    delay(100);                    // Wait to synchronize

void getGyroValues (){
    int MSB, LSB;

    LSB = wiringPiI2CReadReg16(fd, 0x28);
    MSB = wiringPiI2CReadReg16(fd, 0x29);
    x = ((MSB << 8) | LSB);

    MSB = wiringPiI2CReadReg16(fd, 0x2B);
    LSB = wiringPiI2CReadReg16(fd, 0x2A);
    y = ((MSB << 8) | LSB);

    MSB = wiringPiI2CReadReg16(fd, 0x2D);
    LSB = wiringPiI2CReadReg16(fd, 0x2C);
    z = ((MSB << 8) | LSB);
}

    for (int i=0;i<10;i++){
    getGyroValues();
    // In following Divinding by 114 reduces noise
    printf("Value of X is: %d\n", x / 114);
    printf("Value of Y is: %d\n", y / 114);
    printf("Value of Z is: %d\n", z / 114);
    int t = wiringPiI2CReadReg8(fd, 0x26);
    t = (t*1.8)+32;//convert Celcius to Fareinheit
    int a = wiringPiI2CReadReg16(fd,0x2B);
    int b = wiringPiI2CReadReg16(fd,0x2A);
    printf("Y_L equals: %d\n", a);
    printf("Y_H equals: %d\n", b);
    int c = wiringPiI2CReadReg16(fd,0x28);
    int d = wiringPiI2CReadReg16(fd,0x29);
    printf("X_L equals: %d\n", c);
    printf("X_H equals: %d\n", d);
    int e = wiringPiI2CReadReg16(fd,0x2C);
    int f = wiringPiI2CReadReg16(fd,0x2D);
    printf("Z_L equals: %d\n", e);
    printf("Z_H equals: %d\n", f);

    printf("The temperature is: %d\n\n\n", t);
    delay(500);
}
};


texts: What is causing this weird effect with aluminum?

texts:
I grabbed an LED and then scraped an aluminum plate with a pin, and it turned on at some points, at first I thought it was electrified but it wasn't, then I tried with another aluminum plate and it also happened.

Later I tried the same thing with a cable connected to my computer's microphone jack and recorded the spectrum:

The first image is zoomed in, and the background waves are noise from the mains

What is causing this?


texts: Decoupling capacitors: low ESR electrolytic vs electrolytic + ceramic vs ceramic

texts: When dealing with capacitances <= 1uF ceramic is your choice. When you need more than 10uF it is economically justified to use electrolytic cap shunted with small ceramic one. But in range 1-10uF it is questionable. What do you suggest?


texts:
I have this small palm sized toy drone. It uses a 'charger' which houses 8 AA alkaline batteries. The charger plugs into the drone and the charger is activated by a toggle switch.

I want to replace the charger with a USB cable that plugs into my PC monitor or even wall socket.

Can I hack this existing charger into using a USB power source instead of 8 1.5v alkaline batteries?

A little bit of 'f it, I'm gonna try it' resulted in this.


texts:
I bought a Analog to Digital Converter but did not gave much attention to Dynamic range. The resolution is 12 Bit. Minimum input voltage is 0V and maximum is 5V.

The problem is I don't have the datasheet and want to know how can I find the Dynamic range of this ADC?

Additional info: It says it has 10Megasample per sec of sample-rate.


texts:
Which circuit can convert the input voltage signal to either output signal A or B as shown in the image below?

Background info: {Update1:This is the signal from a Passive Infrared (PIR) Sensor which needs to wake a SoC.} The SoC has (only) one internal voltage comparator which needs to wake up the processor when a signal crosses a particular threshold in both +ve and -ve direction with respect to a reference voltage. In this example, the processor needs to be woken up when the voltage is either above 2V or below 1.2V, i.e. 0.4V in either above or below 1.6V. So this (hopefully low power) circuit is for that.

Thanks!


texts: Mosfet motor problems with bluetooth module

texts:
I'm playing around with a bluetooth module and want to control a motor using the module and a phone. I manage to control a small motor (±30 mA), but as soon as I'm connecting a bigger motor I'm getting some inconsistent problems.

I'm powering the whole circuit using a 3v/ 1.5A voltage regulator (which is powered by a benchtop power supply).
The motor is normally drawing about 700mA if connected directly to a 3v source (benchtop power supply)
I'm using a N-Channel Mosfet to control the motor ( mosfet datasheet).
I've hooked it up according to the following schematic

The problems I'm experiencing are:

When I set IO5 HIGH the motor starts spinning, but slower and only draws around 250mA (which slowly increases over time to ±270mA). It's not letting the motor draw all the current. (I've tried different Mosfets, all with a Vgs < 3v)
Sometimes after switching it ON, or when the motor is ON for a longer time the module resets (restarts) itself. Seems like something is happening the module doesn't like (power peak or something). It definitely should not do this and is clearly connected to the motor actions. I've been putting in some extra decoupling capacitors, but this doesn't solve anything.
I put a resistor between IO5 and the Mosfet gate, but also didn't solve anything.

Am I missing something fundamentally, or doing something else wrong? Any help is appreciated.

Cheers Ruben


texts: How do I disable clearance check for a layer or for only some certain elements?

texts:
I'm designing a PCB in Altium Designer. There is a very large heat sink in my project. When I put it on the PCB, there will be plenty of empty space under it where I can put other small components. I tried to put some part of this bridge rectifier under it; that's geometrically possible in real life. But, Altium Designer gave a clearance warning (or an error?) about it (the elements turned into green as you see in the image).

How do I disable this warning/error just for these two elements, or for the entire top overlay layer?


texts:
Usually I use NPN to drive LEDs but in my project I have to use PNP because the cathode of the LED is tied to GND.

Then I have a question, is it possible to have a command of 3.3V and the PNP tied to the 5V.

I am thinking it is not possible because if the command is at 0 the BJT is saturated and everything is OK but if the command is at 3.3V then Veb= 5-3.3=1.7>0.7 and the BJT is still not blocked.

Am I right?


texts:
I have looked at the spec sheets of this chip and it states that MAX Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4)  = -0.3V to (VDD + 0.3V). They also state that MAX Input clamp current, IIK (VI < 0 or VI > VDD) ± 20 mA.

Where I work our design actually has us bringing 20VDC to 30VDC to RA5 at < 1mA. Our boards work fine for the most part, we do have issues where there are weird offsets being written to the microcontrollers, I nee to figure out why. I am wondering if this 20VDC - 30VDC (at low current) to a pin would cause this. I've contacted MicroChip with this question and have had no luck.


texts: Why do i need an endstop sensor with stepper motor?

texts:
Sorry if this question seems stupid, probably it is...

I'm try to design some camera dollies that are moved by some stepper motors controlled with a microcontroller.  Someone told me that it is better to use endstop sensors to detect when the end of the track is reached.  Looking on the Internet, I've found that if I need to know the position is better to use an optical gyroscope (did I understand it right?), but why do I need this?  Is it not enough to have a counter and count the steps?  That way I just have to bring the dolly to the beginning each time I switch on the system and use a counter.  Or is there a problem with that and is there a reason I need other security sensors?

And what if I use a servo instead?


texts: Looking for a way to re-program 16x2 LCD display EEPROM font

texts:
Some time ago I've seen this topic - asking where does the fonts stored in 16x2 (1602) LCD display.

Does a 16x2 LCD display has its own EEPROM?

I'm really interested in this, and didn't find any good answer to in on the net, yet.

It's known that the suppliers of 1602 LCDs (for Arduino, for example), can provide them in different versions of fonts, (European, Russian, etc.).

I'm almost sure those 'special characters' are programmed into the 'upper level memory' in the table (above ASCII 128) - in an EPROM or EEPROM customized module.

A way to find the specs and re-program that module can open a whole new world of easily customized fonts and characters into those cheap 1602 / 2004 LCD displays.

If anyone can find a way to get those specs from the manufactures, or find the right way to do it - it would be really helpful and appreciated.

Thanks for looking into it!