texts: How should I change the R and C values in a snubber circuit when I change motors?

texts:
I am using a triac circuit to convert a 3 speed motor into a fully variable speed motor.  The triac circuit I’m using is one I lifted from another motor which is already a fully variable speed motor.

The characteristics of the 3 speed motor are different than the variable speed motor, and my question is how can I adjust the snubber circuit R and C values to better match the characteristics of the 3 speed motor.

More detail as follows:

The three speed motor is a PSC 120V, 60Hz, 1.1 Amp motor.  There is a dial to adjust speed between Low, Medium and High.  The main motor winding has three different taps that the hot wire connects to, one each corresponding to the Low, Med and High speed settings. When I have set this fan up for variable speed control with the triac circuit, I have the dial switch set to the highest speed setting.

The variable speed motor is a PSC, 120V, 60Hz, 2.5 Amp motor.  This motor is controlled by a triac circuit, with a variable resistor to adjust the speed of the fan.  The control circuit for this fan is shown in Figure 1.  I am using the same circuit to control the 3 speed fan – everything the same, except a different motor.  The Triac is an ADT25C80H.

Figure 2 shows the voltage profile across the variable speed motor for a half cycle at lowest speed.  You can see that in the first quarter cycle, which in an ideal world would be fully off, the voltage gets no higher than 25V (each division on the chart is 50V).

Contrast this with Figure 3 showing the voltage profile across the 3 speed motor for half a cycle at lowest speed.  You can see here that in the first quarter cycle when the voltage should ideally be off, the voltage across the motor actually gets quite high – approaching 60V before the triac switches on.  This has caused the motor to spin at a higher RPM at lowest speed than I was expecting.  I’m guessing this is due to the snubber circuit R and C values not being optimized for this lower power fan (1.1 Amp vs 2.5 Amp).

So back to my question: How should I adjust the snubber circuit values (R2 and C2 in Figure 1) for the 3 speed motor to get the first quarter cycle of Figure 3 looking more like that in Figure 2 (i.e. closer to being “off”, not approaching 60V)?  From what I have read about snubber circuits, the 18 ohm resistor (R2) in my triac cct is on the lower end of what is typically used, and the 0.47uf capacitor (C2) on the higher end. Should I use a higher value resistor? lower value capacitor? if so, by how much?

Pls let me know if there is additional information I can provide that will be helpful (note: I don’t have a meter to measure the inductance of the 2 different motors).

Thanks in advance for the help.


texts:
The questions I have:

Is the makeshift IC I use in the simulation a fair representation of the INA200?
I assembled the circuit as shown in the picture (except for the current source and the LED) and I'm trying to get a response to prove that what I put together works but so far I was not able to see any response at the output (CMPout pin 6)
If things start working the way I intend them to do, how can I tune the system to trigger at different current levels?

I'm currently trying to make a circuit which detects a raise in current using a shunt and an INA200.

Here is a picture of the circuit:

I was using a makeshift INA200 for the simulation.

After putting it all together I realised that the INA200 was not responding to any given input on pin 7/8.

The configuration I was using:

8V (Vs)
connected to 3.
connceted to 2.
GND
open
to 1N4148
shunt high
shunt low

Instead of the LED I was using a wire resistor and I was manually increasing the voltage to see if at any point the INA200 would trip and output ~7.7V but I was unable to do so (or to see it?)


texts: AC Load Detection with auxiliary power supply

texts:
Is it possible to detect a load in an a.c. circuit before switching the main power supply supply on?
Perhaps by using an auxiliary circuit which has it's own power supply, like a multimeter?


texts: Choosing resistor values for a 555 timer

texts:
I have to design a frequency counter using a 555 timer as a pulse generator. I included a schematic for part of the circuit, but this is my first time using a 555, so I also included the original circuit that it is based off, just in case I didn't translate it correctly. As shown, the values for \$C\$ and \$C_1\$ are \$1µF\$ and \$.1µF\$ respectively.

simulate this circuit – Schematic created using CircuitLab

We have an equation for the frequency

$$ f=\frac{1}{T}=\frac{1.44}{(R_1+2R_2)C}$$

And one for the duty cycle

$$ D=\frac{T_{H}}{T} (100\%) = \frac{R_1+R_2}{R_1+2R_2} (100\%) $$

I was assigned a value of 90% for \$D\$ and a value .1s for \$T_{H}\$. Using these values in the duty cycle equation I find \$T=\frac{1}{9}\$. Then using the equation for frequency I get the following relationship $$ R_1+2R_2=1.6\times{10^5} $$

Does this mean I can make \$R_1\$ and \$R_2\$ any value as long as they obey the relationship described above? My instructor gave us potentiometers and I think we have to somehow incorporate those in this part of the circuit. So should I pick a value for \$R_1\$ and adjust the potentiometer to the appropriate value for \$R_2\$?


texts: 9V DC dual polarity supply from 12V DC source

texts:
I have a headphone amp/splitter device that runs from a 9V AC, 750mA wall wart.

I would like to get the device running from a 12V DC supply.

I have taken a look inside the unit and it basically splits the 9V AC supply into +9v DC, -9v DC and 0V before it goes into the main circuitry.

I carried out a simple test with 2 9V batteries wired to create a dual polarity supply and it works fine.

I don't want to run it from 9V batteries so I need a circuit to provide a 9V DC dual polarity supply from a single 12V DC source. I would use a ICL7660 to create the dual dual polarity but I don't think it will be able to pass enough current for the amp.

I did think about stepping up the 12v to 24v then using a simple resistor divider to get +12V, -12V and ground then running each supply through a 7809 and a 7909. Would that work?

Is there a cleaner/better way to get this amp to run from a 12V DC source?


texts:
I found a very basic AM transmitter circuit on the youtube video here.  The schematic is below:

I'm a bit confused on the op-amp circuit on the right.  It seems that the op-amp is really only taking the difference between the message and carrier signals - not multiplying them together like it should be doing.

I'm not at all convinced that this part of the circuit is a frequency mixer.  Am I just crazy?


texts: Help needed with resistor value for charging NiMH batteries

texts: I have an old calculator which contains 4 2/3 AA NiCd batteries in series. These batteries are very old and need replacing, so I'm going to replace them with 4 2/3 AA NiMH batteries in series, which have a capacity of 600mAh. The power supply is 6VDC and I want to charge the cells at C/10. What value of resistor would I need to use?


texts: High Power LED and relay with the same power supply

texts:
I'm rebuilding optical printer (the machine which does Super8 to 16mm film blow-up) and designed new electrical circuit for it so I can control it with Arduino (or maybe later with Raspberry Pi). There are High Power 10W LED  controlled by Arduino PWM signal (to expose the film), 3 Relays (each works with 5V and switches 110V circuit inside the Opt.Printer) controlled by Arduino's Digital pins and 5V Servo Motor (in diagram it wrongly said Stepper motor, sorry) controlled by Arduino as well.
I decided to use one power supply for the entire circuit except for Arduino (it's powered via USB and communicate with computer via serial protocol). I'm going to use a wall wart which has 15V 0.84A because I couldn't find LED driver to power my LED 10V 10W. So for that case I pulled down the current and voltage from power supply with R 6.8 Ohm so it won't fry LED. Then with 7805 the original voltage is converted to 5V which is used for relays and Servo Motor. My doubts are if I designed it right or not because of sharing the same power supply within entire circuit.
The working cycle of circuit consist of 2 steps:
1) All relays switched on and no power to LED neither to Servo
2) relays are switched off and LED with servo motor are powered for ~1 sec.

The parts of circuit are:
3 x relay 5v
1 x Darlington ULN2003A
1 x MOSFET n-chanel IRF1010E
1 x 7805
1 x Resistor 6.8R
1 x Power LED 10W (10V, max. 1050A)
1 x capacitor 46uF

Power Supply Wall Wart 15v 0.84A
the ground of Arduino and Power Supply are connected

Thanks a lot.
and sorry for my electronic amateurism


texts:
I am trying to figure what is with my broken power adapter (230V AC -> 12V + 5V DC at both 2A).

After checking the fuse, now I extracted two heavily cooled diodes, which could be the cause.
But I simply can't figure out what diodes that are.

They are standard shaped (black cylinder, one end has the silver mark), 9mm long and 5 mm diameter, the connector wire is 1.1 mm diameter.
On it I find two lines:

SR   8D

SB 54.0

I have performed some quick measurements, which are confusing me.
I found a 3300 ohm resistor and plugged them at 2.7V. The voltage drop at the diode was 0,16V ( 2.7V if reversed)
With another 220 ohm resistor it was similar.

Maybe the resistor values I am using are too high (the voltage is too low) to make useful tests...

How can I find out if they are OK or broken, and what type of diode do I have here?


texts: Why do all soldering irons have long barrels? Even temperature controlled ones? I can understand that it helps regulate the temperature of a tip if the heating element emits a constant power of heat. But I need to solder a 0.4mm pin pitch device and I'm guessing the stubbier the barrel the less shaky the tip will be when I hold it. If I were to make my own soldering iron, is there any reason not to have the tip close to the handle?


texts: I am looking to control a 12v LED light off of a zwave appliance module.  Here is my issue, the zwave module outputs about a 5v pulse every few seconds while in the off state, which is enough to momentarily turn on the lights.  I put a relay inline, but the 5v is enough to charge the coil and switch the relay on.  How can I create a buffer so only when 10-12v is applied will the circuit be complete?


texts:
I am trying to use the oscillator described in "Experimental Methods In RF Design" book page 4.9 fig 4.13 C. I have attached a drawing here. Sorry for the bad drawing. The values inside the brackets are actual values that I have used in my circuit. Now the problems are:

Whenever I bring my hand near to the oscillator, its frequency changes considerably. This is very annoying. How to stop that? I know this is due to the capacitance of my body, but there must be some way to stop this as professional designs does not behave like this. There must be some standard way to stop this.
I don't understand how to take the output from this oscillator. I tried two points marked A and B in the circuit. If I take the output from point A, then it shows harmonics as seen from my scope picture. How to stop these harmonics?
If I take the output from point B, then it looks OK but the frequency again changes considerably. So how should I take the output from this oscillator?

Also I need suggestions about a buffer amplifier for this oscillator.

Output from point A:

Output from point B:


texts: How do current limiting resistors work between ICs?

