texts: Getting notes from a classical guitar using Arduino

texts:
I had an idea for a project that consists on finding the notes that are being played on a classical guitar using an Arduino. Now, I've never used an Arduino before, so I'm not sure if this is doable or if there is a better way.

I need to detect the frequency of each string, and then try to match that frequency to the correct note. I can't just use 1 single sensor for all the strings, because each note can be on several positions on the fretboard. The information would then be transmitted wirelessly to a computer. It could be the raw information (to be processed by the computer) or the board could do the hard work itself, but maybe that would increase latency.

Do you have any suggestions on how to do this? Is there an optical sensor that can detect the frequency at which a string vibrates and that could be placed beneath each string?


texts: Laptop shows battery is 4% charged, but it is charged to maximum

texts: I got old acer computer and i noticed that when I plug in charger, it says it is charging, but after 5 hours it still was 4% only, so i decided to get out battery and check it with manualy using multimeeter.All cells were charged to maximum, but laptop shows it is only 4% charged.


texts:
I'm reading this article: http://www.learningaboutelectronics.com/Articles/Dark-activated-light-circuit.php
And in there I see this schematic:

I'm highly confused as to how this would even work. First of all, the article mentions that base-collector resistance is around 400K. Looking at the datasheet, the only information I can find is max 10kOhm of input impedance. Is 400K some sort of insider info that I'm not privy to?
Second, in dark conditions, the current would prefer the base of the transistor instead of going through the photoresistor. 100kOhm means that 0.03 mA would flow through that resistor into the base. 2N3904 gain at 0.1 mA is about hFE = 40, so this would allow a maximum of 1.2 mA to flow from collector to emitter, am I wrong? At 0.03 mA, would it even be sufficient to saturate the transistor to switch the transistor on?


texts: Verify that an increase in 8º C will saturate a common emitter

texts:
In the Art of Electronics there is an assertion that if a bias is established with 0.5 the supply voltage, the transistor will saturate if the temperate goes up 8ºC. The schematic is the basic one for common emitter.

I tried to verify that the collector-emitter voltage became zero or less. However I can't manage to get it right. If we start by taking the V_BE voltage as 0.6, it would go down to .5832, but how can we use that to verify it saturates?

Thanks!


texts:
simulate this circuit – Schematic created using CircuitLab

Ok so I have a guitar circuit here, 2 pickups, each one has a on/off switch. I then run them into a master vol and a master tone. From there I run it into a effects pedal built in that requires 9 volt power. Each of the on/off switches has a 6V LED in it that is separate. I'm trying to figure out What I can do to power the pedal and both LEDs from same source.
here is a link to the switch with the LEDS https://www.adafruit.com/products/915


texts: FPGA Synthesize - Xilinx ISE - Removing most all FF from FSM

texts:
I have a verilog module that contains an FSM.

I have extracted parts of it for this post below.

ISE XST issues warning that all the FF associated with the reg variables shown are removed and I don't understand why.

Any insights please

One of the warnings: Xst:1710 - FF/Latch  (without init value) has a constant value of 0 in block . This FF/Latch will be trimmed during the optimization process.

If you look below - bit 3 of RedRam_Data3 is clearly set.

    reg [7:0] RedRam_Data1, RedRam_Data1_next, RedRam_Data2, RedRam_Data2_next,
             RedRam_Data3, RedRam_Data3_next, RedRam_Data4, RedRam_Data4_next;
    reg [5:0] Stream1_Counter, Stream2_Counter, Stream3_Counter, Stream4_Counter;
    reg [6:0] Stream1_Counter_next, Stream2_Counter_next, Stream3_Counter_next,
              Stream4_Counter_next;

    localparam Bit_1_Compare_Value = 6'd14;

    always @(posedge clk)
    begin

        RedRam_Data1 <= RedRam_Data1_next;
        RedRam_Data2 <= RedRam_Data2_next;
        RedRam_Data3 <= RedRam_Data3_next;
        RedRam_Data4 <= RedRam_Data4_next;

        Stream1_Counter <= Stream1_Counter_next[5:0];
        Stream2_Counter <= Stream2_Counter_next[5:0];
        Stream3_Counter <= Stream3_Counter_next[5:0];
        Stream4_Counter <= Stream4_Counter_next[5:0];

    end

    always @*
    begin
        Stream1_Counter_next = Stream1_Counter;
        Stream2_Counter_next = Stream2_Counter;
        Stream3_Counter_next = Stream3_Counter;
        Stream4_Counter_next = Stream4_Counter;

        if(Diff1_Q)
            Stream1_Counter_next = Stream1_Counter + 1;

        if(Diff2_Q)
            Stream1_Counter_next = Stream2_Counter + 1;

        if(Diff3_Q)
            Stream1_Counter_next = Stream3_Counter + 1;

        if(Diff4_Q)
            Stream1_Counter_next = Stream4_Counter + 1;

        RedRam_Data1_next = RedRam_Data1;
        RedRam_Data2_next = RedRam_Data2;
        RedRam_Data3_next = RedRam_Data3;
        RedRam_Data4_next = RedRam_Data4;

        case(FSM_State)

      SomeState:
      begin
           if(Stream1_Counter > Bit_1_Compare_Value)
           begin
           case(Which_Bit)
               0: RedRam_Data1_next[7] = 1'b1;
               1: RedRam_Data1_next[6] = 1'b1;
               2: RedRam_Data1_next[5] = 1'b1;
               3: RedRam_Data1_next[4] = 1'b1;
               4: RedRam_Data1_next[3] = 1'b1;
           endcase
           end // #7

           if(Stream2_Counter > Bit_1_Compare_Value)
           begin
           case(Which_Bit)
               0: RedRam_Data2_next[7] = 1'b1;
               1: RedRam_Data2_next[6] = 1'b1;
               2: RedRam_Data2_next[5] = 1'b1;
               3: RedRam_Data2_next[4] = 1'b1;
               4: RedRam_Data2_next[3] = 1'b1;
           endcase
           end // #7

           if(Stream3_Counter > Bit_1_Compare_Value)
           begin
           case(Which_Bit)
               0: RedRam_Data3_next[7] = 1'b1;
               1: RedRam_Data3_next[6] = 1'b1;
               2: RedRam_Data3_next[5] = 1'b1;
               3: RedRam_Data3_next[4] = 1'b1;
               4: RedRam_Data3_next[3] = 1'b1;
           endcase
           end // #7

           if(Stream4_Counter > Bit_1_Compare_Value)
           begin // #7
           case(Which_Bit)
               0: RedRam_Data4_next[7] = 1'b1;
               1: RedRam_Data4_next[6] = 1'b1;
               2: RedRam_Data4_next[5] = 1'b1;
               3: RedRam_Data4_next[4] = 1'b1;
               4: RedRam_Data4_next[3] = 1'b1;
           endcase
           end // #7


texts:
I recently started a project to use an old PSX controller as a Bluetooth controller. I used an Arduino Uno with a PSX library to interface with the controller and I was able to read the buttons being pressed with the Arduino. Additionally, I used a RN-42 module, which enabled me to use the Bluetooth HID profile to implement a game controller. This way, the Arduino interfaces with the PSX controller, reading the states of the buttons and sends this information to the RN-42 through UART, which finally generates a HID report that is sent to the computer via Bluetooth.
This setup worked as intended, and I was able to use the PSX controller on my computer, but with some compatibility issues with some games. After googling a bit, I read about the differences between xinput and dinput Windows APIs (xinput being the new one recommended by windows) and remembered that 8bitdo controllers support both dinput and xinput.
My understanding of the topic is not great and I'm not even sure if xinput only has to be implemented at the host side or if the controller also has to be compatible with xinput.
If that is the case, what would be the correct way to implement the Bluetooth portion of the project so that the controller has xinput compatibility?
I'm also interested in using a different Bluetooth module that is capable of running a custom application so I don't need to use a separate microcontroller to interface with the PSX controller. What would be an appropriate Bluetooth module for this project?
Any help would be greatly appreciated.


texts: Problem with Op amp and zener diode circuit

texts:
I have the following problem.

Consider the circuit below:

The resistors have the resistance \$R=1000 \Omega\$.
The zener-diode has the breakdown voltage \$V_{break}=2\mbox{V}\$
When \$V_{in}=-3 \mbox{V}\$ what is \$V_{o}\$?

Okay, so here is my thought process:
Since \$V_{in}\$ is negative, the zener-diode cannot be in forward bias mode. If \$V_o\$ is less than \$\mbox{2V}\$, then there is no feedback loop, thanks to the zener-diode's breakdown voltage.
When \$V_{o}=2\mbox{V}\$ the breakdown voltage is reached, and a feedback loop is in place. And since this is negative feedback, the system will stabilize.
So my answer is that \$V_{o}=2\mbox{V}\$.
Now, this solution required me to "think a little", which is not a bad thing. However, in an exam situation I maybe won't be as calm or relaxed, to allow me to think like this.
So my question is: Is my solution even correct (if not then where did I go wrong?) and secondly, is there a solution that I can do in "auto-pilot" so to speak. Like node-voltage analysis or another way that doesn't need clever thinking.
I hope someone can help me with this.


texts: HCPL-3700 voltage detector opto influencing DUT due to low input impedance. Pump float and controller

texts:
I am trying to monitor the state of a float in a septic tank using the HCPL-3700.  The float is connected to two screw terminals on the controller panel.  This float is normally-open with 120VAC across the terminals.  When the float rises to a sufficient height, it shorts and current flows through the float, triggering the relay for the pump motor.  This current through the float is not the full current for the 230VAC pump motor, which is supplied by a separate circuit.

Using the quite-helpful application note for the HCPL-3700, I created this circuit and connected it in parallel across the two terminals.  (My circuit is nearly identical to figure 10 on page 6.)  It works perfectly when bench-testing the presence of AC, but it fails when placed across the pump float terminals.  Apparently, the pump controller detects the 36k-ohm input resistance (2*18) as a short and immediately turns on the pump as soon as the HCPL-3700 is connected.

I tested a number of resistors to determine the threshold for the pump controller to detect a “float up” condition.  Turns out that anything less than ~300k-ohm is detected as short.  (The open float impedance is ~2M-ohm.)

Unfortunately, 300k-ohm is well beyond the limits shown in figure 7 on page 5 for a 120VAC circuit.  I’ve gone through every example in the application note and I can’t seem to figure out a clever way to use the HCPL-3700.  Ideas?

A little background:

Given this pump’s septic function, it cannot fail.  In truth, there are three floats on this tank, with some functional redundancy.  It’s a pretty common design.  I cannot risk a device being connected in series with the float, particularly a device I had a role in authoring.  I had hoped that the HCPL-3700 connected in parallel would not perturb the controller.  I was wrong.

