texts:
I am trying to find the right motors for the following case:
I want to have a total of two motors on opposite sides of a board. The board will have a maximum weight of 150kg (330 lbs) and needs to have a maximum speed of 20km/h (12mph). Time for the motors to reach this spead is trivial, but anywhere between 5-10 seconds looks about right.
Note that those numbers can be exceeded but I need to be able to go at least this fast at peak RPM.
I am trying to find the Torque the motors will need in order to move this weight and any other specification such as Voltage and Current, in order to find the right motors.
The diameter of the wheel should be anywhere between 10 - 20 cm (4 - 8 in)
I also don't care if the motor is brushed or brushless. I would prefer to have a brushed ones since I value cost more then lifespan.
What I tried:
Horse power = kg.m/s = 150kg/2 * 20km/h = 5400kg.m/s = 72HP (sounds unreal)
which then by the use of online calculator was converted to Torque to be equal to
T = 2.57 kg.m^2/s^2 (sounds ok? or is it too small?)
[first to imperial HP = 71, then to imperial T = 18.6 - only calculators I found were using imperial]
In this scenario RPM was chosen to be 20000 since I saw a motor that had that much and since raise in RPM means decrease in torque I figured the bigger the better in order to not get a crazy high torque which I expected provided that I have 72HP
Another approach:
Downwards force due to the weight = m.g = 150kg.g
its split between two wheels so F at each wheel is half of that assumming weight falls in the center
F1=F2 = 75kg.g where F1 and F2 are forces at each wheel.
Torque = F1.d where d is the radius of the wheel (in m)
T = 75kg.g.0.075m = 55,2 kg.m^2/s^2
Those two numbers are very differnet though.
What should I do?


texts: Why does a rotating magnetic field's frequency decrease, if we increase number of poles (induction motor)?

texts: I absolutely don't understand it and drives me crazy. I've found several sources, in which there are shown images and animations about how two or three phase electric current generate rotating magnetic field. In all of them the current and the rotating field's frequency are the same. Although everywhere they write that if we have 4 poles than the current frequency is 2 times the rotating field's frequency, and if we have 6 poles than the current frequency is 3 times the rotating field's frequency and so on. Please help me see what I don't see.


texts: Protection circuit with polyfuse and zener

texts:
I'm designing a protection circuit with polyfuse and zener for DC 5v input. I have try it fisically but the polyfuse never trigger because the zener burns before when I plug 6-12V to the input.

My circuit current is less than 200 mA and the peaks currents is approximately 600mA. I decided place a 5V6 zener and a polyfuse 6V 0.75A. I thought the polyfuse would trigger before burning the zener.
How you could adjust these values for correct operation? Placing a higher power diode, could it be solved?
Thanks in advance!


texts: How does a bi-directional electricity meter know import from export?

texts:
I've searched everywhere for this but can't find the answer...

Its possible to have 3 phase electricity meters that measure both imported and exported kwh with each value being recorded in separate registers.

How does the meter differentiate between imported and exported energy? Doesn't it just see voltage and current going up and down?


texts: How many newtons could this BF350-3AA strain gauge support?

texts: I am planning to purchase a strain gauge, the BF350-3AA in particular although there is no mention of how much force it is able to withstand. Also if someone could advise me of other strain gauges. And are strain gauges used weight scales (the ones you stand on) or is there some other component to measure force.


texts: Any good reference for digital architecture implementations of floating point arithmetic operations?

texts:
I am doing a thesis project. I need to make a FPGA implementation of a neural network. I want to implement some mathematical functions such as an exponential function.

Does anyone know of any good books about FPGAs, VHDL or digital architecture implementation of floating point arithmetic operations?


texts: 0-5 to 0-12 volt level shifter at high frequency

texts:
what is the best way to shift PWM at 500kHZ from logic level 0-5 volt to 0-12 volt to drive a mosfet?

answers here were no good they only work for lower frequency and pwm is distorted at 500kHZ

Level shift circuit MCU to MOSFET

High Frequency Logic Level Conversion


texts: Connecting Zynq boards fast and deterministic way

texts:
I'm trying to make a cluster with Zynq-7010 boards for a real-time application. One of them will be the master, and it will control eight client boards. The master board will also collect the data from clients. I tried to use 100Mbit ethernet connection to connect the nodes but it was not as fast as I need. In addition, it was not deterministic because of switch's indeterministic behavior.
Could you give me some idea about how to connect them fast and deterministic way?
Edit:
Each node has RS-485 interface to outside. Nodes make RS-485 communication up to 10Mbit/s. The master node  has to collect 500byte data  from each of them every millisecond.  The timestamps of each node must be identical (+-2us). The nodes must start to reply the master in 20us.


texts: What are these plug-like cable endings called?

texts:
I've been looking for things like the plugs displayed on these orange wires in this photo:

What are they called?  I imagine that this is a part that I could buy somewhere.


texts:
I am developing a electronic throttle control system for FSAE, and by rules of FSAE, I need to have 2 or more potentiometers to measure the position of my pedal. I've decided to use a rotary pot both ends of the pedal, but I am having trouble finding a 3rd potentiometer to use.

Is there any other sensors that can be used to measure angle position that would fit on(or in!) a metal axle? The issue I have is both ends of the axle are already being used by the 2 rotary pots.


texts: Replacing my 2N2222A with a high power transistor

texts:
I have a 2N2222A transistor that I use in a circuit coupled with an opamp. Its function is to act as a current booster.

The collector is always supplied with 12V and the emitter can be set anywhere between 0 - 8 V. I was not aware about overheating my transistor, and I believe I've burnt my transistor when I have a current of about 200mA passing through it, when the VC was 12V and VE about 6V.

I want to replace it with one that can handle the power yet not hinder performance. I am also willing to buy heat sinks for the packages.

The range of current I am expecting for this transistor to drive is anywhere between 0 and 300 mA.

I was thinking of this transistor with this heat sink.


texts:
We are trying to design a high pass filter, which mainly goals are:

very low noise. Low noise is the first concern.
suppresses 1kHz by around 50dB and passes 2kHz.
Gets rid of DC
Dont care on other frequencies.

Description of our project:

We are to measure a very weak 2kHz signal in accompany with very large 1kHz signal(70dB larger than 2kHz signal) with a 16-bit ADC based Lock-in Amplifier.

Since the 2kHz signal is too weak and we need to achieve a resolution coming from a 16-bit ADC, 2kHz signal has to be amplified first. However, since 1kHz is too large, we have to filter it out first, in order to prevent saturation, before amplification.

About specifications of "how low the noises should be". The requirement is as low as possible. We are willing to try ANY method/combination/components to reduce the noises.

Here are points that I know:

passive filters:

Need inductors, and at low frequency it may be very hard to find a
large and accurate one? (I do not want to make inductor by hand)
low noises comparing with active filters.

active filters:

easy to implement
relative larger noises...

Need your help!

Since the noises are our most important concern, could I ask for some suggestions on tradeoffs of choosing:

active filter based on OpAmp,
active filter based on BJT/MOSFET or
passive filter?
implement active filters based on IC
implement active filters based on switched capacitors

Could I have some general comments?

Any suggestions are appreciated.

Regards,
Richie


texts:
Can someone clarify for me what V(inoise) and V(onoise) waveforms are in LTSpice when using the .noise directive? I thought V(onoise) divided by the gain of your system would equal V(inoise) but that doesn't seem to be the case (see image from recent sim below). In this test circuit the gain is 2.

My understanding is that v(onoise) is the total rms noise you see at your output node.


texts: Connecting 3 LEDs to a parallel circuit of 3 fans

texts:
I am new to circuit building.
I am building a parallel circuit with 3 fans for a laptop cooler, 2 of them are rated 12 V / 0.09 A and one of them 12 V / 0.16 A.
I ignore the PWM functionality of the fans by using only ground and 12 V wire, meaning they will spin at full speed. However I am using a variable voltage adapter (3-12 V, 0.6 A) which I can set at multiple voltages to regulate the speed of the fans. Now I want to add 3 small blue LEDs (20 mA) to this circuit without burning them through.
What is the best way to add these LEDs to this parallel circuit of 3 fans?
They can either burn at constant brightness or vary based on the input voltage.
I was thinking about connecting them in series with a proper resistor, and then connect them in parallel to the fans but I am not sure if this is efficient/feasible.


texts: PWM DC motor drive with L293 and TBA820M oscillator

texts:
In "Applications of Monolithic Bridge Drivers" from ST there's an application circuit for PWM control of a DC motor which uses an L293 and a TBA820M. Here it is:

I know how the L293 works and I've read the 820M datasheet but I don't get the PWM signal part.

why using an audio chip to get a triangle wave?
how does this particular oscillator works?
how are the DC offset and triangle signal added?

Thanks for helping!


texts: Which Contacts this RC Snubber is protecting?

texts:
Hello. I want to know which contacts are this Snubber Protecting.
and usually where the arcs will be happen. i read something that tells the arcs will happen when we have an Inductive Load For examples (Relay Coils , solenoids, Small motors , ... ) k135 Contacts (1.3.5/2.4.4) Directly Connected to the motor So We will have Some arcs on it.(?!) so i want to know how we can protect this contacts. is this snubber circuit in this diagram , protecting it ? or its not. i guess its protecting just the k135 relay coil or the swtich k135(13,14) bcz relay Coil is an inductive load by itself.
Thanks.