texts:
In a simple battery+resistor circuit with a fixed voltage, the resistance of a series resistor determines the current flowing through it.
But what happens if this resistor is placed between two ICs? (for eg a microcontroller and a motor driver IC - specifically an Arduino and an L293B).
Can the current through the resistor be lower than the calculated value for the resistor and the voltage of the circuit (regulated 5V)? (Example: a 1K resistor would allow through 5mA of current in a simple 5V circuit, but what happens if it is placed between two ICs which use a lower level of current for communication, like 1mA or less?)
Does the resistor have any effect if currents are lower than the current calculated for the given voltage level? Is there any power dissipation (wasted energy) when a resistor is in the path of a current lower than the resistor’s current calculated from voltage?
Finally, is it generally a good idea to place resistors between an IC output and input (for the purpose of protecting the microcontroller's output from sourcing too much current)?


texts:
Recently I got my hands on a small amplifier board containing two TEA2025 ICs. Not sure what had it been used in previously, but the sound was acceptable, at least when removing some resistors that seemed to lower the level too much. I wanted to use both of them in bridge mode to independently drive 2 channels at max 5W each, but the IC's were set up in a weird way: one in stereo mode, the other one in bridge mode. I tried to rearrange the components around the stereo one to form a bridge config, but gave up, as it was simply a RPITA. Not only it was quite difficult to make the required connections, but there was also a sprawling network of capacitors and resistors, the sections of which seemed to differ quite a bit between the two amps. (I suppose it was for filtering and attenuating the signal, stuff which I know NOTHING about).
So after a while I gave up, desoldered the amps form the board, and moved one onto a piece of perfboard, mostly according to the bridge mode circuit from the datasheet TEA2025 Datasheet(PDF) 3 Page - STMicroelectronics. I had to improvise a bit with the ceramic cap values - there are two 100nF ones in parallel on the input instead of a single 220 nF, and the 150nF ones on the output are replaced with 220nF ones. Testing it reveals some flaws:

There is a small DC offset on the output (about 0.19V) which wasn't present in the original config

The amp produces a variety of noise, mostly ~50Hz buzz (doesn't sound like a sine wave though), but also a little bit of what I guess is oscillation when an input wire (ONLY wire, no actual input) is connected. The noise seems to mostly cease if I touch the ground tracks with my finger or connect an input. Ground loop?

Even at comparatively low levels the output is quite loud. I suppose that resistor network existed for this reason, but by what principle was it designed?

The output seems less pleasant to listen to than it was on the original board - some filtering needed or something?

All testing was done with a floating 12V linear power supply. Here are pictures of the board:


texts: How do I apply PWM signal to the primary side of a transformer to get synthesized sine wave at the secondary side?

texts:
I'm trying to obtain a sinusoidal signal (\$f_{sin}=50Hz\$) by using a ferrite transformer. I am going to apply a PWM signal at the primary side (\$100kHz\le f_{PWM}\le300kHz\$). I'm going to use one (or two?) H-bridges for driving the transformer. What kind of circuit topology should I use for applying this PWM?

I have three choices in my mind, but each one has its own flaw from my point of view.

Choice 1

At this first scheme, PWM signal is applied in one respective direction for obtaining each positive and negative cycle of the sine wave. My concern is the DC bias on the windings that may saturate the transformer core or make it work near saturation point.

Choice 2

The primary voltage swings between the positive and negative values. My concern is, lots of energy will swing (be wasted?) between the secondary windings and the LC filter during the zero-crossings of the sinusoidal wave since the duty cycle of the PWM will be around 0.5.

Choice 3

Similar to the first one. I have to use two H-bridges and more window area of the transformer because of the extra primary windings.

Which of these topologies are problematic? Are there any other topologies commonly used? When to use each one?


texts: Why does the data sheet for A1362 have conflicting procedure to program sensitivity?

texts:
This data sheet shows two different ways to program the sensitivity of the A1362

on pg. 18 2nd paragraph under "Hold Mode" says "Powering the VCC supply automatically causes the device to enter the first zone. Applying a high pulse, mid pulse, high pulse sequence selects the Sensitivity register. The sensitivity can be set to the desired value by applying the appropriate code pulses."

Contrary to the quote above, a state diagram on pg. 20 shows a different way to enter Zone 1.  Specifically, the diagram below shows you should power ON the device and apply a Vph pulse to enter Zone 1.   However, the 2nd paragraph on pg. 18 says simply powering it on causes you to enter Zone 1.  This is conflicting and I'm not sure how to start the procedure.  How do I know which one is correct?

Is it possible the quote from pg. 18 is referring to Hold Mode only, whereas the diagram is referring to Blow Mode?

If someone could identify which voltage pulses get me into Hold Mode vs Blow Mode I would really appreciate it.

Ultimately after testing in Hold Mode, I need to set both the sensitivity and offset.


texts: Interfacing MAX7219 with Bus Pirate v3.6

texts:
I am currently trying to interface a MAX7219 LED driver with a Bus Pirate 3.6 (Firmware v5.10 (r559)  Bootloader v4.4).

I have the following circuit breadboarded (along with some decoupling caps on the power rail):

I have set up SPI mode as such:

Set speed:
 1. 30KHz
 2. 125KHz
 3. 250KHz
 4. 1MHz

(1)>4
Clock polarity:
 1. Idle low *default
 2. Idle high

(1)>1
Output clock edge:
 1. Idle to active
 2. Active to idle *default

(2)>1
Input sample phase:
 1. Middle *default
 2. End

(1)>1
CS:
 1. CS
 2. /CS *default

(2)>2
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)>2
Ready

Putting the MAX7219 into test mode and turning it off using [0xFF,0xFF] and [0xFF, 0x00] respectively turns all the LEDs on and off as expected. Restarting everything, I then run the following commands to disable character decoding (to use the MAX as a simple LED array drive), set maximum brightness, enable all columns, and finally enable the display:

[0x09,0x00]
[0x0A,0xFF]
[0x0B,0x07]
[0x0C,0x01]

Finally, sending the following eight commands to enable all LEDs akin to what test mode would do does not have any effect, and no LEDs light up;

[0x01, 0xFF]
[0x02, 0xFF]
[0x03, 0xFF]
[0x04, 0xFF]
[0x05, 0xFF]
[0x06, 0xFF]
[0x07, 0xFF]
[0x08, 0xFF]

At any point, I can set or reset test mode and it works as expect, so I'm convinced that SPI communication integrity is not the issue here.

I have tried this with both 5V and 3V3 levels for VCC, with the same results. Any ideas what I may be doing wrong here?


texts: How do I treat this "lamp" to find power dissipated?

texts:
This is my circuit. I need to find the power dissipated by Vlamp. So the lamp turns on if the Vlamp is more than 2V. When the lamp is on it has an internal resistance of 10 Ohms, and when it is off it acts like an open circuit.

How would I find the power dissipated? I know how to do it for Voltage sources and Resistors, but not elements like these.

One more thing, I already figured out that:
Battery has open circuit voltage of 4V
R1 = 5 Ohms
R2 = 5 Ohms
k = 0.2A/V
When lamp on and Vlamp = 2V, Rbat = 10 Ohms

.


texts: Bluetooth Receiver Board - Noise Problem

texts:
I recently bought a bluetooth receiver board in order to add bluetooth to my car, this however is not as easy as I thought. I am not very skilled with electronics.
I have an aux audio input in my car so all I needed to do was connect a minijack cable to the bluetooth board, but when I do this there is a lot of noise. Other than the noise, the sound is very good. I have checked that the connection is correct in terms of which wires in the jack cable is which (yellow = gnd, red = right, white = left)
I'm not sure if the problem is a ground loop or something like that.

Please help :)

I have connected my jack like this:

Bluetooth Board:
https://www.amazon.de/gp/product/B07N8N21M1/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1


texts: A Problem dealing with Cache memory on a computer

texts:
This is Problem 13-3 from the book "Logic and Computer Design Fundamentals" by M. Morris Mano and Charles R. Kime. I believe I have the answer right for part a and part b. That is, they match the website. However, the website is for the 5th edition of the book and I am using the 4th edition.

Problem:

A computer has a 32-bit address and a direct-mapping cache. Addressing is to the byte level. The cache has a capacity of 1 KB and uses lines that are 32 bytes. It uses write-through and so does not require a dirty bit.
(a) How many bits are in index for the cache?
(b) How many bits are in the tag for the cache?
(c) What is the total number of bits of storage in the cache, including the valid bits, the tags and the cache lines?

My answers:

(a) The number of lines (or blocks) in the cache is 1024/32 or 32. Hence the size of the index in the cache is 5.

(b) We need 5 bits to specify the location in the block. Let \$t\$ be the number of bits we need to specify the tag. This gives us the following equation:
$$ w + 5 + 5 = 32 $$
Hence \$w = 22\$.

(c) The size of the cache memory is \$1024 * 8\$ or \$8192\$ bits. Now for each line (or block) we need \$5\$ bits for the tag and \$22\$ bits for the index. We also need \$1\$ bit for each block to verify that the block is valid. \$M\$ is the number of bits needed for the entire cache.
$$ M = 8192 + 32 ( 5 + 22 + 1 ) = 8192 + 32(28) = 9088 $$

However, the 5th edition of the book reads:
$$ 32 × (32 × 8 + 22 + 1) = 8928 \, bits$$

It looks like to me they are not allocating space in the cache for the tag. I believe you have to store the tag. Am I wrong about that?

Updated Answer:

Given that a block is in a particular part of the cache, we know 5 bits of the
address. Hence we do not have to store those 5 bits. Hence the answer is:
$$ M = 8192 + 32 ( 22 + 1 ) = 8192 + 32(23) = 8928 $$
Is my reasoning right?


texts: Shift Registers Controlling Seven-Segment Display without a Latch?

texts:
I'm restoring a Model H Skee-Ball machine, and these old models have a bunch of hardcoded settings and unreliable switch detection, so I want to replace the main control circuitry with something Arduino-based, but keep the other circuitry, like the seven-segment display circuitry.

So I've been analyzing the schematics, but I'm confused about the display circuitry.  The schematic for the display is below, and here is the full set of schematics for the whole machine: http://arcarc.xmission.com/PDF_Misc/SkeeBall%20Model%20H%2002.pdf

I've never worked with shift registers before, but the impression I get is that for a display application, there needs to be a latch.  This blog post was very helpful to me: http://www.sqlskills.com/blogs/paulselec/post/arduino-cascading-shift-registers-to-drive-7-segment-displays.aspx

The display circuitry uses 74C164 shift registers.  I'd post a link to the datasheet, but I'm not allowed more than two links since I'm new.  Anyway, the 74C164 doesn't have an internal latch, and I don't see any latch circuitry in the schematic.  The ULN2003A is just a transistor array to power the lights of the display as far as I can tell.

Can someone help me understand how this circuit works?

EDIT: follow up, let me show where my main point of confusion is.  In the datasheet for the 74C164, it shows an example waveform.  Here's the example:

It seems like the chip just passes through the data signal, but time delayed on each output.  Because it doesn't latch, I don't see how it can work for the Model H display circuit.  Every segment should get the same signal, just time delayed.

