texts: Manchster Decoding when symbol are misaligned

texts:
Have this problem:

I can manually easily decode this using Manchester:

It will be

01010100001 etc

However how should I decode this:

It should be a start sequence code. However on the first screenshot, all nicely aligns, and on the second it looks misaligned in this sequence part, later it aligns (I hope you see this). How to decode this?

Thanks,

Update 1:

Added bigger screenshot of the signal (amplitude plot)

Why the bar pointed by the arrow is not the same size as others? This causes the misalignment.

Where is here clock where is data?

How to decode 8 bits of this signal, starting from preamble 0101 ...?

Thanks,

Update 2:

Here is the continuation of the signal, I tried to decode it (see Red Text on the diagram)

Thick lines I think ís clock (which repeats one is up, than is down etc, on each cycle)

Please correct me if I am wrong.


texts: How does Fourier series apply to signals?

texts:
I have the complex form of Fourier serie:

It says that an and bn are real numbers, while c is a complex number. I need Fourier serie to represent an electrical signal that should transmit bits. In this case, what do an and bn represent? How do I calculate them?


texts: Can convection draw cold air INTO a PC case?

texts: So imagine I'm mounting my nettop-style PC behind my monitor. Its CPU is passively cooled via heatsink. Now the side facing up should have vents so the warm air can escape the case but shoud the side facing my desk have vents too? The way I understand it convection introduces an updraft so that cold air from outside the case will be sucked in through the bottom vents, get warmed up passing the heatsink and escape through the top vents. Also if it works this way I should pay attention that the heatsink's fins are arranged vertically so that they don't block the airflow. Am I correct?


texts: Controlling underdamped LC circuit with thyristor

texts:
I am trying to design a circuit that gives me an underdamped sine wave.
I am controlling the SCR from an external transformer by microcontroller.
When I simulate this circuit, V3 has no effect on the circuit.  I mean the capacitor is not getting charged to lets say 50V to oscillate. Instead, it seems it is oscillating with V2 and the transformer. I don't know if it is the proper way to make an oscillator circuit.

How can I improve this design and solve this problem?
Since I need to switch to have underdamped oscillating several times, I need switching. Can you advise me another topology or circuit example to achieve this if there is a better way to do this?

(Sine wave frequency and switching frequency is not important for now.)

simulate this circuit – Schematic created using CircuitLab

V(3) : Output
V(4) : Pulse


texts:
Is there a power threshold below which a circuit is considered to be intrinsically safe?  For example, if one were to power a tiny Arduino circuit at 5vdc / 30mA = .15W could such a device be considered Intrinsically Safe and used in ATEX Zone 2 or Zone 0 WITHOUT going through certification?

Alternatively are there IS enclosures that are also RF (2.4Ghz) 'transparent'?


texts: Understanding a complicated looking relay

texts:
When I think of a relay this is what I imagine

simulate this circuit – Schematic created using CircuitLab

not this

Can someone please explain how this relay works and how it should be wired to produced the standard behavior of a relay. ie. send current through the coil and the switch closes.

Thanks


texts: How does this opamp phase shifter produce 2x phase shift at the output without changing the magnitude?

texts:
My textbook just gives formulas without any proofs and even though it is frustrating I'm really enjoying deriving the proofs with your invaluable help XD Here is one I'm stuck with:

Please see the given circuit. I managed to get the voltage at \$V_{+}\$ input of the op amp:

Voltage across \$C\$ is given by \$V_{+}=\dfrac{1/(j\omega C)}{R+\dfrac{1}{j\omega C}} v_{\text{in}}= \dfrac{v_{\text{in}}}{1+j\omega RC}=\dfrac{v_{\text{in}}}{\sqrt{1+(\omega RC)^2}}\angle -\arctan(\omega RC)\$

Since the cutoff happens when \$X_C = R\$, we have \$RC = \dfrac{1}{\omega_c}\$:
\$V_{+}=\dfrac{v_{\text{in}}}{\sqrt{1+(\omega RC)^2}}\angle -\arctan\left(\dfrac{\omega}{\omega_c}\right)\$

The phase shift is throwing me off. Any help? In particular I'm stuck on two questions:
1) The phase shift at capacitor doesn't have the factor \$2\$. How are they getting it at the opamp output?
2) How is the gain of this circuit \$\pm 1\$ for all frequencies?


texts: How to self start a MOSFET multivibrator circuit

texts: I have built a simple multivibrator circuit using IRF530s for the switchers.  It does not start unless I introduce noise by touching one of the timing caps.  I tried to include a circuit image but as a new user could not.  It is a textbook multivibrator only using power MOSFET instead of Bipolar Transistors.  How can I make this circuit start at power up?


texts: Are modern processors safe from backdoor?

texts:
I have been reading so many thing about leaks of surveillance recently,

Most of the things covered under
NSA 2013 Mass surveillance disclosure

I use the chips of  Microchip  for designing few embedded systems. I may use ARM chips in future too for some systems.

My question is, are these chips really safe from back-doors theoretically?

I came across this article :
Intel chips could let US spies inside: expert

It makes me wonder if chips are really safe from spying at hardware level?


texts: Why do my RC filter not work as I expect - Yet another fan project

texts:
Introduction

Okay so this is yet an "electronic newbie Arduino fan" project, but I don't just want to turn my fan ON and OFF but adjust the speed so it's not that noisy and give a more relaxing breeze.

The question is an extension of my previous question but so much have changed since then.

What have changed:

I burned my fan det because I tried connecting it directly to a 12 V DC (just to see if it would run faster) - Mmm..  the smell of magic purple smoke
I bought a new USB fan (8 $)
I bought a multimeter that has oscilloscope - giving me eyes to see what's happening
I got hold of a MOSFET: RFP50N06 - Used a NPN Bipolar junction transistor before (it got hot and sometimes it don't work)

The question

Usefull specs:

The USB fan uses 5V and draws 330 mA according to my measurement.
I plan to use a 5V 0.7-1.0A adapter - don't want to risk frying my computer.

This is my RC filter circuit

An I know that people are gonna ask me for the schematics:

And a more clear schematic:

As you can see I'm able to adjust the potential from the source (5V 700mA power adapter), but when I connect it to the fan

I get no breeze out of it... No matter how I turn the potentiometer.

(Turning down the volts gives some summing sounds from the fan..)

Looking at the oscilloscope gives me this

Please help me solve:

how I can make this work?
Understand why it's not working as it is now?

Thank you

BONUS info

I took the broken one apart an found

(BTW: What is the name of such motor _?)

(My screwdriver broke some of the lines)

This is my new fan

UPDATE

I heard you loud and clear :-)

Here is the schematics:

simulate this circuit – Schematic created using CircuitLab

I have now removed the resistor and it started the fan, but it makes an annoying noise. This was not the case with a NPN transistor where I had the RC filter BEFORE at the Base - the transistor got hot so I wanted to apply the filter AFTER the transistor (or you could call it on the "big" current flow)

(I can't access the fan's internal component without breaking it.)


texts:
Following this question, I ended up with the following diagram to drive a custom made dc motor using Arduino (omitting the 5V and 12V power supply stages which work properly):

I keep burning instantly the irfp054n mosfet. An by instantly, I mean it.
I tested with a voltmeter the voltage output by the Arduino PWM pin 5 and it's between 0 and 5V.
The voltage coming out from the TC4422 (pins 6 and 7) is between 0 and 12V.
Right after giving power to the whole system, I see the motor running at full speed, so I turn off the power and measure a resistance of about 0.2 Ohm between drain and source on the mosfet, which means it's gone.
What am I doing wrong? Any hints?

UPDATE: Ok, ok, I'll get rid of that diode... Anyway, I installed it right after burning the first mosfet so I wouln't think it's the cause.
Just out of curiosity: could it be that the problem comes because the Schottky and the mosfet are screwed on the very same aluminium heatsink?

UPDATE: It works, I replaced the diode between driver and mosfet with a 120 Ohm resistor and the mosfet is now a much stronger IRFB4115Pbf. I still have some glitches to work out: when I shut down the 5 V and 12V circuit, the motor runs up to full speed. Any ideas?


texts:
Can someone please tell me about FFT Points? I know that The Discrete Fourier Transform (DFT) is a mathematical operation, and that The Fast Fourier Transform (FFT) is an efficient algorithm for the evaluation of that operation (actually, a family of such algorithms).

But what do we mean by FFT points?


texts: why is ad620 output signal disappearing after connecting the right leg drive to the human body?

texts: I am building an ECG sensor based on the AD620 instrumentation amplifier. The circuit is amplifying minute(50uV) signals from the signal generator perfectly. The total gain of the circuit is around 144. I get a problem when I try to extract the real  ecg signal from the body. When the right arm and the left arm are connected, the output saturates which I think is because the inputs will be floating. The moment I connect the right leg drive to the right leg, the signal disappears and I get a very small signal (4mV) peak to peak at 50Hz. I think the problem is with the right leg drive,how can i solve this problem. I have attached the image of the circuit.


texts:
I´m working on my coilgun prototype, but I have troubles with IR sensors for projectile detection.

When any of accelerating coils is switched off, all sensors report false detection.

I´m using this connection:

On the left side is connected IR photodiode (pin 1,2) and IR diode (pin 3,4). The resulting signal (on the right side) is connected to ESP32 via 3.3v zener diode, where I handle it with an interrupt.

I tried to add debounce capacitors, but it doesn't help. Currently, I handle it by software, but that's not the best solution.

Do you have any suggestion for this problem?

Is it possible that the coil induces a voltage on the sensors or is it just a circuit error?

EDIT:
I switching coils by this circuit:

I´d try to put sensors in copper grounded boxes, use shielded wires and add some decoupling capacitors as was said in comments.


texts:
I want to build aplication where I will provide defined force with linear actuator. DC motor is going to be stalled most of the time and and controlled torque should be applied. So at the actuator shaft I would like to then to have controlled force. If I apply bigger opposite force on shaft it should go down, if smaller then it should move forward to the end... this application is analog: LINK

At the end I want to connect force sensor into closed loop and control it with PID.

So...my question is how to make cuircuit (I want to use arduino) that would be able to do it. On internet I was able to find a lot of examples how to control linear actuators or DC motor, but 99% of it is about speed control, position control...but about torque control in stalled state I didnt find actually nothing...

Is it possible to make it with basic linear actuator at all or I need some other actuator?
Can I use normal motor drivers, or even simpler configuration with N-Mosfet + PWM signal....?

Any comment, suggestion on this topic?

Regards,
Damir

Addition to topic:

Parts I have are following:

Linear Actuator (12V, 150kg)
Monstermoto Motorshield
12V 10A Power Supply
Loadcell 100kg
Arduino UNO

There is another video that show exaclty how I want my sistem to function:LINK 0:30

I red on internet that many actuators have have some continuous stall torque or force...which is approx. 1/3 to 1/10 of Max. torque or force.