texts:
So I was asked to perform the simple task of doing a 3-bit arithmetic shift of the number 1101 (-3 in 2's complement notation).
Now this is easy and it goes as 1101 -> 1110 -> 1111 -> 1111. So the final result should be 1111 (-1 in 2's complement notation).
However I also learned that shifting a number p=3 positions to the right is the same as dividing that number by 2^p=8. Therefore shouldn't my result be 0, since -3 dividing by 8 is 0 (with remainder -3). What am I missing in this apparent paradox?


texts: Altium: Pouring Polygon attached to a specific net class for direct connections

texts:
I've got multiple polygons on this board I'm laying out. Some want to have direct connetsions to pads and others not.

I was originally adding lots of nets to my rules to allow for direct connections and thought there must be a better way. I originally tried wildcards in the names of the nets in the rules, but that didn't work.

I then had the idea that I could create a netclass called Solid Pour and assign the nets I wanted to have solid connections, to this net class. I did this by right clicking on  the net and assigning it to the relevant net class.

In the polygon rules I then  created a rule called Solid By Class, put that as highest priority and said when the first object matches Net Class of Solid Pour, the connect style should be direct connect. However, this doesn't work, I still have to go in and add the specific net name to a custom query. I'm going to end up with a custom query a million kilometers long at this rate!

Is there are way to do what I want to do please? Or am I doing essentially the right thing, but missing an important step out? I can see the nets are being assigned to the relevant class.


texts: What are the reasons to use an LRA vs ERM for vibrations?

texts:
What are reasons to consider when choosing between linear resonant actuators (LRA) and eccentric rotating masses (ERM)?

I'm sketching on a remote-controlled vibrator sex toy with variable frequency, but didn't manage to find an existing easily hackable one, so I'm looking at making one from scratch.


texts: How does one measure the Fourier components of a signal?

texts:
I attended a lecture on ground penetrating radar (GPR). I am used to reflection seismic where the incoming pressure amplitude is measured as a function of time.
In GPR, instead the Fourier components are measured. That is the amplitude and phase as a function of frequency. Then these data are Fourier transformed to find the amplitude as a function of time.

I am curious about how the electronics recording in Fourier space works.
Is the signal split by many narrow band pass filters in parallel?
Are these filters RLC circuits?
Are there chips that contains many such filters in parallel?


texts: How to spy a Bluetooth COM transmission?

texts:
I promise, I'm not doing something mischievous :)

I have a remote device (IMU) which communicate with a PC through a Bluetooth transmission : an ARF7044A Bluetooth Device from Adeunis on the IMU  and a BCM2046B1 Bluetooth dongle from Bradcom on the PC (I'm on Windows XP by the way) .

The problem is that sometimes the IMU send datas, but the PC does not "see" them, though it is possible to send datas to the IMU : I think the communication is not broken, but it is rather a low-level software problem.

The issue appear whether I'm using a hand-made communication software coded in C, but also on "professional" software like putty or Realterm, indicating a driver problem ( I'm using the btwusb Broadcom driver, version 5.6.7900 ).

My question : Is there a way to spy an open communication between the IMU and the PC to see when and why it goes wrong, like a debugging tool ?

I know it is not a "real" electronics question, but I have figured I might have more answers here than in stack overflow.


texts:
A few years ago I made this speaker amplifier circuit for a sound source which was essentially an AC signal -- the two signal pins (d9 and d10, 5v logic) were pulled high and low out of phase to produce sound in the speaker.   This was the circuit I made for it (that red box is the speaker):

In an attempt to somewhat salvage it is there any simple way I can get rid of those immensely wasteful (and heat producing) pullup resistors?   Maybe add another set of transistors connected to d9 and d10 (the signal lines) to give the speaker line 5v when its respective signal is pulled high?


texts: how to calculate Hermitian Toeplitz system of equations on fpga in vhdl

texts:
I'm trying to write vhdl code to solve the Hermitian Toeplitz system of equations (solving for the A's).

   [  R(1)   R(2)* ...  R(N)* ] [  A(2)  ]  = [  -R(2)  ]
   [  R(2)   R(1)  ... R(N-1)*] [  A(3)  ]  = [  -R(3)  ]
   [   .        .         .   ] [   .    ]  = [    .    ]
   [ R(N-1) R(N-2) ...  R(2)* ] [  A(N)  ]  = [  -R(N)  ]
   [  R(N)  R(N-1) ...  R(1)  ] [ A(N+1) ]  = [ -R(N+1) ]

I know of the levinson-Durbin Algorithm, and the brute force way of inverting the matrix.
Neither of these methods seem to be efficient to implement on an fpga.

What are some other methods that work best for FPGAs? Are there any?

I have done several google searches but nothing useful ever comes up.

Thanks in advance!


texts: Why setup time is greater than hold time?

texts:
One of my friend was asked this question in an interview. What should be the answer?
One more question how hold time can be negative?


texts: Using a 10V stepper motor with a 12V controller board

texts:
What should I do when using a 10V .5A NEMA14 stepper motor with this board: https://reprap.org/wiki/MiniRambo (beyond setting proper current limits in firmware)? If I understand it correctly, the board uses 12V by default as it normally controlls 12V NEMA17 motors. Will the voltage difference be a problem and if so, how can I fix it? If I just use resistors, won't it limit the current too?
The board uses A4982 stepper motor drivers, the datasheet is here: http://www.allegromicro.com/~/media/files/datasheets/a4982-datasheet.ashx


texts: Is it ok to use voltage dividers instead of voltage regulators when adjusting reference voltages for opAmps?

texts: My question is about manually adjustable circuits with a knob, coarse ect. When adjusting reference voltage of an opamp, for instance, trigger level of a schmitt trigger or gain of an amplifier manually, can we just use a potentiometer(or voltage divider)?


texts: Twice Vcc in transformer coupled Class A amplifier AC load line

texts:
The DC and AC load lines of a transformer coupled Class A amplifier is shown below.

My question:

How can Vce vary from 0 to 2Vcc? In class, I learned that it was due to Lenz Law working in the transformer and a voltage of Vcc being induced to reverse the change in Ic. However, I cannot picture this. Can someone please explain with a diagram of how this comes about in the transformer windings.


texts: Basic Circuit Analysis with voltage source and current source (KCL)

texts:
I want to solve the following circuit using KCL. I'm calling \$ i_1 \$ the current that flows across \$R_1 \$, \$ i_2\$ the current that flows across \$ R_2 \$ and \$ i _3 = 10A \$.
I'm assuming that the current \$ i_3 \$ is so strong that it is the only one entering the node, while \$ i_1 \$ and \$ i_2 \$ will leave the node.
\$i_1 = \left( \frac{15+V_x}{3} \right) \$ because we are going against the direction of \$ i_1 \$, so it's a voltage rise.
\$i_2 = \left( \frac{V_x}{2} \right) \$
\$i_3 = 10 A \$
So I setted KCl equation in this way:
$$ -i_1 -i_2 + i_3 = 0$$
$$ -\left( \frac{15+V_x}{3} \right) - \left( \frac{V_x}{2} \right) + 10 = 0$$
$$-2(15) -2V_x -3 V_x + 60 = 0 $$
$$V_x = \left( \frac{30}{5} \right) = 6 $$
The correct result is \$ V_x = 18V\$. And from that voltage I will calculate the currents.
I cannot find the error in my procedure. What am I doing wrong? Thank You


texts: i2c communication between cc3200 and at42qt2120

texts:
I am trying to do i2c communication between TI's cc3200 and atmel's touch IC AT42QT2120. I am able to read and write to different memory locations of the touch IC, but i am unable to get it's change line high. The datasheet of at42qt2120 says that after power up you need to read status bytes of the touch IC and after that the change line will go high.
The change line is not going high even after repeated reads of status bytes.

I have done the same communication using atmega2560(arduino mega) as host, in that case that change line was going high after the status bytes read. The only difference between the two systems is of voltage level; atmega2560 arrangement working at 5v and cc3200 system working at 3.3v, but the Atmel chip can work in volatge range of 1.8v to 5.5v.
I have pulled up the SDA SCL line by 4.7k resistances and CHANGE line by 47k resistance.
Is there any point which i am missing here. Do i need to change the pullup resistances for a 3.3v system, even though i am able to do read/writes with present values.


texts:
I am in doubt with a motors operation,
I am not sure whether this question could be asked here,
I have a car wiper motor with two speed operation,It uses a PM dc motor with worm gear inside, so it is not possible to rotate the shaft when in stop condition so my question is there any way to act this motor as a generator??
please see the attached photo to see the gear mechanism of a wiper motor.
Thanks in advance
If i gave a pwm input inorder to create a small torque,and if i rotate shaft in same direction which is already rotating is it possible to rotate and harness energy.


texts:
consider the following circuit:

This image shows a simple "diode OR" power supply switch. I am trying to derive the cheapest circuit to obtain this functionality (the given circuit does not fulfil the requirements):

Assume VCC2 = 5 V, VCC1 = 3.3 V.
When VCC2 is present and VCC1 is not present, the LOAD is supplied with voltage equal to VCC2.
When VCC1 is present and VCC2 is not present, the LOAD is supplied with voltage equal to VCC1.
When VCC1 is present and VCC2 is present, the LOAD is supplied with voltage equal to VCC1.
Current cannot flow from VCC1 to VCC2 or vice versa.

I would appreciate all ideas!


texts: fast analytical technique identifying poles/zeros using degree of freedom

texts:
I encounter some engineers who can quickly spot poles and zeros in the circuit by identifying "degree of freedom". For example, a typical technical discussion goes like : "a miller compensation has two degree of freedom, therefore two poles, a feedforward path gives it a zero. A nulling resistor gives it additional degree of freedom, inevitably adds another pole." This kind of technical discussion sounds incomprehensible to me. (The only methods I was taught are nodal analysis, some open/short circuit time constant techniques, and some phasor estimations on load) .
It seems Prof. Thomas Lee started this: -

I wonder are there anyone here know the insight behind those "degree of freedom" estimation ? What are the rationale mathematically?


texts: What does it mean when only a single capacitance is specified for a variable capacitor?

texts:
I'm looking at various sources of variable capacitors, and many of the sellers quote single capacitance values for the capacitors. Is this typical? If so, is there some rule of thumb from which I can assume the range of capacitance?

Example: http://www.amazon.com/Through-Trimmer-Variable-Capacitors-Yellow/dp/B00G9BIT5W/

Many examples there and on ebay.


texts:
I'm building a line follower robot with just 3 sensors to follow a black line of 1cm. However the distance between my each of my sensors is also 1cm.

Straight path following is not a problem. However there are right angle turns which the sensors seem to miss out often and just run over it. Also, in straight paths, sometimes the line is in between the two sensors and none of them are able to detect and hence its stuck.

How can I solve these problems? Especially the 90 degree turns...


texts:
I am using a TI 74HC4052E to multiplex a TTL UART on a Microchip PIC32MX695F512 microcontroller.

The expected behavior is for the TX and RX signals to pass through the switches unaffected; sadly this is not what is happening.

I am working from a dev board and the PIC has proper bypass caps and all that jazz, and the UART is configured properly - it works correctly when directly connected to an FTDI USB->Serial adapter. Here is a simplified schematic:

simulate this circuit – Schematic created using CircuitLab

Pins RB15/RB1 are configured as buffered outputs, not open-drain. Analog functionality on those pins is disabled. I have no pullups/pulldowns on B0/B1 outputs.

A look at the  peripheral registers:

TRISB = 01111111 1111101 (0x7FFD)
AD1PCFG = 10000001 0000010 (0x8102)
ODCB = 00000000 00000000 (0x0000)

Edit: I noticed that the U5TX pin is RB14 and as shown, is configured as input. I am pretty sure enabling the peripheral overrides the TRIS bits, but I went ahead and forced it to digital output. I also made sure the analog functionality on that pin was disabled. Neither of these changes rectified the situation.

The program loops though the following: selects A/B0, outputs data, selects A1/B1, outputs data.

When I put CH2 of the 'scope on the B0 output pin (pin 1), this is what I see:

CH1 (Yellow) - Probing pin 3 input
CH2 (Blue)  - Probing B0 output

The signal is incorrectly inverted. You can see when the switch turns off as well, indicated by the (slowly) decaying signal, which doesn't look right.

Probing B1 (pin 5) results in the following:

CH1 (Yellow) - Probing pin 3 input
CH2 (Blue)  - Probing B1 output

Now the signal polarity is correct, but I see still that goofy looking decay. I really don't think it should take ~400µs to switch off/on.

When I manually select A0/B0 by connecting the controls signals directly to GND, the B0 signal is no longer inverted, but then again, it is no longer switching, so it is hard to say if this means anything.

I tried using another '4052 and got the same results. The chip has good power and ground connections - I don't think it is being powered through any internal protection diodes or something weird like that. I have a feeling the PIC GPIO pins are somehow influencing this behavior through the S0/S1 select lines, although I don't know why that would be the case.

I read over the datasheet a couple times but I must be missing something that would explain what I'm seeing.

What am I doing wrong here?


texts:
The basic idea is to make an OLED voltage meter.
I idealy want to use as little parts as possible.

If my understanding is correct I would need a voltage sensing circuit which would give feedback to a driver, but I don't know how to drive OLED screen.
The screen I plan to use will be a 8 pin 128x32 SPI interface screen. Would an ATTiny85 work?
Thanks


texts:
I have an idea to use WS2812B as animating light on some old equipment. And I have some doubt. The equipment is 12v so I want to use WS2812B directly on 12V, namely I want to use 5 WS2812b in pararalel, as they usually are on strips,
BUT what resistor to use to limit current?


texts:
I think it should be OR gate, my reasoning explained below:

If A is F/0V and B is F/0V then BaseEmitter of both are reverse biased and thus no current flows, (BaseCollector is at zero potential difference): F*F=F

If A is F/0V and B is T/5V  or vice versa then BaseEmitter of one is reverse biased and thus no current flows again BaseCollector is at zero potential difference for that one, but the other's BaseCollector is forward biased and current flows so C is high voltage: F*T=T

If both are T it is thus obvious current flows : T*T=T

and so gate is OR from this info?


texts: How to combine transient voltage TVS diode and overvoltage Zener diode for analog output?

texts:
How do I arrange my circuit so that the TVS diode can do its ESD/transient job, without being fried in the miswiring/overvoltage scenario?
I have an analog 0-5V output that needs protection from miswiring, transients and ESD. My understanding is that TVS diodes are good for transients/ESD because of the quick response time, and Zener diodes are good for overvoltage because of the greater power dissipation capability.
However, TVS diodes need to be as close to the edge of the board as possible, and are typically the first line of defense in circuits I've seen:

In the circuits below, D1 is the Zener, D2 is a reverse voltage Schottky, and D3 is the TVS diode.
Circuit 1: If I place the TVS diode (D3) out front, the miswiring scenario will fry it.
Analog output protection with overvoltage and TVS:

Circuit 2: If I place the TVS diode (D3) next to the Zener (D1), it is protected from the DC overvoltage. But it seems useless since R2 will be hit with the ESD pulse and it will limit the current into D3.
Analog output protection with TVS protected by Zener:

Circuit idea 3: Just eliminate the TVS (D3) since the resistor can limit the ESD pulse and D1 can handle it. Maybe throw a capacitor or inductor by D1 to slow things down?
Analog Output Protection with Overvoltage and TVS Simulation
Source for TVS circuit image above.


texts: Does a capacitor discharge itself when the charging voltage becomes 0?

texts:
I am charging my capacitor with a binary pulse train (either 1V or 0V). I notice that when the voltage stays at 0V, the capacitor discharges itself.
As shown, the green curve signal is connected to one terminal of the capacitor, and the blue curve signal is the voltages across the capacitor.

Is this expected? Previously, I thought the voltage will rise when 1V but never fall when 0V. So I am expecting voltage across the capacitor to be a "staircase" waveform.


texts: How to make NMOS resistance emulate a normal resistor?

texts:
I am trying to see the behaviour of an NMOS' resistance with gate-source voltage.
This is my NMOS as voltage (Vgs) controlled resistor' schematic (I am doing DC sweep on V2 from 2V to 10V with step size as 1V, ignore the -10V in the sweep in image):

The output (Vgs or V2 vs NMOS resistance [Vds/I(R1)]) I get:

So at 3V Vgs, I get NMOS resistance of about 1 kilo ohms. I make a similar circuit on right by using a resistor with value of about 1 kilo omhs:

Points to observe:

Vgs is set as 3V to get a resistance of 1001 ohms.
The left and right circuits are similar, they only differ how the 1001 resistor is used. R6 is same as R4, R3 as R5 and so on.
R5 is connected to ground and it shouldn't be, but then I could not make it connect in any other way because then it wouldn't make R5 parallel with the NMOS resistance as R3 is with R2

What is going unexpected: The current drawn/flowing the voltage sources V4 and V3 are not same. That means, the circuit on left is not doing a the job of a 1001 resistor. What went wrong? How should the left circuit be modified to emulate the 1001 ohm resistor on the right. I am feeling that I might have done something wrong with placing the V4 voltage source or maybe the NMOS resistance is somehow changing when other resistors are applied due to a new Vds (and not the same as the one in the first image).
However, I am not able to pinpoint the issue. So, how to make NMOS resistance behave like the normal resistor?
Current flowing in V4 and V3:

This is the ALD1106 LTSpice code:
.MODEL ALD1106 NMOS (LEVEL=1 CBD=0.5p CBS=0.5p CGDO=0.1p CGSO=0.1p GAMMA=.85
+ KP=479u L=10E-6 LAMBDA=0.029 PHI=.9 VTO=0.8 W=20E-6)


texts: How can i add cooling fan in series or parallel with a led diode

texts:
I am new to this hobby and forum and would like to thank anyone for there help,
I have found it quite easy to connect leds in series or parralel but now i need to add a fan to a small system to keep it small.

I am using one LED diode rated at 9-12v dc 800ma

I have been using Constant current drivers for this.

My question is how can I add a 12v dc 0.09ma cooling to this simple circuit, I am aware I will need to add a resitor and am also willing to use a different rate power supply.

Please offer your suggeestions as I have searched the internet to no avail.

Thankyou


texts: Is there a difference between these device terms?

texts:
Is the term "High-Speed Digitizer" same as saying "data acquisition device with high sampling rate"?

The definiton I encounter for a digitizer is: " A digitizer is a hardware device that receives analog information, such as sound or light, and records it digitally"

But some companies insists on using both terms which makes me confused. Can we say a digitizer is exactly the same thing with data-acquisition hardware? Synonyms?


texts: How can I draw power from adapter plug without damaging it?

texts:
Sorry for the vague title for I am not sure how to precisely describe it.

Basically I need a 12V power source and I plan to draw the power from an AC to 12VDC power adapter. The output of that adapter is a female plug and the unit comes with a few interchangeable heads. The plug looks like this:

The diameter of the holes is about 1.5 to 2 mm.

I know I can simply cut the wire between the plug and the adapter but before I do that I wonder if there is other way to leave everything undamaged?

The current I want to draw is less than 1 amp.


texts: Does the DC portion of an inverter experience the Apparent Power consumption of the AC part?

texts:
If the AC portion has no load, then the DC portion sees it as an inductive load I assume. So does power factor come into play when calculating the DC wattage consumed?

Let's say AC is 100V 0.1Amps no load. Do we just say the power dissipated is 10 watts? Or is it 10 x pf?

If it's 10 x pf that's the wattage we use to compare the DC wattage being consumed? (assuming no other losses).


texts: I have a motor speed control with the following transistors. I am having a heck of a time identifying them. I've had no luck finding a spec sheet on the web. Any help you may offer would be appreciated.


texts:
Below is a part of a schematic and I would like to understand each part of it.

What I think is happening:

This is being fed a 48V AC source
These leads are a source and a ground?
I'm not sure what that is
Two alternating currents on the input
Not sure what this is..  a diode?  An op-amp?
Showing which terminal output is positive and which is negative.

These are my best "educated" guesses.  I know I'm way off, so I was hoping the community could help me understand.

This is part of a schematic from steminc to drive a piezo transducer.


texts: UART communication between Cypress FM4 (Cortex M4) and Arduino

texts:
I am trying to transmit data from (FM4-176L-S6E2CC-ETH Starter kit) to Arduino (Leonardo) using UART communication. Wire connections (FM4 [p. 8-9] -> Arduino):

P19 (SOT2_0) -> D10
P18 (SIN2_0) -> D11

For programming FM4 I use Keil uVision5 (5.24.1) with PDL (2.1.0).
I have turned on UART ch.2 in pdl_user.c
#define PDL_PERIPHERAL_ENABLE_MFS2              PDL_ON

and initialized both FM4 pins (P18, P19) for communication using a function SetPinFunc_XXX()
#define SetPinFunc_SIN2_0(dummy)        do{ \
                                            bFM_GPIO_ADE_AN08=0u; \
                                            PINRELOC_SET_EPFR( FM_GPIO->EPFR07, 16u, 2u,  1u ); \
                                            bFM_GPIO_PFR1_P8 = 1u; \
                                        }while (0u)