EDIT2: Is it possible that the chip sending the data only sends a clock signal while it's sending data?  Would stopping the clock effectively latch the outputs?


texts: Are the two wires in a telephone cable swappable?

texts:
I am in Switzerland.
Our landline is delivered through an unshielded twisted pair cable.

Are the wires in the pair swappable ? Or does it have a polarity ?
The lines is supposed to provide ADSL without POTS. POTS is now deprecated here and the service is no longer available at the telephone socket directly.


texts: How to drain 500mA constantly from a single USB port

texts:
So I've seen a similar thread to this asking how to get 1.8A out of a single USB port. I've got so far as to know that this isn't possible.

But my question: How do I manipulate the communication between the USB device and the USB Host to make the host constantly put out 500mA?
I know that it goes up in 100mA steps but without communication it also stays there. At 100mA.

What do I need this for? Well I'm trying to make my Pringles Speakers USB powered.

Has anyone out there got a solution at hand?

Best regards

EDIT: Well I guess it will be kinda helpful if I do add some more information.

The Pringles Speaker I'm trying to get USB powered usually runs with 3 AAA batteries at 4.5V. I am using a standard USB wire I had spare and did cut open. Attached everything they way it should be attached.
When I now plug the USB cable into my USB slot the Speaker drains power. But it seems like the power isn't enough because the sounds emerging from the speaker are kind of... scratchy. They usually do sound the same when the batteries get low.

So I tried to plug in the speaker in my smartphone charger (5V at 1A). Then it worked like a charm.

Could the possible solution be to use a Y-cable?


texts: VHDL-AMS simple code but std_logic_vector to quantity issue

texts:
I am working on a Mixed signal model where the symbol looks like the following,

The signal to the left is count_val which is std_logic_vector(7 downto 0) and p,m are the terminals which have qunatities voltage v and current I.

Its a very simple code where we have to use the count_val to calculate the current i.
In simple terms it should be like this,
I == 0.00003 * count_val.

But since count val is std_logic_vector and I is a "quantity" which is analog this makes the above formula hard to implement. I tried to convert the count_val to an integer type and use it in the forumla but still no luck and the forumula 'I == ' accepts only quantities in it and not signals or std_logics . Is there a way to crack this issue ?

The overal block diagram looks like this and at the bottom where the contolable current sink is, is where I am stuck as I am not able to controll the current sink with the counter due to the above mentioned reasons.


texts: USART on STM32F411 reads junk after MCU wakes up from STOP mode

texts:
I am working on a board that uses an STM32F411 connected to a bluetooth module over USART. One of the goals is to enable Low-power consumption in STOP mode.

A brief summary of the platform:

The Bluetooth module can wake up the STM32 using an EXTI interrupt when it has data to send.
I have an interrupt handler to handle the interrupt in (1).
The STM32 enters stop mode in the RTOS's idle thread once it detects that no threads are interested in keeping the MCU awake.

I am able to get the processor into Low Power STOP mode. However, when the Bluetooth module wakes up the MCU to commence data transfer, the MCU picks up junk data over the USART.

I have tried using the alternate function of the USART RTS gpio - I set it high so that the bluetooth module cannot send any data over the USART until I am ready. In my ISR, on receiving the Bluetooth interrupt, I signal a thread to re-initialize the USART at the same rate that it was receiving data at, prior to STOP mode.

I am not sure why the USART is behaving in this manner. As per the documentation, the configuration in STOP mode is required to be preserved across the low power mode.

I would appreciate some pointers for debugging this issue. Thank you in advance.

Please let me know if you need any more information.

EDIT:
Found out the cause of the issue.
When the processor wakes up, the uart has already transferred/lost some data; because of this, the handler for the data gets corrupted bytes. The solution that I finally used involved setting the RTS to HIGH prior to sleep; when the processor wakes and is ready to accept data, it pulls the RTS low and reconfigures the pin as a UART pin. This fixes the issue.

Thanks for your suggestions.


texts: Reasonable resistor values for voltage divider

texts:
I'm getting an unexpected voltage from a voltage divider I created. Is it likely that the resistor values are too high to provide enough current for my multimeter to measure accurately, or do voltage dividers behave unexpectedly with high resistor values?

I'm trying to measure the voltage of the battery but I need to bring the voltage down to below 3.3V as that's all the analogue input of my MCU can tolerate. I created a voltage divider as above. I expected it to reduce the voltage to 1/11 of the battery voltage (~0.67V) but my multimeter is reading 0.35V. I'm wondering if 100K is too high and it's not providing enough current for my multimeter to do it's job. Also interested in any other suggestions. I could reduce the resistor values if that's likely the issue but understood that lower values result in more power consumption.

Thanks!


texts: Raspberry-pi using hardware resistor, need schema confirmation (newbie)

texts:
Good morning,

I learn electronics from raspberry-pi hardware. I realized the following diagram to help me understand 'PULL-UP' using the internal resistor to the hardware.(Python code here)

Could someone just confirm that I'm not mistaken somewhere and that my next schema is valid ? Thank you for your time and your indulgence (I just start with two three bases)


texts: I am wondering what kind of table that is, is that perhaps a state table? I am not sure what \$q_1\$ and \$q_2\$ stand for. They don't look like next state functions since these are denoted \$q^+\$ in my book.


texts: LED display Atmega - Running out of output pins

texts: Seems like I am running out of I/O pins. I only have 6x 8bits pins (need 8 with multiplexing), and I want to power 5x 8 by 8 and 2x 7-seg displays. I don't want to use another ic. so is there a way?


texts: Through hole solder pad dimension rules?

texts:
Is there an electronic rule or just a rule of thumb regarding through hole solder pad dimensions?

That is, if I have a 0.025 inch diameter drill hole (suitable for 24AWG wire), what should be the total diameter of the solder pad?
This is to have an appropriate surface of pad to solder on for both good electrical and mechanical properties.

What ratio should I use?

For example, x2 or x3, would give a total diameter of 0.05 and 0.075 inches respectively.
Or I can try to have the same surface between the drilled hole and the soldering pad. Doing some math, that would mean taking a sqrt(2) ratio.
However, that looks (at least visually) a very small surface.

Any suggestion? Or even pointer to material for good PCB design practices where that can be explained?
Thank you.

Best regards,


texts: See my prototype electronic board w/connectors. Is it acceptable as a commercial product by Western standards?

texts:
Does this prototype meet a commercial standard for acceptability--knowing that it is a prototype?  In other words, will my Western (USA) customer be upset when he sees it, or will it go by unnoticed as another purchased product?

This PCB board always receives a TTL signal when powered on, so no need for resistors (I believe).

A five volt DC power supply sends power to the capacitor and the capacitor to the ICs.  The power cable comes in the DB15. The TTL signals (2 of them) come in the DB9.  The output goes out the BNC.

The two ICs are side-by-side, is this too close?

The connector for the BNC uses two wires and the remainder were severed.

The plastic enclosure was purchased at the electronics market.


texts: FreeRTOS for Atmel's SAM Cortex-M3 Switch between tasks

texts:
I'm playing with FreeRTOS on an Atmels' Cortex-M3 mcu and I was wondering how can I switch from a current task to another irrespective of its priority.
To be exact: I send data to one of mcu's USART port. I have enabled the RX interrupt and I wrote the appropriate UART_Handler. The handler fills a buffer one by one byte. When the handler reads '\n' I want to call the task which prints this buffer.
How can I do this? I tried with taskYIELD but nothing worked.
Any hint with this?

EDIT: I forgot to mention that I'm new in RTOS development. I haven't tried it before.


texts: Does anyone have a good idea on how I could raise the voltage from a 12v car alternator to 48v dc for use in a 48v wind system? Could I put a dc negative voltage of 36v into the regulator field sensing pin to trick the regulator? Can I somehow switch out the voltage regulator for another one or change how much it regulates it to?


texts: Does the formula v=Ldi/dt apply to materials with zero resistence, such as superconductors?

texts: I've been trying to find information about the formula \$ v = L \cdot \frac{di}{dt} \$, it seem to have something to do with voltage drop, and I know voltage drop is caused by resistance, so would a material with zero resistance still have weaker levels of induction with higher frequencies of changing current?


texts: Will this battery pack for an LED strip need a resistor?

texts:
I want to use a small battery pack to power a strip of LEDs from Radioshack.  They didn't have the power supply but list the requirements as 12VDC/1.5A.  I know 8 AA batteries will provide 12 volts but I'm less certain how they will react to the 1.5 amp draw.  We put 8 new alkaline batteries into a battery holder and did a quick non-solder test and the strip did light up nicely but the battery pack started to get warm even though we only had it connected for less than a minute or so. The plan is to solder a 9-volt type connector to the strip so it will be easy to connect/disconnect the battery pack instead of some type of switch. I know that I can add a current-limiting resistor inline with the wiring but I'm not sure what value to use. The strip looks like it has built in resistors so I'm at a loss as to what size resistor to try.
The project is really just a short-term way to decorate a french horn for a school concert. My 15-year-old daughter can just connect the pack when the performance starts and then disconnect it when it is over. My concern is I don't want her to have the battery pack overheat during the performance. I don't care about how long the batteries last, this is a one-time use.
Maybe another way to ask this is, what is causing the battery pack to heat up, the LED strip drawing excessive current or some other reason?
I'm not trying to use rechargable batteries or build a charging circuit, just simply light up the instrument during a concert but safely.
[EDIT]
We did a test using the battery pack and after 30 minutes we couldn't detect any noticable dimming and the battery pack was still around 90-92 degrees F, tested with an IR thermometer.  I told her she can just leave the pack in her lap and if it gets too hot to unhook the connector or remove a battery.  She plans on taking an extra set of batteries with her as replacements for when the first set run down.  My guess is that we previously had shorted the battery pack accidently which caused the temp to spike but now that the wiring has been connected properly we are seeing more typical behavior heat-wise.


texts: I have capacitors of 100uF, 10uF and 1uF; and need a series circuit with these capacitors to form a 0.1uF capacitor, is this possible?


texts: J-Link programmer in Windows 8 don't work

texts:
I use the J-Link programmer in Windows 8. A few days ago, my programmer hanged and the LEDs stayed silent, and I, with the help of the Internet, was again using the SAM-BA software to install the appropriate firmware for it.
Because of the problem with running SAM-BA on my laptop, I had to install it on my co-worker laptop.
This programmer works on my co-op laptop, but on my laptop, flash v4.7 detects it and runs the program on it, but it does not run after writing the code. shown below:

and with the click of the flash download, which puts the program on This is the message below:

Error: Flash Download failed  -  "Cortex-M3"

The point here is that the program works on my co-worker's laptop, and with the same settings on my laptop I do the erase flash, but in the programming  flash, it dosesn't work. shown below:

I reinstalled Kell and j-Link software, but I did not.

my windows drivers are like this:

I wonder where the problem is? !!


texts:
I tried to solve the question but my answer seems to be different from that in the text( according to which answer is -30 V). please help me solve it.

This is what I did

V+ = V- = -2 V

(-2 - V0)/(8K) = 0.1mA

Thus

V0 = -2.8 V


texts: Optical displacement sensor noise and current to voltage conversion

texts:
I'm currently involved in a project with the aim of measuring the tremor of mice limbs (displacements of about 100 um). The sensor my group has chosen is TCRT5000 (Vishay), but we are facing several problems:

We don't know which is the best configuration to convert the collector current (output) into a voltage signal that can be firstly conditioned and then sent to a microcontroller (a PIC for instance).
We don't know which resistance we have to consider in order to calculate the thermal noise and thus the sensor's resolution.

Thanks in advance. Below you have the link to the datasheet.

https://www.vishay.com/docs/83760/tcrt5000.pdf


texts:
I am currently experimenting with some motor control circuitry for my garden train. I have spent several time trying to read up on the basics of motor control, and I have also done some prototyping. I have finally settled on a design, but I have a few different questions that I would appreciate if someone experienced could help me answer.

The question consists of two parts: (a) a system overview and (b) a few questions regarding the design. I am aware that this is a composite question, but I couldn't find a meaningful way of splitting them.

System Overview

The idea is to build a simple garden railway control system. The garden at hand is a small one, remotely placed. The only source of power will be the batteries that I bring. The layout is also to be automated over time, but for locomotives will be manually controlled, likely via a radio link.

Figure:

The track will be used as a power bus: a LiPo battery or two car batteries in series will be connected to the rail to provide power to all rolling stock, and in the future, lamps, switches and so on.

Locomotives will be picking up power from the track, but will receive motor commands via radio. In the future, the locomotives will hopefully be fully automated.

Loco Control

Each locomotive will be equipped with a small control circuit. The purpose is to both be able to drive the DC motor, as well as control the drive. The driver is centered around a H-bridge circuit (the L6202), and the control around an microcontroller (the ATmega328).

Figure:

As it is unknown how the locomotive has been placed on the track, a rectifier is first in line to give us a DC power line initially. This power is then fed into two different voltage regulators. One is to support the ATmega328 and whatever radio solution that will be chosen, and the other ons is to support the motor driver.

Questions

Now that I have explained the complete system, here are the questions:

The voltage regulator for the microcontroller (LM2937) will need to reduce the voltage from approx 20V DC to 5V DC. I am guessing most of it will be turned into heat. Is there any way to avoid this?
The microcontroller won't draw much current, but the motor will, and I guess there might be noise and transients from starting and stopping the motor. Do I need to protect the microcontroller (or its voltage regulator) from this? If so, how?
How can I protect a LiPo from short-circuits or other problems? I don't want any LiPo fires.

I guess those are the most important questions. I have lots of shorter questions, but I think the big questions. If you spot any other problems or improvements, please let me know.


texts: Mecrisp-Stellaris Forth on TI Tiva C LaunchPad

texts:
I'm currently trying to load mecrisp forth on a spare tiva c series launchpad (TM4C123) board I have at home and am not having much success. I'm an electrical engineering student and while I've programmed boards using IDE's such as crossworks before I've never done so from scratch. I have the board hooked up via USB, and have attempted programming the board using TI's LM Flash programmer but haven't had much luck. I guess I'm hoping for a general understanding of the programming process and any gotchas people are aware of that might cause issues.
As I understand it I do the following.

Download mecrisp stellaris
Program my board using USB and a TI utility
Connect to the Forth interpreter via TeraTerm

Any help would be much appreciated!
EDIT: In particular I appear unable to program FORTH onto the microcontroller and establish a connection via serial terminal to the programmed device. I am unsure if it is due to an error in programming the device or a serial connection problem. My question was broadly posed in an attempt to cover any basic errors I might be making. Ideally a simple getting started tutorial would be available but after reading through the mecrisp documentation and extensive googling I am unable to find an example for my specific board.


texts: Internal resitance of a battery and SOC related?

texts:
How do you find remaining SOC of a battery, say 12V 100 Ah? Is it possible by monitoring internal resistance of the battery? Or is there any better way (logic wise) used in industries?

I'm using an 8 bit controller and using 12 bit ADC peripherals on it. I will be monitoring battery current and battery voltage continuously.

How would you guys do for a such a trust-worthy system which could point out how much SOC is left in your system after a certain amount of time?


texts: Is it possible to generate RF to then harvest instead of just using background RF?

texts: I know you can harvest background RF using energy harvesting techniques but this only generates a small amount of power. Could you put a RF emitter close to an energy harvesting product to get more power. If anyone has any links to research on this, I would be very grateful.


texts:
My problem is in the VA, VB parts is the previous circuit equivalent to this (OPTION A):

Or to this (OPTION B):


texts:
In some applications, such as dynamo-powered bicycle lights or torches (the old-fashioned ones with a metal barrel) the mass is truely integrated in the circuit. That is, the wiring does not form a closed circuit with reference to the mass, but the metal of the housing is used as conductor for considerable lengths. See also the circuit in the right below (taken from fig. 2b in the answer to this question) where the volt-meter could have been a lamp or anything else.

Is this good practice, or advisable only in such exceedingly simple circuits? Is it safe to have stronge currents freely floating through the mass? What considerations exist not to do this?


texts: I'm programming a MSP430f6638 via JTAG interface, specifically i'm using TS430PZ100USB kit, and I'm trying to write a FAT16 file in an SDCard so I'm using the FatFs modules to make the system file, the thing is that this module has a couple nested functions, so when i initialize the project i realize the stack has reached its full capacity which (according to IAR Workbench) is only 160 bytes long, when I check the datasheet I can't find exactly the capacity of the stack but RAM is 16kB long, is divided in four sections of 4kB so the top section should be the one where I can find the stack, I don't think an MSP430 has such a small stack, this a common enough high level application. If anyone could give me an answer.


texts: Make a tea mug heater with a USB power source

texts:
For a school project, I have to make a mug heater which draws its power from a computer's USB port, such as this one. I don't mean one that boils the tea, but one that keeps it warm-ish, at at least 40 degrees. Apparently, a USB port can give 500 mA at 5 Volts, which gives me at most 2.5 W. At first, I thought this wasn't nearly enough for a heater, but then I decided to experiment.

I decided to forget the rest of the circuit and pretended that the heating element could take all of the 500 mA. The best thing I could get my hands on was nichrome wire, and I worked out that to get a resistance of 10 Ω (to use all of the available power), I needed approximately 0.6m of swg 32. I experimented, and at 5 V and 500 mA, there was no heat produced whatsoever; as in, I could even touch the wire without feeling heat, let alone feel the heat above it.

How would I go about doing this? I know for a fact that this is possible (see the first link).

EDIT: Yes, there was current flowing (I used an ammeter), and I did coil the wire up.


texts: Making sense of potentiometer connections

texts:
I have stumbled across a problem with potentiometer connections that I have no idea how to tackle. What are the differences of the two circuits below? I understand that the one on the right is the same as a 5kOhm resistance, but the left one I have no idea to what it is equivalent, and the difference appears to be huge in this other question of mine.

simulate this circuit – Schematic created using CircuitLab

EDIT
This doubt arises from this circuit, where I want to calculate the output from that top part made of R2,C2,C1 and R3 which is supposed to generate an offset to Vin.

I was trying to ask just the part that was confusing me


texts: What're the differences between Eddy Current, Current generated in electric power generator and inductive crosstalk generated between adjacent lines?

texts:
I am studying the operation of Q3D, and found the terminology Mutual Resistance used in Q3D. From the Help document, it describes loss due to Eddy Current is modeled in Mutual Resistance. Combined with the learning from SI and basic understanding about electric power generator, I got confused about these three.
My understanding

Eddy Current is generated in conductors when this exists time varying magnetic field. The magnetic field generated by Eddy Current is to oppose the change of external magnetic field. Eddy Current dissipates into heat when circulating in conductors. That's why it is modeled in terms of Mutual Resistance.
For electric power generator, a loop of wire is put inside a static magnetic field. The mechanical force is exerted to force the motion of the wire loop, usually rotation. Then, the changing magnetic flux through this wire loop induces electric current circulating along the wire loop.
For inductive crosstalk of neighboring transmission line, a sinusoidal signal in one TL propagates from TX to RX. The TL can be approximately regarded as a series of LC, along which the signal propagates step by step (very small step). The signal propagating constitutes local current loop, which generates magnetic field, and in turn induces current loop in the neighbor TL. This induced current propagates forward and backward, contributing to FEXT and NEXT.

My question

These three phenomena result from the same origin, which is magnetic induction, and mutual inductance can be a physical quantity in this phenomenon. Then, what're the differences among these three generated current in different situations? To my limited understanding of electromagnetics, I think they are the same, and the difference is that if there's a way for the current flow away to make impact on others. For the case of power generator, the generated current can be guided out to accumulate the electric power. For the case of TL, the generated current can freely flow along the victim conductor, and finally results in crosstalk affecting TX and RX. For other cases, the generated current just circulates and dissipates. Is this thinking correct?
If the circulating current generated on a current carrying conductor, then what and how does it contribute to the voltage drop on the conductor and the net current received on the terminals?
Passive elements, such as TL, via, etc, can be modeled using S Parameter, which can be converted into Z Parameter. Therefore, I think the term Mutual Resistance is actually a part of Z Parameter. However, I am not sure if this is correct and how to describe them in more detail, for example, quantitatively describing this phenomenon using a simple setup and plugging in some values.


texts: Is VCT(volts center tapped) voltage between two outer taps or betwen outer tap and center tap?

texts:
I am not quite sure is VCT(volts center tapped) voltage between one of outer taps and center tap or between two outer taps?

In wikipedia it is said: Volts center tapped (VCT) describes the voltage output of a center tapped transformer.
Kinda gives me nothing..

From this thread How to differentiate center-tapped power transformer from a non center-tapped one? one could conclude that it means voltage between outer taps.

For example: will 241-8-24 from https://belfuse.com/resources/241.pdf give me 24V between center tap and outer tap or between both outer taps?

please advise,
thanks in advance


texts: Is it possible to build an oscillator from an NPN transistor?

texts:
I have an old Russian clock, that you wind up every day, but has a AA battery for the alarm. It somehow creates sound and vibration by resonating a metal piece. However, recently this broke. And my idea is to replace it with a small Piezo buzzer and some kind of an oscillator. Since I'm not an expert in this part of electronics, I only have a basic model in my head:

A capacitor charges to a voltage
A transistor is saturated enough by this voltage to pull the cap to ground and discharge it
Capacitor discharges and the whole cycle repeats
Piezo is connected to the oscillating pin and ground.