So, are my parts usefull for something :) ???

What you suggest to improve? Its just amateur hoby project, so Im trying to stay with low costs...

If I hook load cell feedback back to arduino, and then PID loop will control PWM output to motor driver of actuator...will it work?

Tnx for comments and answears.

Damir


texts:
For my new amplifier design I need a kind of parallel Norton level shifter for differential signal (to subtract the same externally controlled voltage drop from two signals). One possibility is to use a kind of "multiple output current mirror". With FETs it looks quite simple. Just connect input transistor's gate to any number or output transistors' gates. Like here:

Is it possible to do the same with BJTs?


texts: Interfacing open-collector optoisolator to 3.3V microcontroller

texts:
I have a bit of a puzzle on my hands trying to interface a Fairchild MID400 optoisolator (popular "logic level" optoisolator for mains detection) to a 3.3V GPIO pin. The MID400 is a 5V part [*] and has an open-collector output which is pulled up internally to a 5V logic high level. This is the aspect that's causing me problems as otherwise I could just pull it up externally to 3.3V and all would be well.

The microcontroller and optoisolator are metres apart and I would like to perform the level shift on the optoisolator end of the wire where only 5V is available. I can't see how it can be done using diodes or resistors but happy to try out anything suggested.

Switching frequency is low, rise/fall time unimportant. Thanks for any suggestions.

[*] Just in case anyone should happen across this question wondering if the MID400 might work at 3.3V albeit out of spec, I tried it and it doesn't at all.


texts:
I have an electret mic for the design of an audio amplifier using input and output stages.

How can I measure the impedance of that mic?


texts: Kicad Eeschema 'Power Symbol' with local scope?

texts:
AFAIK, Power symbols in Eeschema have global scope. What is the best way to achieve local scope power rails? The only one I can think of is using normal net labels or hierarchical label.

When does this problem arise?

When using nested/hierarchical sub-sheets: Say you make a 'single channel LED driver' schematic, but you want multiple instances/channels of the same 'single channel LED driver'. Then in Kicad you could design the 'single channel LED driver' schematic once, and create multiple 'hierarchical sheets'. If you wanted to run all the instances/channels off a single power source, then the standard approach of using a 'power symbol' would be perfect. Here is the schematic of the 'nested/sub sheet' e.g. the 'single channel LED driver':

But say if you wanted to run some of the channels of 'power supply A' and some off 'power supply B', then you would use hierarchical pins in the schematic of the 'nested/sub sheet' (single channel LED driver) - But it looks ugly :(

Is there some sort of symbol that could be used in the 'nested/sub sheet'?:


texts: How shoud I create an adaptive neuro fuzzy inference system (ANFIS) in MATLAB when I have a lot of inputs?

texts:
In a fuzzy inference system, when the number of inputs increases, they usually either reduce the rules or, in order not to make mistakes, write the ruless between several nested systems, right?
For example, if we have 20 inputs, both of them form a fuzzy system and their output is the input of a new system, and so on until we reach the final output.
How can I make such a system with the MATLAB fuzzy toolbox?


texts: Noise filtering on switching power regulator(LT3690)

texts:
I have limited knowledge in hardware design, where i get caught in the following noise issue.

We found out that 1 of a switching regulator we used is interfering our data waveforms as below:

Yellow colour is data waveform and blue colour is waveform form 20V switching regulator.

As seen in the picture, there is a very huge spike that make our data waveform not really smooth.

Switching frequency we set in the regulator (Rt) is 0.6MHz
Previously we did a wrong inductance calculation, now we change the inductance value to 20uH to suit our 20V design and it wont help much.

Datasheet for LT3690

Is there any method we can use to filter the spike?


texts:
I would like to start using PICs in my projects and was wondering which programmer I should get. I have plenty of experience using micro-controllers (68k, avr), I also have lots of experience with electronics (so building a programmer is possible).

I would like to be able to use MPLAB, icsp, and the in-circuit debugging feature seems pretty neat. USB would also be convenient, but is not necessary. In your answer, I would appreciate a comparison of the pros and cons of your recommendation.


texts:
I'm pretty new to EE and I'm trying to use a sensor and saving battery as much as possible. I've already looked into similar topics (like this), but they are not satisfying me.

So, I want to power up sensor from time to time and get its output. Its regular capacitive soil moisture sensor, that's output voltage is dependent from moisture. The whole circuit is running on 3.3V. I was using n-MOSFET to power it like in the following schema:

Problem is that this sensor does not require to be connected to the ground to work and consume energy (checked on few of them, all operated the same way), so I cannot power-up and power-down it with MOSFET. I was thinking that connecting it to source instead of drain, but I do not want to do it as it is n-MOSFET. Theoretically, p-MOSFET would solve my problem, but it will require to set controller GPIO on almost all of the time, which is what I want to avoid.

Another way would be to power up sensor directly from GPIO (sensor consumes around 5mA, while port can supply around 12), but GPIO voltage under load drops under 3V, which causes sensor output unpredictable.

So, question, do you know the way to achieve it? I was thinking about using a relay, but relays are usually much bigger than transistors.


texts: Best way to map ints to float in Arduino?

texts:
In Arduino how do I map an Integer value Float value or vice versa?

For example this simple script doesn't print out 1600 but still returns a float value of 0.00?

float a = 0.5;
a = map(a, 0.0, 1.0, 0.0, 3200.0);
Serial.println(a);


texts: Reactive energy: forward and reverse components?

texts:
I'm trying to figure out how to measure energy consumption with a power meter.

It reports for the three phases:

Total Active Energy
Forward Active Energy
Reverse Active Energy
Total Reactive Energy
Forward Reactive Energy
Reverse Reactive Energy

Where:
Total Energy = Forward - Reverse, for both Active and Reactive versions.

The question is what is Forward Reactive Power and Backward Reactive Power?

My understanding is that reactive power is casued by inductive elements in the machines, causing a "backward" flow (from machine to generator).
What is then the Reverse Reactive power?

If I'm interested to find out my energy bill cost then (if I understand correctly):

for residential consumers: I should look at total active energy
for industrial consumers: it varies, but sometimes also the reactive part is billed. Would this be the total reactive?

Thank you! I'm not an engineer, apologies if the question is nonsensical.


texts: ST-Link debugger/programmer failed to find STM32L152 MCU on designed PCB

texts:
I'm using STM32L152 MCU on my own project. The project was started on a STM32 Discrovery board. Now I would like to have my own board by designing a PCB with the MCU. An external ST-Linkv2 will be used as the debugger/programmer. (Tested works fine with another discorvery board)
A 6-pin SWD connector was designed on board. The pin mapping between ST-Link and MCU is following the user manual.

SWD pin1 VDD_TARGET VDD from application;
SWD pin2 SWCLK SWD clock;
SWD pin3 GND Ground;
SWD pin4 SWDIO SWD data input/output;
SWD pin5 NRST RESET of target MCU;
SWD pin6 SWO Reserved;

After I got my board, I connect the board with the ST-Link. The board is powered up by an external voltage source of 3.3V. However, the ST-Link is not able to find the MCU. My current objective is to let ST-Link program my MCU PCB via SWD. It should not be a complex design then. Attached is my schematic design:

I think the exteral crystal may not necessary now for the design. If there is nothing missing in the schematic, it maybe something wrong with the input voltage. I wired all the Vdd to Vcc. I also read from online, so BOOT0 is wired to ground, and BOOT1 is left no connect.
Is there anything I do missed?

My PCB layout is as following:


texts: LiPO reverse polarity protection with PFET & charger

texts:
I am trying to use a PFET to protect my circuit against reverse polarity like such:

Now I would like to add a LiPo charger to this circuit. Can I just add it after the PFET (@+Vbatprotected)? Will the charge current be able to flow "backwards" through the PFET?


texts: Voltage regulation - Input voltage almost same as output

texts:
I have a 220V to 20V - 2A transformer and I want to make a simple 24V regulated power supply out of it. So, using only components I already had I made the following:

simulate this circuit – Schematic created using CircuitLab

Firstly, since the voltage right before 7824 is 24.7V (due to the capacitor, and because it's unloaded guess) I thought it will be okay. Then I did a little research and found that the input voltage (to the 7824) should be at least 2.5V higher than the output. Obviously, I can change the 7824 to 7818 or lm317 and adjust output voltage to 20V or even replace the transformer with a bigger one. However, is there any other solution? Would it be a bad idea to leave it as it is?


texts: Can I use multiple resistors is series to approximate a precision resistor called for in schematic?

texts:
I have seen in several schematics where a precision resistor, or matched resistors are called for, but every one of them talk about you going to purchase special resistors for this purpose.

I am building the Go, No-go transistor matching circuit shown here.  It stated the just about all the resistors have to be matched to 1% at the most for it to work.  I have cheapo "1% resistors", but don't trust them to be in spec.  For this particular circuit it would seem that the closer I can get to precise resistances, the more accurate the vbe measurements will be.

Question: do I really need to find resistor "pairs" for this or can I simply put resistors in series until the total resistance is exactly what I want (my 20000 count multimeter would let me get to 0.1% or even 0.01% precision this way)?  So for example, to get a perfect 20k resistor, I might use a 15k, 4.7k, 270 and maybe something small between 1-100 ohms all in series so that the total real resistance measured is 19.999-20,001 ohms.  It seems like a simple no brainer, but every time I see schematics talking about precision resistors, none of them offer this approach, which got me to wonder if there was a reason.


texts:
I'm using an LP38691 3.3V fixed regulator which is overshooting. This wasn't an issue for years, but now a component is being replaced and the current on the 3.3V rail has gone up from 300mA to 500mA. The datasheet claims an output voltage is within 2% of the nameplate, and 4% at worst. It jumps to 3.8V for 40ms, and then steps down to 3.3V.

Is this normal behaviour for LDO regulators? The input voltage is 5V and the thing is surrounded by bypass capacitors and a low ESR 100u capacitor.

Edit:
Here's the schematic. I can't post the entire schematic because there are a few dozen pages. The component that changed was a microprocessor. I also scoped the 5V rail, and it it ramps up and stabilizes 20ms before the regulator starts to ramp up. The odd thing is that we use the same exact circuit on other boards, and those boards don't have that issue with the new processor.


texts: How to calculate instantaneous active power from sampled values of voltage and current.?

texts:
I have sampled values of voltage (phase to ground) and current (line current). I can calculate instantaneous apparent power using:
$$ P(i) =  V_1(i)I_1(i) +V_2(i)I_2(i) +V_3(i)I_3(i), i\in [1,n]$$

Question: Is there a method to calculate instantaneous active (or reactive) power from sampled data instead of apparent power?


texts: Do "standing"/90° MicroSD card slots exist?

texts:
For a rather cramped design, I need a way to hold a MicroSD card in a "standing"/"upright" position (90° to the PCB, rather than "flat"/"parallel" like most sockets). The card will be plugged and removed very seldomly, probably only once, so I don't care too much about the usability aspects of such a design.

Can anybody point me at a socket like this, if it even exists at all?


texts: Flat coil inside rechargable lithium battery

texts:
Take a look at this de-labeled smartphone Lithium-Ion battery:

What is the coil used for?

Possibilities I thought of:

Wireless charging - unlikely because the outer metal foil would screen the magnetic field, too short anyway
Integrated active RFID tag - untypically short coil (not impossible though); same screening problem
Thermocouple-like temperatur sensor - I think this is the most likely use because those batteries need temperature sensing

The battery is Samsung brand.


texts:
I use Elm Chan's FAT32 library with custom initialisation code for SD managemnt with STM32. I have a bunch of 512Mb-2Gb SD cards that I wanna utilize in hardware. I noticed strange behavior with some of the cards.
According to Elm's code we should issue CMD8 command to check the card's type: 1.0/1.1 or 2.0+

512Mb cards give me

CMD0 OK
sdc_cmd: CMD8
Spi::assert
R: 0xFF
R: 0x5

Which is illegal command + idle - OK

1Gb/2Gb cards give me

CMD0 OK
sdc_cmd: CMD8
Spi::assert
get_response:
R: 0xFF
R: 0x1
CMD8 OK
SDHC detected
SD v2

after standart initiation I issue

sdc_cmd: CMD16
Spi::assert
get_response: expecting 0x1
R: 0xFF
R: 0x1
Block size was set to 512
SD init OK
Spi::highspeed
disk_read: Drive=0, sector=0,
Sdc::read_block, Address=0, BlockSize=1
sdc_cmd: CMD17
Spi::assert
get_response: expecting 0x0
R: 0xFF
R: 0x1

So it does not respond to CMD17 as I expected.
In Windows all 2Gb cards works OK and detected as SD, not SDHC.

The question:

1) Why 2Gb card behaves like v2.0?
2) What to do in this case? Where I made mistake in the init process?

