texts: making 16x1 multiplexer by using two 8x1 multiplexer and one 2x1

texts:
How can I create 16x1 multiplexer by using two 8x1 multiplexer and one 2x1 multiplexer? If it is possible, could you show on image(draw) ?

I've drawn is it right ?


texts: Why is 50 Ω often chosen as the input impedance of antennas, whereas the free space impedance is 377 Ω?

texts:
In order to efficiently deliver power to a different part of a circuit without reflection, the impedances of all circuit elements need to be matched. Free space can be regarded as a further element, since a transmitting antenna eventually should radiate all power from the transmission line into it.

Now, if the impedances in the transmission line and in the antenna are matched at 50 Ω, but the impedance of free space is 377 Ω, won't there be a impedance mismatch and consequently a less-than-optimal radiation from the antenna?

EDIT:

As far as I gathered from the answers, literature and discussions online, the antenna acts as a impedance transformer between the feed line and free space. The argument goes: no power from the feed line is reflected and must go to the antenna. The antenna can be assumed to be resonant and therefore radiates all its power into free space (disregarding heat losses etc). This means that there is no reflected power between antenna and free space, and the transition between antenna and free space is therefore matched.

The same should be true in the reverse direction for a receiving antenna (Reciprocity Principle): a wave in free space (\$Z_0\$) impinges onto an antenna, and the received power is fed into the transmission line (again through impedance transformation). At least in one paper (Devi et al., Design of a wideband 377 Ω E-shaped patch antenna for RF energy harvesting, Microwave and Optical Letters (2012) Vol. 54, No. 3, 10.1002/mop.26607) it was mentioned that a 377 Ω antenna with a separate circuit to match it to 50 Ω was used to "achieve a wide impedance bandwidth" with a high power level. If the antenna normally is already the impedance transformer, what is the matching circuit needed for then? Or alternatively, under what circumstances is the antenna not also the impedance transformer?

Some helpful sources and discussions I found:

Klaus Kark, Antenne und Strahlungsfelder (in German)
Impedance Matching (http://www.phys.ufl.edu/~majewski/nqr/reference2015/nqr_detection_educational/Impedance_matching_networks.pdf)
Forum discussion that mentions impedance transformation for an inverted-F antenna (http://www.antenna-theory.com/phpbb2/viewtopic.php?t=776&sid=dede0d4127170d16cc3a583ab0929f3e)
Some general notes about antennas 8http://fab.cba.mit.edu/classes/862.16/notes/antennas.pdf)


texts:
I recently bought a van that has a starting and an auxillary battery, who ever installed it didn't isolate it from the starting battery. I'm planning on installing a simple switch to isolate it, but I need to know how many amps it needs to be rated for.

How can I find this out? I have a multi- meter, but worry that the amperage may be high enough to blow it even unfused (it says 10A max) if I connect it in series between the aux battery and the incoming + lead.


texts:
I'm trying to write as tiny code as possible to extract the firmware of Infineon's XMC4500 microcontroller.

The code must fit into a 30 byte buffer which allows me to have 15 machine instructions using Thumb 16-bit instruction set.

Starting with C my attempt is to dump flash memory through a single GPIO pin (see original question) following this nifty trick.

Basically what I'm doing is:

Setup the GPIO pin directions to output
Blink LED1 (pin 1.1) with a clock (SPI serial clock)
Blink LED2 (pin 1.0) with data bits (SPI MOSI)
Sniff pins with a logic analyzer

EDIT:

UPDATE C CODE BLOCK
ADD ASSEMBLY CODE BLOCK

#include "XMC4500.h"

void main() {
  // start dumping at memory address 0x00000000
  unsigned int* p = (uint32_t *)(0x0u);

  // configure port1 output (push-pull)
  PORT1->IOCR0 = 0x8080u;

  for(;;) {
    int i = 32;

    int data = *(p++);

    do {
      // clock low
      PORT1->OUT = 0x0;

      // clock high with data bits
      PORT1->OUT = 0x2u | data;

      data >>= 1;

    } while (--i > 0);
  }
}

main:
    ; PORT1->IOCR0 = 0x8080UL
    ldr r1, =0x48028100 ; load port1 base address to R1
    movw r2, #0x8080 ; move 0x8080 to R2
    str r2, [r1, #0x10]

main_1:
    ; start copying at address 0x00000000
    ; R12 is known to be zeroed
    ldr.w r2, [r12], #0x4 ; int data = *(p++)
    movs r3, #32 ; int i = 32

main_2:
    ; PORT1->OUT = 0x0
    ; clock low
    ; R12 is known to be zeroed
    str r12, [r1]

    ; PORT1->OUT = 0x2 | data
    ; clock high with data bits
    orr r4, r2, #0x2
    str r4, [r1]

    asrs r2, r2, #0x1 ; data >>= 1

    subs r3, r3, #0x1 ; i--
    bne.n main_2 ; while (--i > 0)
    b.n main_1 ; while(true)

However code size is still too big to meet my requirements.

Is there anything I can do to further shrink down my code? Anything that can be optimized or left out?


texts:
I have a project where a PCB has been manufactured with an error, where a 3 lead BI color LED (red/blue) has a single resistor to limit the current for both colors. I can fix this by hacking apart the PCB but I would like to know what resistor value I could potentially use to satisfy both the RED and BLUE colors of the LED.

This is the datasheet for the LED: http://www.unique-leds.com/images/datasheets/CG/D3009R1B2SBDC.pdf

As per the datasheet the RED has a min/max forward voltage for 1.9/2.5 while the blue has a min/max of 2.9/3.5 If I were to take an average of the mins and maxes and then the average of that:

((1.9+2.9)/2) =  2.4v min
((2.5+3.5)/2) =  3.0v max
((2.4+3.0)/2) =  2.7v averages

and use this to calculate the resistance needed to satisfy both colors:

R = (5v-2.7v)/0.02a
R = 115ohms

Would this be the correct approach to solve my problem or is there a different way I should go about this. Is this even possible without negatively effecting one LED color or the other?

I can manage two separate resistors if I tear up the solder mask and hack it until it works but if I can use the already provided through hole it would make life easier.

Overall I am asking what is the best way to calculate the resistance that would satisfy two colors, RED and BLUE,in a single LED package with 3 leads using a single resistor.

Thank you for your time.


texts:
I am trying to achieve 32-bit resolution using 16-bit timer on STM32F103. I found that ST provides an application note AN2592, however, I have two concerns regarding it:

1) I don't understand why are they multiplying MSB by 65535 (see 3.1). Shouldn't it be 65536 instead (assuming I use period of 65535)?

2) In 3.2 they say that you should process update interrupt first (to update MSB), to account for possible race between update and capture happens. I think, this is not correct.

In my understanding, two races are possible: capture after overflow and overflow after capture. They might happen for various reasons, the simplest one is that interrupts are disabled and both flags are raised before handler begins executing. Or handler starts handling one of them and before code gets to process the event, another event happens.

Depending on which race happened, you either need to update MSB before processing capture event or after. So, the way I think it should be done is to check the captured value first. If it is "pretty low" (less than, let's say, 10, 100, 1000, doesn't really matter as it will either be very low or very high to race to happen) and overflow is pending, then your overflow event happened before the capture. Otherwise, overflow happened after the capture.

This is my interrupt handler:

if (tim->SR & TIM_FLAG_CC1) {
    tim->SR = ~TIM_FLAG_CC1;

    uint32_t lsb = TIM2->CCR1;
    // Captured value is very low and overflow is pending -- need to account for "msb" increment, as it happened
    // before the capture event. Otherwise, we don't care -- if overflow interrupt is pending, we will handle
    // it on the next handler invocation.
    if (lsb < 1000 && (tim->SR & TIM_FLAG_UPDATE)) {
        tim->SR = ~TIM_FLAG_UPDATE;
        // Capture happened just after the overflow: need to increment upper "msb"
        msb++;
    }
    msb_captured = msb;
    lsb_captured = lsb;
    msb = 0;
} else if (tim->SR & TIM_FLAG_UPDATE) {
    tim->SR = ~TIM_FLAG_UPDATE;
    msb++;
}

I haven't tested it yet (need to figure out the best way to test race handling...).

Does it look plausible?


texts: Short-Circuit Protection for 3-6 Volts AA batteries

texts: I’m looking for a circuit that can protect 3-6 Volts AA Batteries when a short-circuit happens. When the short-circuit happens, a second circuit (LED blinking) must be triggered and the batteries must be protected. The goal is that the LED won’t stop blinking until the short-circuit is undone. What are cheap suitable options for this application? Efuse, p-channel mosfet, x2 transistor arrange, Ideal diodes, a Battery protection CI? Could someone give me hand?


texts: Will cutting data line of USB port can supply the right amount of current it is attached to?

texts: I want to use a USB cable and an AC to DC adapter as a supply to my electronics project. I plan to connect the USB cable to the USB port on the AC to DC adapter then I will cut the other end of the cable. There will be 4 lines in the wire namely 5V, Gnd, D+ and D-. I will use the 5V and Gnd lines as a power supply. However, based on my research, if you cut the data lines of the USB cable, the 5V and Gnd will supply less current that it is intended to because it won't be acknowledged by the connecting end that it is used for charging (ex: connecting the USB cable between a phone and a USB port of the laptop). Will this be true even if I connect it to an AC to DC adapter?


texts: Which fab for DRAM device? (ASIC design at Europractice)

texts:
I would like to ask for advice.

Europractice supports many fabs and technologies for custom asic design (fab list). Lib support list of those technologies are public (for example UMC 130 nm LL). I checked all of public lists, and nowhere found dram support.

I am looking for opportunity to design a dram device (for example on 130 nm if that is possible). Which fab i should sign for?


texts:
I am trying to connect the ds1307 to Arduino to get the the time on the LCD and I used this circuit in my project and I tried the example code in the library but it didn't work. What could the problem be?

the code:

#include <Wire.h>
#include "RTClib.h"

RTC_DS1307 RTC;

void setup () {
    Serial.begin(57600);
    Wire.begin();
    RTC.begin();

  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    //RTC.adjust(DateTime(__DATE__, __TIME__));
  }

}

void loop () {
    DateTime now = RTC.now();

    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();

    Serial.print(" since 1970 = ");
    Serial.print(now.unixtime());
    Serial.print("s = ");
    Serial.print(now.unixtime() / 86400L);
    Serial.println("d");

    // calculate a date which is 7 days and 30 seconds into the future
    DateTime future (now.unixtime() + 7 * 86400L + 30);

    Serial.print(" now + 7d + 30s: ");
    Serial.print(future.year(), DEC);
    Serial.print('/');
    Serial.print(future.month(), DEC);
    Serial.print('/');
    Serial.print(future.day(), DEC);
    Serial.print(' ');
    Serial.print(future.hour(), DEC);
    Serial.print(':');
    Serial.print(future.minute(), DEC);
    Serial.print(':');
    Serial.print(future.second(), DEC);
    Serial.println();

    Serial.println();
    delay(3000);
}