Is this possible, or are there any other alternatives using common components only?


texts: Inverting negative-to-positive step-down switching converter

texts:
It's known that RS-232 port has -12V (approx.) on DTR and RTS pins relatively to the port GND.
It's known that the supply of these pins enough for few tens mA (30-50mA in different sources). However, it was enough to power computer mouse. Total: 2 lines * 12V * 50mA = 1200mW (optimistic).

I use MAX3232 level converter to connect RS232 port to MCU's UART. It works well. However, I must supply +3.3V to the MAX3232. MAX3232 uses about 30-50 mA on 3.3V (165mW pessimistic), so RS232 port should have enough power for the level converter.

The problem is:
GND is the same net for RS232 port and for MAX3232 power. That means to draw the power from the port I must convert -12V into +3.3V.

I know how to convert Positive to Negative power using Cuk converter.
I know that I could use negative line LDO to reduce -12V to -3.3V.

I am looking for a method or component which allows me to convert Negative -12V to Positive +3.3V. Tens milliamps is enough.
The switching regulator is preferred over LDO due to high efficiency of power conversion: on RS232 port we don't have too much spares.

To rephrase (and maybe simplify) the question: how to separate/isolate ground plane/net of inverting step down converter?

Any idea, please?

There are many questions about inverting voltage for measurement/sensing. This question is not about measurement; it's about power.


texts:
When dealing with a circuit diagram of some type, a fairly typical procedure for simplifying the circuit is to redraw the circuit diagram a number of times, each time performing one or more independent atomic simplifications, such as combining series or parallel resistors, doing a source substitution, or other such things.

For instance, one might use this sequence of steps if one was asked to calculate the total current in this circuit:

simulate this circuit – Schematic created using CircuitLab

(One would then conclude that the total current is 2/3 amps.)

However, these successive diagrams are time- and space-consuming to draw.

Such a circuit could also, however, be represented using some sort of algebraic notation. For instance, something like "(R1 + (R2 | R3))". This could then be used with a set of production rules equivalent to the atomic substitutions used above:

1 Ω + (1 Ω | 1 Ω)
1 Ω + 0.5 Ω
1.5 Ω

While this simple off-the-top-of-my-head notation might not be able to represent every circuit topology, I would imagine that a more developed algebraic structure could be constructed to represent more complicated topologies (like some of the algebraic systems used for some things in graph theory). Even a more limited notation restricted to simple branching and such could be useful, though, as such systems are not uncommon.

I have searched online with Google for any some kind of established algebraic notation, but all the search queries I have attempted have only returned results regarding Boolean algebraic notation.

Is there any sort of existing notation or system like this?


texts:
Just messing around with LTSpice I came up with this VCA that simulates shockingly good for what it is:

I don't recall ever seeing the use of an op amp to mix the signal and control voltage in an isolated way like this so I just thought I would post it here for posterity (I will probably never build it myself).

If I plot the current through J1 vs the drain voltage, it's an absolutely perfect diagonal line. But R4 has to be trimmed to be exactly 1/3 R3. In practice maybe this is not possible and the simulation is deceiving me?

With R source 10K and 100mVpp input, attenuation is 37dB and the 2nd harmonic simulates 88dB down. Of course increasing R source or decreasing input would improve things greatly. But at the expense of noise created by from having to boost the signal after attenuating the input.

But when you overdrive this circuit it looks like the kind of distortion that would not be horrible for something like a compressor so one might just put a level control in front so that the user can adjust for maximum noise / distortion balance.

I know you can buy a VCA chip for $5 USD but this looks like this would perform really well with a handful of very common parts.

Now if only there were an equally clever way to linearize the control voltage ...

UPDATE:

Note that what is different about this circuit from all of the other FET VCAs I've seen on the Internet, is that different op amp inputs are used to mix the control signal with the control voltage. There are no capacitors coupling the signal and the CV. It's DC coupled. That might be good for something.

Note that when the control voltage gets very close to Vgs(off) the signal does start to affect the linearity of the current through the JFET and you get a compression type of distortion (although I suspect this is true of all circuits like this). For example, the Vgs(off) of the 2N5484 model is 1.5. If I set the CV to 1.49 the attenuation is -4.5dB and the 3rd harmonic is 47 dB down. And this is again with a 100mVpp input which is quite large for this type of circuit.

UPDATE 2:

Also works with a series JFET. Here is a circuit that combines the two to yield better dynamic range (potentially very large if the series JFET is switched completely off because distortion doesn't matter as much when the signal is 60dB down):

UPDATE 3:

The circuit described by Henry Santana in this Electronic Design article:

Op Amp And Two JFETs Form A VCA

is superior in almost every way:

The simulated dynamic range is -180dB which is of course impossible but we'll assume whatever reality is that it's pretty good.

The control voltage is linearized. Trimming is not necessary. Noise simulateed slightly better. And it works at DC.

The only thing that my circuit simulates better at is distortion. THD 0.012% compared to 0.004% in my circuit. The second harmonic is 78 dB down (instead of 88 dB). The distortion is also asymertic whereas in my circuit it is purely symetric. But the distortion actually increases less as the input is increased. Meaning this circuit can take 10Vpp input and distortion is still only 0.864% whereas in my circuit the distortion would be horrendous.


texts: How to avoid solder bridges between LGA-16 pads (paste applied manually)?

texts:
I made a breakout board for an LGA-16 part (LIS3DH) and two attempts at soldering failed with a solder bridge between two pads. Top view of the PCB:

The land pattern was created according to ST's recommendations in TN0018:

  PCB land length = LGA solder pin length + 0.1 mm
  PCB land width = LGA solder pin width + 0.1 mm

A first attempt with solder paste applied manually (with a toothpick) failed with a pair of shorted pads (the leftmost two):

I then tried a second time, with a kapton tape stencil:

But the result was pretty much the same:

The part was also lifted from the board by this bridge, resulting in adjacent joints having no contact at all.

I'm now looking for advice regarding the land pattern design and solder paste application. Maxim has a land pattern recommendation (document 90-0396) that extends the pads to the outside of the package (the package dimensions are identical as per drawing 21-0660). My guess is that those extended pads would allow excess solder paste to flow away instead of creating bridges.

I could also try to cut the kapton stencil to allow for less solder paste, or use narrower pads. I also considered taping the chip down to the pcb with a piece of kapton to avoid the lifting problem, but that wouldn't allow the part to align itself during reflow.

Soldering was done in a selfmade vapor phase oven.


texts: Output of sawtooth generator circuit always 0V in LTSpice

texts:
I am trying to simulate a basic sawtooth generating circuit using an opamp integrator and a Schmitt trigger. However, for some reason, all the output voltages in the following circuit are always 0V:

I am using the standard parameters for the OpAmp (Avol=1Meg GBW=10Meg Slew=10Meg).


texts: Do DC motor brushes have ribbed contact surfaces

texts:
I'm totally unfamiliar with DC brushed motors but bought one for my watchmakers lathe. I was surprised how hard it is to rotate the spindle by hand and how noisy it is when running. With it running around 2000 rpm  and my ear about 2" away from it, it sounds like a faint grinding noise.
So I took off the section with the brushes and the bearings seem perfect. But all four brushes have a raised rib contact surface and the commutator has rub marks that match the ribbed brush pattern.

I did some research on DC motors. One common remark was that brush contact surfaces must be smooth flat and shiny. So I did a search for ribbed contact surface brushes and nothing came up.
My questions are:
(1) Is it typically hard to turn the spindle by hand
(2) Could the brushes have been installed backwards, because the opposite end is smooth, flat and shiny. And there is no perceptible depth to rub marks on the commutator so I'm hoping the motor will be usable.


texts:
I cannot understand how this circuit works.

https://imgur.com/a/OAQSF4Y

I have found a basic explanation online but is not enought to make calculations.

"Using three LM317-N devices in parallel increases load current capability . Output voltage is set by the variable resistor tied to the non-inverting terminal of the operational amplifier, and reference current to the transistor is developed across the 100 Ω resistor. When output voltage rises, the operational amplifier corrects by drawing current from the base, closing the transistor. This effectively pulls ADJ down and lowers the output voltage through negative feedback."

I think that if you suppose negative feedback and delete the 0.2 Ω resistance after Vout for simplification. You get that half Vout is on the positive input of the op-amp. I don't know how to follow after that. I think also there is a weird kind of feedback on the power pin of the op-amp. Thank you for your help.

Do you know what is the output equation, and why?


texts: Very short question about the circuits in the figure?

texts: We have the circuit in the figure.In my book it says Vo=Vi.Why?


texts: Gain bandwidth product of amplifier in a DC scenario

texts:
I think I have a simple (but still to me confusing) question regarding the gain bandwidth product (GBP) of an instrumentation amplifier: Datasheet (AD8237)

I have sensors that change their output values very slowly (measuring sun irradiation) and I want to amplify their small output voltage (between 0-20mV) to 0-2V (so I will use a gain of 100) using the in-amp mentioned above. (The amplified signal then will be forwarded to an ADC that will take one reading per second or less.)

Now the AD8237 has a BW pin, that allows me to change the compensation and increase/decrease the GBP of the amp. On page 20 in the datasheet it says:

  The AD8237 includes an RFI filter to remove high frequency out-of-band signals without affecting input impedance and CMRR over frequency. Additionally, there is a bandwidth mode pin to adjust the compensation. For gains greater than or equal to 10, the bandwidth mode pin (BW) can be tied to +VS to change the compensation and increase the gain bandwidth product of the amplifier to 1 MHz.
  Otherwise, connect BW to −VS for a 200 kHz gain bandwidth.

As this paragraph seems to answer some of the questions I have, it also confuses me at the same time. I researched what GBP is (in my opinion nicely described at learningaboutelectronics.com)

Question:
In my case, should I connect the BW pin to +VS (increase the gain bandwidth product of the amplifier to 1 MHz) or to -VS (for a 200 kHz gain bandwidth product)? As I do not require speed and only care about DC signal amplification, I think that the lower GBP would be sufficient in my case. But on the other hand, they say for gains equal or higher than 10 the higher BGP should be used?

Also what advantages/disadvantages do I get, considering both possible cases (in case of the lower 200kHz BGP or the higher 1MHz BGP)?

Would I care about the BGP in my DC scenario at all?

As the datasheet is little confusing for me regarding this, I would appreciate your help here.

Thank you!


texts: STM32F103C8T6 Standby mode consumption too high

texts:
I am facing a realy strange problem while trying to put my "bluepill" with stm32f103c8t6 onboard into a standby mode. The consumption in standby mode is .8mA (what is 40 times higher then its supposed to be) on first board (Board A) and .02mA (what is 10 times higher) on second board (Board B). I spent 2 days already reading datasheet and reference manual and cannot get below .8mA.

(Board A) was modifyed by removing the on board voltage regulator and 2 LEDs.
(Board B) has only the uC, 2 resistors (100k R3, R4).

The code I use is the following:

RCC->APB1ENR |= RCC_APB1ENR_PWREN;
    ADC1->CR2 &= ~(1UL << 0);
    ADC2->CR2 &= ~(1UL << 0);
    SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
    PWR->CR |= PWR_CR_PDDS;
    PWR->CR |= PWR_CR_CWUF;
    PWR->CSR |= PWR_CSR_EWUP;
    __WFI();

I am running at 8MHz (probably not so important in this case).
I have already tried to put all pins into analog input mode (to disconnect the internal schmitt trigger).


texts: Timing constraints for DDR output multiplexer

texts:
Consider the following circuit, which multiplexes the d0 and d1 inputs to the y output in one clock cycle (i.e., double data rate, DDR).

simulate this circuit – Schematic created using CircuitLab

Which may be the result of synthesizing the following Verilog code:

module ddr_mux (
    input wire clk,
    input wire d0, d1,
    output wire y
);

reg q0, q1;

always @(posedge clk) q0 <= d0;
always @(negedge clk) q1 <= d1;

assign y = clk ? q1 : q0;

endmodule

I have the following timing requirements:

q0 must not change while the MUX select input is at 0
q1 must not change while the MUX select input is at 1

In other words,

y must have at most two transitions per clock period.

If the synthesis and timing analysis tools do not know these requirements on the y output, they have the freedom to implement the circuit with an arbitrary timing relationship between q0, q1, and sel. Here is an example of how this could go wrong:

And here is the desired behaviour:

How do I correctly express this in the form of SDC constraints to be read by Cadence synthesis and timing analysis tools?


texts: How do I calculate the resistance of a copper bar?

texts: I'm trying to calculate the resistance of a copper bar in a DC current, but I'm not sure how to do it. The only things I've seen online calculate the resistance of a wire and ask for its gauge, but a bar is not a wire and it doesn't have a gauge. It's a rectangular prism shape and its dimensions are 1.3cm x 2.5cm x 30cm. You don't have to do the math for me I just would like a formula for getting the resistance.


texts:
What does the below circuit do?

It was found here. I was under the impression it somehow helped with making the sounds required for AFSK 1200 baud and sending them to the audio input of a radio. I have no idea how. Does anybody recognize what the circuit is doing or how it helps me?

The circuit is designed for Arduino's, but it's not even clear from the code what the Arduino is doing to this circuit.


texts: Why we need to consider the emitter resistance re while calculating input impedance of the given amplifier circuit? Is this a compulsion? I found out that even in case of common collector amplifier the emitter resistance is again included in the calculation of input impedance despite the fact that we are taking output across the emitter in common collector amplifier. And how can we derive base impedance = beta * re ?


texts: What is the major technological change that has dramatically improved GPS acquire time?

texts:
What has allowed us to go from a unit (eTrex for example in year 2000) that would take many minutes to acquire GPS lock and be unable to do so indoors, to a modern android phone that will lock in a matter of seconds even inside on the ground floor of a multi-story building?

Is it simply receiver sensitivity?


texts:
I have a 50Vrms sinewave (100Hz and 2A), I rectify it using a full wave rectifier.

Are their away to implement an( ideal full wave rectifier) with this specifications using LM358P (its input is 0 and 15V).

I think it is impossible with op amp but I asked, maybe someone advise my with another way.


texts: The behavioral voltage source in Ltspice, is there a physical circuit that we can use?

texts:
I am trying to make a physical circuit of the circuit shown below:

All the components can be found easily like the resistors, capacitors, bjt except the behavioral voltage source. So can anyone tell me how to use that in the real physical circuit, is there a device that I can buy or make a separate subcircuit to implement the same thing that behavioral voltage source does?
Here V(a) is a DC voltage source going from 0 to 0.1 with 0.01 step and V(b) is the AC voltage source, a sine wave with 3V amplitude and 10k frequency.
Thank you in advance.


texts: How to pick a voltage comparator switch for a low power circuit

texts:
I am finishing up an embedded project for my vehicle and the last step is to make it automatically power off with the car. The way I detect whether the vehicle is on or not is via a battery pin, which maps the car’s battery voltage as a value between 0-3.3 volts, multiplied by 7.2 to give the real voltage. To preserve power, I need to sleep the microcontroller until a signal is written to the wake up pin. So, I need to write gpio high (3.3v) to the pin when the battery is below 13 volts (around 1.8v on the battery pin), and gpio low when it isn’t. Theoretically the high/low can be flipped but that’s not important.

I have done a fair amount of research and have gotten swamped with solutions. At first I thought I could get away with just a transistor but apparently the right way is through a voltage comparator built from op-amps... but that almost seems overkill? I would prefer to input the minimum voltage into the comparator and for it to be low power. I am also not quite adapt a parsing their spec sheets so I’m really at a loss as to pick the exact part I need. I would really appreciate some guidance :)