The code is here
SDC_Error Sdc::initialize(void)


texts:
I have a small project/problem I am working on.  While running a conveyor belt continuously with items on it, I need to stamp every other item.  I am using a photocell to detect if an item is present.  I plan on using a JK flipflop and some logic gates.

The most simple design in my head is to connect the J and K of the flip flop to high at all times, and use the photocell output (either high or low) as the ff clock input.  This would generate a frequency divider by 2 on the output of the ff, basically toggling the output for every other item on the conveyor.  If I use an AND gate to AND the output of the photocell (high or low) with the output of the ff, then I can activate the stamp mechanism on every second item.  The timing diagram for this seems to make sense.

Would this design work or do I need to connect a real (periodic) clock to the clock input of the flipflop?
Any ideas on getting this to work?


texts: What are the methods for Calibrating an ADC/ADC ? Is ADC/DAC calibration is done purely in software ? May I know some hardware methods for ADC/DAC calibration.


texts: Book recommendations for digital circuit design?

texts:
not sure if "digital circuit design" is exactly what I'm aiming for, but someone can tell me and I'll edit it if another name matches better.

Basically, circuit design interest me a lot. I like the idea of working with AND OR NOT etc gates and building things with them. I've been wanting to build a CPU for quite a few years now, but I lack the knowledge. I'm fairly decent at programming however, so I can think "logically", but with circuit design it all is very difficult for me to understand past simple adders and such.

So, I'm looking for a beginner's book on the subject. I plan on doing all design and testing in a simulator such as Logisim, but being shown how to actually put circuits together on a breadboard out of gates(or even transistors and such) would be a definite plus, but I wouldn't want for that to be the focus of it all.

My end result hopefully is to build a CPU in a simulator. So, tell me what book(s) I need to buy to get there for someone who is a novice at electronics and a decent computer programmer.


texts: Monitoring open/closed-circuit on a mains line

texts:
I am building a custom refrigerator control circuit.
The refrigerator is solely powered from a battery source, using an inverter.
For power savings, the inverter should be off when the motor is not running.

The thermostat closes when the temperature is too high. This would normally start the motor. But the inverter is off.

How can I know when the thermostat is closed/open?

There is no voltage in the circuit, so it would be trivial to provide 5V to test for the closed circuit, except that this wouldn't be isolated, which could be problematic when the inverter is on.

The circuit should:

take advantage of the internal thermostat (cannot be seperated from motor/mains power)
should be properly isolated (e.g. induce a 5VAC signal that can be measured via a zero cross circuit, but without risk of back-current)
can be powered from a 5V/12V source

Currently, I have a seperate temperature sensor, and it's a simple solution, but I'd prefer to use the thermostat. Also, the thermostat cannot be seperated, because it's built-in.

simulate this circuit – Schematic created using CircuitLab


texts: How to handle conflicts between reference manual and reference design about ADC of STM32?

texts:
On page 207 of stm32 reference manual, it says that VSSA(power supply of ADC, negative) must be tied to VREF-(analog reference, negative). But when I refer to reference design of STM32(Evaluation board).On page 39, it shows a conflic design:

when i choose not to solder R41 and apply a real negative voltage (-3v3) to VREF-, the two pins(VREF- and VSSA) do not connect. So, which one is the right solution?

In addition, VREF+ VREF- VDDA VSSA have relations to accuracy, so I choose to add two magnetic bead:

Is that reasonable?


texts:
The picture is showing a normal bjt amplifier.whose output side  is converted like this :

suppose the amplifier is unloaded. Text books says this amplifier has an output impedance Rc. According to the second image(equivalent to the first image), the output impedance is nothing but an ac voltage source whose terminals are connected by Rc, now, if Rc were in series with the load (which is not present yet) it is clear the impedance should be Rc, but in this case Rc is parallel, so how in this case too the unloaded impedance is Rc?


texts: Why the v-t and i-t curves for capacitor are exponential curve?

texts:
If we plot and compare v-t or I-t curves with actual exponential curve we can see that they are same, but why? Is there any proof?

From the equation we can see that e is creating bridge between electrical property and time. Why e?

I have a good text book that covers the curve’s characteristics and how it can be used but doesn’t show any mathematical proof.


texts:
I am trying to figure out the total energy released and discharge time in an ignition system like this.  The switch is closed at time t=0, and there is a spark gap in the secondary coil.  The values for the components are representative but may be altered in the future.  I assume the transformer serves the role of an inductor in the main circuit?

I have looked at the analysis of circuits like this elsewhere, but the switch is always in series with the resistor rather than across the capacitor.  So I am having trouble finding the governing DE for this guy.  Is the same DE used for this circuit as used when the switch is in series with the resistor?

Thanks


texts:
I recently picked up a high torque digital servo for a project I'm working on, where the servo needs to lift a bar about an inch, and hold it there, and then set it back down.  The issue is that the digital servo, with any weight applied to it, will sing while holding the weight, or even when it's sitting; because it's constantly looking for center.  Could anyone recommend an alternative motor type to digital which will be silent when not moving?

I tried disengaging the digital motor (by stopping a signal to it), but it would continue to try and center on the last transmission, instead of freefloat.

For anyone wondering, I was using the Hitec 37954S HS-7954SH


texts: Can I replace these many capacitors with just one?

texts:
I'm designing a schematic for an addressable RGB LEDs array and I've chosen the WS2812B because of how common and cheap they are. Looking at the typical application circuit, I noticed there is a capacitor for each LED.

Can the multiple capacitors be replaced with just one single capacitor? What would the capacitance need to be for that single cap?

I'm thinking of placing 50 LEDs per array and it would be very nice if I didn't need to place 50 capacitors too.


texts: Getting TV video from a motorola MBP36 video baby monitor

texts:
I have a Motorola MBP36 (binatone) video baby monitor model MBP36. We (actually a lot of people) want to display the video to a TV, RCA or HDMI (whatever works). No one can find the correct USB output cable for it, and Motorola(and binatone) is being, well, unhelpful.

Given a the output port is a USB mini-B 5 pin output, whats a good way to find a working Audio Visual output cable?


texts: STM32F103 blue pill overcurrent (possibly from motor)

texts:
I have an application that includes a dc motor and a dc generator. I am using stm32f103 blue pill. I am controlling the speed of the dc motor by measuring the voltage and changing the PWM duty cycle on the PA15 pin.

However, today the stm32 burned. Voltage regulator was hot (Around 45 Celsius). Is there a reason for STM32 to draw high current? Is there an error in my schematic?

[![schematic][2]][2]


texts: Seven Segment problems,voltage and current

texts:
I want to ask a question about a project I am making, I am using a seven segment.
Here is Information about the seven segment: http://www.4project.co.il/documents/doc_188_54.pdf

I want to use this seven segment but when I read about it, it said that the maximum voltage allowed is 2.2 (V) also maximum current is 20 (MA) and I only have the ability to give it  5 (V), my question is :
Can I give 5 voltage and use a resistor to decrease the current to 20 (MA), will it work or will it burn it? and is it OK to go pass the max voltage but not pass and max current,and the device will still work?

Please help, I have already burned two seven segment....yeah.


texts: 12V 345 Amp lawn mower battery to a 12V 10 amp motor?

texts: I have a 12v scissor jack that is meant to plug in to a car cigarette lighter, which I believe is around 10 amps. However, I want to hook this jack directly up to a 12V battery, which is rated at about 345 amps. How do I reduce the amps? I see some reducers on ebay but they seem to be for 24v to 12v.. I'm not sure what to call what I am looking for so I am not finding it. How is this done on a car?


texts: SRD-05VDC-SL-C 5V DC relay not working with XY-DJM-5V

texts:
I'm just a beginner and need some assistance. below is a diagram of a 4CH reciever which works fine with some leds and it reports 5V positive on Data0 when holding channel 0 on the transmitter. What's not working is when attempting to use a 5V DC relay as shown in diagram, the relay clicks and seems to work fine with a direct input.

I'm using USB Powered socket which is 5V DC 0.5A I believe. I'm really puzzled while its not working.

SUGGESTED

simulate this circuit – Schematic created using CircuitLab


texts: I have 100V/200W PSU with PFC and I see attached waveform on drain of PFS7329H controller. How can I get rid of it? PSU seems to work fine, but I see EMI issues.


texts:
I have the following problem, it consists of BJTs connected in the following way. I am being asked to find the node voltages. Am doing the part were beta=100 and R is connected.

I have done the work on my paper, but the problem is that when am simulating it, the simulation results don't match my hand written work. Below are the simulation schematic results using LTSpice. Unfortunately I cannot provide my hand written work here because I have done a lot of circuit conversions. I was hoping if somebody can help me with the analysis mathematically. I would really appreciated that. Thanks in advance.


texts: How much natural background radiation is there at 5g radio frequencies?