============================


texts: What does it mean by input and output impedance in a signal generator?

texts:
I have a Lock-In amplifier that can generate sinusoidal signals up to 1.5V peak. There is an output port and input port, and I can obviously fix the frequency or amplitude of the signal I am sending out from the output port.

This device also has a switchable input port impedance and an output load impedance too. The input port impedance can switch between 50 ohms and 1M ohms. The output impedance can switch between 50 ohms and "HiZ"?

This is the description I got for the output impedance being turned on or off:

"Select the load impedance between 50Ω and HiZ. The impedance of the output is always 50Ω. For a load impedance of 50Ω, the displayed voltage is half the output voltage to reflect the voltage seen at the load."

I'm still learning some AC circuiting, so I was hoping if someone could explain me or point me in the right direction to try understand the point of this better.

Thanks a lot for your help


texts: How is the inverter connected to the grid?

texts:
I just finished circuit designing of an inverter which converts 440V DC to 230V AC. Now my manager asked me what kind of connectivity does it has.

I answered him:

"The current connectivity is AC as we have a DC/AC converter to connect to the grid".

He thought it was a stupid answer and he responded:
"Is this your engineering response? That the unit will connect to the AC?!"

I can see that he was mad by my answer but I told him what I knew. I have never worked in this field before and so I'm learning through this job.

Thiss made to do some research on type of connectivity from inverter to grid. All I see in the internet is much about type of coupling (AC coupling and DC coupling). I still didn't find how actually the inverter output is connected to the grid? To be specific, what connectors are used at the output of the inverter?

Any body who could help me with this question or direct me through the right link, would be very helpful from not only saving me from another telling off by my manger but also giving me the comprehension of the electrical connections.

Thanks in advance


texts: 3.3V GPIO output of esp01 interfacing to CMOS logic gates operating at 12V

texts:
I want to check this circuit for proper interfacing, I am interfacing a 3.3V output to CMOS CD4071 with supply voltage of 12V.
-First I used a low threshold voltage NMOS TN0106 as shown in the circuit.
I put a drain resistance of 10kohm to limit the current to 1.2mA when the output is low. will this output impedance degrade the circuit performance(capacitive coupling noise for example ) to the CD4071 gate? Is their a better way to switch the 12 v using the 3.3V input?
-The second part is the control of the 12v relay 400ohm coil resistance using a PMOS VP0106,The 1K resistor is to protect against inductive spikes coupled back from the load. Do I need to consider anything for proper operation.
Thanks


texts: How Does Line Frequency Affect Coils of a Contactor?

texts:
I am using a generator as my source voltage, which produces 240VAC @ 240Hz. I was planning to use the following contactor from TE: CONTACTOR 4PST 40A 240V

In the datasheet it says this contactor's coil's activating voltage needs to be 50/60Hz. Now what happens if I feed 240VAC @ 240Hz to the activating coil?

I have asked the same question from DigiKey and TE support people, and they just said it won't work; but they did not explain WHY it won't work. So, I was hoping if someone could explain it to me why it won't work.

Thanks


texts:
I was hoping that some of you experts could help me identify a SMD on the back of a 1080 ti FE. This item was dropped and it appears has some damage done to it. I would like to replace the missing SMD if possible but having problems identifying what they are.
I know the part is still in production because I have identified it on the newer 2080 ti but still unable to find it.
I have attached the image of the back of the 1080ti. I have specified different sections. I am only Concerned about section A and B.

Section A: This is were I believe two SOT-353 SMD's have been knocked off. I think I located a similar  circuit on the board that identifies the missing SMD. (Section B)
Section A:

Section B:

I couldn't find anything on mouser or digikey that match the code.
Parts Symbol "VT"  there are two ".." under the "V" with a sideways "5" I have found possibilities on the internet but not sure if they are correct?
R1122N171B -- Linear voltage regulator IC
RT9198-20PBR -- LinearRegulatorIC
Any help would be appreciated.
Its not as detailed as my own but here is a reference pic of the back of the pcb.

Thxs


texts:
please help me with an advice.
I need a dc switch, but the switch should work from electricity.
For example:
2 in lines and 1 out line. One in line is 9 volts and out line is 9 volts, but the second in line is about 1 or 2 volts. So the idea is if there any voltage on second in line the out is 9v, if there is nothing on second in line - the out is 0v.

Is there name for that kind of switches, what I can find all are manual switches.

Thanks a lot.


texts: TPS54231 input voltage sensitivity quite high?

texts:
I've spent this evening blowing up TPS54231s. Even a couple of TPS54331s.

(note that C31 is currently DNP)