The entire package is UL listed and I can't replace floats or other components.  The system has worked quite well for years, but I have no visibility of its failure until an alarm sounds.

Maybe there is an alternative opto with a bigger input impedance that would work.  I may be better served by using current transformers or a Schmitt trigger-based circuit.  Given the easy availability of the screw terminals on the controller, this seemed like a great use for the HCPL-3700.


texts: Amplify 1kHz sine wave from AD9833 DDS using LMH6609 operational amplifier

texts:
I'm trying to amplify a 1kHz sine wave signal from the AD9833 DDS chip (0.6Vp-p) to a more usable level (6Vp-p) for a sort of function generator. I plan to work with higher frequencies as well. So I got myself the LMH6609 operational amplifier which has a high bandwidth (900Mhz) and a high slew rate (1400V/us).
I am powering the opamp with a 12V power supply and a buck converter to convert 12V to 6V for the Vcm. I am also giving the DDS signal a DC bias of 6V. I am using the opamp in a non-inverting amplifier mode with the gain set at around 5.7 (47k and 10k resistors).
I have simulated this setup using Pspice for TI, I have attached the simulation schematic and transient analysis results. It works well in the simulation.
But when I try to recreate the setup on hardware, My op-amp seems to heat up quite a bit, and the output is a straight line close to 12V. When I reduce the offset of the input signal, it acts somewhat like a voltage follower. I have attached images of my input and output signals as well.
Simulation schematic

Transient analysis output

DDS output without any DC offset

DDS signal with ~2V DC offset

Op-amp output for above DDS signal as input


texts: What are some (bi-grid)tetrode tubes with negative resistance?

texts: I asked earlier about Dynatron oscillator tubes but instead what I'm looking for is a bi-grid tetrode that has the "kink" in its plate-grid charactestic curve. I actually have a Sylvania 12K5 tetrode, but does that one have negative resistance? If not I'd like some suggestions for a better tetrode model I can find somewhere.


texts:
I have a voltage that's used to dim a 12V bulb and I'd like to use it to dim an LED instead. My plan so far is to use a triangle generator and a comparator to make a PWM signal with varying duty cycle.

I'd like to build everything into a PCB that replaces the bulb, so there wouldn't be a fixed voltage available but a varying voltage from 9V-11.5V, so the circuit needs to operate from that. All is going well, but I need to alter the signal used by the comparator so that it has a steeper slope.

In the circuit I've split the voltage into two sources in order to make it all work, and it looks like what I need would be have a steeper slope. The green line is the 9V-11.5V, and the purple line is what I need to convert it to for comparison with the triangle.

Is there a simple circuit that can do something like that? Maybe something using an adjustable voltage regulator?

Thanks!


texts: How can I detect that a ZVD-style 'backpower protection circuit' is operating correctly?

texts:
I'm designing a circuit that needs a 'backpower protection circuit', similar to what the Raspberry Pi HATs use. This is meant to block voltage from the secondary board when the primary board is supplying voltage:

I've prototyped this in CircuitLab using other jellybean parts, and put some oscillating power supplies in place so I can see how it behaves:

simulate this circuit – Schematic created using CircuitLab

However, even when simulating the circuit, I don't see it supplying the max(v1,v2) that I'd expect to R4, which is my simulated load.

Assuming the circuit is correct, how would I measure that the correct voltage is being sourced or sinked to the right side of the circuit? How could I show which "direction" it is coming from? (such as by an LED)


texts: How to control RPM of an AC motor with minimal parts

texts:
I purchased a fan (https://www.acinfinity.com/smart-cooling/axial-fans-accessories/115v-ac-axial-hs1238a-muffin-fan-120mm-x-38mm-high-speed/#product-warranty) and I was wondering what the simplest method would be to reduce the RPM of the motor in order to quiet it down if need be.

I've read there are certain ways to control AC motors unlike DC motors and if not done properly you can damage the motor and/or it's windings.

From what I understand is that most AC motor controllers chop the AC waveform up to either reduce or increase the HZ provided. Is this correct?

Here are my thoughts on ways to control the motor, and I was wondering if anyone could tell me if they are the correct way. If not provide a better simpler way.

1) Simply add a resistor in series. This will drop the voltage supplied, but likely increase current draw on the windings?

2) Add some capacitance some how to adjust the power factor of the motor to increase/reduce torque?

3) Triacs to chop up the wave form to reduce the ON time the motor receives.

Are any of these correct? If not what is the simplest solution to drop the RPM. I am not looking for variable adjustment, just a simple reduction when inserted into the circuit.

If any of the above are correct, what would the schematic look like for 2 or 3.

Thanks!


texts: How I can replace the micro switch for my club car?

texts:
I used the micro switch in my club car, does somebody know how I can replace this for my old one?
I bought the switch from Zing ear.


texts: Positive feedback loop in the Wien oscillator

texts:
Let's say you got this circuit given which works as a Wien oscillator. To my understanding here Ri is the negative feedback loop and the total impedance of R3 & R4 & L2 & R1 are the feedback loop.
To get the total complex power consumed by the positive feedback loop, I assumed to use the formula: S = [(Vo - Vi)(Vo - Vi)°] / Z°(positive feedback loop)
( with ° meaning the complex conjugate )
However I keep getting the wrong answers, so is there another way to calculate the complex power in the positive feedback loop?


texts: How long does it take for electricity to be considered OFF by general appliances?

texts:
I'm looking for an ATS (or DIY) to switch between my solar and grid power.

I've seen some automatic ATS like here

I've seen on youtube someone uses this model and his computer is switching between solar and grid without "power cut". According to the details of the product : "Transfer Time:≤10ms".

Transfer time is so low that the computer didn't see it as a power cut.

What are the factors that can influence this ? Is it related to the appliance ?

I was expecting the computer to turn off and turn on again. Do you know what is the maximum number of ms that will trigger a "power cut".

Will it be difficult to DIY ?


texts: Can't charge and use a Li-Po Bluetooth receiver at the same time - can I bypass the battery though?

texts: I have this Bluetooth receiver. The battery is not holding a lot of charge anymore so it's become pretty useless. I can't plugin the device and use it at the same time, so I was wondering if I could remove the battery and use the cables that originally connected the battery to directly plugin the device. The battery is YJ402025 Li-Po 3.7V 160MAh. USB provides 5V so not sure if that's going to be an issue... I could take pictures of the device's circuit board if that would be helpful.


texts:
I have an IRF740 mosfet that doesn't get hot in one circuit but then gets completely hot in another identical circuit and for the life of me can not figure out why. Well the circuits aren't exactly identical but nearly so except for one or two definite things.

I'll call the circuits A and B. In circuit A the mosfet does not get hot in any way at all, in fact remains cool to the touch, even cold. While circuit B the mosfet does get hot, and this is what stumps me. Here let me explain the dilemma a little.

Circuit A is just a 555 timer triggering a divide by two circuit which is just a flip flop circuit providing a 50% duty cycle as outputs. Those outputs are alternately triggering two mosfets which are alternately switching two loads and in this case the loads are 5W 12V LED lamps. The loads being switched ON and OFF have their own power supply which is kept separate from the power supply powering both the 555 and CD4014 chips. This circuit works perfectly fine and does what it's supposed to do. Here's a pic of circuit A:

Circuit B is an identical circuit to the first except instead of switching the loads directly with mosfets it is switching and triggering two opto-isolators which then are triggering the two mosfets that are switching the LED lamp loads, again with their own power supplies.

In other words simply swap out the mosfets in circuit A with the solid state relay switches in circuit B. Here is a pic of circuit B:

Essentially these are basic home built solid state relay switches consisting of an opto-isolator and an IRF740 mosfet and a gate/source resistor of 10KΩ. Sometimes a 47Ω resistor is used between the gate and emitter of the phototransistor of the opto-coupler. This doesn't seem to help or make a difference, the mosfet still gets hot.

In circuit A the mosfet doesn't get hot at all and is nice and cool. There's more current running through the load in fact it's only a 1mA difference compared to when the load is directly connected to the power supply.

In circuit B the mosfet gets fairly hot and is very noticeable yet there is less current going through the load, this is a paradox to me.

I've tried a fet driver for the IRF740 but used another identical IRF740 as the driver, which probably doesn't work anyways, because I am probably not supposed to do that, but is all I had on hand. Driving the fet with another fet didn't even flash the LED lamp, which is weird to me. Do I need a power transistor? Is the CD4013B chip in circuit A somehow providing a type of driver that allows the mosfet to remain cool?

Fets are weird to and me and always have been, I have noticed that there is absolutely no current between the opto transistor's collector and the drain of the mosfet, maybe a few microamps, I don't know, I had it set on the largest amperage range.

The mosfet gets hot no matter what frequency the timer is set at, it doesn't change the fact the circuit A's mosfet doesn't get hot while circuit B's mosfet does.

The only real difference I see is that in circuit A the trigger current for the mosfet is being supplied by the 555's pin 3 which then enters into the clock pin on the flip flop. In circuit B the trigger circuit is being supplied by the power supply itself that is powering the load. Other than that I don't see any other differences.

I've tried increasing the gates resistance but that doesn't seem to make a difference either. I've tried no resistor on the gate at all and that doesn't seem to make a difference. I understand that a mosfet is completely different than a transistor however.

How do I get the mosfet to remain nice and cool just like it is in circuit A? Does something have to dramatically change?

Even though I am somewhat familiar to electronic circuits when it comes to this solid state relay switch I am a newbie. So if there is math involved or any other complicated explanation with unfamiliar terms be easy on me and lay it on me in a way that I can understand, basically in laymen's terms.


texts: atmega1281 + Nokia 5110 LCD circuit works with USBtinyISP plugged in. Hangs without?

texts:
I'm building out a circuit with an ATmega 1281 MCU, some switches for input and a Nokia 5110 LCD (SPI interface) for display. I can load code on it just fine with my USBtinyISP programmer. With the programmer connected, the code runs great. It sits there and will chug away for hours. When I remove the programmer and reset the MCU, things either freeze up or the display gets really hinky and displays garbage.

Both the LCD and the ICSP are SPI interfaces. In attempts to get it run without the ISP connected, I've tried pulling both up and down with a 10K resistor on MISO, MOSI, SCK and RST. Nothing makes a difference.

Has anyone else ever seen this happen? What did you do to fix it?

(edit: image added to question)
http://duksta.org/images/ProtoBreakout.png


texts:
I am studying the working principle of tunnel diode and I am reading for a voltage range it creates a negative differential resistance.
If we have a current source supplying the circuit with some current, if the current is inside the negative differential resistance region, which will be the voltage of the diode, the green voltage , the orange voltage or the blue voltage?