and
#define SetPinFunc_SOT2_0(dummy)        do{ \
                                            bFM_GPIO_ADE_AN09=0u; \
                                            PINRELOC_SET_EPFR( FM_GPIO->EPFR07, 18u, 2u,  1u ); \
                                            bFM_GPIO_PFR1_P9 = 1u; \
                                        }while (0u)

When I upload the code on FM4 (no compilation errors), nothing have been transmitted to Arduino, even after I push reset button. Am I missing something?
If change UART channel to &UART0 and use SOT0_0 and SIN0_0, I can view transmitted data in console. Also I have tested Arduino with BT module and Android, and it works fine with the same code.
FM4-S6E2CC:
#include "mcu.h"
#include "pdl_header.h"

#define SAMPLE_UART_RX_BUFFSIZE sizeof(au8UartTxBuf)/sizeof(char)

volatile stc_mfsn_uart_t* UartCh2 = &UART2;
stc_mfs_uart_config_t stcUartConfig;
uint8_t u8Cnt = 0;

static uint8_t au8UartTxBuf[] = "Data sent from UART2!";

void InitUart(void)
{
   PDL_ZERO_STRUCT(stcUartConfig);

   /* Initialize UART TX and RX channel */
    stcUartConfig.enMode = UartNormal;
    stcUartConfig.u32BaudRate = 9600;
    stcUartConfig.enDataLength = UartEightBits;
    stcUartConfig.enParity = UartParityNone;
    stcUartConfig.enStopBit = UartOneStopBit;
    stcUartConfig.enBitDirection = UartDataLsbFirst;
    stcUartConfig.bInvertData = FALSE;
    stcUartConfig.bHwFlow = FALSE;
    stcUartConfig.bUseExtClk = FALSE;
    stcUartConfig.pstcFifoConfig = NULL;

    Mfs_Uart_Init(UartCh2, &stcUartConfig);
}

int main(void)
{
    /* Initialize UART function I/O */
    SetPinFunc_SIN2_0();
    SetPinFunc_SOT2_0();

    /* UART initialization */
    InitUart();

    /* Enable TX function of UART2 */
    Mfs_Uart_EnableFunc(UartCh2, UartTx);

    while(u8Cnt < SAMPLE_UART_RX_BUFFSIZE)
    {
        while (TRUE != Mfs_Uart_GetStatus(UartCh2, UartTxEmpty)); /* wait until TX buffer empty */
        Mfs_Uart_SendData(UartCh2, au8UartTxBuf[u8Cnt]);

        u8Cnt++;
    }

    Mfs_Uart_DeInit(UartCh2, TRUE);

    while(1)
    {
        /* Data is normally sent and received */
    }
}