The input voltage is specified as 17-24 VDC, and this circuit's worked admirably well at 17 volts for a couple weeks now. This evening I've been testing it at 24 volts. With an adjustable bench supply (not a fantastic one - it's a surplus laptop power supply and a Chinese eBay adjustable buck converter), it works ok at 24 volts (to be fair, however, at startup the source supply is drooping a tiny bit, so it may not be a fantastic test of maximum voltage capability).

The trouble starts when I plug in a 24 volt surplus laptop power supply. The TPS54231s instantly die and short out the input. Now, I admit I haven't tried to characterize this input supply's startup characteristics by capturing it on my scope. I'm starting to run low on replacement chips and I'm done with that for now. But the steady-state voltage is correct under load and not - 24V. The TPS54231's absolute maximum input voltage is 30V. Could it be at all likely that the input supply is spiking beyond that - however briefly - and that's toasting these chips?

Assuming that's true, would replacing the S1M with a 24V TVS diode solve the problem?

I really don't want to reduce the input supply voltage spec.


texts: Do surface mount resistors have voltage ratings?

texts:
The assumption of the question is that in all cases the power requirements have been met.

I'm working on some mains (120 Vrms) applications and was speccing out resistors. How small of a resistor is too small at these voltages? I normally work with 0603 or 0805. I'm concerned that a resistor may arc over due to the voltage, that the current would jump from pad to pad of the resistor because the pads are so close.

What size of resistor is safe for 120 Vrms?


texts: Is a thermally conductive pad always useful between TO220 and heat-sink?

texts:
I have a doubt about heat-sinking that I could not solve by surfing the Web. My doubt arised when mounting a TO220 package on its heat-sink using these dirty cheap pads, but actually it has quite a general scope.

There are a lot of articles out there about comparisons between thermally conductive pads vs. thermal grease (and most say that grease is better with regard to thermal conductivity), but I found almost nothing about whether a thermal interface pad is needed at all when you are not concerned about electrically insulating the tab from the heat-sink.

Wikipedia says:

  Thermal pads and thermal compound are used to fill air gaps caused by imperfectly flat or smooth surfaces which should be in thermal contact; they would not be needed between perfectly flat and smooth surfaces. Thermal pads are relatively firm at room temperature, but become soft and well able to fill gaps at higher temperatures.

So it seems to imply that a thermal pad is always a good thing to place between the TO220 tab and the heat-sink in order to improve thermal coupling. But is it really so? References are a bit scarce and tend to focus on CPU/GPU cooling setups.

Moreover I remember having seen some equipment where TO220s were attached to their heat-sinks without either thermal grease nor thermal pads. I can well understand why one would avoid thermal grease (more complicated and costly building procedure), but thermal pads are dirty cheap and don't add much effort when you already have to screw/bolt the metal pad to the heat sink.

Bottom line: if I don't care about electrical insulation between TO220 and heat-sink and I don't want to use thermal grease, is putting a thermal pad between the two always useful, from a thermal coupling point of view?


texts: What is the difference between a low end and a high end rework station, and why pay for a higher end station?

texts:
I just got a cheap Chinese rework station, which broke on me after a few minutes. After some inspection, I've found that most of these low end soldering stations look exactly the same, minus some coloring / aesthetics. Let's see a few examples.

This is the station that I  have ordered. The picture is not accurate, as the unit that I have is branded under a fake company "Yuhan" and is likely not made for american use. That's besides the point, note the location of buttons and knobs on the front plate, which are true to the actual unit.

Let's take a look at another. This one is about 30% more expensive, and is actually branded under the name "Kendall", and has the same interface, and in the same location, but with different stickers.

Seemingly the same product, no? Well, let's add another, 2 data points doesn't establish anything more than a coincidence. This is the Aoyue 968A+. it is double the price of the previous station.

It uses the same technology as in the first two, but also runs an extra tube through the compressor to form a "smoke absorber", which then gets spat back out the hot air module.

All of these stations seem like near exact clones, with different panels in the front and minor differences in the interface. So then to my question, What is the advantage of getting a higher quality unit if they all seem to be the same thing?


texts: Is my equivalent circuit, with respect to the open circuit, correct?

texts:
Target: Finding an equivalent circuit with respect to the open circuit, not the closed one.
My 1st question is whether or not my equivalent circuit is correct or not. I'm confused whether or not I should add up resistors even if the circuit is opened.

My 2nd question is: Why when I apply KVL on left loop I end up with a value of V different from the value I get using KVL on right loop. Is my mistake that I have to find equivalent circuit first then apply KVL to find V? Why?

Thank you


texts: Depletion Mosfet working as enhancement NMOS

texts:
The depletion mosfet can also operate in enhancement mode when the gate voltage is positive (say for depletion type NMOS).

My question is :

Will the Shockley equation be still valid in the enhancement mode?
or Should we use the equations of enhancement NMOS?

Moreover, if i am driving the depletion type MOS to a an enhancement type MOS under a constant drain source voltage (Vds), say for example:

In the above case, Vgs is positive and the depletion type MOS is in enhancement mode also Vds > gate voltage ,Does that mean the Depletion MOS is in saturation region of the enhancement mode?

If i neglect Vds here and use current equations of NMOS enhancement type ,
i get:

Resistance =500 ohms.

But am confused about whether its correct or not and if that's the case why should i neglect Vds ?


texts:
Hello stack community!
I've just started to learn about logical gates for my university course.
I'm trying to design and run a simple circuit with not gates in Proteus as below:

But I'm facing with this error message as I try to run it:

I would appreciate if anyone can help me figure out what the problem is? Or Is there any correct form of  this?


texts: Connecting a powered MCU to an unpowered component

texts:
I’m planning on constructing a circuit like the one below as a way to reduce quiescent current draw from the components in series with the transistor T1 (n-channel MOSFET). There will be several components in series with T1 such as sensors, RF-transceivers and a MCU, but to keep things simple my focus for this question is the GPIO connection P1-P2 between the MCUs.

If both MCUs have power I can configure P2 as input and it would seem that the high impedance will prevent any damage from occurring. But what if the transistor T1 is turned off? Extrapolating from what I found during my internet research it would then seem to be unwise to set P1 as output low, since this would cause MCU2 to start pushing a substantial current through P2, possibly powering up MCU2 in the process.

Assuming the above is correct, there are still several other possible configurations for which I could find no clear answer. Thus, under the assumption that the transistor T1 is off, my questions are:

What would happen if P1 is set as output high?
What would happen if P1 is set as input low?
What would happen if P1 is set as input high?
Would it be beneficial to use an optocoupler or something similar between P1 and P2, to separate the MCUs and reduce possible leakage current?

If my questions do not have a general answer, please assume MCU1 is ATtiny13a and MCU2 is ATmega328p.

simulate this circuit – Schematic created using CircuitLab


texts: How to make circuit to reverse dc motor direction with a 12v+ trigger wire

texts:
I have a motorized retracting front license plate on my car that works great via a double pole momentary switch currently.  However I really would like to make it automatically work when the car starts.

It is very hard to modify the device itself due to the way it is installed so I am looking to build a circuit that would operate it based off a 12v + trigger that will be on when the car starts.

The device that retracts the plate is very simple with 2 wires (red and white) to push the plate out you connect positive to red and negative to white.  To retract it you put positive to white and negative to red.  There is no stop switch on the device so it takes about 10 seconds to fully extend or retract.

So the circuit would need to provide power in one config for about 10 seconds when it senses 12v + and the provide power in the opposite configuration when the 12v + ends on the trigger.

I have some basic electronic knowledge and can solder components to a board but creating this circuit is beyond me.  I would greatly appreciate some guidance to get this built.

Thank you.


texts:
I am working on a custom board for the PCDuino3 Core Computer on Module. The design for the reference board for this has bi-directional ESD diodes on every port that is likely to be touched. I am unfamiliar with this type of device, but would like to follow the reference design if possible, but the one the manufacturer uses is difficult to come by (the Semitel ESDPSA0402V05).

What is the criteria for finding a suitable bi-directional ESD protection diode for a 5v device like the PCDuino3c?

From what I have found after an hour or so of searching, I should be aiming for one that has 5v Reverse Standoff Voltage and 0.05 pF capacitance or lower to support high speed data rates. Can anyone confirm this?


texts: STM32F4 Discovery demonstation not working anymore

texts:
I purchased a STM32F4 Discovery quite recently, and when I initially unboxed the board, I hooked it up to my Mac, and the already programmed in demonstration was working 100%. I was able to view the flashing LEDs, and when pressing the user button, the accelerometer would act as a mouse pointer controller, moving the mouse pointer about on the screen as I tilted the board.

I used Texane ST-Link and the Sourcery Codebench Lite toolchain to compile a few other examples, nothing serious, just basic blinky stuff, and everything was working fine when flashing the board.

It took me a couple of weeks to get Eclipse CDT setup with the toolchain, it's quite a tedious process. I downloaded the samples from ST.com compile the original Demonstration from the STM32F4 Discovery board page. The compilation now works fine, I am able to build without errors, but when I flash the board with the compiled binary, everything seems to work fine.

The LED blinky bit works fine, and when I press the user button, once again, the board goes into the accelerometer mode. The lights are flashing as the board is tilted, but this time the mouse pointer interaction stopped, the mouse pointer is not moving at all.

I tried checking if my USB cable was borked, tried a different cable, and I also tried another machine, but no matter what I tried, I couldn't get the board to work as a USB device using the original demo.

Is there some way I can get the original .hex files to flash the board, to see at least if it works in the way it comes out of the box. I'm guessing if I can ask whether I can reset the board to factory standard, with the original demonstration. This way I can eliminate the possibility of whether the USB pins on the board might have blown or something is wrong with my toolchain.

New info

I gathered my guts to try and run the application in debug mode again, set a breakpoint where the HID report is being sent. The code calls USBD_HID_SendReport, but, as per the image below, the if (pdev->dev.device_status == USB_OTG_CONFIGURED) block never executes, the function just returns USBD_OK

Looking at pdev->dev.device_status a bit deeper, reveals the following:

The device status is 1, which matches USB_OTG_DEFAULT, which is one value of four, defined together amongst:

#define USB_OTG_DEFAULT    1
#define USB_OTG_ADDRESSED  2
#define USB_OTG_CONFIGURED 3
#define USB_OTG_SUSPENDED  4

Does this mean anything to anyone? I'm not too much of a guru here.


texts: How do I find value of gain that stablizes the system from root locus?

texts:
Consider the following root locus:

which is obtained by the following code:

s = tf('s');
G = [2/(s+1) 3/(s+2);1/(s+1) 1/(s+1)];

k1 = 1;
k2 = 1;
D4 = [k1*(s+1)/s k2; -k1*(s+1)/s k2];
F4 = G * D4;

figure;
rlocus(F4(1,1))

how can I find the value of \$k1\$ that makes the closed loop stable from the root locus?

I have tried looking at the windows that opens in the plot:

and considered these valuse of gain as a bound for the gain to use,so I tried to use values of gain between \$0\$ and \$1.90\$, but the system is still unstable.

How can i solve this?

If I try to use the Routh criterion to find the value of \$k1\$ I have that the closed loop is:

\$\frac{F4(1,1)}{1+F4(1,1)}=\frac{-k(s-1)}{s^{2}+s(2-k)+k}\$

and then I use the Routh locus as follows:

\$s^{2} :\$  \$1\$  |      \$1\$

\$s^{1} :\$  \$2-k\$  |      \$0\$

\$s^{0} :\$  \$1\$  |      \$0\$

where I have used the bar \$|\$ to indicate that the numbers belong to different columns in the table.

And so I should have that the closed loop is stable for \$k1<2\$, but if I use for example \$k1=1\$ the system is still unstable.

I have also done the Routh criterion for \$k2\$, which resulted in saying that I nedd \$k2>-0.28\$, but the system is still unstable.

What am I doing wrong?

also If I look for the gain margin, I have :

gm = margin(F4(1,1))

which gives as result:

gm =

2.0000

this if I consider \$k1=1\$ in \$F4(1,1)\$, so it agrees with my calculation using the Routh Criterion above, but why is it still unstable?

But for \$F4(2,2)\$ I have infinite gain margin, ans since I have done a partial decoupling, I have also the term \$F4(1,2)\$ for which also the gain margin is infinite. Could it be that the problem is this?


texts:
This circuit mainly consists of a high side current sensing circuit, a current mirror, an op amp, U1, working as a comparator, and a controlling PMOS, M3, to control the current through the load. Here's the schematic:

When the load current exceeds 1A the output of U2 becomes low and indicates an over current alarm. As soon as the current decreases to 0.5A the output changes to Vpu (=3.3V). The following diagram shows how the high side current sensing works:

The over current is denoted by IOC, and IREC is the recovery current. A 0.5A hysteresis margin is considered in this circuit but that doesn't matter for the purpose of this question.

So basically what I'm trying to do is shut down the load when it sinks >=1A and turn it on when it recovers back to safe operation mode, i.e. when it draws less than 0.5A.

For RL=7.8 ohms it draws ~900mA. So it hasn't yet exceeded the upper threshold and the output of U2 is still 3.3V and M3 on. But as I lower the load value to 7 ohms the simulation goes through apparently infinite iterations and never stops. I don't know why.. (I've tried ns, us, and ms stop times but they didn't work)

What happens is that as soon as IL hits the upper threshold, U2_out goes to 0V (actually 333mV) and U1 turns off M3, hence the load current momentarily drops to 0A - note that the propagation delay of U1 is a few milliseconds. Now with load current equals 0A the output of U2 changes to high again (surely delayed with a few ms), turning on M3 and RL continues to draw current. But as this current is still about 1A (consider the situation in the following paragraph), it makes U2_out low again and turns off M3. Then repeat..

So by simulation I'm not able to prove whether or not this circuit works in practice. But let's consider a situation in which a DC motor (9V @ 0.5A) draws more than 1A due to overheating or excessive torque. Then I guess? upon drawing 1A it must stop, then work, then stop, then work, ... until it cools down and draws 0.5A. Of course, this happens very fast and the load might be too slow to respond to the changes. The following picture shows the (average) load current vs. time for when IL approaches 1A (again based on my guess):

The duty cycle is roughly 50%. If the pulsing current peaks at I amperes, the average current the load draws will be IL(avg)=0.5*I. As the load current decreases due to cooling, so does I. In other words, the load receives on average 0.5A all the way to 0.25A. Then it immediately jumps to sinking 0.5A and stays there or increases.

Another situation might be a constant load with RL=7 ohms or less. It will draw 1A but have to switch back and force with a ~50% duty cycle. So the average current it draws will be 0.5*1=0.5A at all times. Not very useful thing..

So questions: Why did the simulation go through infinite iterations? And most importantly, am I right with my above analysis? I may be wrong though..

Thanks for the time!


texts: Mechanical relay replacement for mosfet bias

texts:
This question is derived from this question after additional experimenting how to avoid power up and power down overshoot with or without load connected to power supply. With my present level of knowledge I resolve this issue effectively using the following circuit (see "dashed" frame section):

It's very simple: LM555 is used for power up delay until bias supply (+/-15 for CC and CV logic) is stabilized as shown below (Vout=yellow, +15V=magenta, -15V=blue).

When power is switched off, then relay is demagnetized while valid bias (+/-15V) is still present and make clean cut by connecting the gate to the ground and no overshoot in CV mode is present. That is nicely visible on the following image:

So far so good. My question is: since this solution with relay is a little too "mechanical" is there a replacement for such functionality?

I spent some time experimenting with MOSFET and BJT as a switch but the problem is that we are working here with marginal situations where power for the switch is also coming in and going away. I found some workable solution for power up case but "grounding" Q1 gate in case of power down to inhibit any residual control voltage what results in appearing undesired (uncontrolled) DCIN to the OUT+ is beyond my expertise.

EDIT 2015-02-26: I spent some time to use different type of bias supply with proper power sequencing. That made this question and one from which this one is derived not relevant anymore. Used solution is mentioned here and here.


texts: Is it possible to amplify AC signal with In Amp in Single Supply?

texts:
Is it possible to amplify AC signal with In Amp in Single Supply, however, with a sufficient reference to 'compensate' the negative part of the signal?

I believe that a in amp with a single supply, for example 5V and GND, can not amplify negative signals because the power is not symmetrical. Right? Or not?

My point is:

If I add a reference (Pin 5) that makes the signal completely positive, is it possible to amplify this signal? Having as a result a fully positive amplified signal?

I'm using a in amp (INA118) with single supply (GND on pin 4 and 5V on pin 7) with gain equal to 2 (Rg = 50KOhm). On reference pin 5 I'm adding + 2.5V (Vdd / 2).

In my project, I need to inject a 1mA electric current into the patient's body through 2 electrodes, receive this signal through 2 other electrodes, and amplify this signal. Like This.
The sine is a sinusoid of 1.98V pp and 1mA (With a frequency sweep from 1KHz to 100KHz) with the voltage ranging from -0.99V to +0.99V. The Schematic is like this.


texts:
I need to make a module which responsible to search overall memory to find a specific value and return the address location, but I have the following error after do Synthesize in Xilinx.

Loop count limit exceeded. Condition is never false.

the Search module: responsible to take the value input and do search on the RAM memory, and return address.

module Search(
    clk,
    rst,
    SearchData,
    FindAddress,
     StopSearch
);
input           clk;
input           rst;
input[7:0]      SearchData;
output reg [1:0]   FindAddress;
output reg StopSearch;
integer i;

wire read_rq;
reg [1:0] nxt_address;

initial
begin nxt_address=0;i=0; end

wire[7:0] read_data_inx;

D0_RAM1 D0(
    .clk(clk),
    .rst(rst),
    .read_rq(read_rq),
    .write_rq(0),
    .rw_address(nxt_address),
    .write_data(0),
    .read_data(read_data_inx)
);
always @(posedge clk )
begin
    while (nxt_address <4) begin
        if (read_data_inx == SearchData)  begin //master i has priority
            FindAddress <= nxt_address;
            StopSearch=1;
      end
        else begin
          StopSearch=0;
        end

        nxt_address <= nxt_address+1;
    end
end
endmodule

and the RAM module:

module D0_RAM1(
    clk,
    rst,
    read_rq,
    write_rq,
    rw_address,
    write_data,
    read_data
);
input           clk;
input           rst;
input           read_rq;
input           write_rq;
input[1:0]      rw_address; //2 bit
input[7:0]      write_data;
output[7:0]     read_data;

reg[7:0]     read_data;

integer out, i;

// Declare memory 2^2 x8 bits
// 2^2 = 4
reg [7:0] memory_ram_d [3:0];
reg [7:0] memory_ram_q [3:0];

// Use positive edge of clock to read the memory
// Implement cyclic shift right
always @(posedge clk or
    negedge rst)
begin
    if (!rst)
    begin
        for (i=0;i<3; i=i+1)
            memory_ram_q[i] <= 0;
    end
    else
    begin
        for (i=0;i<3; i=i+1)
             memory_ram_q[i] <= memory_ram_d[i];
    end
end
//q=d

always @(*)
begin
    for (i=0;i<3; i=i+1)
        memory_ram_d[i] = memory_ram_q[i];
    if (write_rq && !read_rq)
        memory_ram_d[rw_address] = write_data;
    if (!write_rq && read_rq)
        read_data = memory_ram_q[rw_address];
end

endmodule

the while statement which caused the previous error.


texts: Can I just add cells to a solar panel to prevent voltage drop?

texts:
I have a solar panel which should be putting out 12.5v and 30 amps which has 100 solar cells, but I recently discovered it needs to be 17v or so because the voltage will drop. If I add 11 0.5 volt solar cells in series to increase that to 17v, will it work to offset the voltage drop or does it also need more amperage?

The cells are 0.5 volts 8 amps so 4 watts each. They are wired as 4p25s and rewiring is not an option as they are permanently fixed. I have no battery or controller at this moment. I would prefer not to use extra cells in 4p11s as the extra wattage will underutilize my 400w inverter. The solar panel I made is rated to be 400 watts and my load is computer and it takes 250 watts. I am going to use an MPPT controller. The extra cells are going to be put on a smaller panel wired in series to use in series with the larger panel.


texts: Convert transformer resistance data from Watts to Ohm

texts:
Short version: How can I convert transformer resistance values from Watts to Ohms?

Long version: In PSS/E, transformer resistance can be entered as either per unit values (system base or transformer base), or as a MW-value (I believe this represents loss at full load).

How can I convert the values from I/O code 3 to I/O code 1? That is from pu based on winding kV and system MVA-rating to full load loss and per unit impedance (for reactance).

Voltage level: 125/11 kV
System MVA rating: 100 MVA
Transformer rating: 35 MVA


texts: connection from an comparator to an optocoupler

texts:
I have the circuit below to decode a signal that is defined as Logic high >9.5 V and Logic low <6 V
To determine the treshold, schmitt triger is used, then an optocoupler is used to isolate the receiver MCU. Here is a larger view of the first picture.

Here is the comparator's datasheet.

Here is the optocoupler's datasheet.

My problem is that the circuit above does not decode the signal, I guess I am doing something wrong on comparator's output and optocoupler's input, so that optocoupler does not output the correct signal.

Here below is the oscilloscope output of the signal before and after the optocoupler. Signal A (blue) represents the signal at the input (pin 2 of optocoupler) and Signal B (red) represents the signal at the output (pin 6 of optocoupler). At the bottom of the picture, it shows the max, min, average voltage level's of the signals: Signal A's max: 1.542V and Signal B's max is 130.5 mV.

When I measure the current on the line from comparator's output (pin 1 of comparator) to optocoupler's input (pin2 of optocoupler), I read the current value varies between 4.7 to 6.4mA (should be because of the PWM). According to the optocoupler's datasheet, 5mA should be the logic high. However, the signal does not go to logic high at the output of the optocoupler.

Here  below is the oscilloscope output: signal A (blue) is the Vi (pin 2) of the comparator and Signal B (red) is the comparator output (pin 1)

An interesting output oscilloscope output is below. The Signal A (blue) represents optocoupler's input (pin 2) and the Signal B (red) represents the comparator's output. Both output are connected via a 22 awg cable, I could not understand why the signal levels are different

I would highly appreciate if anyone could tell me how to fix the circuit, so that the MCU would receive the decoded signal. Thank you in advance!


texts: 60 Hz signal between thumb and forefinger?

texts:
I was playing around with the oscilloscope and noticed when I measure between two points on my hand, I see about a 1 V signal at about 60 Hz.  Do I oscillate at 60 Hz?  Does this have anything to do with lighting or main's hum?

Where does this 60 Hz signal come from?


texts:
I am new to Xbee so I need your help. Well I am trying to create an indoor localization system. What I am trying to achieve is explained below.
The tags (Xbee S2C) sends out ping every 3 second to the readers (Xbee X2C) around the corners of the room with its Id. [Using RPC]
Upon receiving the ping the reader gets the RSSI and forwards its own id, tag id and RSSI to the pc reader (Xbee S2C) [Using RPC]
The PC readers keeps receiving the data and forwards it to the localhost where I have triangular approach to calculate the location.
Now the problem is I came to know that S2C doesn’t support MicroPython so I need you guys to help me program and achieve what I have explained above.


texts: More than 1-Wire interface (SWI) (ex DS24132) discovery and identifications

texts:
Just started experimenting with 1-wire (SWI) communications. I am currently waiting for my DS2413 and iButtons to arrive. I have been searching for information and there are lots of examples. My question is more practical than how.

Most of the SWI libraries have a search function. So discovering them seems easy. Here is a discussion in this forum. How can I scan a One-Wire (1-Wire) bus for all connected devices and list their IDs

My qustion is a little different. After discovering the serial number (64-bit ID), how does the software, know this serial number (64-bit ID) goes to this physical chip? For example, say I have more than one DS2413, one is driving "sensor 1", two is driving "sensor 2", three is driving "sensor 3" and so one. The search enumerated 3 64-bit ids. How does the software know which 64-bit ids go to which sensor?


texts: How can I mirror a group of components and wires across a line in eagle, without having it switch board sides?

texts:
I want to design a board that is symmetrical - I have designed the left side, and now I want to copy the components and wires to the right side such that it is "mirrored" across the center line - what is the best way to accomplish this in eagle?

here is a screenshot of what I am working with:

I want to take the components inside the orange box and mirror them across the teal line, such that I can then re-incorporate them into the PCB on the left


texts: Constructing a heater by applying power to resistors

texts:
I need to make a resistor heat up a hot end on my 3D printer separate from my 3D printer control board, mainly because my rep rap is also my CNC mill, which its controls have no way to monitor heat and send voltage to cycle heat. I need it to heat up to at least 280°C and would like to know how to make a circuit to achieve this.

I have tried the following concepts with no luck, a hot glue gun heater element, not hot enough and making a circuit would be my best option just don't have enough knowledge to accomplish that


texts:
There is electrical humming sound coming from wemos D1 mini v2 module.
I'm using 5v 3A power supply connected to 5v input pin. I suspect its the current input which cause sparking/humming sound. Although there is no heating of device as such.

What is the recommended current supply for D1 mini module. will it harm module in long run?


texts: Rotary Encoder - Power Source for small Fork Light Barriers with NI 9401

texts:
Task
In order to measure the angle and calculate the angular velocity and acceleration of a large metal wheel with a rotational frequency \$f = 0.01 \ldots 1.00~Hz\$, I try to build a custom rotary encoder located on the axis of the wheel.
The basics to this task are described in this National Instruments Tutorial #7109. To be exact, I want to have three rotating metal discs (Data Channel A, Data Channel B, Reference Channel Z) with a radius of \$r_{Disc} = 114.592~mm\$, i.e. with a circumference of \$U_{Disc} = 720~mm\$.
For an 1° accuracy, I plan to cut \$4~mm\$ slits on the outside of the discs - 90 slits each for discs A and B and 4 slits on disc Z (0°, 89°, 182°, 271° references). The slits should then be detected with fork light barrier sensors.
I already have the following parts from National Instruments, which I would like to use for this task:

Controller NI cRIO-9074 or Compact Chassis NI cDAQ-9171
Bidirectional 5V/TTL Digital Input/Output Module NI 9401

Input Voltages
\$2.00~V \leq V_{In,High} \leq 5.25~V\$
\$0.00~V \leq V_{In,Low} \leq 0.80~V\$
Output Voltages

Output High
Sourcing \$100~\mu A\$: \$V_{Out,High} \geq 4.7~V\$
Sourcing \$2~mA\$: \$V_{Out,High} \geq 4.3~V\$
Output Low
Sinking \$100~\mu A\$: \$V_{Out,Low} \leq 0.1~V\$
Sinking \$2~mA\$: \$V_{Out,Low} \leq 0.4~V\$

Questions
Now the question is which light barrier sensors I can use. The first idea is a Panasonic PM-T54 (NPN Open-Collector Transistor, datasheets here and here) or a PM-T54P (PNP Open-Collector Transistor, datasheets here and here).
They each require a supply voltage of \$5~V~DC \ldots 24~V~DC \pm 10\%\$

Can I use both the NPN- and the PNP-Type or would one of those be more suited for the NI 9401?
If I understand correctly, the PNP-Type does need a sinking input (i.e. sinking output on the NI 9401) with a grounded connection to the load, whereas the NPN-Type needs a sourcing input (i.e. sourcing output from the NI 9401) with a voltage source to the load.
Does the NI 9401 provide enough current?
In the datasheets of the sensors, a maximal current consumption of \$50~mA\$ (circuit diagram in first datasheet or page 6 in second datasheet) or \$15~mA\$ (page 5 in second datasheet) is indicated.
(Side Question: What is the difference between the maximal current consumption and the maximal sink/source current on page 5 in the second datasheet?)
However, it seems that the NI 9401 is only capable of providing a maximum of \$2~mA\$. Is this correct? Does this mean that I need a different power source for the sensors, but that I can keep the NI 9401 as an input module?


texts: Selected ESP8266 WiFi modules short out ATX power supply

texts:
I have a test circuit connecting an ESP-8266 WiFi module to a MAX7219 LED driver. The setup is powered by a modified ATX power supply for both 5V (the MAX7219) and for 3.3V (the ESP-8266).

The setup worked fine for days with the first ESP-8266 unit I purchased. Photos of the setup are below.

I later purchased two additional ESP-8266, flashed them with the identical code, and substituted each of them into the circuit for testing. They each work fine for about 15 - 30 seconds, and then the whole ATX power supply shuts off.

The only time this power supply shuts down like this is when I have short circuited something. But I am not sure how different ESP-8266 modules could have a time-delay short?

I am really puzzled because I would think a short would happen right away, not after a few seconds. This behaviour happens with both of the new ESP-8266 modules I purchased, which makes me think manufacturing defect is unlikely.

While I did buy all ESP-8266 modules from the same e-bay vendor, I noticed that the last two (non-working; B & C in photo) are not identical to the first (working; A in photo). The circuit traces seem to be slightly different.

But all the spec sheets I found indicate that all of these ESP-8266 should be wired the same way. The only device differences I read about are with different amounts of on-board memory, but I am not sure how / why that could possibly lead to a hardware short circuit.

I am not really sure what is going on and would love any insight.

As requested, I monitored current / voltage for each of the various ESP8266 devices. I do not have an oscilloscope to look for spikes - I used two multimeters and watched manually. Here is what I observed:

  GOOD
  3.35Vdc 20mA-60mA

  BAD (#1) - repeated 3 times, same behaviour
  3.32Vdc 70mA cut out ~20s

  BAD (#2) - repeated 3 times, similar behaviour
  3.32Vdc 74mA cut out ~60s, 30s, 10s

  GOOD (repeated)
  3.35Vdc 20mA-60mA (fluctuating; seems a lot "noisier" than the BAD chips)


texts: Recommended dsPIC schematic design and voltage regulator

texts:
I'm having some problems with my dsPIC33EP64MC202. I believe it is a hardware problem, but I'm not sure yet.

I designed the hardware, designed the firmware, and everything was fine in debug mode. So, I stopped to use it in debug mode and I programmed it definitely. One month later it stopped with no reason, so, I tried to debug it and, when I tried to load the code, a message appears to inform "Invalid ID". I tried everything, I plug it, unplug and, finally, I came to the conclusion that it meant that the dsPIC died. So, I put another dsPIC, same model, and it worked fine, but, approximately one month later, the same thing happened, it stopped and when I tried to debug, the message appeared: "Target Device ID (0x1d390000) is an Invalid Device ID". So, another dsPIC lost.

Well, I will put here my schematic and the specification in datasheet. As you can see, the connection in Vcap is not the recommended, I put it in VDD instead of GND. But, if I do not put Vcap in VDD, debug does not work. What can I do? Would it be the responsible for the dsPIC fail?

Another hypothesis is that the problem would be due to the voltage regulator, I use a LM317 to convert 13.8V to 3.3V. The device need to be functioning 24hs, is this source power a good choice?

Obervation: I'm sorry, the schematic of the regulator voltage was not updated. There are no resistors of 375 ohms, but one of 412 ohms instead. So, the calculation will be:

1.25 V * [1 + (412 ohm/240 ohm)] + 50 µA * 187.5 ohm = 3,41V

Any help would be great.


texts:
From a Data Comms textbook:

These are the approximate square waves (Fig 3.7a and 3.7b):

This is where the effect of changes in bandwidth on data rate is determined:

The problem is the explanation/calculation makes no sense to me. I don't see anything in the calculation that ties the bandwidth of the channel to the data rate that was eventually calculated. All they did was take the toggling rate (frequency) of the square wave and multiply it by 2 to get the data rate; nothing that explains how increasing bandwidth increased the data rate.

What I understood previously is that the main reason increasing bandwidth allows higher data rate is because as high bandwidth allows transmission of more frequency components, which in turn allows the receiver to better distinguish between 1 and 0 and ultimately allowing the data source to increase its toggling rate (i.e. data rate) since it knows the receiver can handle it. My questions are:

What have I missed in the textbook's explanation, if anything; or is it just a poor explanation?
Is there anything wrong with my understanding of the bandwidth-data rate relationship?
And just to clarify, the bandwidth considered here is the bandwidth of the channel and not that of the input signal? (though I know the channel's bandwidth does affect the signal bandwidth by limiting it)

Thanks.


texts: Using built-in gain on ADC vs different current-transformer?

texts:
I'm looking to eventually build an energy monitoring circuit using a raspberryPi as the controller and some type of ADC as the collector.  I'm generally following the architecture of the emonTx used at openenergymonitor, except instead of using an Arduino I'm planning to use some type of smaller, discrete ADC, such as the Adafruit 1015 breakout board, or some variant of the MPC3208.  While looking at various ADC options I've come across a few questions that I can't seem to find simple answers to...

1) How do I optimize input range vs. accuracy?   The initial current-transformer I plan to use has a range of +/- 333mv, but it's possible to find similar ones that have an output range of +/- 1V.  Is it correct to assume that the one with the "larger" range will give more precision?  If so, is there a way to know where it's a meaningful amount of additional precision?  (Practical question: do I need to go through the hassle/expense of finding/ordering a 1V model CT?)

2) The 1015 breakout board has a built in ability to increase the gain - but I have to assume that increasing the gain will also increase the noise.  Is there any way to know (explicitly or just "by experience"?) whether the noise/inaccuracy introduced by the gain setting will be better or worse than the error introduced by building a more complicated circuit to lift the voltage into an acceptable range for the ADC?

3) Assuming I have control over the reference voltage on the ADC, is there a meaningful difference between using the bottom end of the range vs the top end of the range?  Or does the convenience of being able to use an existing rail (i.e. the 5V that already powers the raspberryPi) outweigh this?

4) Is the extra circuitry on the breakout board useful in this type of application?  I can clearly see where the ferrite and capacitor logic helps reduce the noise, but I have no idea whether we're talking about meaningful changes for this type of circuit.  ;-)