texts: MSP430 printf() through Spy-Bi-Wire hangs

texts:
printf() to console through Spy-Bi-Wire should be supported in the TI Code Composer Studio.  Found this page, which explains how to enable printf().  But I can't seem to make it work.  The program execution simply hangs, when it gets to printf().

My setup consists of:

MSP430FR5739 on an MSP-TS430RHA40A board
MSP-FET430UIF
Code Composer Studio 5.3.0.00090

To try to enable the printf(), I’ve changed these settings in Project->Properties:

Console I/O (CIO) enabled
Stack size 768, heap size 1024.  (Also tried 300 and 400, respectively.)
printf() support set to minimal

/*
 * ======== Standard MSP430 includes ========
 */
#include <msp430.h>
#include <stdio.h>

/*
 * ======== Grace related includes ========
 */
#include <ti/mcu/msp430/Grace.h>

/*
 *  ======== main ========
 */
int main(void)
{
    Grace_init();                   // Activate Grace-generated configuration

    while (1)
    {
        P1OUT |= BIT0;
        __delay_cycles(100000);
        P1OUT &= ~ (BIT0);
        __delay_cycles(100000);

        printf("*\n");    // hangs here
    }

    return (0);
}

The problem is that program execution hangs, when it gets to printf().

In the disassembly view, the code hangs at this line

000004  3FFF  JMP  (0x0004)

Is this an endless jump?

At one point, I though that there's a problem with my CCStudio installation.  Initially, I've installed 5.3 on top of 4. I've installed CCStudio 5.3 on another computer (virgin one).  I'm seeing exactly the same problem.

Come to think of it, I'm using the same FET430. May be, the problem is in my FET430 or it's firmware.

What am I missing?  What could go wrong? Have anyone else had problems like this?
Is this something that works with 4-wire JTAG, but doesn't work with Spy-Bi-Wire?


texts: Can't program atmega32 interfaced with LM34

texts:
i want to read all temperature range of the LM34(-50 to +300) but i only can program single ended like this one, and i only can read from 0 to 50 F

but i can't program one like this(can't read two pins and get the temperature from them),

i can't deal with two pins of ADC, i only can deal with one pin.
so could any one teach me how this circuit work?, how to program these two pins ?and what happens inside the ports when i deal with two pins instead of one?, and how to measure the value of the sensor?.
BTW, i'm studying from a book but the book didn't say any thing about this, i searched a lot but i need direct help.
thank you.


texts: Changing current output in the attached schematic

texts: I am trying to replicate the results of a paper where a cheap potentiostat is outlined. I need a higher current output than the -200ua to 200ua that is produced by this circuit. Preferably around 10ma. I am guessing that changing the 510ohm to something lower like 100ohm and increasing the vcc input would work but I'm unsure. Is there a simpler way to do this so as to get 10ma output into the cell? The circuit uses LM741 opamps (can also be LM324) Thanks


texts: Wiring diagram for laboratory-related aquarium equipment (PID, SSR..)

texts:
I am currently in the process of constructing a "thermal aquarium chamber", used to study the responses of various species to warming temperatures in their aquatic environment.

The idea is to control a water heater (flow-through) via a ramp/soak PID (Auber SYL-2352P).

I have a very general question regarding the attached wiring diagram: Is my wiring correct? Is there anything I need to add or change? Have I overlooked something?

Update for future visitors

Just supplementing the original question for future visitors. I have tested the set-up (heating water from 20 °C to 30 °C in 0.3 °C/min-1 steps) and it worked. Here's a picture.


texts: In the MAX1979 datasheet, I see two types of ground specified, analog and power ground. My question is: what exactly is the difference between these grounds (noise? if so, which is noisier?), and more specifically, is the power ground an input to the IC? If so, how do I keep it separate from the analog ground? Or is just an output that I am supposed to use, as it is said that it has internal synchronous rectifier ground connections?


texts: Different Method in Relay with two or more switch

texts:
Hmm I cannot specify my question so just take a look my diagram below.

For my question I want to make full use of a single relay but using two switch to turn on different LED but the source & ground are different. In short I want my circuit design to use less components. Can you give me an idea or hint to get what I want.


texts: How to remove noise from microphone input?

texts:
The Issue
I've made a project centred around the XS3868 module which is based on OVC3860. The circuit works fine and I was able to get the microphone to work except for just one thing, the mic input is noisy as hell. The audio input is clear enough when I'm speaking something to the mic, but it gets noisy in an echoing manner whenever there is silence.
I want to get rid of this distracting noise. Is there any way to do so? If so, then please help me in making my project reach closer to perfection.
My Setup
Here is the schematic which I followed:

The schematic is simply based on the manufacturer's application schematic. I'm a beginner with digital signals and hence I simply combined multiple schematics into one. However, I'm ready to learn and improve this schematic.

The details about my microphone connections are as follows:

My circuit uses the microphone of TRRS earphones.
The mic input is fetched through the MIC and GND ring and sleeve.
Since XS3868 has different GND pads for audio and power supply, therefore, instead of grounding one of the mic terminals according to the schematic, I connected it to AGND, or the Audio-Ground pad, of XS3868. AGND is at around 0.6V voltage level.

This connection to AGND is indirectly made because I also use the earphones inserted to the TRRS jack for audio output and earphones intrinsically connect MIC- to GND. This has been done to prevent shorting AGND with GND.

What I've Tried
I tinkered around with the circuit and here's what I've observed:

Connecting an external condenser microphone according to the schematic(which is based on the manufacturer's schematic), i.e. with MIC- grounded properly, I still heard the noise, which subjectively felt slightly lesser in magnitude.

Recording of the noise: https://clyp.it/gap2kc0z


texts: Connecting a +12V DC wire to a Voltage Regulator with 4 pinouts

texts:
The voltage regulator I'm using has 4 pins (2 in, 2 out) pictured below.

The reason I purchased this regulator is that I want to convert +12V DC in to +5V DC current for connecting a Sony Projector to a compatible 3D transmitter. From a post on avsforum I can conclude that pins 1 and 2 from the sony transmit +12V DC. They will be soldered together, and connected to the "+" 12V Input section of the voltage regulator. However, what do I do with the "-" port of the input?

Also on the 3d transmitter end, it expects a +5V DC, which I presume I should connect to he "+" section on the output label of the regulator, but what happens to the "-" side here?

Fig1. SINOLLC DC 12V 24V to 5V 3A Converter Step Down Regulator 5V Regulated Power Supplies Transformer Converter

Fig2. Pin description of the VESA 3d Transmitter (note pin "A", which is +5V)


texts: STM32F4 FSMC 8-bit data width with 10+ bit addressing

texts:
I'm planning to interface an FPGA to a STM32F29/439 via the FSMC (Flexible Static Memory Controller). To save pins I would like to use the address/data multiplexing feature. Thus according to the datasheet for 16-bit mode I have multiplexed signals AD[1..16] and control lines nADV, nWE, nOE and nEN.

Now I only need 8-bit data width but still need at least 10-bit wide addresses, leading to multiplexed signals AD[1...8], non-multiplexed high address bits A[9..10] plus usual control lines. Since this assymetric case is not mentioned explicitly in the datasheet I ask whether someone can share some experience.

Clarification: I'm using a STM32F429 but in general this applies to all STM32F4 with FSMC. I think that the NOR-Flash interface would be most appropriate but unfortunatley the datasheet only mentions 16-bit memory data size, albeit without saying that 8-bit mode is unavailable for NOR Flash.


texts:
I cannot find a concrete specification on the net on how much current can be drawn from an SATA-II connection. I am sure that the standard specifies that value, but I don´t see the point to buy the whole spec just to know this single value.

Does anyone have values for the average / max. power consumption?


texts: Is it still possible to find Braun Lectron System around, or equivalent?

texts:
Is it still possible to find Braun Lectron System or equivalent around ?
For those who don't know about it: https://en.wikipedia.org/wiki/Raytheon_Lectron.
It is basically analog building blocks that did not need any wire to connect (instead the interconnects were made with other blocks with same dimensions).


texts: Which Comparator could match this electronic circuit?

texts:
Below is a schematic of a current regulator using a comparator IC2.  The board is from an XP-605 ELENCO bench top adjustable power supply. Searching the WEB was unsuccessful in finding any original schematic so I resorted to reverse engineer the board and came out with this schematic. The configuration appear to be a simple negative feedback loop feeding a Darlington configuration for current amplification. IC2 is absent from the main electronic board. The PCB do not indicate which IC part number is utilized. It only shows a socket for a DIP8 chip. I found several possibilities of replacement comparators but none was using Pin7 as a power input and pin6 as the amplifier output. LM311 appear to be a potential candidate performance wise but not pin compatible with the DIP8 socket. From the schematic it would appear that pins 1,4,5 are utilized as a zero offset trimming capability.

So, my speculation suggest the following:
Pin1    Trim input
Pin2    negative input of a OpAmp or Comparator
Pin3    positive  input of a OpAmp or Comparator
Pin4    Negative supply
Pin5    Trim input
Pin6    Output (most probably open collector)
Pin7    Positive supply
Pin8    not used in the circuit, ?

The Question:  I am searching for a replacement IC  comparator ( perhaps OpAmp) to match the DIP8 pinout above described and compatible with the electronic schematic. Can anyone help ?
Much appreciation :)


texts:
I have a scenario that,

When receiving data through UART (STM) ,same time the data is    displayed in the notepad(opened in PC) through USB.

How can I implement this?

I am using stm32 micro controller

Figure(as given)

For example,

The data received by STM is employee id,at the same time data   should  displayed in PC.

Note:

I  too have LPC1768


texts: Ethernet shield (ENC28J60) design troubles

texts:
I made a through-hole shield based on the ENC28J60, but I haven't had luck getting the device to do anything at all.

At this point I'm afraid I'm in over my head.  I've spent some time reading the data sheet and clumsily poking at it with my bus pirate with no luck.

If anyone has pointers or the time to glance over my schematic (pdf)(eagle) I would be extremely grateful.


texts: Is it okay to have a ground plane with a Class D Amplifier?