Arduino Leonardo:
#include <SoftwareSerial.h>
SoftwareSerial UART(10, 11);
// creates a "virtual" serial port/UART
// connect FM4 pin TX to D10
// connect FM4 pin RX to D11

void setup(){
  UART.begin(9600); // set the data rate for the SoftwareSerial port
}

void loop(){
  if (UART.available())
    Serial.println(UART.read());
}


texts: In an ADC what are the units of resolution called?

texts: I have a signal whose full scale output on the 12bit ADC is 4095. If I reduce the signal so I see the output number is (say) 4000 the output has decreased by 95. But 95 what? What are those divisions called? It is clearly (?) not bits.


texts: Stuck with matching input signal to an active filter

texts:
I’m stuck at a point when trying to use this filter or a similar one from the same family.

To illustrate the matter I have drawn the below two diagrams. Below F represents the filter.

My aim was to achieve the filtering as in Fig1. But unfortunately the bipolar input signal Vs will be between -10V and +10V as well as the output. And these filters can be supplied from a max range of +8V and -8V power rails not more than that.

The only solution I could come up with is Fig2 at the moment. Op1 halves the input signal to +/-5V voltage range and Op2 doubles the halved signal back to +/-10V range at the filter output. Reg1 and Reg2 are 7.5V or 8V positive and negative voltage regulators respectively.

So as you see this needs four more active components which each can contribute noise as well. Op1 and Op2 might also introduce error. I really dont like this solution but could not think of an alternative.

Is there a workaround for such problem?


texts: Identify the function of a sequential circuit

texts:
I am working on the following question:

I managed to get the following answer is it correct?

Is this correct? It has 16 stated and also has the count enable.


texts: Connecting the output of two motor controllers together - even if briefly

texts:
I am building a dark ride at my house for a party (long story), where the I have a ride vehicle that is a wooden base with 4 casters and 2 powerchair motors hugging a center 2x6 rail on a plywood base for track.  The center rail has a power bus - a strip of metal on each side for power.  This all works great in a giant loop.  I have multiple 24VDC power supplies connected in parallel around the track.

However, now that I have one car happily going around and around, I need to cut the center rail bus in places to make "zones" so I can add and control multiple cars at once.  There will be a PLC programmed, with track sensors as input and as output a PWM to a motor controller for each zone.  That allows me to control the speed in each zone differently (go fast in some cases, go slow for slowly seeing scenes in another, and STOP at the two train stations).  Fast may be 24VDC, Slow 18VDC, and Stop 0VDC as examples.  Slow may vary.

Here is a link to the actual motor controller:

https://www.amazon.com/gp/product/B00YGTB3NO/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

So to repeat, I have multiple 24VDC 40A power supplies.  Each one is located next to the track in different places by their respective "zone".  The motor controller is connected to the power supply and the output of the motor controller is connected to the track "zone" itself.  Each car on the track uses 10A while driving flat and straight and can go up to 19A when going around curves or uphill.

So HERE'S THE CRUX:  If the ride vehicle crosses zones, the brushes on the vehicle that brush the center rail strips will briefly touch the strips on BOTH zones, the one it's leaving and the one it's entering.  If both motor controllers are set to say 50% (12VDC), it's no concern, seems to be fine.  However, I haven't tested it when one zone is set to 24VDC (full) and another say 0VDC (zero).  I'm concerned about back-biasing the 0VDC motor controller.  Now the motor controllers are designed to handle 60A at 24VDC (the capacitors and transisters etc.) so I am not sure if it's really a problem... and I don't see how I can solve the problem with diodes either (such as when you connect two power supplies in series).

The amount of time the brushes will be connected across two zones will be brief - maybe a second at the most???

Any help would be appreciated - I have 9 zones and I don't want to let the magic smoke out!

THANK YOU!  FYI I am a cross between knowledgeable and a newbie - decent at TTL electronics etc. but not high current applications.


texts: common source pole calculation vs. simulation

texts:
I would like to compare my pole simulation results to my hand calculations, I'm receiving quite a big error. when simulating a Common Source stage without output capacitance load there is a big difference between the simulated and the calculated poles, when I'm adding a capacitor load the output pole is similar but the input (which didn't change) is not... maybe I didn't model the MOSFET correctly?

]3


texts: Design challenge: Detect finger-to-finger touch with nothing in between

texts:
I'm trying to build something quite challenging and seem to be getting nowhere. Maybe you'll help. I'd like to detect a touch of two naked fingers with no materials or sensors in between (simple capacitive sensors won't work here). It's a design idea and I'm not very skilled engineer so I have no idea if it's even possible.

Here's a simplified sketch of a hand:

The original idea was this: There's an electrode on each finger and small current is running through from A to B. When fingers touch, current starts passing through the SHORTER GREEN path as well (it may not be apparent but it will be always a shorter by at least ~1cm). But it turns out looking for changes in resistance / current seems to be going nowhere. It's not reliable because the biggest changes in resistance come from contacts between the skin and electrodes. It won't ever be perfect, electrodes move, user sweats, temperatures change, etc. Compared to this, the changes in resistance caused by a shorter path are insignificant. But the contact may be good enough for something else (it would be fine for a simple capacitive touch switch).

I'm now thinking that maybe I could measure the distance between the two contacts  somehow by sending some signal from A and reading it at B. Just looking at the time of propagation of charge imo won't be possible because I won't be able to do this fast enough to get at least a millimeter resolution.

The problem could be really described as detecting whether the shorter green path is being used or not.

(We could add more electrodes on the fingers somewhere along the blue path but not along the green path.)

Do you think something like EDM (http://jerrymahun.com/library/Distance/a.htm) could help here? Any other ideas?


texts: Background functionality of a mobile phone

texts:
I'm asking this question out of curiosity. In general, we have around 6 to 7 radios in a smartphone. the modulation schemes, estimation procedures, synchronization methods are different for each radio. How do the people who develop a smartphone, fit all these radios on to a single chip?

And also I've studied that ARM processor will be used for basic call initiation, call forwarding and call receiving.

So is there an ARM processor that is present along with the SOC, or everything is fit into the a single SOC.? Or they use an FPGA to fit all the radios.?

Thanks in advance
phani tej


texts:
I've tried this question and this and several other possible duplicates of this question, but I still can't wrap my head around this.

I'm using OSHPark for PCB production. They support a minimum of 6mil width tracing. I'm using a two-layer design, so they use FR4 170Tg/290Td for PCBs. They are 1 ounce copper on both sides.

My PCB as an integrated LiPol charger and a maximum consumption of 1A at 3.3V. It can be charged through a mini USB connector, so I'll assume a maximum of 1A at 5V of power being drawn. I don't mind my circuit to go 30º C above room temperature. If I follow the graph below, then my interpretation is that I start at 5V on top left and go to 30º which puts me roughly on the 26AWG equivalent. I then go down to 1oz and then left, getting ~15mils of width.

Does this make sense?

UPDATE: I can't even read graphs. Since it says current in A, I start at 1.0, go right, down, left, and get around ~4mils. Is it right now? Is this completely independent of the voltage? Should I take the voltage into consideration for calculating the trace clearing?


texts: Difficulty with servo control using TI MSP430

texts:
I'm using an MSP430FR4133 chip to test out a servo (I haven't used or interfaced with servos before). I believe I've attached the servo wires to the correct pins, but when I run the program to turn it 90 degrees and then back to 0, all I hear is clicking inside of the servo. Here's my code and the pin diagram:

The servos operate on 5-6V so I connected the servo ground wire to GND (Pin 1), the servo power wire to 5V (Pin 1) and the servo control wire to PWM (Pin 19).

And here's my code:

#include <Servo.h>

Servo servo;

int pos = 0;
const int buttonPin = PUSH2;

void setup() {
  pinMode(buttonPin, INPUT_PULLUP);
  servo.attach(11);
}

void loop() {

  int buttonState = digitalRead(buttonPin);

  if (buttonState == LOW) {
    servo.write(90);
  }
}

Any and all help would be appreciated.


texts: Reverse voltage protection and high-side current switch

texts:
Initially I chose a Infinion PROFET smart high side switch (ITS428L2). In the datasheet it is stated that this device can provide reverse battery protection with external resistor. Frankly, I am not able to figure out how this protection should work: The body diode of the internal MOSFET is placed in a way, that current can flow in case of reverse voltage. So where is the protection?

Therefore i tried to figure out a circuit that provide real reverse voltage protection and on/off-switching capabilities for currents in the ~10A region and as well for high currents (~100A). Is this a suitable approach?

simulate this circuit – Schematic created using CircuitLab

Edit: Changed Source and Drain of PMOS2

Looking at the datasheets of serveral p-channel MOSFETs i wondered about the max. Drain-Current value. Sometimes this current is specified negative, sometimes positive - sometimes there are both values given but of different value. I thought if the MOSFET is conducting there is no direction for the current flow?

Example of SUM110P04-05:


texts:
just like the title says, I'm trying to figure out the duty cycle of a GPS's Pulse Per Second Signal.
This post and accompanying answers seem to indicate something like a 10% duty cycle:
GPS PPS signal corresponds to data time?

Whereas the waveform shown at 2:43 in this youtube video show something like a ~25% duty cycle: https://www.youtube.com/watch?v=GAtL5sFmlQg
Is it variable? Is there a standard? I also crawled wikipedia and some of the documentation links to military standards there, but it was a little dense for me and I didn't see anything really jump out... thank you for your kind and generous help!


texts: Astable 555 Timer creates longer pulse when just turned on

texts:
I have a question regarding the behavior of a 555 timer circuit that I have made. It is depicted below.

Now, here is some interesting behavior, I wrote a program on arduino that measures the lengths of the pulses from this 555 timer. Here is the output that I had.

  Was on for: 472
  Was on for: 279
  Was on for: 279
  Was on for: 277
  Was on for: 278
  Was on for: 278
  Was on for: 278
  Was on for: 279
  Was on for: 277
  Was on for: 278
  Was on for: 278
  Was on for: 277

Now, as you can see, when the 555 timer is first turned on, the pulse is much longer (measured in milliseconds). My question is, how would I avoid this behavior? In other words, how can I turn an astable 555 timer on and off and have the first pulse be the same length as all of the other ones?


texts: Differential Clocking resistor and capacitor choices

texts:
I am working on generating a 2MHz differential clock signal for a DDS chip. I have been given a PCB with a design that I am unsure can work or what the thought was behind it. If anyone could help with what I think is happening and what should/shouldn't be there. X01 is SI510. The CLK1_P is driving an AD9106. The board is four layers with the two inner layers being two power planes and a ground pour on top and bottom. (I think the top inner layer should be a ground plane)

R5 & R6 are pull-up and pull down resistors on the CLK- line. I do not think these are needed, I think they may be some kind of Thévenin termination, but I think the parallel termination is sufficient if done correctly.
R3 and R4 are a parallel termination to match the general characteristic impedance of ~100R. However only one should be needed and it should be as close to the pins as possible.
I do not know what C6 and R2 are doing.
R9, R10, C21 and C20 are forming low-pass filters (i think) to the AD9106. I think the capacitors should be 0.1uF and not 0.01uF, see the screenshot from the AD9106 datasheet below, and I am unsure of what the resistors, R9 and R10, to ground are doing if not used for low-pass fitlering.