And I fully recognize that it's possible that the answer is "it doesn't really matter, because no matter which of these you choose the circuit is going to be XXX accurate anyway which is way more precise than you need to monitor home energy use" - if that is indeed the answer then that info is useful, but I'd still like to understand how the above questions would be taken into consideration if we assume that ultimate precision is required (which I realize it's not...)


texts:
Hi all I am interfacing with GSM SIM900 with atmega32. I am trying to extract the message contents. User will send message  like CHANGE7532167845 to SIM installed in GSM device. So to extract this I am using for loop followed by many if conditions. All I need to do is to save the number in a another variable. Following is my code:

for(int k =0; smscontent[k]!=NULL;k++)
        {
            if (smscontent[k] == 'C')
            {
                if (smscontent[k+1] == 'H')
                {
                    if (smscontent[k+2] == 'A')
                    {
                        if (smscontent[k+3] == 'N')
                        {
                            if (smscontent[k+4] == 'G')
                            {
                                if (smscontent[k+5] == 'E')
                                {

                                    if(isdigit(smscontent[k+6]))
                                    {
                                        serial_Tx("MATCH");

                                    }

                                }
                            }

                        }
                    }
                }

            }
            }

My control is reaching isdigit because on terminal I am getting MATCH but after that what I should do to save number in a variable.? Please help