texts:
I'm working on building a Class D Amplifier (TPA3122), and from what I understand, you want to connect the grounds of the amplifier using a star connection. On this circuit, I plan on using a DC-DC converter to power some other components (Logic IC's, LED, Isolated Bluetooth Module). So I wanted to still use a ground plane for the converter since I would need it to ensure that there isn't a large amount of inductance in my ground path.
So would it be acceptable to design a Class D amplifier, connecting the amplifier's ground using a star connection, while connecting the DC-DC converter's ground using a ground plane? Side note, I plan on using a DC-DC converter IC (haven't selected a part yet) to regulate an output voltage of 5V, and using another converter to isolate the 5V supply (CRE1S0505S3C) to power the Bluetooth module (generic bluetooth module from Amazon).


texts: Developing 25+ device microcontroller/Zigbee network, how to avoid hard-coding polling addresses?

texts:
I'm developing a 25+ node XBee/Zigbee "star" type network with one coordinator and end routers.

To put it simply, it will be similar to a security system where all the nodes are "waiting" on an event; if triggered.

To get up and going quickly yes I'm using the Arduino platform despite the disdain of many EE's.

The XCTU software is great for configuring the XBee radios in AT mode, but if I want to have my coordinator polling each node to see if an event has been triggered, how can I get the randomly-assigned remote IDs that the XBee assigns, or at least avoid manually hard coding arbitrary IDs to each end node?

Ideally I could pull this info off the XBee instead of developing a whole new formulate and assgin IDs routine upon network reset. Seems like I'd be reinventing a lot of the utility built into the XBee system already.

I haven't found any good info yet digging through the XBee documentation.

Any thoughts are welcome!
Thanks.


texts:
Just wondering if someone can give me an explanation for this capacitor layout - what is it's function? The chip to the right is an ADC.

Circled in blue.

I'm guessing it is well known but i don't know how to search for it.


texts:
So I'm trying to upload sketches to an ATmega328 chip via my Arduino as an ISP. I've successfully been able to burn the bootloader, but when I try to upload sketches, I'm presented with this error.

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is  "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdud e.conf"
        User configuration file is "/Users/garrettoelze/.avrduderc"
        User configuration file does not exist or is not a regular file,    skipping

        Using Port                    : /dev/tty.usbmodem1a21
        Using Programmer              : stk500v1
        Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.

I've been looking all over the internet and I can't find a solution that works. Any answers would be greatly appreciated.


texts: How data recovery works in flash memory?

texts: Flash memory is Electronically Erasable Programmable Read Only Memory. In this data is stored by the On or Off state of the transistor. Then How it is possible to recover the data stored in the device even after formatting it ?


texts: Upgrading automotive heater blower motor resistors with a PWM based device

texts:
My 2004 car has a resistor module attached to the DC heater motor circuit that has three coiled resistance wires (2.1 Ohms, 1.5 Ohms and 1 Ohm), two which have burnt out as only two out of four speed positions work.

I'm a total EE novice and wondered if there is a solid state device perhaps using PWM that would be a suitable alternative to a resistor.  Ideally one that would be an in-line replacement or requiring the addition of only a little more wiring to the car.

I've read up on PWM Controllers and Buck Converters but I quickly get out of my depth understanding the types, applications of each and their suitability.

With my basic understanding I hoped three DC-DC Step Down Buck Converters from 12v to 9v, 6v and 3v respectively would provide the necessary speed variation on the heater motor circuits to emulate/replace the resistors.  20A version would cost around the same as replacing the resistor module but would be more efficient and likely equally reliable.

Please can someone point me in the right direction as to the best way to go about such an upgrade.

Thanks.


texts: How to connect a Printer WIFI module wires to an Arduino?

texts:
I’m a digital artist, found this HP printer on the street and wanted to use its components (motor etc.) on my projects.

I was wondering if any of you know if I can use this WIFI module to send/receive data from/to a PC through Arduino API. (I just want to connect it to an Arduino card and be able to receive the simple signals i.e.: High-Low / 0-1 from a PC)

If so, First I need to know how to connect the wires, specially the power (+how many volts?) and ground ones (I can test the rest and read them as inputs by Ardunio even though am not sure if it works!)

So I’d really appreciate if anyone can help me to figure out what’s what in these wires and how can I occupy data signals from a pc?

PS: as you see, one of the wires is soldered in a square form on the back of the PCB, is it a common sign of V or GRND in electronics, and does the standard color codes respected here or not? Thx again! :)
Found Can anyone locate specs on this wifi module? (if it helps)!


texts:
I have a capacitor in which is used in a coilgun circuit, but i cant come up with a reliable way do indicate the charge of the capacitor without using a multimeter.
I want to use a quad-comparator circuit, with 4 LED's, indicating when the capacitor is 25%, 50%, 75%, and 100% charged. I have a single comparator circuit which looks like this:

But I don't know how to power on the LED (Via the comparator output) once the capacitor has reached about 25%


texts: How does this branched electrode circuit work?

texts:
How does this circuit yields the output below?

(Source: Guerrero FN, Spinelli EM, Haberman MA. Analysis and Simple Circuit Design of Double Differential EMG Active Electrode. IEEE Trans Biomed Circuits Syst. 2016;10(3):787-795. doi:10.1109/TBCAS.2015.2492944)
I can kinda see how from the Va and Vc perspective it's a summing amplifier and from the Vb perspective it's a non-invering amplifier, but is it possible to make a more thorough analysis? Is there some kind of description about summing amplifiers with an input on the positive terminal other than ground?


texts:
I am currently looking for a term for a lossless line with a wave resistance Zw which is open ended and I am not sure if I have calculated correctly.
My thoughts about the calculation:
If the line is open at the end, then the reflection r at the end is 1 $$r_{end} = 1$$.
Because it is a lossless line, the reflection factor is only turned in phase, so the reflection at the beginning of the line is
$$ r_{begin} = r_{end}e^{-j2\beta l}$$
the reflection coefficient r can be calculated from the impedances in general: $$r = \frac{Z - Z{w}}{Z+Z_{w}}$$
so that $$ r_{begin} = \frac{Z_{w} - Z_{begin}}{Z_{w} + Z_{begin} } $$
This is my solution for the input impedance Z_begin:
$$r_{begin} = r_{end}*e^{-j2bl} \Leftrightarrow \frac{Z_{w} - Z_{begin}}{Z_{w} + Z_{begin}} = r_{end}*e^{-j2bl} \Leftrightarrow _{r_{end} = 1} Z_{begin} = \frac{Z_{w}(1-e^{-j2bl})}{1+e^{-j2bl}}$$
Is it correct what I have calculated, or do I have a big mistake somewhere?
EDIT:
many thanks @user287001
I Would like to add my comment to the question here, so that it is easier to read with my new solution.
I can see the following from your note:
$$Z_{begin} = U_{begin}/I_{begin}$$
$$U_{begin} = U_{beginfront} + U_{beginreflected}$$
$$I_{begin} = I_{beginfront} + I_{beginreflected}$$
the following applies:
$$U_{endfront} = U_{beginfront} * e ^{(-\gamma l)}$$
$$U_{beginreflected} = U_{endreflected} * e^{(-\gamma l)}$$
Besides that:
$$U_{endreflected} = r_{end} * U_{endfront}$$
so that :
$$U_{beginreflected} = U_{beginfront} * r_{end} * e^{(-2 \gamma l)}$$
Equivalently, this also applies to the current I_begin
results from this :
$$Z_{begin} = \frac{U_{beginfront} + U_{beginfront} * r_{end}* e ^{-2 \gamma l}}{I_{beginfront} - I_{beginfront} * r_{end} * e^{-2 \gamma l}}$$
with $$I_{beginfront} = U_{beginfront}/Z_{w}$$
I then get
$$Z_{begin} = Z_{w} \frac{1 + r_{end} e^{-2 \gamma l} }{1 - r_{end} e^{-2\gamma l}}$$
finally I have to use for r_end = 1 and for gamma = (- j b)
is that correct ?


texts:
I'm having Synthesis errors on using a VHDL module in Verilog. The error message below says that the type of rd_ptr input in the VHDL module does not match the rd_ptr_integer variable in the verilog code.The compiler also gives this error for the pckt_size output variable.
Please help me on this.

The vhdl module entity is this

   entity packet_size is
    generic(
      fifo_MaxDepth:integer range 0 to 256:=16
      );
   port(
    fifo_tlast:in std_logic_vector(fifo_MaxDepth -1 downto 0);
    depth:in std_logic_vector(fifo_MaxDepth -1 downto 0);
    rd_ptr:in integer range 0 to fifo_MaxDepth - 1;
    pckt_size:out integer
    );
     end packet_size;

The part of my verilog code that is the source of the error is this

 reg [WIDTH-1:0] queue [MAX_DEPTH - 1 : 0];
 reg [MAX_DEPTH_BITS - 1 : 0] rd_ptr;
 reg [MAX_DEPTH_BITS - 1 : 0] wr_ptr;
 reg [MAX_DEPTH_BITS : 0] depth;
 wire [MAX_DEPTH : 0]fifo_tlast_packet;
 wire [MAX_DEPTH_BITS - 1 : 0] rd_ptr_temp;
 integer packet_size_out;
 integer rd_ptr_integer;
 assign num_of_packets=depth;
 assign rd_ptr_temp=rd_ptr;
   // Sample the data
   //initialising the fifo_tlast_packet array for the packet_size module
   genvar    i;
   for (i=0;i<MAX_DEPTH;i=i+1) begin
    assign fifo_tlast_packet[i]=queue[i][0];
    end;
    //converting array to integer
    always @(rd_ptr_temp)
     begin
      rd_ptr_integer=rd_ptr_temp;
      end
      //adding the packet_size module for measuring the packet size of the first fifo data
    packet_size
     #(.fifo_MaxDepth(MAX_DEPTH) )
       packet1(
        .fifo_tlast(fifo_tlast_packet),
        .depth(depth),
        .rd_ptr(rd_ptr_integer),
        .pckt_size(packet_size_out)
        );

The errors shown in ISE Synthesis are here

  ERROR:HDLCompiler:440 - "K:/final project/codes/v3/small_fifo_v3.v" Line 69: Formal port rd_ptr of type integer does not match with actual type integer
  ERROR:HDLCompiler:440 - "K:/final project/codes/v3/small_fifo_v3.v" Line 70: Formal port pckt_size of type integer does not match with actual type integer
  ERROR:HDLCompiler:1654 - "K:/final project/codes/v3/small_fifo_v3.v" Line 64: Instantiating <packet1> from unknown module <packet_size>


texts: Getting started with Qualcomm reference designs

texts:
I am looking to get started with Qualcomm Reference Designs.

I am partly inspired by this article: "Start Your Own Smartphone Company for $1,000".

I have an application that I would like to be able to run on my own hardware for various reasons and to save development time I would like to start with reference designs and fit the hardware into the appropriate casing for our application.

I have been through Qualcom reference designs website and it is circular and lacks information even with a login.

In addition to this website developer. qualcomm that has two platforms worth working with but a comprehensive spec only available for the 410c