I can clearly see a good 2MHz signal into the buffer, i.e. the clock setup is working somehow, but nothing is coming out of u3. Ideally i'd like to get this design working but implement any improvements.


texts: Changing the data logging rate on a Tektronix DSO

texts:
Currently, for a continuous waveform, i am able to log data from the Tektronix TBA 1064 DSO as .csv files. The time interval between two samples currently is around 4 * E-08 (by default).

My requirement is to save 1000 samples of the signal values per second.
How do i change the sampling rate/data logging rate for the DSO so that it does not save a lot of clutter information as it is doing now.

Thanks


texts: Can antennas be viewed as light sources?

texts:
Clearly antennas are nothing but a device to radiate the electrical energy through electromagnetic waves.

Since visible light is also simply a certain range of frequencies, isn't it more easier to think of antennas as different shapes of "light" sources?

Like directional antenna is a hand held torchlight, high power means flood lights?

Why can't we simply state this in particle nature as it will be much simpler mathematically than the wave theory?


texts: How to trigger hot plug detection in HDMI interface?

texts:
I'd like to trigger the hot plug detection circuit for one of my graphics card's outputs so that Windows would "think" that it has secondary monitor attached.

I know that there is a pin in the HDMI socket that must be set to high to detect a connection but is it simply a matter of feeding 5V to that pin e.g. from the USB port? No ground connection is needed?


texts: Can I measure the relative output gain of a power amplifier with a multimeter?

texts:
If I wanted to measure the gain that a power amplifier provides to a signal with a multimeter, do I simply do the following:

Measure the input signal's voltage e.g. 1 Vrms
Turn the amplifier up to full.
Measure the output voltage of the amplifier e.g. 20Vrms
Output / input = amount of gain that the amplifier provides.

Is it that simple, or do I need to add a resistor to the output which is a similar load to what a speaker would be and then measure the voltage drop across that resistor?

What if I wanted to determine the watts of the amp? Then would I need a resistor of a similar value to a speaker? Or would it be better to measure the resistance of the speaker with an ohmmeter, measure the amps output voltage and then I = V/R?


texts: LTSpice Third Party MOSFET Error Message

texts:
I am trying to work out a simulation circuit with different nmos(2n7000) and pmos(ZVP2106A) within LTspice.
But I just don't know what to do to make the simulation run. I've taken careful procedures to make sure that the text file was downloaded in the same directory as my schematic and added the spice directives

.lib 2n7000M1.txt,
.lib 2n7000M2.txt,
.lib ZVP2106A.txt,

And once ran the error shown

m1: Can't find definition of model "2n7000m2"

This error popped for all nmos and pmos.

As shown, the first image shows what schematic I'm trying to run a simulation for with the imported pmos and nmos. For the other image shows proof that they are in the same directory. The schematic is named

Test1 and the text fileS that I was trying to import are labels "2n7000M1, 2n7000M2, ZVP2106A".

I've tried putting an X for the prefix to try make it a sub circuit but got the error

Unknown sub circuit called in: xm2......

I'm stuck and in need for help. I've already mention the problem with my professor. So I decided to hit the web for answers/solutions regarding the problem. Any help is welcome and much appreciated.
Thank you!


texts:
I'm trying to get a better understanding of frequency compensation for op-amps. I'll start off with a very specific questions and then get into the context. For a certain op-amp, open loop gain is 90dB and GBWP is 10MHz, so the first pole in open-loop mode is at about 300Hz. With a nominal closed-loop gain of 1, the closed loop gain won't start to roll off until 10MHz. Does this mean that the first pole of the system has been moved to 10MHz, or is it still down at 300Hz? The important consideration is the phase - is there a pole in the amplifier that will cause 90 degree phase shift by shortly after 300Hz, or will the phase be about 0 out into the MHz?

This plays into dominant-pole compensation. If the pole is at 10MHz, I could have a low-pass filter at about 100Hz to cause around 100dB of attenuation, or less than 1 loop gain, by the time the 10MHz pole brings the total phase shift to 180 degrees. But if the first pole of the system is still at 300Hz, the phase shift from that plus the new "dominant" pole will cause 180 degrees phase shift when the loop gain is still far too high and cause instability.

I assume the pole does move, or else dominant-pole compensation would be pretty useless for anything outside of DC. But I was talking to someone who insists that the pole is still down at 300Hz causing significant phase shift before we even get into the kHz.


texts:
So i have a green LED with the Vdrop: 1.9V ~ 4V, Vforward: 2.2V, two AA battery in total 3V and a resistor which has 300Ω.
I place all the component like this  and star to measure and calculate all the possible values that i get.. and hit somethin that makes me wondering how it ends with the result 609mA on the resistor?
could you guys explain where the 609mA come from? I just bought a  "Practical Electronics For Inventors" and Iam new here..


texts:
I'm looking for a dc-dc converter using only basic components (coil, condensator capacitor, transistor, resistor, diode, zener diode).
Because when ordering a specialized component from the internet it usually takes 1 month to ship.

My electronics studies are way behind me, and I'm ashamed to say that I don't understand the two simple schematics that I will post. I can still manage digital systems but analog systems are something else.

I need 5V with 60mA max.

So far I found 2 schematics:

http://www.eleccircuit.com/step-up-dc-converter-1-2v-to-5v-5v-for-micro-computer/

How could I increase the output power?

http://powersupply88.com/voltage-converter-from-1-5v-to-3v.html

Does using a 5V zener diode give me a 5V output? How do I know how much current I can take from it?

Any other schematics?


texts: Why does the voltage changes in this simple circuit?

texts:
I'm beginning to learn electronics, and there's something I just can't grasp. I was told that a high resistance in a circuit would lead to a smaller current passing through it, but the voltage would remain the same. Now I'm facing a puzzle as what I learned and what I see in the real world are very different from each other. As example:

Upon seeing the circuit, I thought the current would flow from +10V to GND, at 0.01A. Actually, as you see in the image, the voltage kinda "stops" in the resistor. Trying this on an arduino, and if I put a LED in series with the resistor, I get about 3V. I really don't get what's happening here, can someone give me a light?


texts: Problems reading data from a microSD card

texts:
I am trying to read a block of data from a standard capacity micro SD card, but the received data does not make any sense. Here is what I'm doing:

Initializing the card
Reading data

Setting CS low
Sending CMD16 to set block length
Sending CMD17 with start address
Waiting for start byte (0xfe)
Receiving bytes and printing them to the serial terminal
Receiving CRC
Setting CS high
Sending 8 extra clocks (?)

The data I'm trying to read is the FAT16 boot sector, as shown below:

And the data I'm getting out is this:

At this point, I can't even begin to think of what is going wrong. I don't think it's a transmission error, because the data out is always the same. I can also read the boot sector signature 0x55 0xAA every time, even if I set the start address to 510 and read two bytes, they come back perfectly. The problem is that I can't read other bytes.

I also tried swapping cards and that didn't help either.

What am I missing?

EDIT: the function in question is below.

bit sd_read_block(unsigned long size, unsigned long start_addr)
{
    unsigned long i;
    unsigned char r;

    SD_CS = 0;

    r = sd_card_cmd(16, size, 0);

    sprintf(usb_uart_tx_buffer, "CMD16 R Token: %02x.\r\n", r);
    usb_uart_tx(usb_uart_tx_buffer);

    r = sd_card_cmd(17, start_addr, 0);

    sprintf(usb_uart_tx_buffer, "CMD17 R Token: %02x.\r\n", r);
    usb_uart_tx(usb_uart_tx_buffer);

    // wait for start token
    r = 0;
    while (spi_rx_byte() != 0xfe) {
        if (r++ > 25) {
            SD_CS = 1;
            return r;
        }
    }

    for (i = 0; i < size; i++) {
        if (i % 20 == 0) {
            UART1_TX(0x0d);
            UART1_TX(0x0a);
        }
        sprintf(usb_uart_tx_buffer, "%02x ", spi_rx_byte());
        usb_uart_tx(usb_uart_tx_buffer);
    }

    // CRC
    spi_rx_byte();
    spi_rx_byte();

    // extra clocks
    r = spi_rx_byte();

    SD_CS = 1;

    return 0;
}


texts: DC motor speed is too low while interfacing with L293D motor driver and ATmega8

texts:
I am trying to drive a 6V DC motor with an L293D driver and ATmega8 without PWM. The problem is, I am getting a very low speed while connecting the motor via L293D driver.But, It rotates well when I provide direct 6V DC supply to the motor.

I am using an external 6V source at the VS (motor supply) pin of the L293D but there is no improvement. The motor does not rotate until I turn the rotor by hand. What could be the problem? My code is here:

DDRB = 0xFF;
while(1)
{
  PORTB = 0B00000010;
  _delay_ms(20000);
}

My simulation design is here:


texts: What is going on with this zig-zag trace connected to the processor?

texts:
I'm taking apart a Pogoplug_V4_A1_V3.1, and I noticed this trace in a corner of a board, connected to the Marvell 88F6192 processor:

The trace itself is approx. 0.2Ω, and the resistor is approx. 0Ω. They are connected to pin 158 & 155, aka M_STARTBURST and M_STARTBURST_IN. According to the documentation:

  Start Burst

  88F619x indication of starting a burst read transaction.
  Asserted with the first M_CASn cycle of SDRAM access.
  NOTE:
  Must be routed on board to the SDRAM, and back to
  the 88F619x as M_STARTBURST_IN. For the
  recommended length calculation for this routing and
  termination requirements, see the
  88F6180, 88F6190,
  88F6192, and 88F6281 Design Guide.

This is interesting, because it's not connected to the SDRAM, it just goes in a big loop.

What is the purpose of this thing?


texts: Filtered Voltage for charging Lead acid battery

texts:
I am creating a temporary setup for a lead acid charger, using a rewound Microwave transformer, a bridge rectifier, and a giant filter capacitor (30,000µF).

Wound turns until I got 14 volts filtered on the output of the capacitor.

I tried to charge the battery, but it seemed to get "stuck" at 11.8-12 volts, and not charge up to the 13.5 volt charge.

I know this might not be the best charger setup, but I fried my charger, and need a temporary set up. I AM watching the voltage constantly, and making sure it does not reach above 13.5.

The battery is a 17 amp hour 12 volt lead acid

And the reason I am using the Giant capacitor is I am using it for equipment in parallel with the battery and charger that is very sensitive to hum.


texts:
i have RGB LED strip 173 LED in parallel.
i am driving from 5V 10A SMPS.
for R, G, B color it works fine universally light entire strip.
but when i go for white color then half of the strip little warm or natural white color.
i check voltage across each LED it is 4.7V at starting of strip but after half strip it going to 3.2 to 2.5 voltage.
what will be the issue any suggetion..?


texts: Looking for the logical equation from this PMOS circuit

texts:
I am looking for the logical equation that describes the given circuit below.

Unfortunately I don't have information whether \$U_b\$ is positive or negative - would that make a difference?