texts: I'm wondering how much energy at 5g frequencies we are exposed to from natural sources such as sunlight compared to what we might receive from living in a city that has 5g cell towers.


texts: I was trying to understand the way this problem was solved and I got confused with the latter part of the solution. I encircled the part that confused me. They seem to contradict each other. If dv(0+)/dt = 0 why is it dv(0+)/dt = -1 in the other one? Please explain. TIA!


texts: Should a capacitor be considered functional if it's capacitance reading is correct?

texts:
There are many different ways to test capacitors. Using a capacitance meter, using a DMM and an analog meter.

In general, is it safe to assume that a capacitor is considered functional if it's capacitance measurement is +- 20% of it's declared value without doing the ohm/voltage test? Are these test overkill after the capacitance value has been verified?

Just so we are on the same page, the ohm test I am referring to us to check to see if the resistance value is not constant and that it increases until OL is displayed.

The voltage test is just to charge the capacitor and check that it is properly charging/discharging. Could these test be mutually exclusive?


texts: How does a 24 volt aircraft battery power a 28 volt bus?

texts:
Can someone explain to me how a 24 volt battery can power components that advertise requiring 28 volts to operate?

The aircraft I fly has a 28 VDC generator that powers both battery and generator buses under normal ops, but in the event of generator failure, the bus tie opens and isolates the battery bus.  The 24 VDC battery then gives you 30 minutes of power to the battery bus.

But today I found that the solenoid dump valve, which needs 28 volts to remain closed and keep the aircraft pressurized, is on the battery bus and (supposedly) still operates normally when the 28 volt generator fails and the 24 volt battery takes over.  What am I missing?


texts: What does a 200MW capacity power plant mean?

texts:
1W is 1Joule of energy transferred in 1sec. So what does a 200MW capacity power plant mean? Does it mean it generates 200MJ of energy in one second. But then I have also read it can mean 200MW of power in any time, 1min or 1hour. It is confusing me a little.
So what does 200MW capacity power plant mean? w.r.t Time.


texts: Learning from checking a 9-volt battery the wrong way with a multitester

texts:
I'm doing some extra-curricular learning about electronics before I know much.  In the spirit of Platt's book, "Make: Electronics", I am "breaking and burning" things to help learn the fun way.  I'm a 10 year old in a 74 year old body, what can I say.

My latest effort was hooking a multimeter (UNI-T UT89XD) with red lead plugged into 20 ampere jack, set the meter dial to 60 mA and touched the leads to the +/- of 9 volt battery terminals.  The mA reading went down from around 35 mA to around 5 mA in roughly 10 seconds, and the battery got very hot.  Its voltage was originally around 9.3 V and after my test it is now around 8.7 - I basically killed it.

I realize I shorted the battery doing this test.  But besides this being no way to test a battery, is there anything to learn from this, namely why, as the battery heated up and the voltage went down from 9.3 to 8.7 volts, did the ampere reading go from 35mA to 5mA in 10 seconds?  Did that tell me anything useful besides it was a dumb thing to do?  Be positive now, and not just "I'm positive that was a dumb thing to do."


texts:
We have a board built in the thousands, and several have (apparently) short-circuited a plated through hole (PTH) to an adjacent pour (see photo, note the other thermal damage is probably due to thermal conduction of via internal trace running to the PTH).

The PTH to pour clearance is 7mil, and the PCB manufacturer and assembler is big name CM!

Any ideas about possible causes or lines of inquiry to pursue?

---followups

This problem has occured in ~0.05% percent of the builds.
the damaged PTH is where the short is suspected to an INTERNAL pour.
I had assumed that 100% of these PCBs were electrically tested. perhaps
I should not assume.
the applied signals are from a <50V battery which is rated for ~20A, but if we assume ~3kv / mil dielectric withstand we are nowhere near a breakdown even with some voltage ringing given our 7mil clearance.
Failures are found during sub assembly testing in a pretty organized / clean facility, and occurs upon connection of power, not during use.


texts: Increase input current in series resonant circuit

texts:
I have an antenna/coil for an RFID application that I am resonating with a series capacitor. However, the current remains extremely low and does not agree with the calculated/theoretical values for its impedance. I am expecting high levels of current. See my setup below:

Vo (Vpp)
Vc(Vpp)
Io (mArms)
Theoretical Io (Arms)

29.2
29
70.7
2.06

*Operating frequency=125 kHz. Current was calculated using the voltage difference in Rs.
Do you have any idea of what I am missing to consider? I have tried reducing the parasitic resistance of the coil further (using Litz wire) and got similar results. I have done some simulations and they show non consistent values of current that depend on the inductance value (?). I have designed lower inductance coils (50uH) with even worse results. Obviously, I have increased the input voltage, but this is impractical since I am looking for >10A input current. Still, the input impedance of the resonating circuit shouldn't be that large. Finally, I have also made a frequency sweep to find the optimal operating point. Any help or advice will be appreciated!


texts: Vivado:Error-Ambiguous clk in event control

texts:
Ambiguous clk in event control error and is pointed to always block.

//fpga4student.com

module PWM_Signals
 (
 input sysclk_p, // 100mhz
 input sysclk_n,
 input reset_n,
 input cpu_restn,
 input increase_duty,
 input decrease_duty,
 output PWM_OUT );

 wire clk; //100mhz
 wire locked;
 wire slow_clk_enable; // slow clock enable signal for debouncing FFs
 reg[31:0] counter_debounce=0;// counter for creating slow clock enable signals
 wire tmp1,tmp2,duty_inc;// temporary flip-flop signals for debouncing the increasing button
 wire tmp3,tmp4,duty_dec;// temporary flip-flop signals for debouncing the decreasing button
 reg[7:0] counter_PWM=0;// counter for creating 10Mhz PWM signal
 reg[7:0] DUTY_CYCLE=128; // initial duty cycle is 50%

 always @(posedge clk or negedge reset_n)
 begin
   if (reset_n == 0)
     counter_debounce <= 0;
   else
     counter_debounce <= counter_debounce + 1;
   if (counter_debounce>=100000000)
     counter_debounce <= 0;
 end


texts: How can I determine what type of resistor, transistor and, diode I need?

texts:
I'm trying to build the following circuit

Given my solenoid draws 1.4A, how do I determine what type of resistor, transistor, and diode I should use?  What if I were to change my power to 9V?  I'd prefer to see answers accompanied by the math so I can understand what's going on.


texts: ESD Protection Necessary for Water Detection Circuit?

texts:
I'm using a water detection circuit similar to the one found here

I put it all together and it worked pretty well for a hobby project.

The circuit hinges around an AC signal that's generated from a (CD4093B) Here's a link for it at digikey.

However I was wondering if I should be concerned about ESD on the input of the "sensor"

Perhaps I should consider changing the CD4093B over to one with ESD protection such as 74LCX00YMTR again here's a link at digikey.

I prototyped it with a breadboard hence why the first part was a Through Hole but am planning on laying out a board so I could switch over to a Surface Mount part.

I was curious if changing this part is necessary or do the two capacitors that block out the DC from the sensor protect it form ESD as well?

Edit - Added additional thoughts.

I've decided to double footprint my prototype board with both the CD4093 (and include the ESP protection diodes both responses suggested) and also SN74LV132ADR  (IC QUAD NAND GATE 14-SOIC)from Digikey.

That way I can compare the two and see if there are any  other changes I should address.

I read though the HCMOS Design Considerations provide by dfowler7437 which lead me to the TI Logic Selection Guide After skimming over the first few diagrams I settled on the LVC family. I ordered some SN74LV132ADR and hope with the following changes I should be set.

I'll include a cheap 100mA regulator for the power input of the SN74LV132ADR. Now, since it's a different part from the reference design (and a different voltage 3.3V instead of 12V) will I need to change the R1 and C1 to a different value to maintain the same frequency? (I'm assuming the frequency is tuned to get the sensor to work around the capacitive value of water)

Also, Since I'm changing the NAND gate to a different voltage I believe I need to change from a P Channel to an N channel (and then invert the output from N2 into say N3 or N4) in order to get the N Channel to work with a different Gate voltage. Does this make sense?


texts: Headroom of cathodyne phase inverter (in vacuum tube amplifier)

texts:
I know that gain of cathodyne is almost 1, so if it's going to produce 12V peak output, it has to take 12V peak input.
 However, if the bias is set to something like (-)1-1.5V, then peak voltage of input signal has to be smaller than 1.5V is we want to avoid distorition, right?
That's how I imagined this situation until I found this somewhere:

  Of course, as with a cathode follower, a bias of -2V does not mean that the stage will overdrive if we input more than 2Vpk, the stage has roughly unity-gain remember!

Okay, so there is some magic happening in the background, maybe it has something to do with cathode resistor drop?
I couldn't find anything else on the internet that would help me understand what's happening here.
Could somebody explain this behavior of cathodyne circuit, and show a way to calculate actual peak voltage of input signal before overdrive happens, or provide links to articles where this is explained?

EDIT:
-1.5V grid voltage refers to cathode voltage, I'm totally aware that actual grid to ground voltage is positive.
Let's say we need 12V peak signal for power stage. That means output voltage of cathodyne will vary from Vq-12 to Vq+12 (Vq is quiescent voltage).
Let's assume cathode is at 100V in relation to groud. Grid is therefore biased to 98.5V.
If gain is 0.98(let's assume it's 1), then input must also have amplitude of 24V if we want output to have amplitude of 24V.
Actual voltage at grid at time t is Vbias + Vsignal(t).
Minimum Vsignal(t) is -12V, and maximum is +12V, since gain is 1, and we need 24V amplitude in next stage.
So minimum grid voltage is Vbias + min(Vsignal(t))= Vbias - 12V = 86.5, and maximum grid voltage is Vbias + max(Vsignal(t))=Vbias + 12V = 110.5.
Therefore maximum grid voltage is above cathode voltage, so grid to cathode voltage is positive, and saturation occurs.

Of course, since I know this is not what actually happens, there must be a mistake somewhere. Why doesn't grid voltage actually exceed cathode voltage, when peak of signal voltage is greater than difference between grid and cathode?


texts:
I'm looking for method how to inform one task in firmware about change somewhere else (Using FreeRTOS 7.1.1). I need to receive information about changes, but I wouldn't want check value in cycle - something like interrupts, but coming internal.

For example (in C-like pseudocode)

void task1(int change1)
{
 int value1 = change1;
}

void task2(int change2)
{
 int value2 = change2;
}

void task3(int change3)
{
 int value3 = change3;
}

void taskCheck()
{
  doSomething();
}

And when any value in any task is changed, taskCheck() is activated.

I thought about queues, but I prefered to ask first if there is no better solution.

P.S. There is no Event Bits and Event Group in FreeRTOS 7.1.1


texts: Using a microcontroller as a microcode sequencer?

texts:
There's this thing called the weird processing unit, or WPU. It's basically an idea of various experimental processors (architectures) that try to be interesting, new, original, extraordinary, different or just plain weird. I'd like to build my own WPU, but just how could one go about doing this without:

A) Cutting too many corners with microcontrollers (I don't consider a single microcontroller programmed to emulate instructions as a computer)

and,

B) Spending too much money on it.