I contacted all the design houses qualcomm had listed online but they seem to only deal with bigger customers. I am finding it somewhat slow to deal with Zuoer in China as mentioned in the bloomberg article.

To get started with reference designs I need a list of what is available and spec sheets for those designs so I can line them up against our test devices and find the right one for our application.

Any information is appreciated, thank you to everyone.


texts: What is the "minimum" transmit power for uplink cellular transmission

texts:
Can anyone help me in finding a good reference for minimum transmits power for uplink cellular transmission?

is 0 dBm a good enough power for very low-power transmission in an indoor environment? Will it achieve high enough RSRP values at the receiver (note that in indoor the receiver is very close to the transmitter)


texts:
I'm implementing a boost switching regulator based on a Texas LM5002 chip (datasheet), to get about 65V from a 12V supply. The design I've arrived at is shown below, inspired both from the data on the datasheet and the information here. I was not able to get all the parts with the necessary values, but I used the closest values I got my hands on. The design took into account an input current of about 50 mA to supply about 1mA on the output node.

simulate this circuit – Schematic created using CircuitLab

Problem is, when I tie 12V to the input, I get, for a few seconds, around 900V (???), before the output shorting to ground. What is exactly could be causing this? Have I got something wrong on my circuit?

EDIT: It appears I made a mistake on my original question while drawing the schematic, the actual value of R4 is 1.6k and not 100 ohms.


texts: Is each individual CPU calibrated before being shipped?

texts:
The quartz movement in battery-powered watches is plated with gold and trimmed individually using laser to achieve a vibration frequency of exactly 32,768 Hz to keep time accurately.

The crankshaft in pistol engine is adjusted by hand or computer to make sure the center of gravity is in the middle of the shaft for smooth rotation.

The 50 ohms resistors on an impedance standard substrate for high frequency measurements are laser trimmed as well for ultimate accuracy.

Therefore, does each individual CPU get calibrated by any means before being shipped? I would imagine the answer to be yes as CPUs are intricate products that should require some tweaking. But how is CPU calibration done on a hardware level?


texts:
I'm trying to understand power transfer in transmission lines.

Consider a voltage source with complex voltage \$V_t\$ and internal impedance \$Z_t\$. Suppose we connect it to a transmission line with complex impedance \$Z_0=\sqrt{\frac{R+j\omega L}{G+j\omega C}}\$, where \$R\$ and \$L\$ are the series resistance and inductance per unit length and \$G\$ and \$C\$ are the shunt condutance and capacitance per unit length, respectively. Note that we do not assume \$Z_0\$ to be purely real, since we include potential losses on the line. At the other end, at distance \$d\$, we connect a load with impedance \$Z_L\$. Our goal is to maximize the active power generated in the load.

1)On the one hand, I know that taking \$Z_L=Z_0\$ makes the reflection coefficient \$\rho = \frac{Z_L-Z_0}{Z_L+Z_0}\$ equal to zero and the transmission coefficient \$\tau = \frac{2Z_L}{Z_L+Z_0}\$ maximal, \$\tau = 2\$.

2)On the other hand, by impedance transformation the impedance seen by the voltage source at the terminals of the transmission is given by
\$Z_{in} = Z_0\frac{Z_L+Z_0\tanh(\gamma d)}{Z_0+Z_L\tanh(\gamma d)}\$.
Here \$\gamma = \sqrt{(R+j\omega L)(G+j\omega C)}\$.
One might then think that we should take \$Z_{in} = Z_t^*\$ (conjugate), as we normally do for maximum power transfer.

Which of these is right? In a set of lecture notes I'm using, the appear to claim both (?). On the one hand, they claim in the text that 1) is right, since it minimizes reflections. On the other hand, in an exercise, they claim that 2) is right.

By the way, is there any way to nicely typeset math formulae here?

EDIT
Regarding Janka's comment:

The voltage is \$V(d)=A_0^+e^{-\gamma d}+A_0^-e^{\gamma d}\$.

The current is \$I(d)=\frac{1}{Z_0}(A_0^+e^{-\gamma d}-A_0^-e^{\gamma d})\$

Here \$A_0^+\$ and \$A_0^-\$ denote the amplitude of the forward and backward wave, respectively.

We must have \$Z_L=V(d)/I(d)\$. Then we find
\$A_0^- = \frac{Z_L-Z_0}{Z_L+Z_0}A_0^+e^{-2\gamma d}\$. If \$Z_L = Z_0\$, we get \$A_0^-=0\$.


texts: Desktop PSU registering signal from 220ac input

texts:
Question:
Do "current+old" generation desktop pc's have any built-in means of registering a signal that is  modulated on a (220v) AC power output?

Application/context:
Suppose your energy company modulates a signal on your 220v/230v AC house/building power supply, is there any way to guarantee the desktop uses that powersource in stead of another powersource without using additional hardware?

Approaches:

I thought it might be possible, if power supply units (PSU)'s have an input voltage sensor which is somehow fed into the motherboard somewhere, before they cancel out all the fluctuations to provide the CPU with a constant DC voltage. But I am not aware of any such sensors and thought perhaps my view/solution space is too limited.
Initially I thought perhaps another approach could be be to set up an extra (USB) measuring device that measures the 220v signal, but that still has 2 problems:

There would still be the loophole of the usb device measuring the signal but the desktop actually consuming a different power source.
It requires additional hardware which is beyond the scope of the question.

As a response to the questions in the comments, I would like to clarify what I mean with:

  Suppose your energy company modulates a signal on your 220v/230v AC house/building powersupply,

I mean that an additional signal is added to the normal/conventional electricity net, by changing the hypothetical pattern* that the normal/conventional electricity network uses, with the function of/by adding another signal. I am not claiming they can but I'm assuming the hypothetical case that they do. A bit like the powerline adapters, except the adapter connected to the router would be placed somewhere before/outside the house by the energy company.

*For the purpose of this question I assume the normal/conventional electricity network follows a pre-determined pattern/signal.

  desktop uses that powersource in stead of another powersource

I mean that, suppose if the neighbors have a different additional signal/no signal in their house than you, that it is not possible for the your pc, to register your signal from your households 220V AC electricity network*, while it is actually connected via a long cable to the wall socket of your neighbors building.

*Of course an external device could be made to register a different signal coming from whatever, but that is not intended here. The question is about a sensor already present in the pc, that without physical modification/non-intended-hacking would indicate the PSU uses/consumes/is connected to the electricity network with the registered signal.


texts: "Numeric value exceeds 32-bit capacity" error in QuestaSim

texts:
In the testbench for a SystemVerilog module, I have the following array declaration and initialization:

real testVals [][] = '{
    '{1.5, 1.5},
    '{2.0, 3.0},
    '{0.0, 0.0},
    '{-1.5, 1.5},
    '{-1.5, 4.0},
    '{-1.5, 3.0},
    '{-1.5, -3.0},
    '{9.5E255, 4.2E200},
    '{9.5E500, 4.2E200}   // line 63
};

When I try to compile the code using QuestaSim, I get this error:

  ** Error: (vlog-13037) fp_adder_tb.sv(63): near "9.5E500": Numeric value exceeds 32-bit capacity.

Why do I get an error about a 32-bit capacity limit when the data-type is real? This would make sense for an integer or int, but it should be a double-precision float. Also, 9.5E255 is also well beyond the range of a 32-bit value - why is it okay? If I remove the one offending line, it compiles without a problem.

QuestaSim version: QuestaSim-64 vlog 10.4c Compiler 2015.07 Jul 19 2015


texts: Parsing GPS($GPRMC)... Significance of Validity

texts:
In "$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70"

I know that the third argument 'A', is for valid data, but what does validity even mean, because you get an A even when some of the information is missing.

Does an 'A', guarantee valid data?
Should i just discard data with a 'V' or can i still squeeze some useful data out of it?


texts: Transformer: loaded vs open-circuited vs short-circuited

texts:
I am trying to understand the working principle of current and voltage transformers.

I understand that V.T. and C.T. are basically just transformers, but I can't understand how secondary winding voltage and current are defined by the load on the secondary winding. Hence, for current transformer, the secondary winding is short circuted (very low impedence), and if roughly speaking, voltage on secondary is determined by the equation:

$$ U_{secondary} = U_{primary} * k;  where\\k = \frac{Ns}{Np} $$

and current

$$ I_{secondary} = \frac{I_{primary}}k $$

Then the current transformer works as voltage step-up transformer and voltage should be some value, but instead, because of the low load impedence Z = 0. It follows from Ohm's Law

$$U = I * Z $$

that Usecondary is 0. Why do these equations contradict each other?

I want to know one equation that describes all parametrs of transformer where is possible to see how primary and secondary voltages and currents change depending on impedences in transformer.


texts: Choosing voltage regulator and battery for a compact RF remote control (transmitter)

texts:
I'm designing a remote control based on a TWS-DS-6 433.92MHz transmitter and I wanted it to be really compact and energy efficient.

I plan to have an ATtiny85 controlling the transmitter and use VitualWire software library to send data to the corresponding receiver (which is already up and running). I'll have the ATtiny85 sleep most of the time, only waking it up when the user presses one of four buttons on the control. I'll power the transmitter using a MCU digital output pin so I only turn the transmitter on when I need it.

The transmitter input voltage is 5V (Edit: correct range is 1.5 to 12V). The controller will have 4 push buttons, each of which will send a different command to the receiver. I plan on mounting the transmitter boards on one of those small remote garage door opener cases like the one below.

Case dimensions in this case are 18x40x67 (mm).

I have a version of the transmitter working on a Arduino Uno with an ATmega328 (not on  deep sleep mode yet) on a protoboard.

Could someone please help me choose a low quiescent current 5V regulator and battery for my remote control?

Also, does anyone see any flaws or room for improvement on my design?


texts:
BJT amplifiers have a few standard configurations, i.e. Class A, B, A/B. Likewise there are a variety of standard OP-Amp circuits such as summing circuits and filters.
Is there a publicly available catalog of these standard circuits? I know companies have their own private libraries of circuits, but I have never seen anything similar in the public domain.


texts: Getting XY Coordinates (Pick and Place file) from Gerber

texts: I need to generate a Pick and place file from Gerbers received for a specific project. Is there any program that will be able to generate these files from gerbers files? At the moment I need to do it manually checking XY and of each component using a standard gerber viewer.


texts: What resistor should I use when wiring 10 LEDs in series?

texts:
I want to wire 10 of these LEDs into a circuit with a 9-V battery. The site states that the forward voltage is 3.2-3.8 V at 20 mA current. Should I assume 20 mA is the max amount of current that can flow throw this circuit?