I derived my current result from a truth table I created.

\$f(a,b,c)=\bar{a}*\bar{bc}\$

I think, my logical term might be right, but I would like to know whether this would also be possible by just looking at the circuit and identifying NAND and NOR constellations in PMOS there.


texts: How to disable Parallel Master Port Address pins in PIC32

texts:
I am using PIC32MX795F512L MCU. I need to use few GPIOs on which Parallel Master Port Address pins are already defined like in Pin44 Pin43 PMA0 and PMA1 is defined . So to use these as GPIO input I need to disable their functionality. I tried setting their ON bit as low but this doesn't help.

Need help in disabling the PMP pins.


texts: If we use potentiometers as volume controls, don't they waste electric power?

texts: I recently heard that we use potentiometers to reduce the volume levels in audio devices. Will it waste electrical energy?


texts: What's a potentiometer with four terminals in this schematic?

texts:
I'm reading the datasheet for a TDA2005 IC.

In it, there's a application circuit schematic with two potentiometers that have a fourth terminal in it. See below:

The components I'm talking about is P3 and P4. I understand the terminals across the "resistor" (going to the input and ground) and the terminal with the arrow, that goes to the amplifier, but I couldn't figure out what is that terminal going to the left, connected to the 2.2 nF capacitor and 2.7 kΩ resistor.

What does it mean? What type of potentiometer is that?


texts: PWM-controlled RGB LED is flickering when PNP transistor should be off. Any insights why?

texts:
I am trying to control an RGB LED (with common cathode configuration) with a BC327 PNP transistor. The LED is powered by a 5V line. The base of the transistor is controlled by a BC548 NPN transistor connected to the GPIO of an ESP-01 module (ESP8266). I attach the circuit diagram below.

The values of the resistors connected to the GPIO are selected in such way so that the GPIO is pulled up during boot in order to boot properly.

I can control the brightness of each LED from the ESP-01 but, the problem here is that the LED is flickering when the PWM is supposed to be off.

Do you have any insights on why this might be happening?

Thanks!!


texts:
I was given the following capacitor by a spare parts shopkeeper when I asked for a polypropylene capacitor (to be used in RC snubber circuit for a mains load).

Can someone confirm this is the right kind? Will be connecting this is series with a resistor across a mains (230v) inductive load.

UPDATE

Looking through google images by searching he marking on the capacitor, it seems it could be either of the ones below

Polystyrene Film
Polyester Film
Metalized Polyester Film
Polypropylene

From the images I've seen, the Polypropylene ones carry a 'PP' mark on them. Either the one I have is not a Polypropylene or it's a cheap one with no markings.

Looks like I'll have to bite the dust and get a new properly marked one.


texts: How to implement a closed loop control circuit for slow process?

texts:
Given a slow process Vout = Process(Vcontr) which takes a control voltage Vcontr and produces an output voltage Vout but with some lag of the order of one second.

I am looking for a good way to implement a closed loop control circuit for setting Vout to a target voltage Vtarget.

My starting point is a circuit as follows:

op amp
inputs: Vout and Vtarget
output: connected to Vcontr-input of the slow process but with a capacitor shunted to ground to slow the rise time (or alternatively some analogue filter?)

Is there a better way to do this? How should I setup the feedback for the op amp?


texts: Why isn't there a non-conducting core wire for high-frequency coil applications

texts:
Background

The commonly known skin effect formulas are derived and only apply to solid conductors. The commonly used "skin depth" only applies in these cases. It is for this reason that in some applications tubes are used, as these are much more weight-efficient than the same diameter wire at a high-enough frequency.

At 1MHz the skin depth of copper wire is 65µm which means that only 40% of the volume of a 1mm diameter wire is carrying 95% of the current, with >35% of it in the outside 20%.

From the skin-depth formulas it is known that a lower conductivity material (e.g., aluminum) has a skin depth that is considerably larger than a higher conductivity one (e.g., copper). As the formula predicts, skin depth is inversely proportional to the square root of the conductivity.  If we carry this to its logical consequences, it should be the case that for a conducting tube (which has an insulation core) skin depth should be larger than for an equivalent solid conductor.

As an alternative intuition a thin-walled insulated-core conductor would have nearly twice the surface area of a solid conductor. So it should asymptotically approach nearly half the resistance at a high enough frequency.

In effect, as can be seen in this paper from HB Dwight in 1922 (possible paywall), the increase in resistance w.r.t. frequency for a tube whose wall thickness is 20% of its diameter is more than a factor of two lower than for a solid wire.

From the above curves it can be seen that a tube with t=200µm and d=1mm, due to the increased actual skin depth, should have less than 50% of the impedance increase than a solid d=1mm wire (do note that the curves are normalized w.r.t \$ F / R_{dc} \$, so interpretation is a bit tricky).

Similar effects (although not as dramatic) can be observed with individually-insulated stranded wire.

Application

In medium-frequency applications, as for example switching power supplies, it is common to use Litz Wire a multi-stranded insulated wire which reduces the losses due to skin effect but becomes less and less effective at higher frequencies (~1MHz) because of the proximity effect and the capacitive coupling of the individual strands.

Probably more gains (particularly with respect to proximity effects) could be obtained if there were multiple individual strands embedded around the periphery of a non-conducting core.

Question

Have I missed something in the theory?

If not, why isn't insulated core wire (either tubes or strands around a core) being commercially exploited for high-frequency inductor applications?

Addendum

As John Birckhead answer points out, flat wire has basically the same advantages with none of the disadvantages (e.g., fill factor). But this leads me to ask:

Why isn't insulated-core flat wire being used for these applications? It should have the same advantage of flat wire with nearly half the resistance at high enough frequencies. Are the possible gains inconsequential?


texts: How can we measure the quality of a capacitor?

texts:
There are various brands of capacitors on the market. Made in China, made in Taiwan, Korean and Japan brands.

Although the values of the capacitors are the same (eg. 35 volts 2200 uf) some capacitors come out more robust and longer life.

How can I measure the difference in quality?

I can measure the capacitance  with a multimeter, and I can measure the ESR with an LCR meter. How else do you check?

For example, I cannot test the operating voltage. It says 35 volts, but is it really 35 volts?


texts: How to control peripheral power supply from microcontroller

texts:
I need to be able to control the 5Vdc power supply for a DS18b20 sensor and a 0.96 oled display from a microcontroller that works at 3v3.
I implemented this circuit, it correctly energizes the peripherals but I cannot turn them off correctly, since the output voltage in the off state is around 1.3V

I tried decreasing the value of the resistors with similar results.

What can I do to make the output voltage lower, around 500mV would be fine.
Edited:
This is the complete diagram after I remove the power control for the display and I will only control the power of the DS18b20 sensor, which is what I need most.


texts: How to do Bidirectional multiplex switch signal over two wires?

texts:
I'm trying to remote control the doors in my stand-alone garage over two wires. There's three operate switches in the house, and three SPDT position switches on the doors. I think I want to end up with a relay board at each side to reflect the state on the other, and some kind of multiplexer in the middle. Off-the-shelf is somewhat preferable to having an Arduino on each side and having to program them.

There's a chance I can abandon the phone in the garage to pick up a second pair, so each direction could have its own.'

I think it's possible an answer would be, "use a 74LS" chip on each end, and connect the output pins a, b, c to the relay controller, the inputs to pins x, y and z and connect the twisted pair to the drivers on pins P and Q.

That would be perfect, having no software, and I'd be able to build that on a proto board, or know what to look for COTS.

The question is what to put in the ? box


texts: I have two parallel RLC circuits with different values. I want to add the transfer function (TF)of both the circuits. If I add Their TF then how to reprenst their equivalent circuit?


texts: What are Kalman filters and what are their applications? Please give simple explanation. I have tried studying different links but felt hard to digest/understand


texts:
Please explain to me why this circuit can give me a regulated 5V? I understand the Joule Thief part, but why the regulator part work?

simulate this circuit – Schematic created using CircuitLab

Especially, why the Zener diode D2 is crucial at preventing the 1117 and the MCU from being fried, and why the cap C1 should not be fully charged at all times?

-- EDIT --