With most hobby home-built computers that don't use a microprocessor, microsequencers are used. They use counters, eeproms, and gates to generate addresses for a control store that generates signals to control the processor.

My question is: Would it be considered cheating if I used a microcontroller to send control signals to peripherals such as an ALU, register file, etc. What are your thoughts?


texts:
I'm using MSP430G2553IN20 microcontroller on LaunchPad to drive an 4056 chip (HCF4056B to be precise) and a 7 segment display. The 4056 is set to sink current.

I've connected the port 2 pins, set as outputs, to the BCD and STROBE input pins of the 4056. The board with 4056 and display has its own separate power supply and the MSP430 is powered via the LaunchPad which provides it around 3.6 V. The grounds of  both supplies are connected and I've set the other power supply as close as possible to 3.6 V.

I'm concerned that with this setup I could damage the chips. For example, when the 4056 power is down, it and the display are still getting some power from the MSP430 via the BCD and STROBE pins and the display remains on, although sometimes it works incorrectly.

Right now, I'm using \$220 \mbox{ } \Omega\$ resistors on the output pins of the MSP430 to limit the output current, but I'm afraid that the setup isn't safe enough.

So my question is: Is there a simple and safe way to connect the MSP430 to the 4056? For best results, I'd want to drive 4056 at higher voltage than MSP430, but if that's too difficult I could settle for 3.6 V.


texts: Designing a BJT cascode amplifier for decent gain and bandwidth

texts:
For my university course assignment I have to design a BJT amplifier using a Cascode stage with the following specifications using LTSpice. Only Vcc=3.3V and ground rails are available as well as a Refernence current \$I_{ref} =50\mu A\$ is allowed for biasing the BJT's using a current mirror.

Voltage Gain= 80 \$\pm \$5% V/V
Current Gain= 75 \$\pm\$5% A/A
Corner Frequency= 40k\$\pm\$5%  Hz
Power Dissipated= 2\$\pm\$5% mW
Output swing= atleast 2.64V
No resistors should be used, only active loads

To start things up, I experimented using a NPN load and driver and even by dc sweeping for minute changes in bias I was not able to get any decent gain.
Next I made a PNP load and NPN driver(pull down circuit), like a CMOS and even this has led to dismal gains even after sweeping through minute changes in bias voltages. I have attached the schematic image below:

Can someone point me in the right direction as to where I have been going wrong with the design. I think using lower number of transistors are better since biasing them with such a low Vcc is going to be a pain. I have selected four BJT's to use for the cascode since a high gain is necessary as well.


texts:
I wondered this while soldering a mains voltage circuit board and was surprised by how close together the traces were.
It has obvious implications in design of electrical plugs, and the proximity of wires when doing anything to do with mains voltage.

I've tried asking search engines sensible questions like "how far can 240V arc at 1 atmosphere" and "how far can electricity jump" but I haven't found any easy answer. This calculator states that it only takes voltages between 400 and 3000VDC.

By asking this question, I hope future people will be able to find the answer quickly and simply.

My research suggests that the arcing distance is dependant on the medium and the pressure, so let's assume air (~79% nitrogen, ~20% oxygen, ~1% argon and a few other things) at 1 atmosphere or 1.01325 Bar.
An answer has also drawn my attention to the affect of temperature and humidity. Assuming that higher temperatures and higher humidities both increase the possible arcing distance, let's choose something harsh like 40 degrees Celsius and 95% humidity.

Given a mains voltage of 230VAC in the UK, how close would two uninsulated copper wires (as an example) need to be before an arc could form between them?

Is this different for traces on a circuit board, or pins in a plug?

For bonus points, could answers be given for 120VAC too? Would 240V arc significantly farther than 230V? How about 110V compared to 120V?

I'm looking for fairly concise answers, but perhaps the reason I haven't found a simple answer is because there isn't one...

This question is just out of curiosity. I'm not going to start rewiring mains fixtures or designing 240V circuit boards any time soon.


texts:
I am trying to import one of the spice models (from here) into QUCS.

I haven't been able to find much documentation about this except for vague hints that it is possible.


texts: circuit analysis transient response in an RC circuit

texts:
I asked this question already yesterday, but it seems like I didn't explain it well enough so I will give it one more go.

This circuit is powered by a DC current source. I am trying to find out how current will be split between the two branches in the TRANSIENT response. This is a hypothetical circuit where the capacitances are large and will take lots of time to charge them up, so the current will be constantly changing with time.

I have derived 5 equations shown in the picture where all the voltages are functions of time, except V4 as it is always 0. However, when I am trying to solve these equations (after some substitutions and using the ODE45 function in MATLAB) the values come out wrong, when comparing them to when I run a simulator.

Are my equations wrong? Is there another way to do it? I am a mechanical engineer undergrad, so my knowledge in electronics is limited.


texts:
I am working on a LDR based JFET project which would turn on automatically when it is sufficiently dark.
Accordingly, I have designed this circuit.  Is this practical? Also when the LDR value reaches 0 ohms the gate-source junction will be fully negative, but since the junction is reverse biased will it consume any power from the left side battery? I am not interested about the resistor values here, I just want to know whether the topology is correct.


texts:
I want to make a simple battery powered Arduino-based keypad lock, and in order to save as much power as possible, I want it to self-shutdown after few seconds of inactivity.

I am trying to devise this shutdown mechanism and this is what I suppose should work:

It should work like this: after I tap the switch, MOSFET should start conducting, powering the Arduino and also C1 should charge quickly. C1 should keep MOSFET on for few seconds, allowing Arduino program to load and set D8 pin to logical 1, and therefore to take over business of keeping MOSFET on at all times. After Arduino detects few seconds of inactivity, D8 pin turns off and after C1 discharges, MOSFET turns off, so the whole thing turns off.

I've entered similar scheme in Multisim software, replacing Arduino with 150 ohm load resistor and ignoring the D8 pin. Unfortunately, Multisim says there is 35mA current through load resistor despite the fact switch is OPEN!! How is it even possible?

Multisim scheme:


texts: Why the internal resistance of battery is greater than internal resistance of car's accumulator?

texts:
It is really important for me to understand the following question.
I know that it is a basic stuff, but I think that I am still missing something.

In my opinion it is caused by the fact that the battery is not as accurate as car accumulator.
Is there more causes of this effect?

Edit: I mean the very normal battery one of which we can buy in every single shop.


texts: How to read/write from a CPU using a usbWiggler?

texts:
Reading the Macraigor API for the usbWiggler

  MacraigorApi_ JtagScanlO

BOOLEAN_TYPE MacraigorApi_JTAGScanIO(
                               char *shift_register,
                               unsigned_int length_in_bits,
                               MEMORY_BUFFER_TYPE *data_in_ptr,
                               MEMORY_BUFFER_TYPE *data_out_ptr)

  Use JTAG to scan the stream of bits contained in *data_in_ptr array to the
  shift_register of the currently selected CPU and at the same time
  collect the bits arriving from the CPU in *data_out_ptr array,
  leaving the CPU in "RunTestidle" state at the end of the operation
  Returns TRUE if command completed successfully

  shift_register ["IR"/"DR"] - destination shift register (IR= JTAG
  Instruction register, DR= JTAG Data Register

  length_in_bits [1 - ... ] number of bits to shift in/out of the CPU

  data_in_ptr pointer to array containing the bits to be shifted into the
  CPU, in the format [8,7,6,5,4,3,2,1,0] [15,14,13,12,11,10,9,8] ... where at
  the end of the scan operation bit O will be the bit closest to SDO and bit
  N will be the bit closest to SDI

  data_out_ptr pointer to array containing bit scanned in from CPU in the
  same format as data_in_ptr, where bit byte Obit O contains the first bit
  scanned in from the CPU

I'm not sure I understand this description clearly. So playing with the C++ code and Cortex M3 I did this:

int scanBits = 0x292;
unsigned char data_in[256];
unsigned char *data_in_ptr = &data_in[0];
unsigned char data_out[256];
unsigned char *data_out_ptr = &data_out[0];
MacraigorApi_JTAGScanIO("DR",
                        scanBits,
                        (MEMORY_BUFFER_TYPE *)data_in_ptr,
                        (MEMORY_BUFFER_TYPE *)data_out_ptr);

And the data_out_ptr showed me a result like this:

1110010001001111111111111111111111111111111001001101001010101010011001
0010110000000000000000000000000000000000000000001100011111110100110111
1110111111011111101111000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000100110000010001001111101010100
0010000110000000100000010001001110001001000000001000000100010011111101
1100011100000000000011000111111101000110000000000000110001111111010011
1100000000000000000000000000000000001000000001000000100010101001010100
0000000000001100011111110011011100000000010000101010101011100001111111
0000000000100000000101100011000010100000000001100011111110011001100000
000000000000000000000000000000000000000000101000100111110010000

Can someone explain to me in simpler words what this API description mean? I'm new to this field so a lot of the jargon here is not as clear to me.

Also I'm kind of confused on this, How can I, from this stream of bits, get what data was on a X address?


texts: Transfer function G(s)= 2/(0.0625*s^2+0.1*s+1) phase calculation problem for ω>ωn

texts:
I am trying to create a table of values and the bode plot for the tranfer function
G(s)= 2/(0.0625*s^2 + 0.1*s + 1). However when i use values above ω{n} the the values of phase does not agree with the bode plot result of matlab or wolfram alpha. For example if ω=0.5, bode plot of wolfram gives arround Φ = -142deg but the calculation gives 41.633deg.
The phase equation is:
                     Φ(ω)= -arctan[0.1*ω/(1-ω^2/16)]
[]1
[]2


texts:
Im trying to build up my own BLDC Motor Controller. Now Im wondering if I really have to implement Dead Times between switching the High- and Lowside FET´s. My switching frequency is 30kHz, my Motor has 5kW 48V and the max RPM of the motor is ~3000 RPM.
Attached is the switching scheme for my motor in forward direction. It also shows the state of the Hall Sensors.

For Example the state of Phase U never suddenly changes from HIGH to LOW. As far as I understood Dead Time insertion, I dont need this for my switching sheme, am I right?
Would be nice if someone could help me here :-)
Thanks in advance,
Peter


texts: Practical considerations for a summing amplifier

texts:
The summing (usually inverting) amplifier is a classic op amp configuration. However, I'm struggling to find any products on the market which actually do this, leading me to conclude that I have to build my own.

The move from the textbook with its ideal components to the messy real world often comes with gotchas and problems you might not have thought of, and these practical considerations often end up dominating the noise budget of a system.