serial_Tx function

void serial_Tx(char *str)
{
    for (unsigned int i=0;str[i]!=0;i++)
    {
        UDR=str[i];
        while(!(UCSRA&(1<<UDRE)));

    }

}


texts: Can/Should DC-AC Inverter Be Used To Power Inductive Loads (AC Motor)?

texts: Trying to make an inverter (or buy), to power a 120VAC motor using a 12V lead acid battery. However, after many hours of searching it seems that inverters are not intended to operate on inductive loads such as multi-phase motors. Why is this the case?


texts: PCB material that does not swell from water absorption?

texts:
We designed a microchip to sense high pressures under water. The chip senses pressure through a thin diaphragm that deflects and a corresponding piezoresistor circuit that measures the deflection. For every pressure, the chip spits out a corresponding voltage output.

The chip contacts are soldered directly to a FR-4 PCB and then the whole thing is potted in urethane.

The chip works great outside of water, and underwater, but the transition causes problems. Say the chip is placed in a water tank and pressurized to 500 psi for a few hours. It measures 500 psi no problem. But when we depressurize the tank and remove the chip, the chip outputs 20 psi, or some other random number, when it should measure 0 psi.

We think that the FR-4 material is swelling from the exposure to high pressure water. This swelling would stress the pressure sensing diaphragm and cause the erroneous reading.

What are good PCB materials that swell less when exposed to high pressure (~500 psi) water?

Or, any other hypotheses as to what is happening?


texts: PIC MCU: XC8 Not treating TMR0 as a 16 Bit Register

texts:
I recently finished a project programming a PIC18F2620. All was good, but I decided to explore the new stuff Microchip has to offer, and am now trying out the PIC18F47Q43.
I'm getting a strange problem when loading a value into Timer 0. For the 18F2620, all you had to write in MPLAB was "TRM0 = 65535" and boom the thing has it's 16 bit value. When I try and do the same with this micro though, it's saying its not a 16 bit register, and I'm getting this error:

I know that TMR0 isn't actually a register, it is just a tool put together in XC8 to make things easier, but they wouldn't have revoked this feature in later releases would they?
If they have taken away this feature, can you please help me figure out how to load these timers with 16 bit values. I'm using MPLAB IDE and XC8 2.30 (the latest version).


texts:
Given this circuit considering that before the switch closes the network is in a steady state.

What steps should one follow to trace \$V_{L1}\$ before and after the closing of the circuit ?

As far as i know there is a transient formula involved \$ V(t)=[V(0_{+}) - V_{ \infty}]\exp{^{\frac{-t}{\tau}}}+V_{ \infty}\$

I had no problems calculating \${\tau}\$

What I'm having a hard time with are \$V_{ \infty} , V(0_{+})\$ and how to trace the graph once I calculated them, could you provide any insights for this ?

In my case is useful to calculate \$V(0_{-})\$ ?

What would have changed if instead of the inductor I would have had an capacitor ?

(Correct me if my thoughts are wrong)

For Olin : I would calculate \$R_{eq}=R_{2}//R_{4} = {\frac{1}{2}}\$ and having \$R_{1}\$ in an open circuit provided by \$a\$ , \$R_{2}\$ in a short circuit provided by \$L_{1}\$ and \$R_{3}\$ in a short circuit provided by \$SW1\$