Since you guys are suggesting a closed loop design, does this look better? (Remind you that the MCU won't take a pulsing power rail too well so I just keep the LDO there with as little headroom as possible to achieve proper regulation.)

simulate this circuit

The above schametic is modified to include the resistor Olin suggested.

-- EDIT 2 --

Will this work with less loss?

simulate this circuit

Tweak R2 in this schematic so that JFET pinches off when the voltage across C1 goes above 6V (enough headroom for 1117 here.)


texts: Find which wires are what in a sjt power cable

texts:
I'm trying to figure out what wires are live, neutral and ground in my computer power cable. I'm getting some weird readings from the wires.

A - B = 51v
A - C = 117v
B - C = 65v

I'v read a bunch of articles but can't figure out what is what.


texts: Is access reader need UL approval for US market?

texts: We are a access reader manufacturer outside of US. Do we need to obtain UL approval for our reader in order to sell or install in US?


texts: I have a differential analog signal traveling over 2 coaxial wires. I need to convert to single ended. When should I use a BALUN ? When are other solutions such as OPAMPS more appropriate ?


texts:
I have found myself needing small heaters, in the 5-10 watt range for various applications in diy projects, preferably powered from 120VAC. The exact wattage is not important, and doesn't have to have a thermistor.

Ideally, I would love to just use a 3k/10 watt resistor and call it a day, but for safety reasons I know you must use an isolation transformer.

So can I just find the smallest 1:1 0.05A iso transformer I can, fuse it at 0.05 A on the wall side and call it good?

There might be an even better solution though, maybe even something just off the shelf.


texts: AT90USB1286 not detected by Windows Device Manger

texts:
I'm working on a controller for a USB-C keyboard. I understand USB is a very complicated protocol, and USB-C even more so, however luckily enough there's a ton of open-source projects that aim to accomplish similar goals so I've been basing my controller off of that. I've mostly been following this guide.

I thought it was finally finished, but upon connecting the controller to my computer via USB, it's not detected by Device Manager.

Here's my schematic. Basically everything I've done here is the same or very similar to other projects.

I had a fair amount of issues soldering it all together as the components are SMD, however it all looked good in the end. I suppose I could've fried the AT90USB1286, but I assume that's unlikely.

Here's some pics of the actual board, sorry for the potato quality.

Can someone recommend some next steps to troubleshoot this? I understand this is somewhat advanced and I am somewhat of a beginner, but I'm just trying to create something I'd use and am enjoying it.


texts:
On digikey site program memory for ATMEGA328P-AU-ND is shown as 32KB (16K x 16). in ATMEGA328P datasheet program memory is 32KB but what does (16K x 16) mean?

Other Examples are :

16K x 8
64 x 16
64K x 8
1K x 16


texts: How to connect toroidal transformer from wall power

texts:
How to I connect 240v from a wall powerpoint to a toroidal transformer?

I've searched all over, and I'm a complete novice, and I cannot find anything that explains what I need to know at my level of understanding.

It is a 240v 20va 15v+15v toroidal transformer. It has two blue primary wires, and four secondary (red, black, yellow, orange).

I have the hot (brown) line coming from my power cable running to one of the blue primaries, and the neutral (blue) line coming from the power cable running to the other blue primary.

I then have the red + black running to a rectifier bridge, and the yellow + orange running to another rectifier bridge.

There is no voltage output from the output leads of the rectifier bridges. No voltage output from the secondaries.

I've got two of these toroidal transformers set up identically, and neither are working.

What am I doing wrong?

Thanks in advance.


texts: Is it possible move mouse cursors via IR pins?

texts:
In a mouse (with ball) there are IR sensors and phototransistor sensors (in pairs) to check the movement of the mouse in both axes.
For each axis, there is the following configuration: http://1uparcade.rmfx.com/images/kb-optics.jpg
It is possible to operate (with voltage, current and possibly frequency) externally the pin of the optical sensor to move the cursor?

Thank you in advance!


texts:
I'm using an AVRISP mkII programmer to flash an Atmega 328p MCU. Not an Arduino, this is my design.
I'm using avrdude which came with WinAVR. I don't have Atmel studio installed, and I'm using Windows 7.

The command I am running is:
avrdude -p m328p -c avrisp -P usb -B 15.625 -U flash:w:firmware.hex:a -U lfuse:w:0xd6:m -U hfuse:w:0xd8:m -U efuse:w:0x07:m

The error I get is:
avrdude: ser_open(): can't open device "usb": The system cannot find the file specified

I have installed the drivers. AVRISP mkII shows up under LibUSB-Win32 in device manager.

I have tried using a bunch of other names for the port to no avail. The weird thing is that I used the same setup last year and it worked fine. I reinstalled WinAVR and that's when it stopped working. I am using the same boards as last year, so I know they work, and I even tried another computer.


texts: Separating power ground from control ground

texts:
I'm looking at the 'layout considerations' for TPS61030. On p.18, it says

  Use a common ground node for power ground and a different one for
  control ground to minimise the effects of ground noise

Aren't the power ground and control ground connected to the negative of the battery anyway? It seems to imply the 2 grounds should be somehow separated.

Thanks


texts:
I'm new to I2C and am trying to get two ATtiny85 to talk to each other.

I have Arduino IDE 1.8.0
I used this link (damellis) to install the ATtiny board in the IDE
I use an Arduino nano to program the ATtiny85.
I use this TinyWire library from lucullusTheOnly.

The ATtiny has to be able of being both master and slave. I based my code on this example of lucullusTheOnly.

I have a very simple program (see below) that sends one character on the bus, but I get an error 0x0C USI_TWI_ARBITRATION_LOST.

I reduced my setup to only the master on the breadboard with 5kOhm pullups on the two I2C wires (2x10kOhm in parallel) to 5V to eliminate all other traffic. But the error remains. Really nothing else on the board.

ATtiny pin usage
3 --> 1kOhm --> LED --> GND (for flashing out error-code)
4 --> GND
5 --> Pullup 5kOhm --> 5v
6 --> Pullup 5kOhm --> 5v
8 --> 5V

I have no scope at hand to monitor traffic on the bus. I can go to a lab next week, but that's long waiting ;-/

In Arduino IDE, I have the Clock speed of the ATtiny set to 1Mhz (was default).
Could that be the problem? Should I increase that? Can I simply change that in the Tools>Clock menu? I thought I read somewhere that I had to burn the bootloader too.

Test program:

#include <TinyWire.h>

int error_led_pin = 3; // == physical pin 2 on attiny

byte own_address = 10;
byte slave_address = 11;

void setup() {
   // config error_led_pi as Output for driving an LED
   pinMode(error_led_pin, OUTPUT);
   // config TinyWire library for I2C slave functionality
   TinyWire.begin( own_address );

   TinyWire.beginTransmission( slave_address );
   // fill the send buffer
   TinyWire.send('b');
   // execute the master sending and check for an error
   // returns 0 if there was no error (otherwise you can find the different error code definitions in TinyWire.h)
   int errorCode = TinyWire.endTransmission();
   if(errorCode!=0) {
      // turn on the error LED, if there was an error
      handleError(errorCode);
   }
}

void loop() {

}

void handleError(int code) {
   if (code != 0) {
      // *** ERROR ***
      // errors defined at https://github.com/lucullusTheOnly/TinyWire/blob/master/TinyWire.h
      digitalWrite(error_led_pin, LOW); // TODO: remove!
      delay(500);
      // blink resultCode number of times  // TODO: should be led at pin 2 = push button
      for (int i = 0; i <= code; i++) {
         digitalWrite(error_led_pin, HIGH);
         delay(500);
         digitalWrite(error_led_pin, LOW);
         delay(500);
      }
   }
}

Any thoughts on finding why I get USI_TWI_ARBITRATION_LOST ?


texts: Accuracy when measuring current (mAmps) and small voltages

texts:
I'm looking at a circuit (part of a bigger circuit) that consist of a 10 ohm resistor and a red LED.

It's running on 2.05V (checked with 2 different multimeters, ranging from from 2.047V to 2.05V).
The voltage drop of the LED (again
measured with 2 different multimeters on the live circuit) is 1.96V
The resistor clocks
in at 10.0 ohms exactly (again measured with 2 multimeters).

Now, according to Ohms law, the current flowing through the LED should be

I = V / R = (2.05V - 1.96V) / 10 = 9 mAmps

However, when hooking up my multimeters I get the following readings

Multimeter A : 7.30mA
Multimeter B : 6.10mA

It took them about 30 seconds to stabilize.

Why am I seeing that much difference ?

Multimeter A is about 4x more expensive than multimeter B, so I guess it will be more accurate, however, the difference between the measured 7.3mA and the calculated 9mA is too big to ignore no ? Or am I missing something ?


texts: Why at microwave frequency we prefer rectangular waveguides while at optical frequency circular waveguides (i.e. optical fibres). Can we have rectangular optical fibres.


texts: How to correctly wire this transformer for 240V?

texts:
I have an old transformer (without any details about brand and model) with dual primary windings. I need to set it up to take 240V, but I am unsure about the correct way to connect the windings in series.

Here is a photo of the primary side:

So what is the correct way to connect these for 240V input?

Do I connect the two 0 connection points and supply 240V at the two 120 points or cross over a 0 to a 120 pin?

Note: the windings is on each side, i.e. there is no connection between 0 and 0, and 120 and 120. On each side I have about 8 Ohm between the top 0 and the bottom 120 pin.


texts: Creating a simple voltage regulator for medium currents

texts:
Question, as fast as possible: Would this circuit regulate poorly-regulated +12VDC effectively?

I am an electronics level zero, so please bear with me. Please let me know if you would me to clarify anything.

Full Question:

I'm trying to design this smart lighting system and I need a power source. Unfortunately, due to the wire run lengths, I can not rely on receiving well-regulated +3.3v directly, especially at high currents.

I want to keep the device as small and low-profile as possible, limiting my options.

I designed this circuit to regulate voltage effectively. Would this work?

I am alright with up to 0.2v of ripple. All resisters are 1k ohms, and the capacitor is 100uF.

Also, if I messed up something which would make this circuit blow up, please let me know. This one of the first circuits I've designed from scratch.


texts: How do I insulate a stepper motors from RF transmitters and receivers

texts:
I have a project that requires using steppers motors to work within centimeters from a wireless RF transmitter and receiver. I am using this stepper https://www.adafruit.com/product/858, the transmitter is FS1000A and the receiver is XY-MK-5V.The signal transmitted is a square wave with period modulation.

I can send data between the two chips with two PIC24Fs and I can spin the motors. But I can see the noise on the oscilloscope in the RF signal and every once in awhile (2 in 5 minutes) the signal output from the receiver gets very noisy and then flatlines. I have to reset the PICs before it comes back. This only happens when the stepper motors are spinning.

Is there a way to insulate the stepper motor so it does not interfere with the transmission? Or is there a slightly more expensive RF chips I can use that this wouldn't happen to?


texts: Can´t erase data from flash memory (STM32)

texts:
I´m trying to save some data to flash memory on my STM32F407 board. Before I can save them, I need to erase a memory sector. I chose 16 Kbytes Sector1 starting with address 0x08004000 and chose Voltage range 2.1-2.7 V. I'm using HAL library.

Program stops responding after FLASH->CR |= FLASH_CR_STRT; line inside HAL_FLASHEx_Erase() -> FLASH_Erase_Sector() function.

I'm pretty sure it's my fault but I can't find out what is wrong.

HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |
                           FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
FLASH_EraseInitTypeDef EraseInitStruct;
EraseInitStruct.Sector = FLASH_SECTOR_1;
EraseInitStruct.TypeErase = TYPEERASE_SECTORS;
EraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_2;
EraseInitStruct.NbSectors = 1;
uint32_t SectorError = 0;
if (HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError) != HAL_OK) {
    HAL_FLASH_Lock();
    return;
}

uint16_t data = 300;
//----------------------------write data
if (HAL_FLASH_Program(TYPEPROGRAM_WORD, start_address, data) != HAL_OK) {
    HAL_FLASH_Lock();
    return;
}
HAL_FLASH_Lock();

Did I choose wrong voltage range or number of sectors?

Thanks for your answers.


texts:
I'm trying to design an ultra low power audio recorder, in order to monitor ground noise in rural areas. The circuit I'm working on is based on a microcontroller (STM32L100RC) and an audio codec (VS1053) plus a bunch of additional components.

At this point, my circuit estimated current draw is around 300 mA (average, without considering burst due to audio processing and memory card writing).

As I would like to run my setup for about 2 months (around 60 days) to make relevant measurements, at this rate I would need an "immense" battery pack.

I would like to ask if there is something that enables recording 2/4 channels to an SD card in a more energy friendly package (maybe 1/10 of actual 300 mA), where an 80Ah LiPo battery pack would be able running easily for the time span, and enough spare capacity for eventual other sensor samplings.

Thanks in advance.

Edit

Thanks for all your comments. I decided to edit the question to add more details, instead of answering singularly.
The actual circuit voltage is 5V, audio cannot be processed onboard and I need only a large audio file (or a lot of smaller ones) for the entire sampling period.

VS1053 audio encoder supports OGG encoding and, considering microphone bandwidth (around 10kHz), I would like to record at 44.1kHz Mono.

My problem is mainly due to expected very high MCU + ENCODER current draw. I can consider a good result something around 4 mA during recording but now I'm out by around two orders of magnitude.


texts: Using generate to create module ports in systemverilog

texts:
Hi I am trying to do something like this

`define PORTS 4
module mulitplexer
(
  input logic clock,

generate
 for(genvar  n = 0; n < `PORTS; n++) begin
    output  a_t       multiplx_a_[n],
    input   a_fc_t    a_multiplx_[n],
    input   b_t       multiplx_b_[n],
    input   logic     ready_[n],
 end

endgenerate

input logic reset
);

but i get a warning about missing a port in the ansi port list, I have not been able to find any answer to what I am doing wrong.
any help will be much appreciated


texts: How would I go about getting a small oscillator running at precisely 31,891,269,116 µHz?