texts: how significant is the effect of high loads on servo accuracy?

texts:
After reading up on some questions posted here regarding servos, I decided to go with the Dynamixel AX-12A which can be found here
http://www.trossenrobotics.com/dynamixel-ax-12-robot-actuator.aspx.

Will putting high loads on the servo significantly decrease its accuracy? Will the servo release the same amount of power to move "X" degrees regardless of the load it has to pull or will it compensate for the higher load and output more power?

Would the answer be different for lower performance servos like the one here http://servocity.com/html/hs-422_super_sport_.html?
These servos would be handling a lower load but I'm still worried the accuracy might degrade as I put on more and more weight.

Last thing, for the second motor I listed, how would I implement a PID loop with it? Assuming I have a working encoder o


texts:
I'm working on a project where I am sending data from an msp430 to an atmega328 through regular tx/rx lines. My board will also need the capability to perform software changes on the atmega through FTDI, which needs to be connected to the same tx/rx lines. So when the FTDI is connected, I'll need to break the lines from the MSP. My first thought was just to put a PMOS between the two lines and have the FTDI VCC connected to it. But I am not sure this would be the most robust solution. Can any one point me to the right direction?

Thanks,
Micah


texts: Can you put a through-hole part behind an SMT part?

texts:
I'm wondering if it's possible to place a through-hole connection on the opposite side of an SMT microcontroller.

I have a small connector with a solder pin (for the shield) on one side of the board, and I'm hoping to place a microcontroller on the other side of the board. The hole for the connector would be near the center of the MCU package, away from the pins.

The board is extremely space constrained and this might be the only way to get the MCU on the board without going to a tiny-pitch WLCSP type package. The position of the connector cannot move.

Has anyone done this? What are the challenges and things to keep in mind?


texts: Why there is a resistor soldered across output (green) and excitation (black) in a S-Beam load cell?

texts: As the photo displayed above, it is a S-Beam load cell. We selected the same color of wires that connect the header of the load cell. As we can see, there is a resistor soldered across output (green) and excitation (black). Why a resistor should be soldered here?


texts: Understanding the Kraakdoos Opamp circuit

texts:
I'm trying to better understand the layout below. Which is based on a project called "Kraakdoos" [2] which is a touch based musical instrument. And sources suggest that it uses "‘malformed’ oscillators that were very unstable and highly sensitive for finger connections".

However from what I can tell of the circuit there are no explicit oscillators. Is this correct? It simply seems to be a high gain opamp (inverting configuration?). So my question is where does the oscillation come from?

Also am I correct in understanding that the transistors at the output are a push-pull output stage?

The circuit is our course in some respects intensionally wacky, but I'd like to understand it a little better.

[2] http://www.eam.se/kraakdoos/


texts: Measuring the peak discharge current of capacitor

texts: I am applying two capacitors conneted in parallel to operate a pulsed plasma thruster. My question is how to calculate the peak discharge current of 2x 8(micro-Farad) capacitors (connected together in parallel) in an RLC circuit?. I am doing this because I want to choose the suitable current probe (a rogowski coil) to measure the current. This rogowski coil has a peak current that must not be exceeded.


texts: What is Xilinx FPGA XC3S2000 gate count and speed?

texts:
I am trying to start learning FPGA programming and want to start with XC3S2000  (Spartan III). In table 1 , I see 2M gate count which is much higher than more advanced Spartans and could not find its system clock speed. I doubt its gate numbers should be that high and think I am checking something wrongly.

Any helps appreciated.


texts:
I have a project where I need to switch the + side coming from the battery (single cell LiPo) to a consumer (ESP8266) with a 3.3V signal (common ground).

I have loads of NPN and PNP-transistors here, but can't make it work.

I'm sure this is a pretty basic question, but even though I googled the whole internet, trailed and errored a lot I can't find a solution.

Thanks!


texts:
I want a curcuit with 3.3V and 24V supply. The micro will use the 3.3V supply, which needs to be able to set multiple industrial 24V digital outputs.

My plan was a simple op amp, but as far as I know no op amp will actually achieve an output of 100% of Vcc, no matter the gain. Is there a cheap and simple way to do this? Relays seems expensive and big.


texts: Torque and Current Frequency Relationship in Lorentz force

texts:
Lorentz force equation shows us that current is proportional to the force. Is it safe to assume that the force generated by an AC current at 60Hz will always have the same frequency? In other words, as the current increases and deceases (sinusoidal) the force will follow the same pattern at the same rate.

Would this be true if the current flow had a circular shape or any non-linear shape? The reason I ask is because Maxwell is giving me torque plots with frequencies twice the current's frequency. I find this odd.

Edit: Here is a simple simulation of a wire with 100A RMS passing through. The plots shows the current and the torque around the wire. This proves to me that the frequency of the Torque is twice of the Current.


texts: Common emitter amplifier's \$R_C\$ breaks

texts:
What happens if the collector resistor breaks (its value goes to infinity) in a textbook example circuit?
I assume that \$ I_C \$ hits zero, \$ U_{CE} \$ decreases until the transistor goes into saturation, but still without collector current.
Does this affect the base current? Or Beta?
Thanks for the answers


texts: Question about thevenin circuit analysis with voltage across voltage source

texts:
I have a certain circuit in mind and I want to find its Thevenin equivalent resistor:

I see that there is an dependent voltage source so I add a voltage source of 1V between a and b and make the other voltage source equal to 0 (the independent 9v). when I use nodal analysis on the new circuit, I am not sure how to calculate the current i3. I thought about using Kirchhoff voltage law on the middle loop but for now I am confused.
If I have three voltage sources, do I just take a wild guess about which way the current goes when I apply KVL on the middle loop? because if they didn't note the direction of the current on the Vx resistor, I would have said that Vx+2i3-2Vx+1=0, or would that be wrong because I assumed i3's direction to go to the right?