So for \$t<0\$ the tension \$V_{0-}=0\$ because \$L1\$ is a short circuit ?

While for \$t>0\$    one could calculate \$V_{0+}\$ but here is where I get stuck as in my solution it suggests to use Millman theorem and calculate \$V_{0+}={\frac{a-I_{L1(0_{+})}+{\frac{e}{R_{4}}}}{{\frac{1}{R_{2}}}+{\frac{1}{R_{4}}}}}\$  In this case what I don't understand is why they consider part of the contribute the current \$I_{L1(0_{+})}\$ ?

Is \$I_{L1(0_{+})}\$ same as \$I_{L1(0_{-})}\$ ? If yes why ?


texts: Charge injection Compensation for Demodulation

texts:
I have a precision application where I am trying to limit the charge injection on an analog mux that is demodulating a sine wave from 0deg and 180deg components (with a trigger signal from a comparator).
Is there anyway to add a compensation circuit to guarantee that charge injection glitches will be kept to a minimum?
See the below background info:
Simplified Schematic:

Below is a more complete design. I have a simple instrumentation amplifier with its 0 and 180 components going into an analog mux. (Note: VDD=+5V and Vee=-5V). The output of the demodulated signal is going to a Low pass filter.
I have chosen the ADG1436 as the analog mux for its low On resistance, low charge injection (30pC) and low leakage.
Detailed Schematic: Cmult=2, Rfv and RF2v=1k, RGv=500, Cf =1.2p

The simulations look great and show no noticeable charge injection glitches.
But there is a slight offset upon a switch, which I think is macromodel modeling of charge injection? (see pink signal = Vdemod - input signals) But the ~8mV offset doesn't line up with Q/C=V  ==> Vcharge = 30pC/(6.8nF*2) = 2.2mV
ADG1436 Simulation:

When I built an earlier circuit with a different mux the ADG613 (made into a SPDT), with 1pC charge injection, the simulations also showed no noticeable glitches on the output or inputs to the mux. Yet as seen below there are noticeable spikes.
So I think the macromodels isn't really showing the maximum charge injection that could occur!
Inverted Demodulated signal with charge injection glitch from earlier ADG613 design

Charge injection on the sine wave inputs (sorry about the scope triggering)

So I am wondering is there anyway to add a compensation circuit to guarantee that glitches will be kept to a minimum? I was wondering if I could put capacitors on the output of the in-amps to absorb some of the excess injection.


texts:
Consider the open loop transfer function of \$\frac K{s^3+2s^2+2s}\$.
In a negative feedback system, that has three poles \$0, -1+i ,-1-i\$.
Is there any break-in or break-away point because only one real pole is here? If we solve the derivative of denominator then we get \$s=-0.67\pm 0.47\$ but the points do not lie on real axis.
Please ensure if my approach is correct or not.


texts: Can I plug USBasp to an outlet via cellphone charger adapter and therefore power my standalone ATmega328p?

texts: I wanted to power my circuit (ATmega, 2 LEDs and crystal) but I do not really want to use batteries. Can I just plug USBasp into cellphone charger (5V - 1A) and then with plugged USBasp power my circuit? Will USBasp decrese the current or ATmega (or both!) will be fried? Or just overheated or something.


texts:
I have a PCB in which I need to change the crystal. I don't have scope right now with me. So is there any way I can check if the crystal is working or not after soldering it in PCB. I am not good in soldering so I thought there might be some way of checking the crystal so that to confirm that it is soldered correct and working fine. I have this Fluke Multimeter

Thanks


texts:
when reading the datasheet for some SMPS controllers like the lm25116, I can see that they operates around 1MHz, but nowhere we can find their duty cycle resolution: 8bits, 12bits, 16bits ?

So I'm asking myself this question: - for a 1% duty cycle -

the on state is only 10ns with a period of 1us
or the on state is always 1us with a period of 100us ?

On my point of view, the first proposition seems pretty strange (10ns on time) because for a standard 10bits resolution (40mv precision for 40V) the chip should run at 1GHz to be accurate !

I guess the proper answer is something analog instead of digital, but nowhere I can find the "corresponding" resolution.

Thanks in advance for your help.


texts: How can I interface to a capacitive sensor and measure its value with my Netduino?

texts:
I've just bought a rain detector, not realizing it is a capacitive sensor (I had assumed it was going to be resistive, as most are). However, being capacitive means it can be sealed so no electrodes are exposed to the elements, so I can see the advantage in that. The device simply has 2 terminals and is essentially a variable capacitor.