So: what kind of issues are there to be wary of when building a low noise, ~150 MHz, ~5dBm output, unity gain summing amplifier from parts? Or, alternatively, do commercial systems with these problems conveniently pre-solved exist?

Thanks in advance.


texts: USB Softcore for FPGA : Extra resistor on FPGA transmitter pin

texts:
Have anyone used this USB softcore before ?

Why do we need extra resistance on the tx pin ONLY ?

  Whichever pins you transmit on need to have resistors after them. The
  exact values will depend on the internal resistance of the pins;
  usually something around 27 ohms will be ok.

According to section 7.1.1 (Tx) and 7.1.2 (Rx) of the USB 2.0 specification , it seems like we need some resistance for impedance matching for BOTH Tx and Rx.

1)    is it correct that I only need TWO 27 ohm resistors in series (to compensate the low output impedance, say 73 ohm of FPGA pins) with the FPGA usbcorev softcore D+ and D- pins ?

2)    And another 1.5 kilo-ohm pull-up resistor for D+ line ?

3)    Since D+ and D- are bi-directional, do we need 15 kilo-ohm pull-down resistors for both D+ and D- line at FPGA pins ?

4)    From on-chip termination section within intel cyclone IV IO inteface spec (have anyone used on chip termination ?) , I am not sure if I need to use external series termination resistors for both D+ and D- line. When I loop deeper into cyclone IV IO spec, it only supports 25 ohm or 50 ohm on-chip termination.
    This means this on-chip termination is not suffice for 90 ohm transmission line in USB spec . Could anyone advise ?


texts: Clearance between copper pour and board outline (in OrCAD 10.5)

texts:
I’m laying out a PCB with an intricate outline. First, I drew the outline (yellow in the picture below). Then I’ve added a copper pour at the top layer (blue in the picture below), but a clearance between the outline and the pour wasn’t created. The board outline didn’t clip the copper pour. (The clearance between copper pour and traces, components was created as expected.)

How can I enable clearance between copper pour and board outline?

Details

Obstacle type: Board Outline. Layer: Global Layer. Width: 40 mils.

Obatscle type: Copper Pour. Layer: Top. Width: 10. Clearance: 10

I’m on OrCAD 10.5

Not really looking for workarounds

I'm asking for a proper/prescribed way of doing this.  I'm not so much asking for workarounds.  I know a few workarounds already.

I can create a separate anti-copper obstacle between the por and the board.  I can also draw the copper pour such that it doesn't extend outside of the board outline in the first place.   But these things feel like workarounds.  Is it not unreasonable to anticipate that somewhere the OrCAD has got a setting for this kind of clearance?
(Eagle has got one, albeit the setting is in a weird place.)

The board outline is pretty intricate, so I don't want to trace it out more than once.  I haven't run into this problem before, because my previous boards had simpler shapes.


texts: Equivalent circuit of a non-ideal resistor

texts:
I've come across two different equivalent circuits for a non-ideal resistor and I'd like to understand which is correct. The first is:

and the second:

These are different equivalent circuits with different frequency responses. To show this I can take the parasitic values from the second link (C=0.3pF and L=1.5nH) and simulate both equivalent circuits with SPICE. For the simulation I'm using a voltage divider configuration with the top resistor non-ideal (arbitrary value of 1kOhm) and the bottom resistor ideal (also value of 1kOhm). The divider is driven by an AC voltage input of increasing frequency. Here's the first simulated circut:

And here's the second:

I measure the ratio of Vout to Vin (where Vout is the voltage measured across the ideal, bottom resistor). I've used the same frequency range. The plot for the first circuit is:

And the plot of the second:

There's nothing unexpected about this, since the parallel capacitor in the first circuit bypasses the resistor and inductor, whereas in the second, the capacitor is in series with the inductor.

It seems to me that the second circuit must be the correct one, since otherwise I don't see the point of ever using a speedup capacitor (the parasitic parallel capacitance basically acts as one). Is my intuition correct?

Note I've seen this answer which also seems to indicate the second circuit is correct. However, the linked to Vishay article uses the first circuit, although with added inductance due to the "external connection".


texts:
I'm trying to troubleshoot a delinquent power supply I have. Most recently one of the transistors (Q1) actually exploded on it. This has led me into investigating the schematic, but try as I might, I can't make heads nor tails of what's going on. I'm an electrical engineer (but optics) and will admit being a complete noob with electronics, but I'm trying to change that.

I've attached the circuit diagram. For starters, rather than "HOW DOES THIS THING WORK," my more specific question is how the UA/LM723 operates in the circuit; that is, what is its job, and how does it do it? I have seen another LM723 in almost the exact same setup elsewhere, but the site was in Russian. I have also spent about half a day playing around with the various configurations on the datasheet to try and get a feel for how it works. However, I don't understand:

a) why the zener is shorted to ground, and the effect of this (I have seen it either greatly limit the range of Vo, or make the whole thing unstable)
b) what the role of the LM723 is in this circuit. I understand that it is responsible for varying the voltage (and regulating it), how is it accomplishing this?
c) BONUS, if not too strenuous, I know that Q3/4 is likely the main pass transistor and thus responsible for full current handling, but what are Q1 and Q2 doing?

I'm quite lost after spending some time monkeying with this, so any direction is greatly appreciated.