tl;dr

how would I do a KVL equation on the middle loop
is there an easier way to solve it using nodal analysis (specifically, to find i3)?

Sorry if the question seems a bit confused, because I'm confused.


texts: Series connection of transmission lines described by telegrapher's equations

texts:
My issue concern the definition of series connection of multiple transmission lines described by the so called constant parameter model, to be next simulated in EMTP-RV. Let us take as an example two transmission lines of length respectively $$\Delta x_1,\Delta x_2$$ described by the telegapher's equations
$$
L_i\frac{\partial I_i(x,t)}{\partial t}=-R_iI_i(x,t)+\frac{\partial V_i(x,t)}{\partial x}\\
C_i\frac{\partial V_i(x,t)}{\partial t}=-G_iV_i(x,t)+\frac{\partial I_i(x,t)}{\partial x}.
$$
with i=1,2.
Is it possible to obtain an equivalent aggregated model in the form of telegrapher's equation via linear combination of the two systems? By setting for example $$\Delta x_{eq}=\Delta x_1+\Delta x_2$$
which are the corresponding values of $$L_{eq},C_{eq},R_{eq},G_{eq}$$
?


texts:
I'm running a small 3W speaker from an MP3 module, in order to save power I control the module with a MOSFET switch. The module itself can not go into an very effective low current sleep mode so I have to turn it off. I turn it off only when it is not outputting audio, however I can hear a small pop noise from the speaker when turning off.

What could be a safe / quick & easy / cheap fix for this?
I was thinking about inserting a short (2 Ohm or less) across the speaker or to ground in order to lower the voltage that develops across the speaker. Perhaps this could be switched with a BJT or JFET?

Other ideas?


texts: On IAR's EWARM package, what is the difference between the built-in MISRA C checker and CSTAT's MISRA C checker?

texts:
A bit of background: Our team will be programming firmwares for ARM microprocessors. Programming codes should comply with the MISRA C standard.
We have decided to check IAR's EWARM package: https://www.iar.com/iar-embedded-workbench/#!?architecture=ARM&currentTab=editions-and-licensing

Looking at the EWARM package list, we see that there are two possible MISRA C checkers:

The standard MISRA C checker which comes in by default with the EWARM package
The MISRA C checker under the optional static analysis package called CSTAT

My question is, what's the difference between the two checkers? Assuming we only have to follow MISRA C compliance, what will we lose if we opt not to buy the optional CSTAT package?

Thanks in advance for any answers.


texts: 3 bit up/down counter using 2 flip flops

texts:
Can I build a 3 bit modulo 7 counter using 2 flip flops ?, I'm thinking of using the clock as the third bit since it toggles from 1 to 0. Will that work ?

edit:
Found this circuit which uses two jk flip flops but counts down

Link, Circuit

Would it be possible to make it count up as well ?


texts: FT230xs USB basic UART converter dropping frames

texts:
I'm working with a custom STM32F429 board, I am using serial-USB port (USART1-PA9,PA10) for debug output and diagnostics. When I connect the board the FTDI chip is recognized and proper kernel modules are loaded.

dmesg output:

[  260.406486] usb 2-1.1: new full-speed USB device number 7 using ehci-pci
[  260.526558] usb 2-1.1: New USB device found, idVendor=0403, idProduct=6015
[  260.526563] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  260.526567] usb 2-1.1: Product: FT230X Basic UART
[  260.526569] usb 2-1.1: Manufacturer: FTDI
[  260.526571] usb 2-1.1: SerialNumber: DN4934JQ
[  261.545819] usbcore: registered new interface driver usbserial_generic
[  261.545829] usbserial: USB Serial support registered for generic
[  261.552062] usbcore: registered new interface driver ftdi_sio
[  261.552086] usbserial: USB Serial support registered for FTDI USB Serial Device
[  261.552266] ftdi_sio 2-1.1:1.0: FTDI USB Serial Device converter detected
[  261.552341] usb 2-1.1: Detected FT-X
[  261.552891] usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB0

The problem is that when I use GTK terminal, putty, or moserial to view the datastream, the data is always jumbled up and has missing fields. For example Helloworld\r\n turns to ellwold\r\n. Inited Can Bus at bitrate 125000 bps turns to Initd aus a birate 500 ps. I have attached the relevant schematic here. I have basically copy-pasted the self-powered USB design from the datasheet for FT230XS.

You might notice that there are no decoupling caps on the VCC pin as shown in the datasheet. Connecting 2x 100nF and 1x 4µF caps on this pin was causing an error where the chip couldn't be read by the Linux kernel.

[ 4135.146806] usb 2-1.1: new full-speed USB device number 45 using ehci-pci
[ 4135.226834] usb 2-1.1: device descriptor read/64, error -32
[ 4136.187078] usb 2-1-port1: Cannot enable. Maybe the USB cable is bad?

Also I have configured the CBUS0 pin for VBUS_SENSE via the FT_PROG utility. Any suggestions or tips would be greatly helpful as this is my first project with any FTDI chip.

Edit:

PCB design snapshot:


texts: A question about DC-DC converter and buck converter

texts:
I see in buck converter examples that they have fixed/regulated input voltage and a fixed output.

I'm planning to build or buy a for example 9V to 5V buck converter but the 9V side will be composed of parallel batteries. This means the input voltage will not be regulated. And since the battery voltage will drop by time output voltage will be affected proportionally if I use a buck converter.

Is there a DC DC converter or a type of buck converter which both steps down the input voltage and also regulates it to a reference value? Like in my case the input voltage is not regulated(batteries) but the output voltage must regulated to a fixed voltage.


texts: Stabilizing the UVLO feature on a DC/DC converter

texts:
Very many DC/DC controller IC's utilize an under voltage lockout feature by way of an external pin monitoring the applied voltage and comparing it with some internal reference, putting the IC into standby if this threshold is breached.   Usually this pin is named "EN" or "UVLO".

I use a high resistance voltage divider to feed the EN pin on my IC.   The divider is fed directly from Vin, the battery voltage, and set to output the correct threshold voltage when my batteries are discharged to my pre-defined limit.

When powered from Li-Ion batteries ( and probably any other battery I imagine ), when the threshold voltage is broken, the IC goes into standby mode.  This removes the load on the battery, which raises the battery's voltage, which pushes EN over the threshold, and the IC resumes operation again for a few ms.

This cycle continues on and on until the battery, after 100's of 1000's of cycles, finally quits and doesn't bounce back to higher than the EN threshold.

My question is:   what are the techniques used to feed the EN/UVLO pins of DC/DC converters to prevent this type of bounce?    Is a separate comparator with wide hysteresis used instead of directly feeding EN?


texts:
I am working on a simple circuit whose goal is to control a high voltage device (e.g. a lamp) thanks to a (3V3) relay module, ESP8266-01 and the MQTT protocol.
To power this circuit, I am using a 5V phone charger producing a 3.3V voltage through an AMS1117 voltage regulator (5V --> 3V3). This 3V3 output from the AMS1117 is what I call "3V3 power supply" below.
The wiring is the following:
**ESP8266-01:**
VCC <--> 3V3 power supply
GND <--> GND (power supply)
CH_PD <--> 3V3 power supply
GPIO2 <--> IN (relay)

**3V relay:**
VCC <--> 3V3 power supply
GND <--> GND (power supply)
IN <--> GPIO2 (ESP-01)

While it sometimes works, as I am often experiencing some problems (ESP-01 not connecting to the wifi, relay switching on its own, ...), I am wondering wether my circuit is lacking something (diode?) or if the wiring is wrong.
UPDATE:
Following @SimSon advice, I wrote this simple sketch:
#include <ESP8266WiFi.h>

const int switch_pin = 2;
int state = 0;

void setup() {
  Serial.begin(115200);

  WiFi.forceSleepBegin();

  pinMode(switch_pin, OUTPUT);
}

void loop() {

  if (state == 0){
    digitalWrite(switch_pin, HIGH);
    state = 1;
    Serial.println("1");
  }

  else{
    digitalWrite(switch_pin, LOW);
    state = 0;
    Serial.println("0");
  }
  delay(1000);
}

However, while it will indeed switch the high voltage device (as expected) it will do it for less than a minute before freezing. As I have Serial.println() at each switch, the ESP blue led also blinks every second when the relay switches but it stops blinking once the relay also stop working.
I have tried with a second relay but the problem still occurs.
SECOND EDIT:
Here is what I got with on the serial port when switching the realy every second until crash:
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld


texts: Why are we still using resistors with %5 tolerance while they can even manufacture a 14.318182MHz crystal?

texts:
Year is 2012 and I can only find %5-tol resistors in the local market. They can make transistors at molecular scale, they can manufacture 14.318182MHz crystals, they can place trillions of flip-flops inside a memory chip.

Then why don't they start manufacturing %0.01-tol resistors? Is resistor manufacturing a more difficult job compared to the ones I mentioned above? What is the reason for still manufacturing %10-tol and %5-tol resistors?