texts:
I am looking to build an RTC module for Arduino that runs on Mars time. The conversion factor is 1.0274912510 Earth seconds to 1 Mars second.

Whilst I have managed to accomplish this programmatically with a <2 second resolution (which is not exactly ideal, I'd prefer something like 300 ms of accuracy) using fixed-point maths on an Arduino Uno connected to a regular RTC module, I am wondering if it would be possible to have some kind of low voltage oscillator running at precisely 31,891,269,116 µHz (31.891269116 kHz) which would, more or less, be interchangeable with a standard 32 kHz clock crystal (however, I would be open to other ideas so long as they aren't prohibitively expensive.)

Any ideas how this may be possible? Alternatively, some kind of timer that goes off once every 1.0274912510 seconds would also be acceptable.


texts: I'm getting back into hobbyist electronics after a very long hiatus and was wondering what the current state of circuit simulation software is. What is the industry standard for macs or PCs? What are the open-source alternatives?


texts:
I was reading this thesis and it mentions Bode-Fano criterion almost in every chapter of this thesis.

Could anyone advise about the derivation of bode-fano criterion?

Note: The original proof is so tough to digest and comprehend.


texts: Why is my equation for getting the energy of a capacitor wrong?

texts:
I have a question.

Because \$Q=CV\$, \$U=VIt\$ and \$Q=It\$

The energy in joules of a capacitor from what I get is
\$U=QV\$ with \$U=C(V^2)\$

But why when I see on the internet it is \$U=(C/2)(V^2)\$ ?

Correct me if i'm wrong at the equation please.


texts:
I have a very simple capacitive power supply schematic that I'm using to teach myself some of the underlying math and concepts. Let me be clear up front - I am not planning on building this - so I'm not concerned about its safety or cost or anything. I'm just trying to get the math right so I can understand how it works.

simulate this circuit – Schematic created using CircuitLab

In the above schematic, R1 is a load that I want to apply 3.3v across and that I expect to draw 220mA. I sized C2 for a 1% ripple at 120hz (since it's a full-wave rectifier) using the formula \$V_{pp}=\frac{I}{2 \pi fC}\$ and got \$\frac{220mA}{2 \pi \cdot 120hz \cdot .033V} = 8.842mF\$.

I still need to size C1, and that's where I'm running into trouble. I know that C1 and the R1/C2 circuit must drop a total of 120V, and I don't yet know the total current or impedance of the whole 120V circuit. But! I can calculate the total impedance of R1/C2.. and thus I can calculate the current that will flow through the bridge.. which must be the total current drawn from the mains.

C2's reactance at 120hz by \$X=\frac{1}{2 \pi fC}\$, is \$\frac{1}{2 \pi \cdot 120hz \cdot 8.842mF} = 0.15 \Omega\$. (Sniff test #1 - this seems super low.)

The total R1/C2 impedance would then be \$Z=\frac{1}{\frac{1}{15} + \frac{1}{0 - .15j}}\$ - or, as I worked it out, \$Z = .0667 - .149985j\$. The effective impedance of that is \$|Z| = \sqrt{.0667^2 + .149985^2}\$, or \$.164135\Omega\$. 3.3v applied to that will flow a bit over 20.1A. (Sniff test #2 - crazy high.)

Ok, I guess.. now that we know the total current draw and the combined impedance of the rectified circuit, let's solve for C1..
$$
120v = 20.1A \cdot \sqrt{(.0667 + 0)^2 + (.149985 + X_{C1})^2} \\
X_{C1} = 5.81979\Omega\\
C1 = \frac{1}{2 \pi \cdot 120hz \cdot 5.81979\Omega} = 227.893 \mu F
$$

However if I put in 227.893\$\mu F\$ for C1, and then run a simulation, I get 53v across R1:

Where am I going wrong?


texts: What is IDC connector pitch on a USBAsp?

texts: I am planning to use a USBASP programmer to program one of my boards, and I want to use a fitting receptacle on my board. I fail to find the exact pitch that the USBAsp's IDC connector has (as I understand there are 2mm and 2.54mm pitches). Does anyone have any info?


texts:
I've designed, ordered and assembled a PCB to act as an Arduino shield that takes sensor input and interfaces with a set of (again, custom design) motor driver cards. PCB images top and bottom attached and brief description at the bottom.
I have some stray voltage occurring, which is threatening to damage the Arduino. I first noticed it when I connected the Arduino and the 5V regulator started smoking. I then removed power, removed the Arduino, and voltage-probed the shield pins with the power back on.
When the voltage regulator was attached, I got 0.7 and 1.1V on A4 and A5 w.r.t. ground; Vin was 11.8V; 5V was 2.8V; and the other 4 power pins were successively slightly less. Trace voltages were also seen on digital pins 3 (0.04V), 7 (0.12V) and 8 (0.13V).
With the voltage regulator removed, I still get some stray voltage. On the power pins it's 0.4-0.5V and on the other side digital 7 and 8 are at around 0.7V.
I'm very confused as to why this is happening and I can only imagine it's some sort of electromagnetic effect I hadn't accounted for. I can't see any shorts and even if there were, it doesn't explain the behaviour.
PCB Description
A terminal block in the corner which takes 20V DC from a laptop charger. A 20V rail runs from there, 2/3 of the way around the circumference of the board taking power to motor driver headers. Other pins on the headers are Ground (2nd pin from edge of board, adjacent to 20V), 2 x relay actuating pins and a PWM.
Next to the terminal block is a 4-pin header for a voltage regulator which steps down the voltage for the Arduino. It's outputting 11.8V which goes to Vin.
https://www.amazon.co.uk/gp/product/B08CZBHLNH/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1
The bottom plane is 95% ground apart from a couple of sets of traces; two traces run from the middle of the H-bridge to the relay lines at 3 o'clock on the board, and eight run from the traces connecting the 10K resistors and the headers, diving underneath the Vin trace before reappearing to go into the PISO.
Other components on the board include a 3-pin header for an IR receiver; a 16-pin header for 8 reed switches, which are pulled down by 8 x 10k resistors and input to a PISO shift register; and an H-bridge made of 4 x NPN transistors (plus diodes and 1k resistors) to power the relay. None of IR, reed switches or motor driver cards were connected when the issues were noticed.


texts:
I am developing simple project of water level alert when water reaches to a certain level (adjusted by user) in inches.

Which electronic component i should use where user can adjust inches?

Like 5, 6, 7 .... 20 inches.

I have searched a lot over internet and found Potentiometer can be used for this purpose. But it is not accurate and depends of input voltage/current etc...

I need smaller component because it will be used in 3x3 inches circuit board with Arduino.


texts: Is this a SPST Off-(NO) N/O NO Latching Push Button Switch

texts:
I bought this from ebay

expecting it to be the style of switch that when you push the button it connects the circuit until it is pressed again then it breaks it, like a ballpoint pen..

instead upon testing it, its a keyboard style switch where the circuit is only connected when it is pressed..

Is this a mistake by the ebay seller?
i was advised on this type of switch by someone here, at the exchange :)

(i was in belief that the keyword here is 'latching')

Thanks in advance


texts: Altium Designer PCB Editor Set Component Reference Point Snap

texts: I am designing a PCB in the metric system however I have some imperial system components on the PCB. I'd like to snap one pad of that component to the metric grid, instead of the component reference point snapping. Is this possible?


texts: Current flow in step-up and step-down transformers of a power system

texts:
I have a question with respect to the current flow in step-up and step-down transformers.

AC transformers work only when an alternating current flows through the primary so as to induce current in the secondary.

So for all the different transformers located in different areas leading right up to our homes, there must be an AC current flowing through them at all times right? Does this also mean that there is AC current continuously present in the distribution lines at all instants?

Also, is the return path for these AC currents through the transformers one of the phases of the three phase power lines thereby not needing an earth ground?


texts:
Has anyone else had instances where an AVR just mysteriously stopped working after several months, but reprogramming it would bring it back?

I'm running a bunch of atmega328's in wireless sensor network.  I've now had 3 times (in about a year) when one of them has just stopped working.  I'll re-burn the program to it and it'll start working again.  It's not always the same unit, so it doesn't seem like it's a defective chip.

That seems like it would be a rather disastrous thing that would keep people from using AVRs, so it's obviously something about my particular circumstances.  I was just wondering if anyone else has run into it and might have some pointers.

I'm running at 3.3V off of batteries, so the voltage will sag too low to operate once every couple months and I have to replace the rechargeables.  The modules use sleep mode and the watchdog timer to sleep for 60 seconds, take a reading, radio it back to the base station and then sleep again.  The modules are arduino compatible, so I haven't flipped the "don't let me re-burn this" bit.


texts: How to find out whether this STM32 board can communicate through its USB port by default?

texts:
I am planning to upload a ready firmware to this STM32 board. And I need to use it through its USB port(which is also used to upload firmware through its ST-link interface).
Now I know that in Arduino board the USB port and the Tx/Rx pins are one and the same thing. So one can communicate with Arduino through its USB port without doing any modification.
Since I haven't dealt with STM32 in this way, I was wondering how can we figure out whether this has the same functionality. Meaning that can we by default use its USB port to communicate with it? Where in its datasheet or manual we can infer this?


texts: Ferrite or iron powder? How do I tell what an unknown core is made of?

texts:
Most times when I need a small inductor, I try to find the necessary core in my junk box. Depending on what I'm trying to build (RF, power, ...), a ferrite core or an iron powder core might be the better choice.

For completeness, ...

Magnetically soft ferrites, as used for today's RF or power applications, are sintered particles of, mostly, MnZn or NiZn compositions. (Wikipedia section about how they're made)
Iron powder cores are produced by gluing small iron particles together using epoxy resin or another polymeric glue. I've seen them pretty much exclusively as toroids. The main applications appear to be mains frequency input filters and PFC (step-up) stages at low to moderate frequencies, not so much SMPS transformers. One big advantage appears to be the fact that you can build toroids with an air gap distributed along the entire ring.

I am aware that many different types of both ferrite and iron powder exist (and it may be interesting to test them, too), and the differences do matter, but let's say I'm just hacking some proof-of-concept circuit and don't care about exact losses or saturation properties.

Still, I want to avoid really bad mistakes like using iron powder when I'm building an antenna balun. Some other time, an iron powder core may be just right and a ferrite core may be a bad idea.

Let's focus on simple toroids of different sizes, as a start, because this is what most iron powder cores look like.

Is there an easy and somewhat reliable test that tells you if your core is made of ferrite or iron powder?

Like winding ten or twenty turns of wire onto the core, carefully applying a rectangular voltage (low duty cycle, via a power MOSFET, using a freewheeling diode) to this inductor and looking at the point of saturation in the inductor current?

Or testing the inductor with a sine sweep up to some 10s of MHz in an appropriate circuit?

Also, can you sometimes tell just by visual inspection? For instance, are these color codes used by other manufacturers, too?


texts: How does oscillator frequency stability affect timing?

texts: If, for example, a crystal oscillator is specified as +/- 100ppm what does that mean? That the exact frequency is uncertain to that degree, or that the frequency varies by that degree over normal operation? Also, does that automatically imply that any timing based on it is inaccurate to the same degree?