Using V = RI, I calculate that I need a resistor that is 450 Ω (9/0.02). Is this correct? Secondly, if I want to have 10 LEDs here do I need a higher voltage (38 V)?

This is the first LED circuit that I am making, so I'm not familiar with most of the basics.


texts:
While other good answers have stated why discharging a 12V lead acid battery is hurtful to it, I seem to be unable to find how you should monitor it.

Assuming I want to stop drawing current from the battery when it is at 50% charge, to avoid too much permanent damage. When the answers like this one states the amount of cycles you can have with each DOD, it does not state how it should be measured. As voltage drops during discharge, the battery may (correctly) show a lower voltage with a multimeter than without any load on it, where it will quickly rise to a larger voltage.

To avoid damage, should I stop drawing current when the battery is at 50% during a discharge, or when it is at 50% with no load?


texts: What are the manufacturing difficulties for a large Li-Ion battery pack?

texts:
How is a large Li-Ion battery pack, such as in a car, manufactured? What makes it difficult to produce, if anything?

This question is born from the high cost of Tesla Model S, which is around $70k. In contrast, the average 4-door car is more like $20 or $30k despite having an internal combustion engine.

I don't understand that. I would have thought that a big battery, which has no moving parts, would be much much cheaper than a 4-cylinder engine.

So what's the expense in making a large Li-Ion battery? Is lithium much more expensive than steel? Are there major (expensive) safety precautions in manufacture? Is the battery pack very intricately "woven" with cells? Something else?


texts: Adding a second usb port to get around current limit

texts:
I'm building a keyboard with the proton c controller, from what I can gather it uses a usb2 port. Now the problem is I want to use an ssd1306 OLED panel and almost per-key RGB (around 70 LEDs total). 1 led uses about 12mA (using the SK6812MINI-E), 70*12=840mA, which is over the limit. If I could add another USB connection it could get around this limit (if my logic isn't flawed). The problem is I'm not sure how to wire it. Right now the led matrix has VDD pins connected to +5V of the proton-c, VSS to GND.
What would be the best way to add another port? I'm open to not even powering it from the PC, but from an outlet.


texts: VHDL Output is Unitiliazed or Zero when simulated

texts:
I am new to VHDL and implementing a test bench. I am trying to write code for a simple 2:1 MUX where the output of the MUX enters an active high synchronous LOAD register. Inputs and outputs are 8 bits. When I run my simulation my output F reads 'U'. I also tried to initialize the output signal in the test bench to (others => '0') but that just makes my output F = 0. Any help would be greatly appreciated, thank you!

DESIGN

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity REG_A is
    Port ( A : in STD_LOGIC_VECTOR (7 downto 0);
           B : in STD_LOGIC_VECTOR (7 downto 0);
           SEL : in STD_LOGIC;
           LDA : in STD_LOGIC;
           CLK : in STD_LOGIC;
           F : out STD_LOGIC_VECTOR (7 downto 0));
end REG_A;

architecture Behavioral of REG_A is
    signal s : std_logic;
    signal s_mux_result : std_logic_vector(7 downto 0);

begin

    regA : process (CLK)
    begin
        if (rising_edge(CLK)) then
            if (LDA = '1') then
                F <= s_mux_result;
            end if;
        end if;
    end process;

    with s select
    s_mux_result <= A when '1',
                    B when '0',
                    (others => '0') when others;

end Behavioral;

TEST BENCH

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity regA_tb is
end regA_tb;

architecture Behavioral of regA_tb is
--INPUTS
signal A : std_logic_vector(7 downto 0) := "01100101";
signal B : std_logic_vector(7 downto 0) := "11100111";
signal LA,SEL : std_logic;
signal CLK : std_logic := '0';

--OUTPUT
signal F : std_logic_vector(7 downto 0):= (others => '0');

component regA
    port(
        A,B: in std_logic_vector(7 downto 0);
        LA,SEL : in std_logic;
        CLK : in std_logic := '0';
        F : out std_logic_vector(7 downto 0)
        );
end component;

begin
dut: regA port map( A => A, B => B, LA => LA, SEL => SEL, CLK => CLK, F => F);

    --GENERATE CLOCK
    generate_clock  : process
    begin
        wait for 50 ns;
        CLK <= '1';
        wait for 50 ns;
        CLK <= '0';
    end process;

    switch_process : process
    begin
        SEL <= '0';
        LA <= '1';
        wait for 100 ns;
        SEL <= '1';
        LA <= '1';
        wait for 100 ns;
    end process;
end Behavioral;


texts: Transformer behavior for complete dummies

texts:
Unfortunately in mech. eng. we didn't really studied transformers that deeply.

However I was struck with a question after talking with an electrician friend that was repairing a failed transformer*:

  Considering an ideal transformer (without losses) and an open circuit on the secondary, could the current on the primary be calculated as: \$I = V/(2\pi fL)\$?

I am under the (possibly wrong) impression that since there is no load on the secondary, the power dissipated on the primary should be 0, and as such no current would flow through it.

A different but related question: say I removed the secondary from some transformer and was left with just a piece of copper wire wound about an iron core, would the current flowing through this inductor be calculated the same way as if there was a secondary wound on the core?

\$*\$ The failed transformer had no load on the secondary but the primary was draining around 7 amps at 230V! I'm guessing the isolation of the secondary got toast and it short-circuited.


texts: Connecting STM32F407VET06 to W5500 Ethernet

texts:
I'm newbie about these issues. I'm trying to connect stm32f407vet to w5500.
Those pins were connected like following :
INT -> IRQ
CS  -> CS
SCK -> SP_1 SCK (PB_3)
MOSI -> PB_5
MISO -> PB_4
RST -> RST
NC ->  NC
V -> 3.3
GND -> GND

But Assigning IP address to ethernet module failed.
Ethernet module is connected Modem via ethernet cables and on the other hand with stm32.
And Wiznet IO library used in software side.
Here is code :
  wizchip_init(bufSize, bufSize);
  wiz_NetInfo netInfo = { .mac     = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef},    // Mac address
                          .ip     = {192, 168, 1, 192},                    // IP address
                          .sn     = {255, 255, 255, 0},                    // Subnet mask
                          .gw     = {192, 168, 1, 1}};                    // Gateway address
  wizchip_setnetinfo(&netInfo);
  wizchip_getnetinfo(&netInfo);

Hence the IP adresses in netinfo turns into "FF,FF,FF,FF", when the program is run.
I'm confused about what I do next. I need your guides and helps.
Thank you, bests.