(I'm asking this because I learned that the following circuit may not work because the resistor values may differ greatly from the rated ones.)


texts: problems while trying to communicate between ATMEL mega169 and ATMEL flash

texts:
Hello everyone

I'm writing a C program that will access a flash AT45DB041B from the controller ATmega169. I'm using a Butterfly development kit.

I have succeeded to read the status register and get correct data so I'm quite sure that the flash works and can communicate. But I haven't been able to write and read to flash, the only thing that I can read from it is zeros.

I unfortunately I don't have any possibility to snoop the traffic either.

init:

 void init_flash_as_master(void)
 {

// double speed, p 150 mega169 manual
SPSR = 0x01; // the other bits are don't care or set by hardware

//      MOSI        SCK         !SS    are outputs
DDRB |= _BV(PB2) | _BV(PB1) | _BV(PB0);

// p 148 in mega169 manual
/* bit 7, 0 interrupt not enabled
 * bit 6, 1 SPI enable,
 * bit 5, 0, MSB first, ch 5 flash datasheet
 * bit 4, 1, Master
 * bit 3,2, 00, CPOL,CPHA, SPI mode 0, p 5 flash datasheet
 * bit 1,0, 10, /32, flash max operating frequency 20 MHz p 1 flash datasheet
 */

SPCR = 0x52;

}

send:

inline void send_byte(uint8_t byte)
{
    SPDR = byte;
    while (!(SPSR & _BV(SPIF))) {;}
}

recive:

inline uint8_t recieve_byte(void)
{
SPDR = 'A'; //load SPDR to start clock generation
while (!(SPSR & _BV(SPIF))) {;}
return SPDR;
}

start transmission:

inline void start_transmission(void)
{
    // set chip select for sending data
    PORTB &= 0xFE; // setting bit 0 on port B low
}

stop transmission:

inline void stop_transmission(void)
{
    // finish transmission
    PORTB |= 0x01;
}

clear flag:

inline void clear_SPIF(void)
{
    uint8_t temp = 0;

    // clear SPIF
    if(SPSR & _BV(SPIF)) { temp = SPDR; }
}

write operation:

// write a struct song_t to specified page in the flash memory
void flash_write_song(uint16_t page, const song_t * song)
{
    if (direction != master) init_flash_as_master();

    clear_SPIF();
    start_transmission();
    // ch. 12.2 flash datasheet
    send_byte(0x84); // write to buffer 1, 84h
    send_byte(0x00); // three address bytes, starting at byte 0
    send_byte(0x00); // table 7, flash application note
    send_byte(0x00);

    // push name
    for (int i = 0; i != NAME_LEN; i++)
    {
        send_byte(song->name[i]);
    }
    int j = 0;
    while (j < TUNE_LEN)
    {
        send_byte(song->tune[j]);
        j++;
}
stop_transmission();

flash_ready();

start_transmission();
// ch. 12.3 flash datasheet

    // Buffer 1 to Main Memory Page Program with Built-in Erase
send_byte(0x83);

    // first byte contains the 4 uppermost bits
send_byte(get_high_byte(page));

    // second byte contains the 7 lowest bits, starting at bit 1
send_byte(get_low_byte(page));
send_byte(0x00); // table 7, flash application note

stop_transmission();
flash_ready();

}

read operation:

// read a struct song_t from specified page in the flash memory
void flash_read_song(uint16_t page, song_t * song)
{

if (direction != master) init_flash_as_master();

clear_SPIF();

// flash datasheet 16.2
start_transmission();

// table 7, flash application note
send_byte(0xD2); // read page from main memory,
// first byte contains the 4 uppermost bits
send_byte(get_high_byte(page));
// second byte contains the 7 lowest bits, starting at bit 1
send_byte(get_low_byte(page));
send_byte(0x00); // controller says, read from byte 0

send_byte(0x00); // 4 don't care bytes
send_byte(0x00);
send_byte(0x00);
send_byte(0x00);

// read name
for (int i = 0; i != NAME_LEN; i++)
{
    song->name[i] = recieve_byte();
}
/*  // and now we will read the data until we find a 0
int j = 0;
uint8_t byte_popped = recieve_byte();
while (j < 4) //TODO
{
    song->tune[j] = byte_popped;
    j++;
    byte_popped = recieve_byte();
}
*/
stop_transmission();

}

The question

I am quite sure that the error is in my code, as I can read the status register. But I can't see any problems in my code. Am I pulling the right signals in the right time?

If you want any clarifications or more descriptions, please tell.
Regards
Gorgen


texts: Can an external defibrillator deliver a continuous charge?

texts:
Can an external defibrillator, used medically to restore normal heart rhythm, deliver a continuous charge? I've been trying to find references to how a defibrillator works, whether it sources with batteries or capacitors, and so on, but the information seems to be evading me.

Edit: Considering that defibrillators deliver a complicated AC waveform, I can see how this question could be unclear. What I'm asking is whether defibrillators are capable only of producing one-off "shocks," or whether they can "shock" continuously, like inserting a finger into a light socket. For a mathematically better defined problem, I'm asking whether typical external defibrillators used by medical staff have an operation time duty cycle (how many milliseconds in every x milliseconds the device can be run, as opposed to a PWM duty cycle) and a small upper bound on charge delivery time. In other words, could I, for instance, deliver a 2-minute charge?

Context:  There's a scene in the TV show Dexter wherein the titular character electrocutes two people simultaneously with external defibrillators. He doesn't cause arrhythmias, as far as I can tell. He actually electrocutes them with extended shocks. My first thought upon seeing this was, "that's not how defibrillators work." I wanted to do some additional research just to be sure. I asked it here after googling around and not finding anything of note that actually describes modern defibrillator function.


texts: How to address a 16 bit LCD using 8 bit bus?

texts:
I need such a TFT with SSD1289 controller, but with 8 bit bus.

Does anyone know how to modify it?


texts: design approach for multiple control signals

texts:
I built an LED driver based on TI's LM3549, to drive an RGB LED. It works great, but requires that I provide a control signal for each LED:

In my testing, I'm using an Arduino to generate the control signals, and am effectively tying up the run loop with with the operation. If it were a single line, I could use a hardware timer, but I don't want to (or have) 3 timers to tie up this way. Is there a more cost-effective way to create this kind of control signal, without dedicating an MCU to it?


texts:
I recently bought a moisture sensor off eBay (one of those Chinese YL-69 like can be seen here) and my original plan was to use it with an Arduino board. However, after much experimenting I realize there is a chance my sensor was broken, so before I go back to eBay to complain, I would very much appreciate expert advice.

Because the readouts were so wonky, I decided to perform the simplest test: plug the YL-69 to the also included YL-38 (as can be seen here), power the YL-38 (it has on one side VCC, GND, D0 and A0 and on the other side two input pins to plug to the YL-69) and this YL-38 lights up a blue LED just by having current flowing through it. Additionally, depending on the resistance applied on the two IN pins and depending on the potentiometer's adjustment, it will light up a red LED once the resistance to the IN pins crosses the threshold defined by the potentiometer.

From what I was able to read online, normally, by sticking the YL-69 on water, it should cause the resistance at the IN pins to be almost nil and thus the red LED would stay lit for as long as this is happening. However, what happens is that as soon as I stick the YL-69 in water (not completely obviously), the red LED comes up for a while (indicating that the water had an effect in lowering resistance) but after just 2 or 3 seconds it turns back off.

This is consistent to when I was reading the A0 values with the Arduino. I was getting what I sometimes thought was the right reading but it would always level out back to 300-ish.

My question is: is my YL-69 sensor broken? Thanks in advance!


texts:
I am not sure why one of the advantages of Digital vs Analog communication is higher SNR?

For example, when I want to transfer a 4.5v signal vs a 5v signal, how does converting these values to some digital levels first (e.g. using a 16-bit ADC) will help the communication path to have higher SNR?

Also, I read an article which points out the followings:

SNR of a digital signal determined by the maximum discrete amplitude and the resolution of the A/D (volts/count).
SNR of analog signal determined by power supply rails and by noise floor.

Could someone please explain what that means also? and why?


texts: How does wiring two LNAs in parallel affect charactaristic impedance?

texts:
It appears that wiring amplifiers in parallel improves the signal to noise ratio.  I thought I would experiment with two SAV-541+ LNAs in parallel and see how they perform:

How does wiring an LNA in parallel affect the impedance on both sides?
Will it cut it in half and create 25-Ohm impedance values?
If so, will it be 25-Ohms on both sides, or just one or the other?

-Eric, KJ7LNW


texts:
I'm trying to work out the amount of watts my mobile phone uses and thus how much power it needs to charge back to full power. My handset is the Nokia 820 Lumia and the specs are as follows:
Battery 3.7v, 1650mAh.

I have calculated the watts by using the following:
(1650mAh x 3.7)/(8 x 1000) = 0.76 with 8 being the talk time in hours when on 3G. However, I have become confused when reading the specs of the handset on CNET where it states the following:
Power Consumption Operational: 55.0W
Standby/Idle: 3.0W

Can anyone explain what the Power Consumption Operational is? This is what is confusing me. Does this mean that the handset is using 55W when fully operational and if so, how much wattage is needed to charge it (ie if I'm using the phone & it's charging).

Thanks,
Ads


texts:
Using direct temperature (vs watts/current/voltage) as input from a heat plate @ 100C - simple conduction - with a disparity of area - Heat plate is 25in sq, as it ratchets down to a 10 mil copper conductor (actually a cupper plated via) through a 100 mil PCB.

Will the temperature rise when it reaches conductor peak (via surface) as opposed to remain steady state?

For the theoretical - resistances are too negligible to factor but if it need a value, the inverse would assume Cu to be 400 w/m-k

So Im trying to solve for for t2

T1=100C....
Along - Dia=.010/Distance = .100 Cu....
With k = 400w/m-k....
T2=( ? )


texts:
Try to make simulation of this task with program of your chose.

Can someone please do this simulation with a program like Multisim and upload the simulation,because i dont have the program.


texts:
I have a 230VAC inverter that runs off 12V (battery). But it seems to cause a lot of noise.

The noise is causing problems with my MCU and other circuits. It seems the problem is measurable in the +12V supply.

Diagram

simulate this circuit – Schematic created using CircuitLab

Oscilloscope

I'm measuring the +12V bus, which is connected to battery positive, and with the probe ground connected to the negative bus, which is connected to battery negative terminal, via 30mm2 cables of ~1m length.

Measuring directly at the positive terminal gives the same result. Except when the probe ground is connected to battery negative.
(This leads me to suspect the problem might be with the inverter input)

However, when probe ground is connected to battery negative terminal, the noise disappears. The scope looks the same when the inverter is turned off.

Attempts to reduce noise

I've tried to use an extension cord to move it ~4 meters away: no effect
Turning off lights: no effect
Holding the inverter in my hand: no effect
Connecting oscilloscope probe to battery negative terminal: causes noise to disappear
Connecting a wire from negative battery terminal to oscilloscope ground: no effect

Context:

Inverter pulls 0.6A
Scope ground is connected to negative bus, which is connected to battery negative terminal
No natural earth is connected. "Earth" is connected to negative bus, which is connected to vehicle chassis (motorhome installation with external mains cable intake, mains cable lacks earth wire).
Battery bank is LiFePO4
No VAC output is connected
Oscilloscope and computer is powered from mains cable during testing
No other appliances are connected except for a 12V LED strip (no driver).

Question

What is the cause of this noise?

Do I need a beefy input capacitor? The inverter already has some beefy input capacitors, but maybe they're not enough?

What else might resolve the problem?


texts: Selecting 2 pole branch circuit protection

texts: I am trying to select a 2 pole circuit protector (UL489 approved), to protect a 575V transformer. I am however unable to find any 2 pole CB that go above a 480Vac voltage rating. Is there anything I'm missing when it comes to branch circuit protection?


texts:
I have a project and I need use ISP to send codes to ATMEGA328P, the problem is that my ISP programmer works with 5V and my system works with 3.3V. I know ATMEGA328P supports 5V but other components in my system (like a radio) not, and I like run it in 8MHz .

I used a LM1117-3.3 to reduce ISP 5V to 3.3V but I have a problem when power the system with external 3.3V, the regulator is in short because its VOUT is getting 3.3V. to solve it just put a diode as shown in the picture below, but the diode has a 0.7V voltage drop which forces my circuit to work with 2.6V, this is causing problems on my radio.

Does anyone have any suggestions to solve this? I did not want use more jumpers ....