I am a software engineer by profession and never been any good an analogue electronics (I've tried, but I just am no good at it). The application notes that come with the device make no sense to me. They show an RC series circuit which connects to a microcontroller pin which is labelled with several functions and they make no mention of how the pin is configured or how to measure the value. They also omit all the component values from the schematic.

The only bit of information I've found that is of any real use is that the device has capacitance of 100 pF when completely dry and >= 360 pF when completely wet.

On my Netduino, I have GPIO pins, A to D, PWM, all the usual stuff, it works at 3.3 Volts. Could someone please help me figure out how to connect this sensor, what type of input to use and figure out any circuitry that needs to go around the sensor?

These are links to the data sheet and application notes, although they are not much help (the sensor is literally just a capacitor).
http://en.telecontrolli.com/downloads/category/21-sensor.html?download=83:rain_sensor
http://en.telecontrolli.com/downloads/category/21-sensor.html?download=84:rain_sensor_applic_note


texts:
I have a handful of these chips and I'm trying to figure out what they are. This post links to two sites, smdcode and s-manuals. The former is dead and the latter only classifies A44 as perhaps a transistor. Google wasn't helpful either. Can you help out?

The two lines of codes are just A44 and 66P2. No logo. It has 8 pins total.

Blurry pic below. Since it's so generic/unbranded I don't think digging out the fancy camera gear changes anything. Body dimensions are 3.1 x 2.8 x 0.86 mm.


texts: MCP2221 circuit not showing up in device manager, let alone as a COM port

texts:
I have made a simple custom board based on an Atmega168A and a MCP2221 for the USB bridge. I have successfully programmed the Atmega to shine the on-board LED and display "hello" on the Serial bus (using an ArduinoUNO as ICSP) with bootloader burnt (Minicore, if that matters), but when I proceeded to disconnect the ICSP circuit and connect the on-board USB link (J3 on the schematic) nothing happens. Nothing in Windowsw's device manager.

I used a MCP2221 not long ago with the same computer, using the same subcircuit ("USB-UART" block on the schematic), and it used to work just fine.

What did I miss? I do not think this belongs in Arduino SE, my guts tell me something's wrong with my circuit somehow.

Circuit  below, obviously design-rules-checked so accurately describing the actual PCB (manufactured by Eurocircuits). Wire labels are all net names. The resonator is not populated (I used the internal 8MHz oscillator when programming), and the switch is used to reset the uC when programming via USB.


texts: Measure the resistance of some DC Motors

texts:
I did the following to measure the resistance of some DC motors I have and I'm wondering if I did it properly and if my conclusions are sound:
I had 4 motors (same model) already connected to a breadboard in parallel. I have a semi-broken "Universal AD-DC converter" variable power supply that is set to output 4.5 V. When I plugged that on my breadboard (motors started turning) and measure the voltage straight on the adapter, it was fluctuating around 10 to 11 Volts (unregulated I guess). I then measured the current and it was about 0.6 A (even though the adapter says "200 mA Max").
It means my circuit had a \$16.6\Omega\$ resistance, so each motor is around \$65\Omega\$.
Makes sense?


texts:
I am trying to understand a design that would enable us to measure/determine the Total Harmonic Distortion.

Few key points:

The system is micrconcontroller (TI, C2000, dual-CPU) driven electronics
It has a decent and functional external ADC circuitry (ADC resolution is 12-bit)
The input (whose THD is to be calculated) to the ADC system is a 3-phase supply, 230V (RMS)
The fundamental frequency is 50 Hz
Number of samples to be taken: 400 samples per cycle/waveform.
Maximum number of harmonics to be calculated for 50

I read through a lot of material for understanding the math for 'nth' harmonics in a signal. For example, 2nd harmonic would have the frequency twice the fundamental frequency. And, I figured that the complex waveform at 2nd harmonic would be summation of the two signals and can be represented as:

Where, 'series 1' is fundamental sine wave, 'series 2' is the sine wave with frequency twice the fundamental and 'series 3' is the complex resulting waveform.

I looked into the DFT-related references and I understand how to calculate DFT of signal. Based on samples I figured that I need to generate a 400-point DFT Matrix (400x400) for DFT calculation (multiplication).

I have a few questions:

Since I want to calculate upto 50-th harmonics, I assume my equation f(t) would be a large equation consisting sum of all signals that (can) have frequencies for upto 50th harmonics. Am I right?
Since the number of samples is 400, I need to generate a 400-point DFT matrix (Possibly using matlab?), is that correct?
The output of DFT is 400 values, obtained from the DFT (after matrix multiplication) and typically referred as magnitudes. How can those be used (in a C program) to calculate THD.
I didn't understand the relation between the DFT and THD.


texts: Reducing give in bi-polar stepper motor axel

texts:
I have the NEMA-11 bi-polar stepper motor (http://www.active-robots.com/3322-0-28sth32-nema-11-bipolar-stepper-with-100-1).

The issue is that I am able to turn the axel about 5-8 degrees without applying much force. This is an issue as what I am connecting it to can sometimes lightly pull causing the position to be inaccurate.

I am new to stepper motors. What can I do to reduce this?


texts: How do you call wire pins that can be used as jumpers with your breadboard?

texts:
I can't seem to find these things on electronics distributor websites. There is a bunch of various pins and connectors but I can't find these among them. What are they called? I tried "dupont 2.54mm connector/pin" and didn't get the results I expected.

Thank you.


texts: Frequency comparator circuit in LTspice not outputting expected state

texts:
I'm trying to simulate the circuit in the method shown here in LTspice as:

I use the same parts 74HCT74 and 74HCT00.

But the circuit does not function. Here I set F2>F1 and the outputs at R1 and R2 alwyas zero. I tried the swap the F1 and F2 nothing changes. I couldnt figure out what can be the problem here.

I uploaded the above circuit in LTspice here along with the 74HCT library and symbols as rar file.


texts: Playing multiple sounds simultaneously with Arduino

texts:
I would like to play multiple audio samples (wav files) simultaneously using an Arduino microcontroller. Is this possible by use of external (audio procesing) hardware?

I read about the Adafuit Wave Shield:

https://www.adafruit.com/products/94

But from what I could understand, it seems possible only to play one sound at a time using this board.

What is a good way to playback multiple sounds simultaneously using Arduino?


texts: Electric field strength from AC conducting wire in form of a loop along z-axis?

texts:
Let's say I want to calculate the electric field strength from an AC conducting wire, with a certain frequency and current. The wire is in the form av a loop. I want to calculate the E-field along the symmetry axis (z-axis) of that loop of wire.

How would I go about it?

OLD POST BELOW:

Let's say I want to calculate the electric field strength from an AC conducting loop of wire, with a certain frequency.

The total charge Q will be

$$Q=\int i(t) dt$$

Since the current entering in one end of the wire, and at the same time exits at the other end, the total charge Q will be zero? Is this correct? Therefore the electric field strength will be zero?


texts:
I am building an array of LEDs that I plan to power up with an LED driver. Here is the one I chose - Mean Well LCM-60U

I have been using it and it works great. However, I have one thing I am trying to optimize on it and that is turning it on and off consistently. That datasheet explains that the turn-on time is about 1 second from cold start and that the turn-on time can vary the more it is turned on and off. I am using PWM control for dimming, but it is not possible to dim all the way to zero current. Turning on and off the AC line works, but I plan to have other controllers working in parallel and I would like them to turn on and off pretty close to the same time (100ms or so of each other).

I have two ideas to go about it, but I am not sure if this will harm the driver in any way. My first idea (that I tried) was to place a relay contact and a few regular diodes in parallel with the LED string. When I click the relay on, the diode absorbs all the current leaving the LED string off. When I want to turn on the LED string again, I open up the relay and the driver goes back to power the LEDs. Since I am cycling between a lower voltage (2V) and a higher voltage (27V), my LED string never gets overvoltaged so I am happy with the result. I just hate that there is wasted energy. My hunch is that no harm is caused to the driver, but I am not sure if this yields more consistent on/off times. Side note: I guess I do not have to use a diode to direct away the current, but a resistor would probably work okay too.

The second idea was to simply have a relay contact in series with the LED string. Thing is, the maximum open circuit voltage can reach 102V. When I close the relay to power the LEDs, I am afraid that the initial 102V will damage my LED string before the current regulates the string and it goes down to 27V.

Any comments on what I have tried so far or other ideas?


texts: frequency modulation and incoming signal selection

texts: I have some understanding of what frequency modulation entails - it entails "adding" a new frequency to the frequency spectrum of a signal. But how, exactly, is a modulated signal selected in the receiver? Say you're listening to your car radio and want the radio signal modulated at 80 Hz or something. How does the actual system select it? In general, not in car radios specifically.


texts:
I recently bought an ESP-01S module and it only has one blue LED on it (unlike the other ESP8266 modules) and when I connect the 3v3 and gnd, it blinks twice.
I was wondering what does this LED indicate? is it only power? or maybe connected to the RX and TX pins?
Unfortunately, I couldn't find a complete schematic of the board or a detailed datasheet. The only datasheet I found was this which didn't include details.
Also, when I tried to power the ESP up, I noticed that the wires spark when I try to connect the 3v3; Does that mean I'm not supplying the module correctly? I'm using the 3v3 and the GND pin on arudino Due


texts: How to write testbench for digital circuits that output video/audio signal

texts:
As far as I have seen, a testbench will provide some stimulus to a DUT and the output shall be compared with expected values. This is one way to verify.

Many digial circuits however, may produce more complex outputs for example if they output a video or audio signal. How to people write a testbench that is able to verify such a signal.

In other words, audio/video signal may be have a lot of data in it. Do we need to look at it from a higher level when we simulate?


texts: Transformer makes an audible noise with SSR but does not make it without SSR

texts:
I have a large transformer (see below) that I wanted to switch on/off from a digital platform using a solid state relay. The equipment works without any issue and makes no noise when the solid state relay is bypassed but the transformer makes a buzzing noise when it is in series with the relay. I tested the equipment with the relay and the noise and it seems to be working but the buzzing noise worries me and I fear for the transformer.
This is my SSR: PF240D25R
My qusetions as follows:

Why is my transformer making an audible buzzing noise with the SSR, while there is no audible noise without the SSR? Is it caused by the approx 1.6V drop (see the datasheet)?
How can I stop this noise?
Is it safe for the transformer or should I stop using this SSR?

UPDATE 1: The control circuit is a Raspberry PI Zero (GPIO: 3.3V) and the resistor is 330R that makes the current 0.01A
UPDATE 2:  My SSR is a 'Random Turn-On' type


texts: Requesting help identifying potential damaged resistor on PCB

texts:
The picture is a motor control board which recently failed. The digital console indicates some problem communicating with the motor. Inconsistent power supply and moisture MAY have played a factor. Not sure.
Also worth mentioning I'm a dangerous beginner at this. But I'm too stubborn to buy an expensive replacement control board when I stand a chance of repairing this one. So far I've tested health of the motor and control wires via multimeter. This control board remains a suspect just by process of elimination. The white coating there stands out on an otherwise clean PCB.
To be clear my questions are:

In your expert opinion do you see any potential damage?
If this is damage, how fixable does it seem? Would it be sensible/worthwhile to replace that resistor and reassemble and test the unit?


texts:
In my circuits lecture we talk about transient behavior and how to express it mathematically. In the lab, someone points out the transient behavior of the circuit while looking at the oscilloscope screen which shows the output signal of the circuit.

All of this is great, but I don't understand conceptually/qualitatively what it is. What does transient behavior look like, for example? Is it that slight upward curve when you zoom in really close on the graph of the voltage across the capacitor as you charge it? Why does transient behavior happen? Do we want it to happen or no?


texts: Bidirectional 4 cell Li-Ion battery pack

texts:
I went through the following application note from microchip that deals with designing a bidirectional power supply for charging a battery pack (pages 16/30 and 17/30).

The link: https://www.microchip.com/Developmenttools/ProductDetails/MCP1630RD-DDBK3

The application note says that when a power supply of 6.5V to 7V presents from the right side (J2 in the schematic), the circuit works as a boost converter to charge the battery pack.

Let's start from this point. To charge an Li-Ion battery pack, we need two loops (Constant current loop and a constant voltage loop ). At this configuration, we have only the current loop composed of U4:A and its surrounding components, In my behalf, I don't think that the voltage loop composed of U3:B will take effect in this configuration because it is placed at the input side of the boost configuration. So, where is the voltage loop when the circuit is in the boost configuration ?
When the circuit is concidered from left to right, the battery pack is concidered to be the input voltage to the rest of the circuit which is now working as a voltage mode buck converter (controlled by U3:B that is now at the output of the circuit). And the current flowing through the shunt resistors R4 and R5 is now negative, so how does the current loop react to this current knowing that the OPAMP is fed only with a positive 5V ?


texts:
How well known are embedded microstrip antennas in general and are they feasible. I want to pot a 2.4 Ghz antenna for product reliability/water and shock proof reasons, but finding information and sources on this has been difficult.

What I have gauged so far is that this antenna will probably need to be custom designed, I have not found any freely available examples for reference so far. I presume as long as it's properly designed and tuned it will function as well as a normal designed against air antenna. In my specific application it would be a potted PCB antenna.

Input and any sources are greatly appreciated.


texts:
What is / how can I get a student-safe power supply for electronics projects?

I'm looking for a student-safe power supply for solder less breadboard.  I'm developing a course to teach electrical engineering to grade school students as an after-school program.  I'm wrapping up the first course and I've learned a lot, including that I need to find a safer power supply.  We're mostly using 9V batteries and connecting them to the breadboard via alligator clips.  After lots of searching, I'm realizing that I need to turn towards the expert community for guidance.  I hope that with the rise of the Makers  this question will become increasingingly relevant with time as more kids get into electronics.

Inextricably linked to this question is what is the minimum power source to use.  I've liked using 9V batteries since we can connect to them using alligator clips; but I worry that they are just a little too powerful.  I can imagine them somehow starting a fire with them.

My #1 priority is to keep the students safe.  Kids just have no concept that they can cause damage to themselves and property.  When I ask "where is that smoke coming from?" I'll get a gleeful response from the student that is seeing how many batteries he could hook together and short out.   I really need to limit the damage they can do.  I mainly don't want anyone electrocuted or anything to catch fire.  Kids will routinely attach LEDs backwards, leave them like that and then act surprised when they explode.

After safety, I want to protect the equipment.  Kids will hook up a LED backwards all the time.

After protection, I want to give the kids feedback as to what is going on.  A light that indicates power is on would be awesome.  A light or siren or circuit break that indicated a short would be awesome too.

Battery powered supplies are slightly preferred, just to keep upfront costs low and to avoid having to run outlets to each table.

Boundaries:
  We are only using simple LEDs, BJT transistors, resistors and maybe a timer IC.

Similiar Questions:
    How to protect an electronic construction kit (a toy) from damages?

References:
Course details are here: http://www.ascendly.com/classes/iee

We currently sometimes use this power supply from the Squishy Circuits Store and/or a 9V battery with alligator clips.

Epilogue

I found it tougher than expected to find a suitable wall wart, so I'm listing what I finally found for future reference.  I'm about to test the following combination:

$5.95 Wall Adapter Power Supply - 5VDC 1A
$0.95 Breadboard-friendly 2.1mm DC barrel jack
$2.95 in-line power switch for 2.1mm barrel jack

Epilogue 2

A year-plus in, I've decided to drop the in-line power switch since it wasn't obvious when it was 'on' vs. 'off'.  I'm instead relying upon the students to unplug the rat-tail from the supply, which is quick and easy.  Also, since I'm primarily using this for a squishy-dough project, I'm experimenting with with using two button batteries instead of a wall power.


texts: Collecting energy from 70-80 Celsius degree heat heat

texts:
I'm assembling a wireless thermostat for radiators. The module is powered with batteries.

I searched for a way to recharge the accumulator from the heat generated by the radiator but I could not find anythin.

Is there a way to do that?

Thank you!


texts:
I am working on a interface between an Arduino microprocessor and a old electromechanical pinball machine to track the scoring and light up some LED's based upon that.

I made a circuit diagram... or I think it might be described as that.  I have never done that before and may have more than one tragic mistake.

The pinball machine is the 26V AC coil on the top left, that coil when energized turns a score reel... I am going to tap into the input voltage for that coil and hope to convert to DC, trigger a relay and send a signal to the microprocessor to enable me to "watch" the scoring on the pinball machine with the arduino processor and control some LEDs (shown bottom left).  All the circuit stuff (but for the 26 V AC coil) are in a project box.

Question I have, is do I have to worry about filtering (and how would I) the reverse voltage (shut down voltage?) coming off that 26 V AC coil inside the machine.  Basically, I am going to run wires from that to a rectifier/smoothing capacitor to trigger a relay (24 V DC relay) and have that switch a 5V DC signal to an Arduino input pin.

I am not sure I need to filter it... will the relay chatter from the reverse voltage?  Will it possibly destroy the relay?  Kinda new territory.  Lets hope my diagram is functional and try to be nice to the new guy... happy to make corrections and listen.  Thats what I am here for.

Any other stupid mistakes you can point out would be great. I can also list the exact components I am using if required.


texts: What is the the purpose of the capacitor in this relay circuit?

texts:
What is the the purpose of the 470 uF capacitor in this relay circuit?
Why there is no relay protection diode in this circuit?
The relay is used to toggle a voltage divider circuit.


texts: How to further dampen vibration cascading on piezo-elements?

texts:
I'm trying to build an electric xylophone. I want it to be pressure/velocity sensitive so I decided to use piezo-elements to pick up 'hits'. Below is a close-up picture of my setup.

So every bar you see (4 total) has a piezo-element taped onto the bottom. The bars are attached to the foam with CA glue/superglue and the foam is in turn glued with CA glue to the wooden piece beneath it.

When I hit a bar (hard enough to exceed a certain threshold), the piezo is read on an arduino which finds the peak in the signal and converts it to MIDI, that is in turn send to a Raspberry Pi which produces a tone. The idea of the blue foam, is that when I hit one bar, other bars (piezos) will not vibrate enough to produce a tone.

However, the problem I'm facing is that the blue foam is currently not dampening the vibrations enough. When I hit a bar not even all that hard, it will already trigger other bars as well. A side-problem is that I don't need to hit very hard to make the piezo send out its max value (5V). That relation could perhaps be solved if I would have less sensitive piezo-elements. Do those exist? The first (main) problem is more urgent to me though. So do you have any ideas on how to dampen the vibrations better to prevent other bars from vibrating as well?

Below is a broad-view picture of my setup, in case that clears up anything.

Here is a picture of my electronics to some extent.

The piezos are to the right of the picture, they are inserted in the blue breadboard, each with a 1 Mohm resistor. The inputs are then wired to the transparent breadboard where they are connected to a mux (CD4051BE). The mux is connected to an arduino analog input (most left yellow wire). This setup is because I eventually want to connect 16 piezos to 1 arduino.


texts: DC motor causing noise on the power line

texts:
I've been building a circuit where I'm controlling a motor using a bluetooth module + phone. I've been having some problems, which mostly are fixed (see topic: previous topic).

The main problem I'm facing at the moment is that the DC motor is causing quite some noise on the power line (even if I power the motor directly from V+). I've managed to reduce this by limiting the motor current (using resistor R13) and put in some capacitors + a diode (D3) over the motor. However there is still siginificant noise.

Therefore I would like to know if there is a way to reduce the noise on the power line even more beside having these capacitors and the diode(D3), when the motor switched on (or have additional capacitors)? And what capacitors are best in reducing noise?

See schematic below:


texts: How to substitute this pickle switch with a software controlled switch?

texts:
I'm working as a research assistant. We have three high frame rate cameras that currently save the recorded video when the pickle switch (purple cord) is manually pressed. I want to replace this purple pickle switch cable with a microcontroller that can automatically send a trigger signal to the cameras when receiving a signal from a Linux machine. I tried searching google for "software pickle switch" and there were too many extraneous results. How should I go about doing this?
I'm also confused about the actual circuit that is created between these 3 BNC connectors and the pickle switch. I'm told by another research assistant that the pickle switch grounds the BNC cables. Is that correct? What would the actual circuit look like if drawn on a schematic?
Edit: Here is what I think the circuit is actually like. I measured the resistance of the BNC pickle connector and it short circuits when the button is pressed.


texts: Capacitive Switch To Distinguish Between Metal and Plastic

texts:
I have an application where a rotating plastic wheel has ferromagnetic inserts on the circumference of the plastic wheel (they don't stick out).  Shown below in the picture is the plastic wheel (black) with ferromagnetic inserts (red).  This could be accomplished with a hall-effect edge detection sensor like the Allegro ATS616LSGTN-T but I don't want to use it because the magnet in this sensor will cause drag (due to the reluctance effect); this is my only reason for wanting to avoid using hall-effect sensors.
I am wondering if it would be possible to create a capacitive switching sensor to distinguish between plastic and metal given the wheel is rotating around 3500 rpm.


texts: Why Some SMPS use Tiny Switch, Some use Top Switch and Some use Link Switch and Other use PWM IC. Please guide what is the criteria to select?

texts: I saw many smps design , Some use Tiny Switch , Top Switch , Link Switch and other user PWM Control IC only. What is the difference and how to choose right one??


texts: Why did they use ultrafast diodes in a 50 or 60 Hz bridge?

texts:
This is again from an HP power supply (PSU). The incoming 230 V is rectified into 340 VDC and is fed to a switched-mode supply. The odd thing here is that the manual for that unit, HP6023A, has different diodes for CR1, CR3, and CR2, CR4.

CR1 and CR3 are labeled "pwr rect 600V 3A 200ns" (MR856) whereas the other two are just "pwr rect 600V 3A" (1N5406). In reality the unit did have four identical MUR 460s which is indeed a 200 ns part. If we look at a more recent schematic for a similar PSU (HP6038) then they are labelled "1901-1199 diode-power rectifier 600V 3A":

Now 1901-1199 is indeed MUR460 in real life. Is there a reason to use fast recovery diodes in a bridge for 50 or 60 Hz? Is it because it drives a switcher?


texts: Treadmill causes nearby electronics glitch

texts:
I don't know if it is right place to ask, if not correct/guide me.

I recently have built treadmill workstation, where I could walk and work (rather than just sitting).

But as soon as I turn on treadmill, nearby keyboard, mouse and monitor starts glitching:

Monitor turning off/on by itself (occasionally)
Keyboard repeats keypress (press "s" once but on textfield you see "sss") (most of the time)
Keyboard turning off/on by itself (frequently)
Mouse just turns off until I reconnect USB (rarely)

Which makes my experience awful and I had to switch back to sitting.

Treadmill itself works perfectly, I can't complain or explain problem to seller.

What I have tried:

Connected EMI filters to PC

I thought treadmill might be somehow modifying AC sine wave since it can act like generator or generating noise.
Wrapped underside of the treadmill desk with conductive fabric

I thought glitches caused by magnetic/spikes that treadmill is generating which might be adding more noise into HDMI/USB cables.

p.s. I tested conductive fabric with my phone, it blocks WiFi, cellular network and bluetooth perfectly.

After wrapping with conductive fabric what I have got:

Monitor turning off/on by itself (occasionally)
Keyboard repeats keypress (press "s" once but on textfield you see "sss") (occasionally)
Keyboard turning off/on by itself (rarely)
Mouse just turns off until I reconnect USB (rarely)

What do you think, what causes such glitches?


texts: Why do we use a diac for triggering a triac?

texts: I mean, Wouldn't it be possible to give a gate pulse on triac directly? I have seen in many phase control application circuits like fan speed control,the usage of diacs to trigger a triac.


texts:
Is there any way to connect to LCD display modules through SPI as can for example be done with the Rapberry Pi through the use of https://github.com/notro/fbtft/wiki. I would also like to use one with touch capabilities. I know that there are already capes with touch screens on but they are far more expensive than the LCD module that I want to use. The capes also seem to use a parallel connection instead of an SPI one which will of course give a better refresh rate but take up a lot of pins and I do not really need a fast refresh rate, just the pins.

UPDATE:
I should be able to manage without the pins used by the capes and I was thinking about using the http://za.rs-online.com/web/p/lcd-colour-displays/7812992/ module, would this be possible with any OS for the Beaglebone, I don't mind using Debian or Ubuntu, I would actually like to use Ubuntu considering the nice gui.


texts: How to convert from power signal received by Antenna to voltage signal?

texts:
I am considering wireless transmission.
Let us define a cosine signal with frequency 2.4 GHz, i.e.
$$s(t) = A\cos(2\pi ft),$$ where $$f=2.4\times10^9.$$

Let us assume that when TX transmits the signal s(t) of power 50 W, RX receives the signal of power 0.5 W (that is, 49.5 W is attenuated in the air.)
Saying more detail, transmitted signal and received signal are, respectively,
$$s_{TX}(t)=10\cos(2\pi ft)$$ and $$s_{RX}(t) = \cos(2\pi ft).$$

Does the received signal represent voltage for load?
I mean, if load is 1 Ohm resistor, is the power for resistor $$P_{Load}=\int_{T}\frac{s_{RX}(t)^2}{1}dt=\frac{1}{2}=0.5 W\quad?$$

If so, if I use 0.1 ohm, the power will be 5 W? (Received power is just 0.5...)

Please someone teach me where I have misunderstanding


texts: Compute analog signals as functions of two signals

texts:
I would like to hear your opinion with respect to the following architecture for a supposedly easy task. I need to “compute” the value of two voltages depending on two signals.

Details:

I need to construct a circuit, that computes two voltages (U1, U2) depending on two analogue signals (S1, S2). Since the relationships U1 = f(S1, S2) und U2 = f(S1, S2) are nonlinear, I thought of using an EEPROM. To keep the system as simple and cheap as possible I thought of not using a uC or an FPGA.

So I thought about this scheme:

But I realized that ADCs, DACs and EEPROMs have mostly a serial interface, and the serial communication would complicate what I thought was a simple solution.
Does somebody have an idea, how to tackle this problem?


texts: What could be causing differential signal drift?

texts:
I looking at a differential signal on a scope, and I see that while the signal should be exactly equal and opposite the values are slowly drifting slightly.
The quantity I'm looking at is the areas of the positive and negative pulses, the should be equal and opposite but they are not. Further, I want them to agree within 5%, but watching on the oscilloscope I see that they slowly drift in and out of this tolerance.
The circuit in question is a single-ended signal from a signal generator going through a single winding on the primary of a toroid, the secondary of the toroid is 8 turns into a twinax cable, which I have broken out to two coaxial cables into two channels of an oscilloscope.


texts:
I need a circuit or preferable a ic that have a stable output of 5VDC. Input range may vary between 4 - 5.5V.

I want to "drive" a Vref on a ADC. The operating voltage for this ADC can be 2.7 - 5.5V, so no proplem here. But I would really like a stable external Vref, and I have seen a variation between 4.2 to 4.9V on the system.

Any ideas.
I was looking to TPS61175 or TPS40304, but there have to be something simpler?
ADCs to be used: MAX11614 or MCP3208
Kind regards


texts: current to voltage converter op amp question

texts:
I have been given this question and i'm struggling to get my head around it at the moment..

A 12-bit DAC (Digital to Analogue Converter) gives an output range of 0
to –1 mA for a digital input word of 0 to 4095. The required output,
however, is for a bipolar voltage range of ±5 V.

(a) Design a current-to-voltage converter circuit to achieve the required bipolar output voltage.

I am guessing that 0mA = +5v and -1mA = -5v, however i'm really struggling to get -5v with the input 0mA, any point in the right direction would be appreciated.

Thanks in advance