texts:
I have 2 computers (home PC's). Both are connected to the internet through a router/switch.

The router is always powered, regardless when one (or both PC's) are going standby.

Idea is, to power the router from the PC power supply (by homemade cable ofc.), so When PC goes standby the 12 Volt are shut off and so the router (note also that this avoids the router power adapter).

The trick is to have this happen from both two PC's - aka power on/off the router by a common connection from both. If both (or only one powered) are off/on the router follows, and we save the world energy.

I already have made such a connection - and it work fine. But I'm still concerned by any power/voltage imbalance between the two PC's.

Below is how I made the wiring with 2 protection diodes.

But still i think that one PSW could feed into the other. I also considered a relay which could isolate 100%, but this would give a short delay in power when shifting.

Are there any other wiring (or device/chip) to solve this perfectly.

Tx for any answers


texts: What's the maximum power capacity of a transformer with super conducting wire?

texts:
If I wind a specific transformer with superconducting wire and take away temperature from the core by means of some way, how much power can I take from transformer? I should mention max power capacity of that transformer with normal copper wire is 100 W.

In normal usage:

Frequency: 50 Hz
Input 220V
Output 10V 10A


texts: I2C device lists 20mA max current on AD, CL, and DA pins. Do I need a resistor between it and Arduino?

texts:
I'm looking at the datasheet for an LED controller (the MAX6955), and it shows that all of the interface pins; clock, data, address, etc., have current maxima of either 20 or 40mA. I'm aware that the Arduino I'm using is capable of sourcing considerably more current than that, so I need to be careful not to flood the I2C slave with more than it can handle.

It seems counter-intuitive that I'd need a resistor on all these lines (though I may need pull-up resistors for other reasons), but I also don't want to take a risk in experimenting with the device. They're about $18/each, so I'd rather not blow one out with an inept assumption.

Will the Arduino conform to a set of standard I2C current sourcing limits, or am I going to need to do something arcane to ensure the safety of these chips?


texts:
Problem description is as follows: Design an amplifier with maximum voltage gain without output saturation.

The following diagram was given:

I've tried doing a T-model for the first part that goes up to C2, and I got the following:

Vo=gmVgs(RE1)

Vin=gmVgs(1/gm)

Resulting in the following gain:

Av = vo / vi = gm*RE1

I have a feeling this result doesn't seem right.

For the sake of honesty, to say that I'm not sure what direction to take or how to attack this problem would be an extremely mild way to put it.

Another issue (?) I'm having is that I'm looking on the manufacturer's datasheet for the MOSFET I'm using, and there is no value for the transconductance paramater kn*(W/L), which I need when calculating the drain current in DC analysis, and 'gm' in small-signal analysis.


texts:
There are varied IC's to sift through to get to the one that matches a designers requirement. So i was wondering if its possible to improve an IC parameters, take for eg THD+N, to at-least an acceptable value.

As an example, for IC TA2020, its THD+N shoots to 10% at 25W. Can it be brought down below 5%. Similarly its dynamic range or efficiency or channel separation.

Is it possible?


texts:
If I wanted to draw say a verical thermistor in a circuit diagram, it can look like any one of these four:

Is there a convention for which one to pick, or are all of them valid in any situation where a vertical thermistor is drawn?

Thanks


texts: Advice and critical remarks regarding the manufacturing of a DC-DC step-down converter

texts:
I'm in the third year of my electrical engineering major and I want to take things a bit further than the usual analogue electronic circuits I've studied thus far by making a DC-DC step down converter that would convert 12V dc to 5V DC and output 3 amps of current.

So far I've only designed a PCB and I've gathered my components, but before I actually start assembling everything, I would like some advice from you guys especially since I can't test the components since it is my understanding that using a breadboard is not a good idea and perf boards are not really easy to get for me.

The schematic and the design of the PCB are as follows:

You can tell from the schematic what components I will be using, however I wasn't able to find those exact resistors. The closest I could get was a 1k resistor and a 3.3k resistor for the voltage divider resulting in 1.163 volts instead of 1.21 or thereabouts. Alternatively, I was able to find 4.7k and 1.5 k resistors which would give me 1.21 volts, however the error for all these components are 5%. Every electronics store I've been to, I was told 1% resistors are considered military grade so they don't sell them or some other bogus. I bought 20 pieces of each of the four resistors and I'll try to pick the ones with the closest value to the theoretical one (using a multi meter) but I don't know how they would fare with changes in temperature and load and what not. So this is one aspect I need help with.

I also wasn't able to find a 22uH inductor that could take 6 amps (apparently it is recommended that I should choose an inductor that could take twice the current the converter will supply) however I was able to find 11uH inductors rated for 6 amps and I was wondering if it would be ok to connect them in series.

And I forgot to mention this the first time I posted the question but I also was not able to get the diode that is in the schematics but I was able to get an SB560 diode which as far as I can tell from the data sheets, it should do the job but in any case if any one would like comment on that, it would be great.

What are your thought on this?


texts:
I am trying to implement the DALI TX/RX circuit below.

The description says:

  The other transistor (T2) is controlled by the current flowing through the
  resistor (R1). If a DALI slave unit is connected, this current will be the
  same as that flowing through the power transistor. The value of the
  resistor is chosen in such a way that when the current exceeds 250 mA
  the voltage level across the resistor will open the transistor (T2) which in
  its turn closes the power transistor (T1). In this way the current is
  maximized to 250 mA.

The designed circuit is here below, the relative part is in the red rectangular box.

Could anyone explain me how does the resistor R1 (in the first picture) value 2.7 ohm opens the transistor when the current exceeds 250mA? On that design, the signal is transmitted as 12V (logic high) and 0V (logic low).

Here below is the circuit lab drawing in case it is needed.

simulate this circuit – Schematic created using CircuitLab

V2 is a pwm that gets 5V and 0V values.

datasheet of T2 and T3 transistor (BC337)

datasheet of T1 transistor (BD135)


texts: Is there an easy way to provoke soft errors?

texts:
So I'm mainly involved in writing firmware for industrial sensors which are expected to be very robust.

One of the things you have to face are random errors everywhere, especially in ICs outside of the microcontroller. What we usually do is cyclic initialization so we are sure that the volatile registers are written inside a certain time, if possible with every cycle. That way we are pretty safe against soft errors harming us a long time.

Some ICs have a bit of a problem with that method so for those we switch to a read - check - correct method. We read the registers, check them against what is expected and if it doesn't match we correct the registers.

Testing this method proves to be a bit difficult. Sure we can modify the value we read in the firmware and check whether the correcting measures are done correctly, but I'd like to see that we actually capture soft errors in the device.

TL;DR
Sometimes we are "lucky" that during our EMI tests a soft error happens in the IC we would like to test, but is there a relatively easy way to provoke soft errors in a specific IC on a PCB?


texts: What is this device attached to a high-voltage power line?

texts:
I noticed this white, cylindrical device on a power pole near Seattle that facilitates a 90-degree turn of the transmission line. It looks like the lightning conductor comes down the pole into a sort of service loop before disappearing into the device.

I imagine that the device in some way facilitates grounding the lightning conductor, but I can't find any further information on it. It doesn't seem to match up with any easily discoverable arresting scheme.


texts: Adjustable 0-5A voltage controlled current source

texts:
I would like to build a high side current source that can source 0-5A with a 1mA resolution.  The voltage source feeding into this current source is a variable 0-50V that is always ~3V above the required voltage for that current[1].

My initial thought on doing this was to use a current sense amplifier as the inverting input to an op amp (the non-inverting input is the reference voltage) that controls a p channel MOSFET which controls the current going into the load.  Unfortunately, this means that the current sense amplifier is inside the feedback loop of the op amp, which seems to be a problem (I'm getting lots of oscillations).

However, This note from analog shows a low side current sink using a difference amplifier to measure the current through a current sense resistor.  It is using (a small amount of) positive feedback, which I don't understand.

This note from linear shows a low voltage, lower current (2A vs the 5A I want), current source.  I'm worried about the integrator causing the transient response of the current source to be too slow, and thus too inaccurate.

This note from TI talks about separating the unity gain bandwidths of two amplifiers by a "factor of 5" when using an amplifier inside a feedback loop of another amplifier.  (They mention this as a rule of thumb, but don't talk much about how to make it more concrete).  However this seems really hand wavy, and it doesn't go into more detail.

My questions:

What is the positive feedback for in the analog note?

Does this change the unity gain bandwidth of the op amp so the factor of 5 is obeyed?  And does the amplifier INSIDE the feedback loop have to have a unity gain bandwidth greater than the one being fed-back?

What are other topologies for accurate current sources that can handle 5A?

[1]:  For example, if I have a 1A current into 10Ω, the adjustable power supply will be at 13V, and 2A current into 10Ω will give me a power supply of 23V, etc.  The transient response of this response is a problem for another day...


texts: i2c Error in using BeagleBone Black with custom audio cape ( using ti's TLV320AIC3107 codec )

texts:
I have made custom audio cape using  TLV320AIC3107 codec and here is a schematic diagram.

For connection with BeagleBone Black I refer audio cape which is available in market. here is a link: CircuiCo - Audio cape.

I installed the DT Overlay as follows:

root@beaglebone:~# echo BB-BONE-AUDI-02 > /sys/devices/bone_capemgr.8/slots

root@beaglebone:~# dmesg

[  254.659557] bone-capemgr bone_capemgr.8: part_number 'BB-BONE-AUDI-02', version 'N/A'
[  254.659641] bone-capemgr bone_capemgr.8: slot #7: generic override
[  254.659659] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 7
[  254.659677] bone-capemgr bone_capemgr.8: slot #7: 'Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02'
[  254.659784] bone-capemgr bone_capemgr.8: slot #7: Requesting part number/version based 'BB-BONE-AUDI-02-00A0.dtbo
[  254.659802] bone-capemgr bone_capemgr.8: slot #7: Requesting firmware 'BB-BONE-AUDI-02-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  254.668469] bone-capemgr bone_capemgr.8: slot #7: dtbo 'BB-BONE-AUDI-02-00A0.dtbo' loaded; converting to live tree
[  254.668961] bone-capemgr bone_capemgr.8: slot #7: #4 overlays
[  254.678886] of_get_named_gpio_flags: can't parse gpios property
[  254.682895] 1-0018 supply IOVDD not found, using dummy regulator
[  254.682971] 1-0018 supply DVDD not found, using dummy regulator
[  254.683035] 1-0018 supply AVDD not found, using dummy regulator
[  254.683096] 1-0018 supply DRVDD not found, using dummy regulator
[  254.692524] davinci_evm sound.13:  tlv320aic3x-hifi <-> 48038000.mcasp mapping ok
[  254.701641] bone-capemgr bone_capemgr.8: slot #7: Applied #4 overlays.

Which seems to have installed successfully. To confirm:

root@beaglebone:~# cat /proc/asound/devices
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0]   : control
 33:        : timer

root@beaglebone:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=EVM
    DA830 EVM,
    Default Audio Device
sysdefault:CARD=EVM
    DA830 EVM,
    Default Audio Device

root@beaglebone:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: EVM [DA830 EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Now I try to play wave file :

root@beaglebone:~/Desktop# aplay -vv test_stereo_8000Hz_8bit_PCM.wav
Playing WAVE 'test_stereo_8000Hz_8bit_PCM.wav' : Unsigned 8 bit, Rate 8000 Hz, Stereo
Plug PCM: Linear conversion PCM (S16_LE)
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 2
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 8
  buffer_size  : 16000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
Slave: Hardware PCM card 0 'DA830 EVM' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 16
  buffer_size  : 16000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
  appl_ptr     : 0
  hw_ptr       : 0
#######   +                                        | 19%

after that board freezes and not responding.

When I check dmesg, I see the following error:

root@beaglebone:~/Desktop# dmesg

[  904.298073] omap_i2c 4819c000.i2c: Arbitration lost
[  905.330496] omap_i2c 4819c000.i2c: controller timed out

Any one have Idea ? what's wrong ?


texts:
Self thaught electronics hobbyist, I might be missing/misunderstanding something obvious.
I'm designing a circuit and added a battery protection based on the Diodes Incorporated AP9101C (Product page).
I don't really understand how the FET's work in the "typical application circuit":

As I understand this (and since both sides are meant to be "ground", this is a bit confusing), these are two N-type, enhancment FET's. So,

source should be at a lower potential than the drain,
Vgs should be above a certain voltage to conduct.

According to the pinout and the operation description, DO is used to control discharge and CO to control charging.

Looking at the functional diagram, it seems no majory current is conducted through the chip itself, so whatever goes from/to P- from/to battery ground goes through the FET's.

However, whichever direction the current flows, there's always one FET that is "reverse biased"(don't know the exact term). As far as I understood, FET's are not meant to be used bidirectional.
So, in case the battery is discharging, (conventional) current is flowing from P- to GNDbat. In that case, Q1 is in the correct direction, but Q2 is not. In that case, is the current through Q2 flowing through the body diode (the diode from source to drain?). Or am I misunderstanding something?


texts:
Can I use this programmer to program an onboard Atmega168 TQFP chip?

Does the board have to be powered up or the programmer supplies it's own +5v?

Here's what the programmer's schematic looks like.


texts: Have you any idea how is a changeable end-of-arm tool powered when is interfaced with an ATI tool changer or something similar ? My first thought is that on both sides of parts is a F/M connectors that are precisely fitted.And if that's so, in terms of safety its allowed ?


texts: Converting an ASCII string to bit stream

texts:
I am doing a project in which I am getting data from some switches and push buttons on the pins of 8051 uC. Now I have to transmit this data on the port pins serially to the PC.
 At the PC end, I am receiving the data in C# .Net application using the serial port class.
Now the issue is that I want that the data received in C# application is in the form of bit string instead of ASCII.

Can someone guide me how it can be achieved ?


texts: What is the best way to connect UART to USB? (need HID compatability)

texts:
I was wondering what would be the best method to add USB connectivity to one of my designs.  I have an Atmel ATMega328P which will be sending HID reports to my computer, but I need a bridge to go from UART to USB.

FTDI makes such a bridge, however it seems that these don't support the HID protocol.  Is there any other way to go from UART to USB and have my device show up as an HID device?


texts: Measuring variable resistance as voltage value

texts:
I would like to replace the microcontroller of an old gamepad with a Arduino/Teensy board. To do this, I need to connect all buttons and the output of the 4 potentiometers of the gamepad's joysticks to the Arduino.

Unfortunately, the potentiometers are not wired as voltage dividers but as variable resistors with a common source/ground pin:

simulate this circuit – Schematic created using CircuitLab

I could just put a constant resistor at the output of every potentiometer and read the voltage at this position, but then the voltage changes nonlinearly. The ADC resolution of the Arduino is not high enough to accurately measure such nonlinear curves.

Is there a way to linearly convert the resistance of the potentiometers into a voltage value to then read? I think it could be possible with pnp transistors as a constant current source, but im not sure how to wire it.


texts: Refraction vs Reflection in Ultrasonic sensor for water level detection

texts:
I want to use ultrasonic module JSN-SR04 for detection of water level inside tank. The US module has single sensor for Transmission and Reception of US signals as shown below.

I wonder if US sensor will work reliably for water level detection or if there will be absorption or refraction of US waves inside the water body and little or no reflection of the US waves? How can I check this analytically? I don't have the modules at hand at the moment but I don't know how can I find out about any possible problem in level detection.

The size of water tank is 4 x 5 x 6 (L, W, H) and it is made of concrete. Is it possible that the concrete walls will also reflect the US waves and disturb the sensor readings?


texts:
I am currently working on an RF project and using a high power RF SPDT switch. The control voltages of this switch are between 0V/-40V. If the control voltage is 0V, then the corresponding path is ON and if it's -40V then the path is OFF.

I wish to control this switch using a microcontroller. I know I would need a driver between the microcontroller GPIO pin and the RF SPDT control pin. Assuming I have a -40V rail available in the system, how could one convert the microcontroller GPIO signal (for example, working between 0V to 3.3V) to those required by this switch?

One option that I imagined is to use a level shifter. However, level shifters working in these voltage ranges are not available off the shelf. So I thought of building one using high power MOSFETs. But this solution would need several MOSFETs, thereby costing some PCB area.

Are there any other smart solutions for this problem?

Thanks.


texts: How to tell a battery is LiPo or Li Ion (based on apperance)?

texts:
I have this battery and I don't know it is lipo or li-ion:

Is there any way to tell a battery is lipo or li-ion based only on apperance?


texts: I am playing around with RFIDs and want to detect when an android phone is about atleast 10-20 meter away. I planned to use an RFID tag but need the tags pin broken out so that some interrupt line goes high or low to signify that a read operation is in progress. However I am unable to find any RFID tags that have their pins accesible. Can someone give me some idea as to how to proceed. Also is the range of 10-20 meters realistic with passive RFID tags?


texts: What resistor type is best for use as a heater?

texts:
I'm working on a design that requires I heat a bank of 18650 batteries during their operation. The plan is to mount the batteries along with large axial 2W resistors in to a PCB and using small thermostat ICs to keep them at a set temperature. (Very similar to this cubesat battery for reference).

My question is what is the best resistor composition for this purpose and whether it even really matters much? I imagine this sort of boils down to what is the most inefficient power resistor since I want the temperature to rise as much as possible. My initial thought goes to ceramic as the entire element is heating and I see that most dedicated heating elements are made of ceramic.

Any help would be appreciated, thanks!


texts: (LM2902N based) Variable gain for a Instrumentation amplifier

texts:
I'm trying to build a Instrumentation amplifier that would do a 10uV -> 10mV amplification. The motivation is to measure uA currents on a small enough shunt resistor (1-10Ohm).

For a proof of concept, I've built a circuit like the one below (ref.) with a distinction that I'm powering it with two 9V batteries and am using LM2902N as the op amps and Rg is somewhat different. It has much less that the required 1000x gain.

However, when measuring the results for different input voltages, the gain seems to vary:

I was expecting it to be constant.

What is a reasonable place to look for the causes of the variations?

Cheap resistors?
Inadequate op amp?
Breadboard prototyping?
2x9V batteries as power supply?
other?


texts:
I am designing a two side PCB in eagle. I have placed top and bottom ground pour. After using the autorouter, the ground islands have very little connection to each other, and there are completely separated islands. What is the preferred method to check for ground consistency, and to tell the autorouter, to complete ground?

This is how the unconsistent ground looks. The nets are not shown.


texts:
I built a robot using the Arduino Due with all the sensors running at 5V over I2C. There is a level shifter on both I2C lines. The motors are controlled using a VNH5019 motor driver carrier from Polulu (which takes PWM input). The motor speed and direction changes rapidly in this particular application.

When the motors are not running, everything is dandy and the readings are fine. On running the whole robot on the ground, with the motors, it runs fine for around 30 seconds to a minute before the I2C bus completely stops responding. All the devices start to time out on the I2C bus and the robot starts catastrophically misbehaving as a result. The Arduino has to be reset. After a reset, it tends to take less time to go berserk.

I've run the motors with the wheels off the ground and I get a significantly better running time so I strongly suspect it has something to do with the current being drawn by the motors. The motors are separated from the arduino and the custom PCB I use to route the I2C signals by two layers of metal plates (presumably this provides some shielding). I have installed 0.1 uF ceramic capacitors across the motor terminals and a 220 uF capacitor on the power supply to the Arduino.

I have also placed additional pull-ups before and after the level shifter but none of this seems to stop the problem.

I'm presently at a complete loss as to what else I might do to stop motor noise.

Edit:
Some schematics (for what it's worth)

This circuit sends signals to the motors and provides power to the motor drivers. Vin and GND are not actually connected to the Arduino. There is are copper pours for GND and 12V on the two layers of the PCB to support the current.

This circuit connects the Arduino's I2C bus to the various components. There is a voltage level shifter from 3V3 to 5V (LS1 and LS2). The transistors are not in use.


texts: Using SLA in place of LFP to test an LFP charging device

texts:
I'm testing a solar charge controller for LiFePO4 that uses absorption and float stages. By design, power-on initiates the absorption stage, and a timer terminates absorption and initiates the float stage. If battery voltage drops to a reset value, the device cycles back to the absorption stage.

Unfortunately, the unit I purchased isn't behaving as designed.  It's cycling to the absorption stage when it should, but also randomly when it shouldn't.

Tech support is testing the device using an SLA battery, supplemented by a second power supply that's set to a voltage between the float and reset voltages. With sufficient PV input, the controller floats the battery as expected. When they remove the supplemental power, battery voltage drops to the reset level and charging cycles to the absorption stage as expected. They are not able to reproduce my problem with this setup.

So it appears that they are able to successfully trigger the main branches of their firmware's logic by alternately adding and removing supplemental power. But are there characteristics of LFP whose absence might skew the results?  My intuition tells me they should be using LFP to more closely model real life, but I can't justify this position with facts.


texts: Teensy++ 2.0: How to get a PWM output from pins OC2A & OC2B

texts:
I'm doing a project that requires a lot of PWM's and I've gotten 6 of the 9 PWM capable pins to work, but I'm struggling to get the last 3 running.

To get the OC1A-C Pins running a PWM, I did this:

DDRB = 0xE0 //Pins B7,B6 & B5 to output
TCCR1A |= (1 << COM1A1) | (1 << COM1A0) |(1 << COM1B1) | (1 << COM1B0) | (1 << COM1C1) | (1 << COM1C0) | (1 << WGM10);
TCCR1B |=  (1 << WGM12) | (1 << CS11);

//Test PWM Values
OCR1A = 0x10;
OCR1B = 0x20;
OCR1C = 0x30;

However, when I try to do the the same for OC2A and OC2B, nothing happens:

DDRB = 0x10 //B4 to output
DDRD = 0x02 //D1 to output
TCCR2A |= (1 << COM2A1) | (1 << COM2A0) |(1 << COM2B1) | (1 << COM2B0) | (1 << WGM20);
TCCR2B |=  (1 << WGM22) | (1 << CS21);

//Test PWM Values
OCR2A = 0x40;
OCR2B = 0x50;

So what else do I need to set to get the PWM on those pins working?


texts: looking for a device or tester to know if car is electrified

texts:
I'm new here and definitely not an electrical expert - so please forgive any lack of clarity and errors in my terminology or tags.

We live in a rural area and drive a plug-in hybrid electric vehicle which we love. However, recently an electrical-related problem has arisen which is causing us great anxiety. There has been a significant increase in rats throughout our region. They climb into engine compartments and chew on (and can destroy) car wiring.

This can be an expensive nuisance in a conventional car - but in an electric vehicle it can be deadly if they chew through the orange wires (higher voltage – I’ve been told 300V). The mechanic that first noticed evidence of rats under our hood told us that if they damaged those wires, the current could arc, thereby electrifying the car body – and electrocuting anyone who then comes along and touches any metal part of the car.

He warned us to take immediate steps to address the issue, so since then we’ve been employing all the rat deterrents we can muster. My husband has been checking under the hood every day before using the car – very, very cautiously and with great anxiety for both of us, as to do so requires him to touch the car.

My question is this: is there some kind of device that we can use to find out whether the car has been electrified, BEFORE we touch the vehicle? i.e.  something that would (for example) light up, or make a sound, or some other clear indication, if the car was electrified and therefore dangerous? Perhaps something that we leave attached to the car while it’s in the carport, or maybe a portable device that has insulation on one end (the end we would hold) and conduction on the other end (which we would touch against a metal part of the car). Surely there must be some sort of relevant testing device in existence?

FYI: I checked with the car manufacturer and they do not know of such a device (although I expect it would be of great interest to other EV owners as well). I know that we could purchase insulated safety-rated boots and double-layer rubber/leather gloves, like the mechanics who work on electric cars use – but it’s not practical to don heavy gear every time we want to use the car or even just brush by it as we leave the house.

I appreciate any help we can get on this. Thanks very much.


texts:
I have used .meas expressions to calculate harmonic values in LTSpice. The problem is that these are now in the error log and I cannot export them.
Is there a way to export error log values in a .csv file for example?
Is there a better automated way to calculate harmonic values?


texts: How does a Resolver-to-digital converter work?

texts:
I am currently taking a class on sensors and sensor design and I came across this homework problem:

  In a commercial resolver to digital converter the digital angle Φ is determined to be 20 degrees. The output of the summing amplifier is resolver signal A sin (2πft), where frequency f is 60 hz, A = 0.7 volts and the input voltage V to the resolver is 10 volts. What is the rotor angle in the resolver in degrees at time t = .07 seconds?

I am having a hard time figuring this out. I've read through our assigned textbook and came across this block diagram of the Resolver to Digital Converter that we are going over.

Based on my understanding, the converter will start with a Digital Angle (Φ) and combine it with the input signals from the two secondary transformers in the resolver. Then the detector will use the reference voltage in conjunction with the output of the summing amplifier in order to find the Error signal: Ksin(θ-Φ). It then uses this error signal in some way to determine how far off the digital angle (Φ) is from the true angle of the resolver.

How does this detector work? What is it doing exactly? How does the integrator work? Is there some information or equation I'm missing? I don't need the answer to the homework problem, I am only looking for some guidance.

As a side note, I would greatly appreciate any recommendations for some good textbooks on sensors.