UPDATE: I checked the 3055, and it has 550 ohms from emitter to base (i.e., black lead on emitter); and about the same from collector to base (black lead on collector). Everything else HI. I think that my pinout is correct (used http://www.rmcybernetics.com/images/users/diy_coildriverSd2gH5.jpg).


texts: How to avoid clash of multiple RF modules [315/433 Mhz]?

texts:
I am working on a project which requires multiple RF working together (around 100). This will be one way communication from TX -> RX.

I will be setting up multiple cheap 433/315 Mhz in one particular area. How can I make sure that particular pair of RF doesn't clash/interfere with other pair. For every transmitter, there will receiver. No central receiver there.

I will add 8 bit Microcontroller on Transmitter side which will be connected to RF Transmitter and send data when required.

On receiver side I will add another micro controller to decode the packet and perform task accordingly.

I have read that upto 500 different channels can be selected which will avoid the interference, but couldn't find much info on that.

How can I solve the problem? Cost is a big factor or else I would have used HopeRF module in which network ID can be set and works with particular network.


texts: Protecting regulator from alternate power supply

texts:
I'm designing a module built around a Teensy LC MCU which can either run off of Eurorack power (+12/gnd/-12) or USB (mainly during development). The Teensy wants 5V and regulates down to 3.3V onboard, so I want to use a regulator to drop the 12V to 5V. In my first prototype this is a 7805:

D3 is protecting against reversing the Eurorack power connector (pins 1-2 carry -12V, which I don't need in this module). I gather that you don't want to put voltage on the output side of a 7805 with the input unconnected, so D2 is intended to protect it when the 5V is supplied from USB and the Eurorack is disconnected.
The module should be drawing under 60mA, so I'm not too concerned about temperature, but on general principle I'm considering using a switching regulator in place of the 7805, for sake of argument let's say an LM2574.
My questions are:

Is D2 a suitable way of protecting the 7805 from output-side voltage? Does the drop across the diode leave a small reverse voltage through the 7805, and is that okay?
Is a similar diode arrangement suitable for protecting an LM2574? What part of the datasheet tells me if it needs protection?


texts: Name for old-style (purple-tinged) white LEDs?

texts: Older white LEDs (ca. 2005-2010?) had a distinct purple tinge while modern ones have a spectrum much closer to a blackbody.  I rather like the look of the older style and would like to purchase some now.  Does anyone know what keywords to use to find the older style in a parametric search?


texts:
I have a Rigol DS1000Z, and I'm using it to sort of log data.  I have a wavelength tunable laser that creates an electrical pulse (start of pulse is start of sweep, end of pulse is end of sweep), and I have an optical power meter which measures the laser power, and gives an electrical signal.

I trigger the oscilloscope off the rising edge of the pulse, and I look at the power meter output in another oscilloscope channel.  I can then see the power vs wavelength measurements on the scope.  Although not a huge issue, I was wondering if it's possible to tell the scope to stop getting data on the falling edge of the pulse, instead of just filling up its memory.

Is this possible?


texts: Why IBT_2 motor driver is more powerfull with Arduino then with Stm32

texts: The question is why in DIY Force Feedback applications for PC racing simulators, the FFB is more powerfull with Arduino then with STM32. Can it be due to the diffrent logic level that goes from them. 5v Arduino and, 3.3 STM32. The IBT_2 logic levels are 3.3-5v. I believe that hardly, but still. The IBT_2 driver operating voltage is 5 volts. Arduino provide 5 volts, and stm 32 about 4.3v from it's 5volts pins. But IBT_2 also work on it. Can it be due to the fact that arduino has more "amps" in it's logic. Or is it due to the diffrent software used, or diffrent power provided from these two controllers. Or what else can be out there?) Thanks!


texts:
I see many posts regarding adding more power to supplement USB ports power but could not find a good answer how it can be done. My configuration is like this (except the red line):

I have a raspberry Pi computer powered by a 5v 10 amps power supply. A phone is connected to the compute using using a standard USB cable. The phone is in tethered mode and raspberry pi is connecting to Internet over that link. Now, since the configuration is supposed to run for long time the small amount of power raspberry pi is supplying through the USB line is not enough. So, I plan to add the red line in the diagram. Basically connecting the positive terminal to the usb ports positive / power line (I was thinking about using a diode - but then it'll drop .7v which is not acceptable) after measuring the voltages of each side using the USB ground as common and making sure those are same.
My logic is both of the systems are powered from same power supply - so if the voltages are same on the battery terminal and USB ports positive terminal it should be safe. I am not sure how the internals of the USB port works on a raspberry pi. So, wanted to discuss what else should I test or if the idea is valid at all.
Update:
One possibility I see is to use USB Power delivery protocol as described here: https://www.ti.com/interface/usb/type-c-and-power-delivery/getting-started.html#:~:text=USB%20Power%20Delivery%20(PD)%20is,power%20level%20for%20each%20application. It states that the system must negotiate first to use the system. And I know the phone I am using supports PS Fast charging. So, while it may not be possible to use simple wires to accomplish the task, using a TI chip from the link may solve the problem.
Also for 5V and up to 3amps there is the CC controller - that is about 15 watts (6 times more than normal 500 ma USB power).
I'll do more research and if I find a solution, add that here as it seems to be a common problem without a solid guideline of what works and what does not that cab be easily found for EEE novices like me.


texts: In the AL9910 LED driver datasheet it shows a part, which I assume is a varistor, is it so? Varistors are shown to be connected across L and N lines, but here it is connected in series. Please explain the operation principle.


texts: Controlling Speaker Output with Transistors

texts:
I am awfully new to circuit design and a little confused on some of the things I can and cannot do here, so please bear with me.

In a simple Arduino project, I am trying to control the output of an 8-ohms, 300mW loudspeaker from three separate digital control pins, using the circuit below.

simulate this circuit – Schematic created using CircuitLab

I want each of the Pins to represent a different output level: Pin1=Loud, Pin2=Medium, Pin3=Low, etc. The user activates the Pins by switching them HIGH, thus activating the NPN transistor and allowing current to flow through the load side (at least that's what I think I am doing).

I have the following hardware:

One source of power: 5V regulated output from a Adafruit PowerBooster via a 3.7v LiOn Battery.
one 8 ohms loudspeaker, 300mW (that's all what the datasheet says),
3, 2N2222ATA NPN (1A, 40V, I think 100hFE) transistors for the switches,
A 3.3V arduino to control the Digital Pins.

The circuit works (...), but I have no idea if it is safe and if I am exposing any of the parts to undue harm and crucially, if it will last and not destroy itself over time.
- I have no idea what base resistors I should use on the base of the three transistors (Rb1, Rb2 and Rb3: at the mom, I am blindly using 1K for all three), and I have no idea if my transistors are fit for the task.
- I am slightly worried about a short circuit in the case where Q1 is activated. I have decided NOT to use any resistor here, because I wanted full output and did not reach the sound level I wanted, but fear this might not be super safe...

So, here is my question:

Is this circuit a viable answer to my problem? In particular, I don't know if this is good practice to place load resistors (RL1 and RL2) the way I have and if not using any resistor on the Q1 collector is a good idea.
Is it safe for the Arduino?
Could you help me calculate what base resistors I should use?
Are these transistors appropriate for this task?

I hope I have said it all.

Thanks in advance for the expertise provided.

Edits (following remarks/suggestions):

Added RL1 resistor (10Ohms, 1W to dissipate heat)
Modify base Resistors Rb1, Rb2 and Rb3 to 510ohm from 1k.


texts: How does electrical interface on multi-subscriber FDM telephone line work?

texts: I am wondering how the electrical interface for a frequency multiplexed telephone line works. If two senders are connected to a single line, how is it that the final output stage amplifiers don't clobber each other's signals, possibly even burning out the amplifiers? Are there analog filters after the amplifiers to ensure that the impedance the amplifier sees for signals outside the passband is very high? Does this mean that each device (presumably the modem) can only transmit on one frequency, or can the filters be tuned to a desired passband or selected from a bank of filters in the device? Or, alternately, is the output impedance of each amplifier high enough such that the loading effects are tolerated? Would this imply that the signal level per channel drops with every connected device?


texts: Gain of Non-Inverting Amplifier Does Not vary with Resistor Values

texts:
I am trying to build a non-inverting amplifier using a LM7171 op amp, and I am implementing it with potentiometers as Rf and R2 so that I can smoothly control the gain of the amplifier (and easily check if its working correctly). I am applying +/- 15 V to the op amp. When I adjust the potentiometer's resistance the gain does not change as expected, or noticeably at all. Setup is shown below with traces when the resistances are Rf=Ri=540 Ohm and Rf=1.8 kOhm, Ri=540 Ohm, and as can be seen the gain/amplitude is the same for the different resistances used. The yellow output on the oscilloscope is the output of the amplifier, and the green is directly from a t-connector to the function generator's output.

I have used two different op amps and got the same behavior, so it is not broken, and all connections seem good. I measure the values of the potentiometer so am confident they are as described. Any ideas what might cause this? Thank you in advance for your help.

100 kHz sinusoids.

Setup as voltage follower


texts: Atmega328 ubrr value shifting issue for serial transmission

texts:
My doubt is about the way in which the baudrate value is written into UBRRn registers.

For eg:

Lets say i want to write the value 25 into UBBRn registers to configure the microcontroller to communicate at a particular baud rate.

I use the following code to do that

unsigned int ubrr = 25; // 0000 0000 0001 1001 (16 bit binary representation)

UBRR0H = (ubrr>>8);     // Moving the lower Byte 0001 1001 to UBRR0H
UBRR0L = (ubrr);        // Moving  0000 0000 to UBRR0L

Why are we moving the lower byte to the high register UBRR0H and the higher byte to UBRR0L (after shifting).

Generally when we are moving a 16 bit value to two 8 bit registers,

The Lower byte will be moved to the Lower register (UBRR0L) and
Higher byte will be moved to the High register (UBRR0H)

Why is ATmega328p reversing this trend,

Is this a design issue,or there is any specific reason to do this ?

Also UBBR0H has only 4 bits and the upper nibble will be discarded ?

I would like to point out the default code in the datasheet is working perfectly for me,I am just curious why it is done like that?


texts: Arduino Motor Control Circuit with Power Transistor and H-Bridge

texts:
I'm new to motor control, and I'm trying to create a circuit to control this motor: http://www.robotshop.com/en/banebots-rs-550-motor-12v-19300rpm.html

The key electrical characteristics for my application is that it uses a 12V supply, and at I need to be able to hit the operating point of 40A to get the resulting torque.

I am planning to use an Arduino microcontroller, and some googling led me to this schematic:

The particular motor they are driving is much lower power, it's 9V/100mA. So my question is if I can modify this circuit to use a larger power transistor for my application, and if so, how I should pick one. For example, I found this: http://www.digikey.ca/product-search/en/discrete-semiconductor-products/fets-single/1376381?k=power%20mosfet%2040%20amp and I don't know how to tell if a particular transistor would be appropriate or not.

After that, my next step is to add bidrectional control, and research tells me I need an H-Bridge. What does the circuit look like with an H-bridge added in? What sort of specifications do I need for the H-bridge? Does it have to handle similar current as the power transistor? For example, I found this: http://www.digikey.ca/product-detail/en/VNH7013XPTR-E/497-13076-1-ND/3455766 and have no idea if it's appropriate, or how to use it; to be honest all I know is that I want an H-bridge.

Some further background on my project: I am looking to build a relatively high powered robot actuator. The application is extremely price sensitive, so I'm looking to build out a circuit as inexpensive as possible as opposed to buying some pre-made motor controller, which I've seen can be >$50.


texts: Apparent power calculation of different loads for transformer sizing

texts:
Let's say we have two electrical loads and we would want to calculate the total apparent power in order to size the transformer to supply the demand. I'm currently confused between which two calculation method to use.

Load A: P: 3kW, Q: 4kVAr
Load B: P: 4kW, Q: 3kVAr

Method 1:
If we sum up P and Q, we will get P: 7kW and Q: 7kVAr.
Then we can just use

$$
S = \sqrt{P^2 + Q^2}
$$

to calculate the required apparent power, 9.899kVA.

Method 2:
Calculate individual load's apparent power using same equation above.
S of load A = 5kVA
S of load B = 5kVA

Sum of these will arrive to 10kVA.

So clearly, there is a difference in result when power factor of the loads are different. And this difference will be even more apparent when there is a long list of loads involved.
I'm more inclined towards method 2 since these are the actual kVA demand of the loads. Whereas in method 1, we only calculate the overall demand with a generalized power factor.

Hence, i'm wondering if I am making a mistake of undersizing if I size my transformer based on method 1 instead of method 2?


texts: What happens if there was a short circuit fault BEFORE the main circuit breaker?

texts:
I haven't studied power systems yet but i keep wondering about that.
What would happen if there was a short circuit fault BEFORE the main circuit breaker(on the grid itself)? what protction is supposed to stop that kind of faults?


texts: Voltage drop across a series with a source and a resistor

texts:
I've tried using KVL and KCL but nothing I do is resulting in an answer. I am struggling with how to treat the voltage drop and the two resistors that are in parallel with each other. I think I may be trying to put a ground node in the wrong place.

Any help to get started would be greatly appreciated.

The question says to use KVL and KCL to solve for v.


texts: Significance of capacitor in this circuit

texts: In the above circuit, you can see there is capacitance of 10uf, GND connected to pin number 16, 29, 28, 25, 23 and many other points.. What is the significance of this capacitor.. Can we neglect this.. Sorry, I am not very good with electronics..


texts: Can a power cable from an AC adapter be safely split into separate wires?

texts:
Given a AC to DC power adapter like those found powering most electronics such as a network switch, could the 2 wires leaving the adapter be split into 8 wires of smaller diameter ( 4 wires per each original wire ) and then rejoined their original 2 wire counterparts further down the length of the wire without any additional "stress" / safety concern?

This question assumes that the volume per length of wire for the 4 wires equals or is greater than the original wire's volume - For example, original wire of 2mm and then each of the 4 are 0.75mm resulting in a larger total 3mm when all 4 wires are added together.

Also assumes that all wires are properly shielded given their diameter.

Goal is primarily to see if a "flatter" set of smaller wires can replace a single, thicker wire and also to increase understanding of the safety ratings / concern over handling current.  For sake of discussion, please assume wire length is 15 feet and the voltage / amperage is 12 V and 4 A.


texts: Differential to Single-Ended Converter + Common-mode Shift + Sallen-Key Filter (Is one Stage Possible?)

texts:
I have a differential signal that needs to be conditioned as follows:

Convert from differential to single-ended.
Filter with a 3rd order Sallen-Key filter
Common-mode shift into an single-ended, single-supply ADC.

Of course three separate stages can be cascaded to produce the desired effect. However, I'm wondering if it's possible to combine all three into a single stage?
Any ideas on whether this is even possible would be helpful!


texts: Anyone may suggest a temperature sensor technology that will work to a max of 200ºC?

texts: Cheapest sensor technology as possible, up to +- 5ºC or 5% of accuracy. Better if it doesn't need complex (and costly) additional circuits.


texts: Likely RS-485 color coding of three wires?

texts:
We received a piece of equipment (actually from an Italian manufacturer, if that gives a hint) which uses RS-485.

So, as well as a power connection the devices have THREE WIRES (bare wires) coming from the relevant board, being white, gray, black.

We have all the custom communications protocol in a PDF, but they neglected to include a mention of the wiring of the RS-485.

Can you guess which is A, B, Reference?

Is there a typical color scheme for the three, for "raw" 485 wires?

As it happens the engineers are completely on holiday for a week! (Typical production hang-up right?) Also just generally curious if there is a typical standard for this.

Just FTR if relevant, the plan by us and them was that the three wires would connect to a convertor to RS-232 and hence to an ordinary (ie Windows8) PC; cable lengths are only a meter or two.


texts: How to display potentiometer value from dspic33 microcontroller

texts:
I am new to the microcontroller world and am using a dsPIC33EP256MC506 controller and dsPICDEM -2 MCLV development board for a project. I am trying to read the value of the potentiometer that is on the dev board, but am having trouble. I just want to be able to run the program and move turn the potentiometer and see the program output the value. I know that I have to use ADC ports somehow to do this, but I'm not exactly sure how to use it. Documentation has not been very helpful on how to do this in the program either. If anyone can direct me to documentation that uses ADC to control the potentiometer or help me get started with this that would be great.

Also, does anyone know where this value will be displayed? It makes sense to me that it would be displayed in the Variables output tab, but no values seem to be populating for any variable.

Microcontroller: dsPIC33EP256MC506

Development Board: dsPICDEM -2 MCLV

Programmer/Debugger: REAL ICE

Compiler: MPLAB X - XC16

Thanks again!

#include <p33Exxxx.h>
/****************************CONFIGURATION****************************/

_FOSCSEL(FNOSC_FRC);
_FOSC(FCKSM_CSECMD & POSCMD_XT & OSCIOFNC_OFF & IOL1WAY_OFF);
_FWDT(FWDTEN_OFF);
_FPOR(ALTI2C1_ON & ALTI2C2_ON);
_FICD(ICS_PGD1 & JTAGEN_OFF);

void initAdc1(void);
void Delay_us(unsigned int);
int  ADCValue, i;
int  main(void)
{
// Configure the device PLL to obtain 40 MIPS operation. The crystal frequency is 8 MHz.
// Divide 8 MHz by 2, multiply by 40 and divide by 2. This results in Fosc of 80 MHz.
// The CPU clock frequency is Fcy = Fosc/2 = 40 MHz.
PLLFBD = 38;                    /* M  = 40 */
CLKDIVbits.PLLPOST = 0;         /* N1 = 2  */
CLKDIVbits.PLLPRE = 0;          /* N2 = 2  */
OSCTUN = 0;
/* Initiate Clock Switch to Primary Oscillator with PLL (NOSC = 0x3) */
__builtin_write_OSCCONH(0x03);
__builtin_write_OSCCONL(0x01);
while (OSCCONbits.COSC != 0x3);
while (_LOCK == 0);             /* Wait for PLL lock at 40 MIPS */
initAdc1();
while(1)
{
    AD1CON1bits.SAMP = 1;         // Start sampling
    Delay_us(10);                 // Wait for sampling time (10 us)
    AD1CON1bits.SAMP = 0;         // Start the conversion
    while (!AD1CON1bits.DONE);    // Wait for the conversion to complete
    ADCValue = ADC1BUF0;          // Read the ADC conversion result
}
}
    void initAdc1(void) {
     /* Set port configuration */
     ANSELA = ANSELB = ANSELC  = ANSELE = 0x0000;
    //ANSELBbits.ANSB5 = 1;           // Ensure AN5/RB5 is analog
    ANSELBbits.ANSB0 = 1;
    ANSELAbits.ANSA0 = 1;

// A0 and B0 are inputs
TRISAbits.TRISA0 = 1;
TRISBbits.TRISB0 = 1;

/* Initialize and enable ADC module */

AD1CON1 = 0x0000;
AD1CON2 = 0x0000;
AD1CON3 = 0x000F;
AD1CON4 = 0x0000;
AD1CHS0 = 0x0000;
// 0000 0000 0000 0101
AD1CHS123 = 0x0000;
AD1CSSH = 0x0000;
AD1CSSL = 0x0000;
AD1CON1bits.ADON = 1;
Delay_us(20);
}
void Delay_us(unsigned int delay)
{
for (i = 0; i < delay; i++)
{
    __asm__ volatile ("repeat #39");
    __asm__ volatile ("nop");
}
}


texts: threshold problem on a Schmitt trigger op amp

texts:
I have the Schmitt trigger op amp on the below diagram. (channel A & B refers the oscilloscope probes on the following figures).

The resistor values are selected to set the trigger threshold as ~9.5 V and ~5.1 V and I use this page to verify the threshold values.

However, the oscilloscope output below shows that the comparator handles the signal on the left side(High=10.71 V; Low=-106.8 mV) correctly, but it fails for the signal on the right side (High=10.36 V; Low=2.85V).

Here there is the zoomed signal:

The signal is not only handled wrong, it  is also extended 377 usec on the time domain. However, there is no time extension on the signal on the left side of the first oscilloscope figure.

Could anyone tell me why the comparator does not handle the second signal and how it can be solved?

Thank you in advance..

Datasheet of the comparator.


texts: Controlling a shaded pole fan via light dimmer switch? Which among these two fans are better for cooling?

texts:
I'm building a DIY lab round flask heater using a fiber glass 250mL GLAS-COL M102, 180 Watts heater mantle. The temperature will be controlled via a PID controller and a K-type thermocouple. Since the metal outer shield of the heater also gets hot during the operation and the PID controller will also be placed inside the housing I need to remove the heat from the inside. I have two types of axial cooling fans in my possession (picture shown in attachment). Now, the No. 1 type fan is quite powerful, noisy and the air has a lot of force to it. But you can feel the air flow pressure only unto 2-3 ft from the fan. The No.2 fan though not very loud or powerful, the air flow can be felt even up to 5-6ft away though the force from the air is not quite high like the former. I want to use a 115VAC fan to avoid using another circuit if I were to go with a 12VDC fan.

I'm assuming these are shaded pole motor fans. Can the speed of these fans be controlled via a simple light dimmer or the need a specific motor speed controller (maybe a triac controller)? Also if I used a light dimmer and wanted a slower speed to reduce noise, will the motor stall after a certain point and cause it to overheat?


texts:
I know resistors in series have the same current, and resistors in parallel have the same voltage drop, but in practice, I can't get the equivalent resistance right. Wondering if anyone has tips/advice/etc

I have the below circuit:

First I label the nodes (did it with color so it's easier to see) and the direction of passive current.

Apparently R2 and R6 are in series, and that equivalent resistance is in parallel with R4. In total, that makes up the resistance between nodes A and B.

But how? It doesn't look like R2 and R6 have the same current, because current splits into two direction after R1, and only part of it goes to R2, whereas R6 gets more current.

In any case, doesn't current take the path of least resistance, so it shouldn't even go through R2?

I know if might seem really simple, but I'm pretty lost.


texts: Adding Current limit for DIY DC-DC converter (CC/CV battery charging)

texts:
I was following the circuitry by great Scott for the DIY buck converter here:
 https://www.youtube.com/watch?v=m8rK9gU30v4 .
Created a converter that gives 0-23V on 24V supply.

After this i wanted to add different current limits to this buck converter such as 1/2/3/4/5 Amps for charging different li-ion battery pack.
For that i am going to follow this"Traditional method of implementing CC/CV"here:

https://e2e.ti.com/blogs_/b/powerhouse/archive/2017/11/24/how-to-design-a-simple-constant-current-constant-voltage-buck-converter

also have seen this video on adding a current limit to a buck boost converter:
 https://www.youtube.com/watch?v=8uoo5pAeWZI

with the shunt resistor and all.

Thing is I  cannot even understand how is the Traditional method of implementing CC/CV working here and how to approach this software wise.

A more in depth explanation could be quite helpful and any type of suggestions regarding any other way would be highly appreciated.

Thanks


texts: Reducing EMC from a long trace where one end is normally floating

texts:
Following on from this question about a PCB layout with EMC issues, I'm currently reworking the design to minimise breaks in the ground plane and try and identify any other EMC issues.

One thing that caught my eye was a relatively long (40mm) 5V trace that runs across the board. This trace runs to a connector that is used for debugging and is there to allow the board to be conveniently powered from the debug connector, without the need to wire in the main power supply. However, during normal operation, this ends up being an unterminated trace that is connected to the SMPS 5V, and is probably acting as an antenna, radiating switching noise and possible picking up the GSM signal and injecting it back into the board.

One simple solution is to simply not have that trace at all and require the board be externally powered during programming. However, this got me thinking: in situations where removing the trace may not be practical, how would you go about eliminating the negative EMC effects caused by traces like that, which are normally left disconnected?


texts: Rf Module Receiver With Pt2272 always gets signal

texts: I am just trying to on and of an led with rf module. I have tried lots of module but my works end up with same result. When I feed my receiver,  with led connected to data out,  it always powers the led wheter or not transmitter operating. And when I operate my transmitter led starts to blink(sometimes). I didn't understand what is happening. Can anybody please help. Or you can just tell me what should I try to learn. Sorry for my English. Thanks..


texts:
In my little box full of various electronic components I've found an AMIBIOS chip from 1995. The actual chip data are the following:
Vendor: ASD
Number: AE29F2008-12
Another number: 9846

I want to connect this chip to the Arduino and play with it. I'd like to turn it into permanent memory for some small variables like time or current process step.
Because my search for a datasheet was unsuccessful, I now hope there is some general rule to how 32 pin bios chips are supposed to be connected. Is there any? If not, what are the steps I should take to find out what pin does what?
If you know something about my specific chip, please post in comments.


texts: How long should one let the motor turn (witout driving) to re-charge the car battery, after having using it to charge a laptop's battery

texts:
I'm going to spend 1 week with no electricity. I won't need any for everyday life (I do this each year), except to charge my laptop's battery (10.8V, 5.2Ah, 57 Wh) three or four times.
I have a car 12V->220V converter on cigar lighter plug (I'll use the laptop charger 220V->20V on it - I know it would much more efficient to have a car 12V->20V laptop charger, I'll consider this for next time). If we assume 50% efficiency, one full recharge of the laptop's battery will drain ~120 Wh from the car battery.
If it's a 60Ah 12V car battery, this means it will make it drop from 720 Wh to 600 Wh. Is that correct?
Question: After having charged the laptop during 1 or 2 hours with the car cigar lighter plug (fortunately the cigar lighter plug does not switch off after a few minutes), how long should I let the motor of the car turn, without driving but alternator working, to compensate this drop of 120 Wh, so that the car battery is 100% charged again? So that two days later, I can do it again.
(Note: using a power generator is not an option for out of topic reasons)


texts: Can I determine a formula for fuse disconnection times?

texts:
This is the first time I have used this stack site so am not 100% sure this question is on topic (based on the tags I couldn't find) but thought someone may still be able to help me.

For those not familiar, in the UK we have the IET Wiring Regulations which set out regulations for electrical installations. This document also includes disconnection times for different fuse types so that the correct fuse can be selected for a system based on the PFC of the system and the required disconnection time.

Here is an example of one of the graphs for British Standard BS88 fuses;

Now I'm no mathematician but looking at the graph I'm sure there must be a way to deduce formula for the different fuse ratings (no formula are provided in the regulations). I'm currently updating an electrical design process where currently, the designer needs to manually refer to the graph to see which fuse should be used. I want to automate this process, hence wanting to find the formula for the graph.

Now, actually getting to the question, is it likely that the graph has been created using a formula (assuming it even has one), or could it just be data recorded during testing of the fuses with a "line of best fit" chucked over the top? I find it strange that I can't seem to find any formula for the graph anywhere online or even any clues.

I tried plugging in the values in the provided table into Excel and used the "show formula" option (I know, very crude) but using the formula provided didn't give me correct results when I manually checked them on the graph.