texts: How to create a reverse voltage protection with minimal voltage drop

texts:
I would like to create a reverse voltage protection for my 12v 0.1A - 3A (load is changing) DC circuit with minimal voltage drop. According to this Instructable Link. There are 3 ways to do it. Using a Diode, a Schottky diode, or a MOSFET.

It would seems the mosfet is the way to go, but i am not well versed with mosfets and do not know too many of them, so are there any other COMMONLY available mosfets that i can easily find? it would seems the one in the guide is quite hard to find.

worse comes to worst. i will just have to settle for schottkies. Is parralleling 2 schottkies recommended to achieve the current demand?


texts: I have a trusty 2005 Edirol UA-20 midi interface, on which MIDI in has recently stopped working. After a bit of testing it appears the Sharp PC401 optoisolator / optocoupler appears to have failed. It was stored for 7 years and was put back into service and lasted around six months. I'm curious how this would happen and if it would be common failure?


texts:
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7147.pdf

From the datasheet, on page 18, there is an example -

To connect CIN3 to the positive CDC input on Stage 0 use the following setting:

STAGE0_CONNECTION[6:0] = 0xFFBF

STAGE0_CONNECTION[12:7] = 0x2FFF

I am confused with the - STAGE0_CONNECTION[12:7] = 0x2FFF ; 0x2FFF = 0010111111111111

But from the SINGLE-ENDED CONNECTIONS TO THE CDC,  SE_CONNECTION_SETUP = 01: single-ended connection. For this stage, there is one CINx connected to the positive CDC input

so instead of 0x2FFF = 0010111111111111, it should be 0x1FFF = 0001111111111111

Am I right or I am mistaking something?

Thanks


texts: Can someone explain the purpose of R53 in this old linear power supply circuit

texts:
This is an old linear power supply schematic.  The 78GU1C is a four pin adjustable regulator.  It adjusts its output to keep its sense pin, pin 1, at 5V.   In this circuit, since there isn't a divider, in the feedback loop, it's going to adjust the base drive of the D44VM4 pass transistor to keep the output voltage at 5V.  Fairly straight forward regulator driving a pass transistor.  What I can't figure out is what R53, in parallel with the transistor is for.

Put together a simulation.  The dotted box is a rough approximation of the 78GU1C.  Though rough, and simplistic, it does actually behave properly when prototyped.  The prototype had a CA3140EZ op amp which has a 40ma max output -- hence the extra transistor to drive the "internal" pass transistor.

In simulation the op amp will oscillate at when the current through Rl is below about 2A, depending on the opamp model being used.  I'm also using "perfect" passives and generic transistors.  I'm sure that with a more complex circuit, and proper models for everything, the oscillation could be tamed.  I was more interested in how the circuit behaved with and without R53 present.


texts:
I was wondering about the viability of adding a Hall effect sensor which can sense a magnet through a plastic cover.
I'm interested measuring the angular velocity of a motor through a plastic cover, my plan is to mount magnets to the drive gear:

And attach a Hall sensor outside the cover:

But I'm not sure if the distance will be too great or the motors will impact sensor reading.
Any ideas?
My end goal is having the chassis be controlled by a Raspberry Pi or Jetson Nano but I'm not sure if they will keep up with the sample requirements so I'm thinking of running a separate Arduino to actually count rotations and be fed target velocities and return total rotations between samples.


texts: connector between copper wire and very small silver wire

texts:
I have a scientific piece of equipment that has very thin silver wire (they are 0.008'' in diameter, with teflon coating, for a total outer diameter of 0.011'').
I need to connect this equipment to another, but the wire are very brittle and easy to break.

I would therefore like to create a cable (using ~22AWG copper wire) with a connector on the end, and a mating connector attached to the silver wires.

I need a connector that's fairly secure but can be connected/disconnected easily. So far, I've made do with pomona mini banana plugs, but the thin silver wires are difficult to screw in and make a good contact, and they usually break at the connector after a few cycles of connect/disconnect.

Does anyone have a better suggestion?


texts:
I recently had surface mount inductor fall off my board due to vibration fatigue. The lead actually broke off on the component where it enters the gray material. https://www.digikey.com/en/products/detail/bourns-inc/SRP1265A-150M/4876713

This particular inductor is quite heavy, so I am looking for a lighter version, but wondering if there is another option for ruggedizing the heavy components on my board. It is in a very rough/vibey environment, and it needs to be heatsinked to the housing so I can't rubber mount it.
Is there an epoxy that is commonly used? Or a method of board design or component selection to prevent issues like this? I did some research and I'm unclear if you put epoxy under the component or over the top after reflow. Thanks guys.


texts: Pour copper area inside cutout Altium 19

texts:
I have a board design in Altium 19 which has a differential pair on layer 2 and a power plane on layer 3 (the rest of L2 is GND).  I need to cut out the power plane on L3 and have an area of GND to give a reference for my diff pair - how can I acheive this in Altium?

I have tried making a cutout then drawing a copper pour within that, but the copper pour doesn't work, though the cutout does.  Also tried moving the polygons around in polygon manager, without success.


texts:
i have this homework in proteus , but because of the virus  my theacher can t explain very good how to use this program.I have this circuit and i can't play it.I attached the circuit and the errors that i have.Can someone help me to make it works?
Thank you!


texts:
Does anyone know of a comprehensive source of information on LTSPICE directories, libraries, the Control Panel - Sym & Lib Search, model locations, etc. as they relate to simulation portability?

I have two computers, whenever I create a simulation on one machine, it never runs on the other machine.  I always get "Could not open library file".... even though the precise file it is complaining about is clearly in the location referenced.  I have had limited success editing the directory paths in the text files that make up the project, but with no consistency (these files oddly use absolute paths). The only way I can make it work is to enter the entire design over again on the second machine. Makes no difference which machine I start with, the result is the same.

I find LTSPICE simulation portability to be a complete mystery.  I would kill for some professional documentation. (something besides the terabytes worth of tidbits scattered across the WWW).  I would think that the Control Panel -Sym & Lib Search was added to solve this, but I can't figure out why it exists, seems to do nothing.

Any guidance greatly appreciated.


texts: Is it possible to have rounded (fillet) edges on a PCB?

texts:
I would like to know if its possible to have the PCB edges rounded.
No, I'm not talking about having round corners, or shapes in the PCB.
What I want to know if there are milling bits that allow to have the actual edge rounded.

I've seen this before. The PCB edge is so nice to the touch, and feels like a premium board. I would like to do something like this, but I cant find anywhere on internet, and the few PCB factories I've talked to don't know what I'm talking about :(


texts:
Does the color of jumper cables in a circuit matter?

I'm starting out with Arduino and can't get it to work at all with a breadboard! I'm thinking it's something simple like this!

I know Black is Negative and Red is positive, but what about green, blue, orange and white etc? Is it just to make the circuit clearer or does each color have a meaning?


texts: Can I power an (extended) LED stripe from both ends simultaneously?

texts:
I have a 5 meter WS2812B (5V) LED stripe which I need to extend with another 100cm. I want to power both stripes using a 60W sitched-mode power supply, however I have read that you should not daisy chain more then 5m because the stripes are not designed for the additional current.
How should I do this?

Connect Vcc, GND and Data on the extension point and then power the stripe from both ends simultaneously using the same power supply. Will this balance the current on both sides or will it short circuit?
Only connect Data on the extension point and separately connect the second stripe to the power supply.


texts:
I'm trying to implement the circuit shown in the schematic below (not complete, just for reference,) where the idea is to turn on only one LED at a time -hence the ADG1406-  with a frequency of about 1kHz.
The characteristic of the circuit, which I try to make evident with the color gradient, is the high resistance of the traces, where green is a low resistance (15Ω) and red high (250Ω.) Because of that, I decided to implement a current sink (TLC5947) to keep the brightness constant along the whole matrix.
Using the TLV61048 (boost converter) a voltage of 14V is defined with a maximum current of 300mA, for my application, the LEDs require a current of 10mA.

Now, my question is.
With the implementation of the TLC5947 is the supplied voltage (14V) going to be adapted according to the conditions of each LED plus keeping the current constant following more or less this equation
$$V=R\times I_{LED}+V_{LED}$$
or in the case of implementing a current sink, must the voltage supply be different?
There must be a working principle/theory that I'm not getting.
EDIT: I'm aware that the current set resistor (R_{IREF}) is missing, the main point of the question is to clarify the behavior of the voltage across the matrix given a current sink.
Also, the high trace resistance is given by the really small cross-section of the copper.
Second approach
The difference with respect to the first approach is, as proposed in the comments, change the TLC5947 for another ADG1406 (yeah, expensive IC) and the voltage regulator was also changed by a single-channel LED driver, the TPS92612.

Note: there is a mistake in the schematic, the VDD of both ADG shouldn't be connected to the output of the LED driver.


texts: Mismatch on string of resistors for DC bus voltage sensing

texts:
In the picture below, you can see a string of 10 resistors used for DC bus voltage sensing. I think that the blue resistors (the original ones) are 400k/1W. The colors are: yellow, black, black, orange. One of the resistors got open, and I replaced it with the one you see different in the string, the one in the red circle. It's a 390k/1W resistor. The equipment worked well for a couple of hours, then the resistor in the white circle got open.

Do you think the new resistor could have affected the string so that a new resistor got damaged?

I think we have a variation of 10k in the string with the addition of a 390k, which leads to increase the current.


texts: High-Sensitivity, Low-Latency Imaging Sensor

texts:
This might be a bit of a long shot for this venue, but: I'm looking into sensors for a scientific imaging application where the key is excellent sensitivity (quantum efficiency and noise performance) combined with low readout latency.

I don't need a lot of pixels, something like 64x8 or even a 32x1 line sensor would be just fine. However, readout of these pixels must be quick, not in terms of frame rate (throughput), but in terms of latency. Ideally, the readout latency would be well below 100 µs, so that together with an exposure time on the order of 50 µs, I'd get the result within less than 100 µs of the trigger event (on a custom FPGA board, so the exact interface does not really matter). Also, the short exposure times, compared with the fact that the observed process is rather faint in intensity, necessitate a very good sensitivity.

Traditionally, photo-multiplier tubes would be used for detecting the process, but my goal is (spatially resolved) imaging instead of just counting photons. For this, electron-multiplying CCDs (EMCCDs) seem to be an interesting option.

To give you an idea what this is all about, take a look at Andor's iXon 897 Ultra camera. It would be a near perfect match for the application, if it was not for the long readout latency of >500 µs. The main cause the long latency seems to be the fact that the CCD operates in frame-transfer mode, so that even if only a small region of the camera's 512x512 sensor is used, the image still has to be shifted through the whole storage area.

Are there EMCCD sensors that do not use a frame transfer setup? Or sensors in an oblong/line shape? The target application uses wavelengths just below 400 nm, so good quantum efficiency on the short end of the spectrum would be necessary, even though latency is the key factor. Whether it is a finished camera product or a bare sensor is ultimately not that important, as throwing together some readout electronics for this specific application would be doable.

Another product I stumbled upon is the FirstLight OCAM² camera. It seems to use a custom EMCCD sensor design manufactured by e2v with several readout stages to reach a latency of under 60 µs. However, the used sensor only has a very mediocre quantum efficiency in the near-UV, and while the website mentions that custom developments are possible, custom-ordering a sensor might be prohibitively expensive.

I still think that I'm missing a much more obvious solution, though.


texts: Use old PC power supply for 24v solenoids?

texts:
I'd like to use the +12 and -12 leads from an old PC power supply to power 24v irrigation solenoid valves. The values are rated 0.22A inrush current and 0.1A holding current.

I only plan on 1 or 2 solenoids being energized at a time. I can arrange for them not to be initially energized at the same time.

I see from some wikedpedia info on PC power supplies that the -12 is only rated for "minimal" current. But what is a typical -12 max current value for some random old PC supply?

Q: Would a 1A max load be a problem?

Bonus Qs: Any problem using the +12 and -12 leads for 24 V potential? I'll be controlling the solenoids through a relay. For the solenoid loads, should I use diodes across the solenoids?


texts: Why are BJTs more reliable than MOSFETs under severe weather conditions?

texts:
I read in a textbook (Microelectronic Circuits by Sedra and Smith, pg. 494, (2010) sixth edition) that BJTs are preferred by the automotive industry due to their reliability under severe weather conditions. I understand that temperature affects the carrier concentration, but how does this cause BJTs to be more reliable?

The paragraph in question:


texts:
I have a use-case where I need to control 4+ sonar sensors with a pic 628A microcontroller. The pic is also responsible for controlling a GPS and LCD so pins are scarce. The sonar sensors each have a single signal pin. To operate them, you pulse this pin which produces an ultrasonic chirp and then wait for it to go high again which indicates that an echo was detected. The time between the initial pulse and the response pulse corresponds to the time of flight of the chirp.

I would like to be able to multiplex all of the sonar sensors onto a single bus, but am not sure how to accomplish this. I would like to use only basic components if possible (not specialized IC's) because my main purpose of this experiment is to get a better understanding of the basics. Since the signal channel must allow for both input and output, I do not think bipolar transistors will work. I have considered using FET's to multiplex each signal line, but I am very inexperience with this stuff and would appreciate some direction.


texts: How do corner vias in a QFN layout ensure stable operation?

texts:
In the picture below, from the recommended layout of the TGA-2513-SM:

there are via holes in the four corners of the QFN package. The datasheet claims that this "ensures stable operation". In what sense? There are plenty of thermal vias under the pad which also ensures a solid connection to the ground plane. Why are these four corner vias necessary?

The only reason I can think of is these corner pads provide extra heat dissipation. But that doesn't seem like what they meant by "stable operation". This is a wideband LNA by the way.


texts: Controlling a 12V circuit with a RaspberryPi via PWM

texts:
I'm looking to power a 50W 12V heating element via the PWM pin of my Raspberrypi. For this, I have a MOSFET (STP9NB60) and a power supply. Of course this MOSFET's threshold voltage is at least 3V, likely more. A RPi I/O pin is high at 3V3. So it is unlikely that I can switch on the MOSFET properly. So I figure, that I should make another circuit to deliver 12V to the gate, using a regular transistor, and then switching that one with my RPi. I have some of type BC547. Can I use it for this? I imagine the circuit as follows:

Would it work this way?

EDIT

Alternatively, I have H-Bridges (L293DNE) that I have tried this with, following this tutorial. It went well and I was able to control a 12V Fan perfectly, but when I plugged in the 50W heating element, the H-Bridge went really hot really fast ... Since I have around 20 of these H-Bridges I was wondering if it's possible to wire them in parallel (or maybe just layer them on top of each other so the pins touch) to allow for higher amperage? This is all only necessary if it cannot be done with the MOSFET above ;)


texts: How add a chip antenna for the Bluetooth of the module BCM4339?

texts:
I have the following concern in a design that I am carrying out. I am working on the development of an electronic prototype that uses as a CPU the module: PICO-IMX6-SD. This module has wifi and Bluetooth connectivity and for this uses the BCM4339 chip of the Broadcom company. But in order to provide this functionality you must connect an external antenna through a ufl connector.

My device consists of a base PCB which contains a 70-pin hirose connector that allows connection to the module PICO-IMX6-SD, I do not want to add an external antenna to the device for some reasons, but I want to include a chip antenna on my PCB. My question is this: if I add the antenna and I put a ufl connector, then when connecting both ufl connectors through a female-female cable would have Bluetooth connectivity?
Or there is the possibility of potential failures.
In general lines I have not found a design that uses the BCM4339 together with an on board antenna.
A clearer way to explain this is the following: the Intel company launched the Intel Edison module, it has an on board antenna chip for the Bluetooth connection. This module was discontinued, in the prototype I use this module, but I replaced it with the PICO-IMX6-SD. Now I want to add a chip antenna just like the one the Edison has.
What recommendations do you suggest? I'm thinking of using some Murata chip antenna.


texts:
I have Microsoft HD3000 lifecam studio webcam.
I have some noise, when operating it in low light conditions.
I would like to minimize noise as much as possible, detaching infrared filter and using it as a grayscale imaging device.

As a software engineer i could go simple way:
I could suppress noise to some degree purely with software means. Applying some lowpass filtering between frames to suppress high frequency noise, suming UP R+G+B channels to get grayscale image, or further - decreasing its resolution 2 times (via adding 4 nearest pixels' brightneses, so gaining extra bit depth in exchange for resolution) But that's not point of question.

But i think i could achieve some SNR improvements in hardware circuitry itself. I suspect noisy ATX PSU is main reason of such noise (400W of constant load, constant writes to hard drives, so on) So some noise could possibly go to web cam, messing up with exposure process itself.

So i would like to try to power my webcam from separate power source. (Dual 18650 li-ion batteries in series) I suppose to connect web camera USB power pins to a li-ion accumulators, via LM7805 1A linear regulator. So now you got the idea, and my questions are as follows:

Can be "1A" considered suffient current?
Is it safe to operate camera in such way?
Is it safe to connect just D+ and D- pins to PC?
Could i achieve some noise suppression this way? (If not - why?)


texts:
I am quite new to electrical engineering.

I understand how to use Kirchhoff's circuit laws to get to my desired equations. What I don't understand though, is how to treat operational amps within those circuit laws. I can't find a helpful source which describes the process behind it. For example I would like to know how to get such equations for the following circuit. Where would the loops (Kirchhoffs second law) be in this circuit?


texts: What is this 4-lead component that looks like enamelled wire?

texts:
The attached is one board, a MOSFET driver, from an old power amplifier in our lab that unfortunately suffered a mini-fire recently. (Prior to its untoward warming, it operated from 160V rails and had a max current output of ~75A DC, with a O(100 kHz) bandwidth). The board design is from about 1990.

What is the 4-lead component in the green box? It's unlabelled, and as far as I can tell there is a negligible resistance across all four pins. It looks like two thick, plated wires joined by something chunky and wrapped in black insulation.

Am I being dumb? Is it just a jumper?


texts: Insight on backup safety feature for linear actuator using NEMA stepper motor in commercial product?

texts:
I am of intermediate skill level with electronics and hardware. I am working on a linear actuator concept prototype with a partner that we plan to iteratively develop and eventually take to market for in home applications. It's primary array of use is for drawers, small doors, pop out shelves, etc. We are currently using a set of small limit switches, positioned in parallel to the axis of motion, (signal lines to an Arduino controller) to control the actuator's travel bounds, operates with a NEMA 23 motor.
Several weeks ago we integrated a second set of external limit switches just a short distance beyond each of the first set. This second set runs a voltage line of the motor through these second switches before it reaches the motor. We mean for this to act as a safety feature that will shut off the motor if the traveling component goes beyond either of the intended first switch set positions.
For a number of reasons, this temporary solution will not work in the final design. Therefore, we need some other alternative to limit the travel while also ensuring safety with using the high torque motor. Ultimately, we would like to have a single limit switch or other electromechanical component that limits the travel length while also ensuring safety under operation from the high torque motor.
My question is:
How do other similar commercially available products that use high torque motors accomplish this while ensuring safety? Are additional fuses, switches, or relays typically used in combination to prevent catastrophic failures? How can we guarantee the motor will stop when it hits the switch or component, even if there is a hardware failure or software error?
Thank you for reading my post. I greatly appreciate any insight.


texts: How to use an USB port with 3.3v power output?

texts:
I am trying to use an USB port on a development board that doesn't provide a standard A socket. Instead, it provides 4 pins: 3.3V, two data pins and ground. Looking at the datasheet of the SoC, there is a pin AVDD33_USB described as "USB analog power", which provides 3.3v instead of the expected 5v. So, I assumed the board designer simply exposed the 4 pins from the SoC directly, and that is why I measured 3.3v instead of 5. Looking through the dataseet, I found a section called "Typical Application", with the following diagram:

So, it seems I can't use the USB port directly, and I need this "charge pump" thing. So, questions:

What is the simplest way I can use the USB port? Can a powered USB hub be directly connected to the board pins?
What is a charge pump?
Do I need an external 5v source?
Is this the typical way USB controllers are exposed in SoC?
Where does the AVDD33_USB pin enters in this diagram? If not used, why does it exists?

The SoC is a Hi3516A. The development board is called HI3516ASDI V1.0.


texts: Understanding TVS diodes in this application

texts:
From this Reference Design you can see they use two TVS diodes at the gate of the first FET to clamp voltages greater than 500V. They do the same in this other Reference Design.

So basically my question is: TVS diodes do not regulate compared to Zeners, so can this approach continuously clamp high voltages without having a negative impact on the TVS? To my understanding, TVS are mainly used to clamp overvoltages but for a short time.


texts: when a capacitors is being charging from a battery is battery discharging?

texts:
I'm studying yet.

Is a battery discharging when capacitor connected to it is charging?

Please explain how does it work!


texts:
I have 900k--100k resistor voltage divider, which works ok - scales down input voltage 10 times.
Now I want to offset attenuated value by 1.65, i.e. I apply bias voltage at the bottom of voltage divider.
The schematics is easy:

simulate this circuit – Schematic created using CircuitLab

Now if I apply 10 V on Vin I expect to see 2.65 V on the output, but in practice I measure 2.45 V, why is it so?

At first I thought maybe I have my probes set to x1, but no, on x10 I read the same voltage. Have no idea where are my 200 mV lost.

Other thought was that that 220 Ohm resistor is basically in the divider chain, so it is 3 resistor divider 900k, 100k and 200 Ohms, but I checked - since it is orders of magnitude less than other it should take 0.002 Volts, not 0.2.

The question is - where are 200 mV lost and how to make it "right" i.e. give output of 2.65 V?
Just to clarify without offset I get exactly 0.9999999 volts with the divider and x10 probe, I checked resistors multiple times, all of them are practically up to specs, <0.5% off.


texts: Power distribution switch for auxiliary battery

texts:
I'm designing a power distribution system, for connection an auxiliary battery to my system.
The idea is to use a power distribution mux, similar to TPS2124 from TI. I want to be able to control the switch-over from my uController:

The problems I have is the following:

Vsupply can range between 5-36V, which the TPS2124 cannot handle.
Current output of the power mux should be up to 5A
I want to control the switch over, but if Vsupply is removed, then the system should automatically switch over to the auxiliary battery

I'm unsure if this is the best solution or if there is a single chip solution that can handle the charging requirements as well as the option to switch over from the uController.
Looking for inputs on the design.
Thanks!


texts: Using super-cutoff to reduce Direct Source to Drain Tunnelling

texts:
I was wondering if anyone had any insight on how useful it would be to reduce direct source to drain tunnelling by applying negative gate bias voltages on sub-10nm FinFETs. Has anyone looked at this before?

From what I know, direct source to drain tunnelling current is an exponential function of the barrier height, so with negative gate bias voltages, wouldn't the effective barrier height increase, thus resulting in exponential reductions in leakage current?

Quick follow-up question: if negative gate bias voltages can help to reduce DSDT, is there any data/insight on to what degree we can reduce leakage current, given that with sufficiently negative gate-bias voltages GIDL current will become the dominant leakage mechanism?


texts:
I'm working on a transimpedance amplifier circuit, but it appears that there are issues reading out a signal. The source is comprised of sixteen individual SiPMs in parallel with each other, specifically the MicroFJ-60035. For this array, I'm running two variants of the circuit: one array without an op-amp, and one with an op-amp. Below is a schematic showcasing both types:

simulate this circuit – Schematic created using CircuitLab

Apologizes for the formatting, but I thought that it would be easier to showcase the two types of circuit in one schematic rather than have two large schematics take up the page.  While I only show one SiPM in the schematic, you can think of it as sixteen SiPMs all connected in parallel, with the anodes and cathodes of all sixteen parts connected with the others. Please note that the two circuits shown are independent of each other, being on separate boards and all.

Now, the first schematic, shown on the left without an op-amp, has no issues with it. Rather, it functions as expected given the array configuration and the resistor, showcasing a negative signal at the oscilloscope. However, there are issues with the transimpedance circuit on the right. The op-amp I'm using for the circuit is the TI OPA-656, and the output of the circuit is not showing anything even when light is shining on it.

At first, I thought that the issue was just bad orientation of the SiPMs. So, I've unsoldered the SiPMs and made sure that they were in the correct orientation. Doing so did not solve the issue. I'm beginning to wonder if it might not be an issue with the layout, but an issue with the op-amp used in the circuit. Having sixteen SiPMs in parallel increases the capacitive load at the inverting input, but would that alone prevent any output from showing at all? I would have expect some response, but to have no response is strange.


texts: Allocating more memory Space in controller

texts:
Chip: PIC18f26j50
Compiler: C18

My objective is to store values in a table in the RAM memory using structures and feed in the values which are quite large.

#include <p18F46J53.h>

 struct table
    {
      float temp;
      float humidity;
      float pressure;

    }entry[300];

This is my sample code and I have to store such members into the controller's memory. This is for the purpose of monitoring the surrounding data of the atmosphere. And later dump this data into EEPROM.

But I am having trouble building the code as it give the following error:

  Error - section '.udata_main.o' can not fit the section. Section
  '.udata_main.o' length=0x000013ec

I tried searching Google for fixing  this udata error and ended up with
How to Create Objects Larger than 256 Bytes with Microchip's MPLAB C18.

But this shows how to store each variable. How can I store structs in C18? Or is it impossible?

I'll try to be more specific. I found this method to store data greater than 255 bytes.

#pragma udata large_udata
unsigned char big_buff1[300];
unsigned char big_buff2[350];
#pragma udata

How can I store structures greater than that so that I would just need 3000 bytes at the for the table preparation?

I would prefer to use float but I can settle for using int/char.

I hope this makes things clearer.


texts: Transients question - Understanding the current

texts:
Consider:

How can I understand the second part of the question? After I close S2, I have the answers... Why is the expression for after I close S2 given by \$= 0.48 -0.3e^-3t\$?


texts:
Is Image Based Visual Servoing a non-linear controller? I think it is as the Image Jacobian has square terms of u & v (image-plane coords).

Where \$p_u, p_v\$ are the width & height of each pixel, \$f\$ is the focal length of the camera lens, \$Z\$ is the depth of the object which has been projected on the image-plane.


texts: Startled by a notation of operator for combining two signals

texts:
I am studying electronics and when practising, I got stuck at this simple problem of summing two signals. I believe I know how to work out everything except the combination of the two signals with two "minus signs".

The problem is

i.e. one signal of 0.1 V (rms) going through amplifier block with gain of -3.3 dB and other signal of 0.4 V (rms) going through amplifier block of voltage gain of 0.902 are combined together and then go through amplifier block of gain 4 dB. Both signals consist from an uncorrelated noise.

I think that the attenuated signal from the first source is
$$ V_1 = 0.1 \cdot 10^{\frac{-3.3}{20}} \approx 0.068$$
and that the signal from the second source is $$V_2 = 0.4\cdot0.902 \approx 0.36$$

I have then tried to add these signals together and get the \$V_\text{out}\$:
$$
V_\text{out} = (V_1+V_2) \cdot 10^\frac{4}{20} \approx 0.680
$$
which is quite far from the correct answer of \$582\:mV\$.

I believe that I have not combined the signals correctly — I have also tried combining them with negative signs, but that would just yield negative voltage. Could someone please explain me what this notation of combining signal means?


texts:
I have a question about writing scalable code in VHDL.
I have a structural VHDL project that contains a lot of components. I would like a method of changing the bit size of all components by just changing one value in my top level file.
For example I would like a integer constant called dataWidth that I can change in my top level file that will change the data size of all components used in this top level file.
I tried declaring the integer as a generic inside the entity of the top level file but it in the other components it doesn't compile saying the dataWidth hasn't been declared.
What is a simple method of doing this?
I can provide code if you need to see it.


texts: Oscillations on High Side Sensing Current Source

texts:
I designed a simple adjustable constant current source that uses high side sensing but I can't seem to figure out where the oscillations on my output are coming from. The circuit is shown in a picture below and is designed to have a maximum current output of 2A. In simulation everything works as intended but when I populated my PCB I get really bad oscillations.

The potentiometer on the left is a 10k pot. The P-Channel MOSFET that is doing the switching is an FQP17P06 with a large heat sink and the two opamps are an LM4562MAX being driven with 12V on the positive rail and GND connected to the negative rail.

The output of my real circuit tracks the potentiometer set point roughly but oscillates wildly sometimes +-1.5A. The upper limit is also off. When I turn the potentiometer all the way up as shown in the picture my max current measured with a scope and a power supply is somewhere around 2.8-3A which is a lot higher than my intended 2A and is blowing my 2.5A fuse not shown.

Did I do something wrong by using the FET driving OpAmp in open loop mode or are the OpAmps powered ineffectively so they are behaving erratically near the rails?

Current Source Simulation

EDIT (2019-June-11):
I attempted to recreate the oscillations by making the circuit components more realistic in both Falstad and then in LTSpice and both refused to simulate or locked up. Turns out my computer was on the fritz and I had to borrow a different one to get a good simulation.

Adding Cgd to the FET and updating the beta value to 1/Rdson as suggested did cause the output to oscillate. I was then able to get it to stabilize using the recommended answer of slowing down the FET driving opamp with an integrator.


texts: What is maximum ESD current flowing through the pin for HBM model?

texts:
I have a given specification HBM ESD tolerance on my IC (For instance 1kV). I just want to estimate the maximum current which will flow on the pin in question and so determinate the clamp point on the snap-back curve.

Thanks!


texts:
NOTE: Question was edited following comments and answers.

As you would probably all agree, current is in practice measured by putting a resistor of small resistance in series and then measure voltage across that resistor. (I know there are other scientific methods, but are they used in everyday hobby applications?)

Measuring voltage precisely is no problem. A cheap four channel AD converter (combined with a microcontroller or i2c to USB controller) accuracy might be upwards of 1% quite easily according to Andy aka (IMHO upwards of 0.5%).

However, what I find problematic is that resistors of small resistance and small tolerance are very difficult to obtain or cost forbidding prices.  Four
power resistors of 1 Ohm and only 5% tolerance are twice as expensive and at least an order of magnitude less accurate.  Only one low power 1 Ohm resistor with 0.1% tolerance cost several times ADC price.

What is the possible solution to that problem?  One idea is buying a cheap power resistor and determine its true resistance and correct the result, but how to determine its true resistance?  Naturally, measuring small resistances is just as difficult as measuring small currents.

Are there any simple hobbyist method to measure current with better precision than 1% that does not require an electronic lab at home or dozen of dollars per resistor?


texts: 41256 / 81256 - dram power and ground confusion

texts:
I'm trying to design a memory board for an Emu Emax sampler to enhance the amount of memory.
Now, when I read the Emax service manual and look at schematics over memory chip connections (in this case the memory type is Fujitsu MB81256-12) the POWER is on pin#16 and GROUND is on pin#8 on memory ic's; but when I read datasheets for the memory chips the signals are swapped (i.e. ground on pin#16 VSS and power on pin#8 VCC). Can it be that it make use of negative voltage compared to ground? What am I'm missing here?

Thank you in advance for any answer(s).


texts: How to calculate power consumed by an electrical device in a specified amount of time?

texts: Say for example I have a TV with "140 watts" marked on it. Does this mean the TV consumes 140W per minute? Per hour? Per day? How is the power consumed by device calculated from the device specification?


texts:
The text describes "Internal Weak Pull-Ups and Pull-Downs" in the book Microcontrollers From Assembly Language to C Using the PIC24 Family:

"The term weak is used because the resistance is high enough that an
external driver can overpower the pull-up resistor and pull the
current to near ground, producing a 0 input.
The weak pull-up is implemented as a high-resistance P-transistor and
when enabled, the gate of this transistor is 0, turning it on."

I get that a high resistance leads to a weak current output from the resistor. It's the way it is worded that doesn't register based on the previous definition of a pull-up resistor which is simply to ensure that there exists a logic level and not a float, and with the control being dictated by a pushbutton.

How can an external driver [a device that controls high and low output to the input of circuit in question] "overpower" the pull-up resistor? By increasing this current? If that is the case, doesn't V = IR imply that an increase in current increases the voltage? If this is true, how can a 0 input be generated when both scenarios have two different levels of currents flowing, which both take the same path down the pull-up resistor and either to the input, or to ground, based on whether or not the pushbutton was pressed? I am assuming based on my careful analysis of wording that the effect of "pull[ing] the current to near ground, producing a 0 input" can only happen if an external driver "overpowers" the pullup resistor.

Thanks for any help.


texts: How to figure out SD Card optimal write size

texts:
I am writing the data logging portion for a real time embedded application. I have an SD card I communicate via SPI at 33Mhz. I need to be able to log at least 1024 bytes of data ever 1 milli-second. I have tried sending the pre-erase command with 2 blocks erased and then sending the multi-write command with 2 blocks but this takes longer than 1 milli-second. My SD card is rated at 20MB/s so it should be good for 20KB/ms at optimal speeds.

I have tried reading the SD card specification to see how to calculate the optimal write size or sector boundaries and can't tell exactly what to do. Should I be writing in multiples of the sector size at blocks that are multiples of the sector size?


texts: Why does a cold solder joint appear grainy or dull?

texts: A good solder connection is shiny, and we're taught that dull solder indicates a cold solder joint.  Why is this?


texts: Why is the output of stateful elements often named Q?

texts:
In logic circuit diagrams, I've seen various conventions for naming inputs and outputs of logic gates and combinatorial circuits. However, stateful elements like latches and flip-flops often have their "state" called Q. I suspect there is a connection with abstract Finite-State Machines from theoretical computer science, where "state" is often noted Q as well (so I asked them too :-)

But why have people picked this particular letter ?


texts: Quick question, are the brushes in a brushed DC motor supposed to be lubricated?


texts: How to know (or estimate) the range of a transceiver?

texts:
I'm trying to decide between different wireless transceivers, where my main requirement is furthest range for a given frequency band.

Is there a way to relate the frequency, data rate, power output, current received/transmitted, etc into a decent estimate for the range these transceivers can work at? I'm new to RF electronics clearly.

For reference, I'm looking at parts like the following:

http://www.digikey.ca/product-search/en/rf-if-and-rfid/rf-transceivers/3539948?k=cc1101


texts: Which DC power jack to use with AC-AC adapter

texts:
I bought an AC-AC adapter for a project (takes 120 VAC mains and produces 12 VAC/3.5 A). It has a regular DC power jack (2.5mm I.D., 5.5mm O.D.) and I want to purchase a DC power jack to connect to it.

However, all DC power jacks I could find are rated for a specific DC voltage and current.

Are there any AC-rated DC power jacks on the market, or must I use a DC-rated one? Are there any special considerations I should be aware of?


texts: Is there a method to get the carrier from the recieved QPSK signal?

texts:
If we have given a signal and we know that is a modulated QPSK signal, can we recover the carrier if we know the carrier frequency fc.

Edit: A clarification,  I do not have to do it in hardware, a matlab code is fine.


texts: LM2596: input voltage varies with output voltage?

texts:
I have a 12V solar panel connected to a LM2596 (the one that has one pot for changing output voltage) that gives me a nice 5V output. However, when I check the voltage at the input pins, the voltage from the solar panel is also 5V. If I vary the voltage using the pot on the board, the input and output voltage is always the same. If I disconnect the LM2596, the voltage from the solar panel is back at 12V.

Why is this? I would expect the voltage at the input pins to be 12V, regardless of output voltage.


texts: Connecting multiple servos for a robotic arm

texts:
i am computer programmer and its really been long since i have done electronics. I need help on connecting my servos to an arduino to power my robotic arm. This is the robotic arm that i am trying to build.
I have come up with the connections as shown in the below diagram with my basic knowledge and browsing the internet. I have omitted the signal wires for clarity

What i would like to know is

Will this work?
Is this a good/decent design? I think it isn't as I have 4 battery packs.I would like to have a single power source that would save me the trouble of maintaining so many batteries. To do this I have thought of using a voltage regulator but i am concerned about how this would perform if one servo starts drawing too much load. It might suck up all most the power leaving very little for the other servos.

Any suggestions would be greatly helpful.


texts:
Will a capacitor actually help to lessen the effects of ESD? Because, with rise time of about 1 ns, the frequency of the ESD signal will be well above the self-resonance frequency of the capacitor and it won’t act as a capacitor. Maybe it won’t actually help to reduce the transients.

Please share any insights on this topic to help me better understand.


texts: Switching bjt transistor with photodiode

texts:
Initially I thought this would be a pretty simple problem, but I'm just getting started learning electronics so I would love some assistance.

This is my circuit:

I calculated the values based off this calculator: http://www.daycounter.com/Calculators/Transistor-Switch-Saturation-Calculator.phtml

This the photdiode I am using

Basically I want to detect when the light is on, I have a visible light photodiode, and when it is on, I want it to send a HIGH signal.

Maybe I am naive, but I thought the transistor would be "ON" or "OFF", but I'm reading 1.4V at the output. I am not sure why this is, maybe to do with such a low Rc resistor value, but the reason why I chose that is because of the calculator, I didn't want a too high base resistor because otherwise it would be a too high threshold to switch. But in any case, it doesn't detect the light very well so I'd really like to understand what's going on before I just try some random values.

EDIT: Thinking about this some more, doesn't the photodiode generate current, so if I change the circuit to be like this.... random values chosen because I haven't calculated it. Would this work? It didn't when I just tried, though I'm not sure what values I need. Am I totally wrong here?

Also to clarify, the long leg of the photodiode is the end with the higher voltage?


texts:
Can someone shed some light on the rationale for the SPDIF coaxial input circuits in: (1) the DIR9001 evaluation board (see schematics, page 7), and (2) in this Application Note from ST (see Figure 10 on page 12). They both use 74xx logic gates but put feedback resistors (as if it was an analog amplifier --- read: being used as an analog-signal amplifier) and even more puzzling, put DC-blocking capacitors at the input.

Additional question: if I want to add an isolation transformer (a 1:1 pulse transformer), do I need to change anything (for now, tentatively, I'm going with the two-stage circuit from Figure 10 of ST's application note). I assume that I need to add an additional DC-blocking capacitor at the primary of the transformer, and place the 75-ohm termination resistor on the secondary of the transformer --- BTW, I'm planning to use the Murata DA103J.   Would I need to change anything w.r.t. the circuits mentioned above?

EDIT: This is my tentative circuit --- are you suggesting that I do not need and could/should remove C3?


texts: Bitwise expression in System Verilog causing Icarus Verilog to Hang

texts:
I have ripple carry adder in system verilog as shown below. The circuit isn't functionally correct which is not my problem here. My problem is this line  c_in[0] =~(c_in[63]) | carry_in ; cause my simulator (Icarus Verilog) to hang. When I change the operator | to ^ it simulates without hanging. I want to find out what is causing the simulator to hang.
`include "adder.sv"
module ripple_adder #(parameter width = 64)(input [width-1:0] a, b, input carry_in, output logic carry_out, output [width-1:0] sum);
logic [width:0] c_in;
 genvar i;
always @(*) begin
 c_in[0] =~(c_in[63]) | carry_in ;
 carry_out =~(c_in[64]) | carry_in | ~(c_in[19]);
 end
generate
 for(i=0; i<width; i=i+1) begin
  adder dut(a[i], b[i], c_in[i],c_in[i+1],sum[i]);
 end
 endgenerate
endmodule

1 bit adder
module adder(input logic a, b, carry_in, output logic carry_out, sum);
 always @(a, b, carry_in) begin
   sum = a ^ b ^ carry_in;
   carry_out = a&b | (a^b) & carry_in;
 end
 endmodule

Testbench
`include "ripple_adder.sv"

module tb_adder;
    parameter width = 64;
    logic [width-1:0] a, b;
    logic carry_in;
    logic [width-1:0] sum;
    logic carry_out;
    logic [width:0] sum_out;
    int passedFile;

    ripple_adder #(.width(width)) dut(.a(a), .b(b), .carry_in(carry_in), .carry_out(carry_out), .sum(sum));

    initial begin
        passedFile = $fopen("passed.txt", "w");
        assertCornerCases();
        test();
        $fclose(passedFile);
    end
    task test;
    integer i;
        for(i = 0; i < 50; i++) begin
            a = {$urandom(),$urandom()}; b = {$urandom(),$urandom()}; carry_in = 0; s_out = a + b + carry_in;
        #5 if (sum == s_out[width-1:0]) $fdisplay(passedFile, "%d", 1); else $fdisplay(passedFile, "%d", 0);
           if (carry_out == s_out[width]) $fdisplay(passedFile, "%d", 1); else $fdisplay(passedFile, "%d", 0);
        end

        for(i = 0; i < 50; i++) begin
            a = {$urandom(),$urandom()}; b = {$urandom(),$urandom()}; carry_in = 1; s_out = a + b + carry_in;
        #5 if (sum == s_out[width-1:0]) $fdisplay(passedFile, "%d", 1); else $fdisplay(passedFile, "%d", 0);
           if (carry_out == s_out[width]) $fdisplay(passedFile, "%d", 1); else $fdisplay(passedFile, "%d", 0);
        end
    endtask : assertOutput

endmodule : tb_adder
```


texts: Why is my Voltmeter/Ammeter not reading amps correctly?

texts:
I am having problems correctly setting up my volt/ammeters. I am attempting to use them to monitor a boost converter I recently purchased. I would like to have one set up on the input of the boost converter and the second on the output. I have tried many ways of wiring but for some reason the V/A meter on the input will not read the amperage. Also when input V/A meter is connected the output V/A meter will show an extremely high amp reading (I'm assuming it's taking the reading from both V/A meters' shunts instead of just it's own). I have switched the meters to rule out a faulty meter. They both read voltage fine and the output will read amperage fine (when input meter is disconnected.
I have to assume I am wiring something wrong, so I have included a wiring diagram (forgive me if it's bad, I've never made one before). Also I have included info on the parts I used.

Following Information added after original post
Boost Converter was advertised as 1200w, 20amp, input 8v-60v with output of 12v to 83v

-My 12v power supply was a modified computer switch mode power supply.

-The actual load was electrolyte solution with copper as both anode and cathode. (I use electrolysis for de-rusting items).

Just to summarize, V/A Meter 1 (Input Meter) won't read amperage, but does read voltage. V/A Meter 2 (Output Meter) reads both voltage and amperage, but gives incorrect amperage reading if Meter 1 is connected. Why is this? How do I fix this and/or wire this correctly?


texts:
I couldn't find a simple approx formula for calculating diode reverse recovery losses!
I am not doing any rocket science, so I just need an approx formula (not worried much about temperature effects and small variation in parameters). I have been searching in Google for answer, most of answer refer to an litterateur, which has detailed calculation including "n" number of variables. Please suggest a basic formula for approximating diode recovery losses.


texts: Frequency response based on a transfer function

texts:
The transform function: $$T(s) = \frac{1-sRC}{1+sRC}$$
Polynomial form: $$-\frac{s-\frac{1}{RC}}{s + \frac{1}{RC}}$$
Since magnitudes of the zero Sn = 1/RC and pole Sp = -1/RC are equal,amplitude gain is 0. What about the phase? How does '-' sign affect the phase?

Without the minus: Sn i positive and real and has a \$\Pi\$ phase while the negative Sp has a \$0\$, at \$\omega=0\$.

As \$\omega\rightarrow\infty\$, \$\pi \rightarrow \pi/2\$ and \$ 0\rightarrow\pi/2\$. After subtracting the phases from zero and poles we have that phase changes from \$\pi\rightarrow0\$.

What does the minus affect?


texts: Can i increase the amperage of a step up transformer?

texts:
I am doing wood burning, and I wanted to use higher voltage.
I have a neon sign transformer-10000 volts- but it only has 3mA.
It doesn't seem to be enough to push through the wood. Can I increase the amperage or do I just need to get another one?

I have been using a microwave transformer up till now.


texts: Connector types to used to distribute AC mains terminals

texts:
I want to power tens of these small power supplies. From a single AC mains.

Below I tried to illustrate the powering of these power supplies PSU 1, PSU 2, ect..

But for the case above what are such type of terminal block is called? A terminal block where one does not have to daisy chain and terminals are innerly connected. In other words, what are the yellow blocks above called?
For example I found this terminal block under the category called "distribution blocks". But in its data sheet there are types for earth and neutral but not line. Im totally confused, it doesn't even mention whether the pins are innerly connected. Can I use this for both line or neutral?


texts:
I am exploring a project which would require stationing several sensor packages outdoors in a semi-protected environment. I am wondering wether adding a simple, low-power heater circuit to the package might improve its robustness in winter time. Basically, the idea would be to keep the package warmed within its spec'd operating range, and also possibly to evaporate any dew or other condensation that might otherwise form inside the package.

Is this a reasonable idea? What kind of heating element would be suitable for this application?


texts: Voltage Drift on an Open Circuit (and how to get rid of it)

texts:
I'm trying to create a custom lick-port to detect mouse licking behavior. I am following a design published here that uses the junction potential between the mouse's tongue and the metal water spout to detect when a lick occurred, see image below:

To do this, I'm acquiring the voltage signal as an analog input to a National Instruments DAQ card (PCIe-6363) via an NI breakout box (model SCB-68). I'm reading out the voltage using Matlab R2014a, using the DAQ toolbox to read out voltage from the analog input (ai) channel on the NI DAQ card.

My problem is that when the circuit is open, the voltage is slowly drifting to a particular value over about 8 minutes (it looks to be around 2.8V):

What I really want this system to do is have a voltage of 0 until the circuit is closed, at which point I can detect a junction-potential that signifies a lick. So, why is this drift occurring? What can I do to prevent it during the open-circuit condition?

Here is a sample of what happens when I hold the ground in one hand, and touch a wetted finger to the + wire. Each sharp drop coincides with the circuit closing:

Now, I could still potentially use this, just by calculating the derivative and seeing when that exceeds some threshold, but I want to know why this isn't working as expected.

Thanks!


texts:
My PC powered off out of the blue one night and when I opened it to look for a burning smell I didn't notice any, so I thought it might be due to a power surge and tried to boot up the PC again with the cabinet open and that is when I saw a yellow spark fly out from the graphic card. I checked my PowerColor HD 7970 graphic card and I noticed a burnt out component on the back side.

I've marked the burnt out component in the cropped photo below.

Initially I thought it was a Surface Mount Capacitor because of the 'C' in the label C610. So tried to contact a computer repairs shop and they said that it wasn't a capacitor but I'm not sure if the guy knew what it actually was.
Can someone help me figure out what type of a component it is? I'm assuming C610 is the same as C618 or C623 because it looks like they are the same size.

P.S. My PC boots up fine using the on board graphic card it has so there is not damage to the motherboard I think.

Also I have a multi-meter available in case you want me to test something and report back.

Update : The IC 8510 301-24 U1216 below the burnt capacitor in the photo is dead too.


texts: Is this reversed P-MOS next to the battery for some other purpose?

texts:
I was handed a schematic with this P-FET next to the battery. My experience tells me that this would not provide any reverse polarity protection (which at a glance it what I thought it was for), but I can't figure out if the original designer had another purpose for it.
Does anyone know if it might be used for another purpose?


texts:
I have a quadcopter flight controller (RTFQ Flip MWC) that supports I2C sensors for adding thing like a barometer, magnetometer, and GPS system. The officially supported sensor block (BMP180, HMC5883L on one board) is discontinued, as far as I can tell.

I have found other I2C barometer and magnetometer sensors, (BMP280, LSM303) but I am not even sure if all I2C devices of the same type are interoperable. Do they all look the same (at least interface-wise) to the flight controller?

I'm also new to I2C in general; the sensors I need come on two separate boards. Do I just stack the boards, directly connecting the I2C bus between each?

Thanks in advance,
Neil

EDIT:
I was able to find the datasheets for the discontinued and proposed sensors:

BMP180
HMC5883L
BMP280
LSM303

All are compatible with the 3.3v output of the Flip MWC, which is good.

I was quickly able to find what I believe to be the register map for the BMP180 and HMC5883L, but the table I found for the LSM303 was very confusing and I wasn't able to find one in the BMP280 datasheet.


texts: Circuit analysis on op-amp with no negative feedback

texts:
In this diagram, there's an op-amp with no negative feedback. What is V+ (voltage at positive end of op-amp)?

I'm self-learning circuits, and a resource I'm using says V+ = V3 / 2R. However, I don't understand why it's V3 / 2R. I know V3 is the voltage source thus there's the V3 there, but why isn't it V3 / 2 for example?


texts: Where do small gas engines get the current for their spark plugs?

texts:
While technically not an EE question, until StackExchange adds a regular Engineering section, EE was the closest fit.

On small gas engines like those in weed wackers and lawn mowers, where do the spark plugs get the current necessary to create sparks large enough to set fire to the gas fumes?


texts:
I usually use hot air gun to solder components on the PCB. However I am afraid of using hot air on SMD LED - they have that clear plastic on top and i am afraid of melting it with hot air, so I usually used two solder irons to place SMD LEDs on the board, which is quite cumbersome.

I have regular solder paste and low-temperature paste (about 125 °C). Would it be safe to use hot air on these LEDs with regular or low-temp paste?


texts: Is it normal for an unregulated AC/DC Adaptor to provide voltage after unplugging

texts:
I have an AC/DC adaptor, as it has variable voltage setting (1.5, 3.0, 4.5, 6, 7.5,9 and 12 V).

Voltage readings are larger. For 7.5V setting it provides 12V, for 12V it provides about 18V.

So I suspect this might be an unregulated power supply.

I unplugged adaptor from 240V AC power and measured the voltage across terminals. Despite a lot of time has passed I should be able to measure about 11.5 volts between positive and negative terminals.

Is it the expected behavior. If so what might be the correct way to safely discharge it ?

I use this adapter to power a DC 12V 0.60W fan. It is controlled by an IRF540 mosfet and Arduino's PWM signal.


texts: Non-isolated input conditioning for a crude switch

texts:
I'm trying to build something Arduino-based which can (among other things) detect when a user touches two specific fingers together.  The best idea I can come up with is to have a wire on each finger that forms a circuit when they touch each other.  I'm afraid that some kind of static discharge or other accident applied to the wires could fry the Arduino.  I read that using a Zener diode attached to ground before the input would work but that it might not catch very fast spikes (as in the case of an ESD, I would presume).

Is there a better way to protect the chip from such circumstances?  Or better yet how can I improve my design so that this doesn't become an issue?

Thanks!


texts: Jtagulator bypass scan: conflicting pinout results

texts:
I ran a bypass scan in Jtagulator on 8 channels of a 20-pin JTAG (I think) header on a Intel X Scale (ArmV5) PXA270 board and got wildly varying results:

TDI: 3
TDO: 4
TCK: 7
TMS: 6
TRST#: 0
TRST#: 1
TRST#: 2
TRST#: 3
TRST#: 5
Number of devices detected: 591
...........................................
TDI: 5
TDO: 4
TCK: 0
TMS: 7
TRST#: 1
TRST#: 2
TRST#: 3
TRST#: 5
TRST#: 6
Number of devices detected: 773
.
TDI: 5
TDO: 4
TCK: 2
TMS: 7
TRST#: 0
TRST#: 1
TRST#: 3
TRST#: 5
TRST#: 6
Number of devices detected: 590
.
TDI: 5
TDO: 4
TCK: 6
TMS: 7
TRST#: 0
TRST#: 1
TRST#: 2
TRST#: 3
TRST#: 5
Number of devices detected: 589
...................
TDI: 6
TDO: 4
TCK: 0
TMS: 5
TRST#: 1
TRST#: 2
TRST#: 3
TRST#: 6
TRST#: 7
Number of devices detected: 766
.
TDI: 6
TDO: 4
TCK: 2
TMS: 5
TRST#: 0
TRST#: 1
TRST#: 3
TRST#: 6
TRST#: 7
Number of devices detected: 591
.
TDI: 6
TDO: 4
TCK: 5
TMS: 3
TRST#: 0
TRST#: 1
TRST#: 2
TRST#: 6
TRST#: 7
Number of devices detected: 592
...........................
BYPASS scan complete!

Then I ran an IDCODE scan and got:

:i
Enter number of channels to use (3 - 24): 8
Ensure connections are on CH7..CH0.
Possible permutations: 336
Press spacebar to begin (any other key to abort)...
JTAGulating! Press any key to abort...
TDI: N/A
TDO: 0
TCK: 2
TMS: 1
..
TDI: N/A
TDO: 4
TCK: 3
TMS: 6
TRST#: 0
TRST#: 1
TRST#: 2
TRST#: 5
TRST#: 7
..
IDCODE scan complete!

I set the voltage to 3.3. How should I interpret the results or change my setup to determine which pinout is accurate?


texts: Two transistor switches on a dual coil latching relay

texts:
simulate this circuit – Schematic created using CircuitLab

I have a small project in which I have an ESP8266-12E OUTPUT pin going through a 2N2222 transistor as a switch that energizes the set side of a dual coil latching relay.  When the relay is set the ESP is turned off and another ESP is turned on.  I want to put another 2N2222 transistor as a switch to energize the reset side of the relay from the second ESP's OUTPUT pin.
When the reset is activated the second ESP is turned off and the first one is reactivated.
I have included a drawing of the wiring I think will work.  Is there some reason this shouldn't work.  Will it bounce back and forth?  I don't see why it should as the activation pins are turned off when the power to the ESP's are cut.  I know this has been asked before but this suggests a different solution.

Since I could not find a dual coil DPDT latching relay in the schematic resources I put two single coil SPDT back to back to simulate one.  Just image them as one. The top is the positive side of the set and reset coils.


texts:
Are there any standard FPGA internal buses?
I've always used some sort of bidirectional bus between my internal blocks, but is there a standard way of doing this?


texts: I like to analyze bluetooth low energy advertising packages on an Arduino Uno. This tasks poses me problem because the BLE modules I have found only work in device mode (Adafruit, RedBearLab, and other nRF51822 and nRF8001 based) and can't collect data. Does anyone know about such projects or have experiences with this?


texts:
In the datasheet of the PIC24FJ256GB206, I have read that there is an onboard voltage regulator which will drop the core voltage to 1.8V.
My question is: Will the logic levels of output pins also drop to 1.8V or will they remain to go all the way to Vdd, in my case 3.3V?

Thanks


texts:
I'm attempting to design a BLDC Motor for theoretical use in an electric car and I'm having difficulty calculating the maximum current at various speeds.

Is there any equation I can use for this? I've already got the Torque/Voltage constant, so I know what voltages I need for what speeds. I also know there's a relationship between the voltage and current but I can't figure out how that would come into whatever equation.


texts: Voltage measurement using the following circuit

texts:
I was given the following circuit for a mains-voltage measurement system. The oscilloscope in the schematic is meant to analyze a low voltage representation of the mains voltage supply.

After simulating the circuit I have noticed that it produces a 5V (peak to peak) sine-wave for the oscilloscope to analyze.

I am a beginner in the field and though I have a basic idea about how each block in the circuit works, I am not too confident about how it all comes together.. Could somebody give me a brief idea about how this circuit works. Thanks in advance.


texts: How to design Micro SD circuit for different speed class?

texts: It's my first time to design the micro SD reader circuit. I hope that my design can support micro SD card with various speed class(from class2 to class10). According to my understanding, the only difference for different speed class is the clock frequency from a circuit perspective. Does my guess correct? Or are there other things should be concern about when designing a circuit for various speed class? Since the clock source is the CPU peripheral interface in my design, so if I don't change the clock frequency, does a class2 card has the same data rate as a class10 card?


texts: Help identifying 1.27mm spring-loaded connector

texts:
I'm planning building a small board that will interface with a connector pad that has pins with 1.27mm spacing between them. It has 26 pins in total but only about 5 are actually required.

I'm looking for a connector that is basically this but for a pitch of 1.27mm.

I looked everywhere online but could not find such connector. The only one I could find was this connector on Digikey but it only has 4 pins.

Does anyone know where I could get such a connector (at an affordable price)? This is for a small project so I'll only need about 15 at most.


texts:
Solid State Relay (SSR) Crydom CN240A24: Eur 10.72

Same function with basic components

  Optocoupler MOC3043 (zero-crossing detect, triac out): Eur 0.726
      Triac BTA06-600CWRG (snubberless): Eur 1.16
      2 resistors: Eur 0.212

Total for the second solution: Eur 2.10, or 80% less than the SSR solution.
Prices from the Mouser catalogue. Similar devices from other manufacturers have similar prices (quick check).

So, the question is: what's so special about Solid State Relays that they cost so much?

edit
I guess at Crydom the LED and photo-triac are bonded directly to the thin PCB. Packaged components may be used for small production runs, though.


texts:
I notice in my father’s farm , there is a diesel generator that powers 30 hp water pump as well as water pressure control or ( water pusher something like this) that is also 20 hp.

This is the diesel generator and its specs

Does anyone has PDFs, websites, or any videos that explain load calculations for the D.G, please?

I am interested in learning more about generators and motors and how each load draws current and also make sure that the DG is  big enough for the load.


texts: Reasoning behind equations in analysis of electrical circuit

texts:
I am currently studying the mathematics textbook Nonlinear Dynamics and Chaos by Strogatz. As part of an example, I am provided with the following electrical circuit and accompanying explanation:

Example 2.2.2: Consider the electrical circuit shown in Figure 2.2.3. A resistor \$ R \$ and a capacitor \$ C \$ are in series with a battery of constant dc voltage \$ V_0 \$. Suppose that the switch is closed at \$ t = 0 \$, and that there is no charge on the capacitor initially. Let \$ Q(t) \$ denote the charge on the capacitor at time \$ t \ge 0 \$. Sketch the graph of \$ Q(t) \$.
Solution: This type of circuit problem is probably familiar to you. It is governed by linear equations and can be solved analytically, but we prefer to illustrate the geometric approach.
First we write the circuit equations. As we go around the circuit, the total voltage drop must equal zero; hence \$ -V_0 + RI + Q/C = 0 \$, where \$ I \$ is the current flowing through the resistor. This current causes charge to accumulate on the capacitor at a rate \$ \dot{Q} = I \$. Hence
$$ -V_0 + RQ + Q/C = 0 $$
or
$$\dot{Q} = f(Q) = \dfrac{V_0}{R} - \dfrac{Q}{RC}.$$

I have started studying electronics, but I'm still learning the basics, and haven't yet learned enough to understand the electronics reasoning for what the author has written. Specifically, I'm wondering about the following:

Kirchhoff's voltage law states that the directed sum of the voltages around a circuit equal zero, but what is the reason for the terms of the equation \$ -V_0 + RI + Q/C = 0 \$ being structured as they are? Specifically, why is the voltage given a negative sign, why is the resistance multiplied by the current, and why is the charge on the capacitor divided by the capacitance?

I understand that \$ -V_0 + RI + Q/C = 0 \Rightarrow \dot{Q} = f(Q) = \dfrac{V_0}{R} - \dfrac{Q}{RC} \$ by algebra, but why is this equal to \$ f(Q) \$? In other words, why is the rate at which charge accumulates on the capacitor, \$ \dot{Q} \$, a function of the charge of the capacitor, \$ f(Q) \$?

I would greatly appreciate it if people would please take the time to clarify these points.


texts:
I need to identify this SMD component, which looks like a tantalum SMD capacitor.
But I can't find specs that would match the marking on a component.
I hope that someone can help me.


texts:
I recently tried to use a soldering iron for the first time, but I don't seem to figure out how to use it properly.

In the articles I've read about how to solder properly, it is commonly stated that the process is quite short: you touch the connection you want to solder for a few seconds, then you apply the solder for another few seconds, and that's it.

This, however, is not what is happening in practice. When I apply the solder, nothing happens: the solder wire (provided with the soldering iron) just stays solid, and if I keep touching the solder with the soldering iron for, say, a minute or two, at some point it may start melting, sticks to the iron, and remains there in a solid form, then melts again a minute later.

I was thinking that this is due to the fact that the soldering iron is not hot enough, but the manual of the soldering iron says that the melting point of the solder wire is 215 °C and the general operating temperature is 270-320 °C, while I've set it up to 370 °C, and tried even a few times to push it up to 400 °C, even if the manual claims that “the temperature for general use should not exceed 380 °C.”

Since the problem is not the temperature, what am I doing wrong?

Notes:

The soldering iron is new. The tip is clean.
The temperature of the tip is reported on a small LCD screen (i.e. this is not the temperature I've set, but the actual temperature of the tip).


texts: Applets illustrating the operation of diodes and transistors

texts: Anyone know a site with interactive applets illustrating the operation of diodes and transistors as well?


texts:
I've got an oscillator spec that states an RMS period jitter of 1.7 ps and an RMS phase jitter of 0.85 ps.

I know that period jitter describes the deviations from the oscillator's average period over a number of randomly selected cycles, I'm not sure how to interpret the phase jitter. Apparently, it is defined as the integration of phase noises over a certain spectrum.

This raises a number of questions:

is the phase jitter just another view of period jitter or does it contain unrelated information?
why should I care about that number?
is it a coincidence that phase jitter = 1/2 period jitter?


texts: PID motor controller using simulink semantic errors when changing reference values

texts:
My aim is to design a pid - motor controller in simulink, and i also have to use h-bridges and PWM generator. The motor is a single phase dc-motor. And the aim is to control the speed.
  The reference signal contains the desired speed interms of volts. .
  before i started designing the pid i simply connected the output port of (abs) to the controlled voltage source without adding the summing block and the feedback blocks. The output matched the signal and it looked pretty good. But the aim was to use pid control with feed back so i assembled the system as shown above. Here is where the problem comes in...

Problems:

When i added the summing block and the pid i got the error algebraic loops which i " corrected " it by going to simulation/ configuration / diagnostics/ and making the error sign to none.

The real problem actually is at my reference and my output. To make it clearer, here is another picture:

We can see that that the output of the speed is zero for the first 5 seconds which should actually be somwhere about 700. The weird thing about this is i tried it with a different signal reference and look at what happens.

We can see from the picture that it went back to some desired location( or atleast a better one ). But i only changed my reference nothing else. I have done a small delay on the reference so that it is visible. I can even go furthur and delay it even closer to zero so that it would be as if the system works fine as shown below.

So what is this phenomenon? I really don't understand where this comes from? Why didn't the signal follow the reference on the first solution and then follow the reference on the rest of the solutions? Is it because of the algebraic loop errors? I really need your help because it has been frustrating me all day!
For more information:

$K$ values on the figure simply convert from the voltage signal source to actual rpm values. It is found from steady state analysis by initial value theorem ( answers the question what is the voltage required to rotate the motor at some rpm value $w=K*V$

$PID$ controller is actually a $PI$ controller. I have set $D=0$ P is found root locus plot so that we have a better performance. P=0.04*K. $I$ Is set to 0.1 to reduce steady state error. Found from simple experimentation.

Saturation is set to 0 (lower limit) and 5 (upper limit).


texts:
Find the cut-off frequency of this filter:

My attempt:

$$\text{H}\space_{\left(\omega\right)}=\frac{\text{R}_1+j\omega\text{L}}{\text{R}_1+\text{R}_2+j\omega\text{L}}=\frac{\text{R}_1+j\omega\text{L}}{\text{R}_1+\text{R}_2+j\omega\text{L}}\cdot\frac{\text{R}_1+\text{R}_2-j\omega\text{L}}{\text{R}_1+\text{R}_2-j\omega\text{L}}=$$
$$\frac{\text{R}_1^2+\text{R}_1\text{R}_2+\left(\omega\text{L}\right)^2+j\omega\text{L}\text{R}_2}{\left(\text{R}_1+\text{R}_2\right)^2+\left(\omega\text{L}\right)^2}$$

So when you're looking for the cut-off frequency you can say:

$$\Re\left(\text{H}\space_{\left(\omega\right)}\right)=\Im\left(\text{H}\space_{\left(\omega\right)}\right)$$

So we get:

$$\text{R}_1^2+\text{R}_1\text{R}_2+\left(\omega\text{L}\right)^2=\omega\text{L}\text{R}_2\Longleftrightarrow$$
$$\left(\omega\text{L}\right)^2-\omega\text{L}\text{R}_2+\text{R}_1^2+\text{R}_1\text{R}_2=0\Longleftrightarrow$$
$$\omega^2\text{L}^2-\omega\text{L}\text{R}_2+\text{R}_1^2+\text{R}_1\text{R}_2=0\Longleftrightarrow$$
$$\omega=\frac{\text{L}\text{R}_2\pm\sqrt{\left(-\text{L}\text{R}_2\right)^2-4\cdot \text{L}^2\cdot \left(\text{R}_1^2+\text{R}_1\text{R}_2\right)}}{2\cdot \text{L}^2}\Longleftrightarrow$$
$$\omega=\frac{\text{L}\text{R}_2\pm\sqrt{\left(\text{L}\text{R}_2\right)^2-4\cdot \text{L}^2\cdot \left(\text{R}_1^2+\text{R}_1\text{R}_2\right)}}{2\cdot \text{L}^2}$$

Am I doing something wrong?


texts: Effects of input capacitance on propagation delay (with Logical Effort analysis)

texts:
Let's consider the logical effort methodology for the propagation delay's computation. Here there are some informations (https://en.wikipedia.org/wiki/Logical_effort).

Let's consider a generic CMOS cell, for instance a CMOS NAND. We know that the propagation delay is proportional to the output parasitic capacitance of the cell. But, I was thinking that it should depend also on the input capacitance of the cell: precisely, I thought that the delay should increase if it increases, since high input capacitance mean slower input signal, and so slower output signal.

But if we analyze the delay through the Logical Effort methodology, we get a different result. The normalized delay of a cell is equal to:

where h is the ratio between output and input capacitances. From this formula we see that high input capacitance means small delay. I do not understand the physical cause of this dependence.


texts: Trouble on switching a 3V relay with Arduino digital pins

texts:
I am using the Arduino Ethernet with POE and I am in trouble when I have to enable my relay by using a digital pin. What I would like to make is to start a motor by using a relay, which relay is switched with a Arduino digital pin.

My relay is the following (3V):

My circuit is the following:

My sketch is as-like the following:

#define pinRelay 5

void setup() {
  pinMode(pinRelay, OUTPUT);
  ...
}

void loop() {
  ...
  digitalWrite(pinRelay, HIGH);
  delay(5000);
  digitalWrite(pinRelay, LOW);
  delay(5000);
  ...
}

When the digitalWrite(pinRelay, HIGH) runs then I listen a weak click come from the relay but it doesn't work as expected: the COM/POLE (Common) doesn't switch from NC (Normally Close) to the NO (Normally Open) so the current doesn't pass and the motor doesn't start. However if I connect the wire directly to the 3.3V (or the 5V) power source pin on the Arduino board it works as expected and the motor start moving.

What is the problem? Why the relay doesn't work as expected?

Note I: I also tried with pins other than 5, but the result is the same.

Note II: By measuring the Voltage between the pinRelay and the Ground with my multimeter, the output is around 4V.

Note III: I read a lot of posts on the Web that may be similar to my issue, but I have not yet figured out what the problem really is.


texts:
I have the following circuit:

I'm trying to calculate the equivalent current.  In my approach resistors 2 and 1 are in parallel so their equivalent resistance would be 2/3 then since resistors 1 and 2/3 are in series I will get an equivalent resistance of 5/3

Now since the 2 resistances are in parallel I get the equivalent resistance as 1.06. Now the current in the circuit is \$V/R\$ so \$1/1.06=0.94\$. But the answer in the textbook says it's 0.66. Please let me know what I'm doing wrong here.


texts: What are good quality of life additions to a prototype PCB?

texts:
What additions are good to add to a prototype PCB that makes your life easier?

I have come across a few nice additions such as:

Adding useful information on the silkscreen to designate functional areas/pins/traces. Revision number.
LEDs for power and micro activity.
Test points at important places in the circuit.
Connecting a spare communication channel to a header.

Are there others that are helpful?


texts: Programming using stm32l discovery board

texts: I need to program an external Customized board which contains stm32l476 micro controller. It does have swd connectors. Can we use an stm32l discovery board as a st-link for programming my board?


texts: Estimate current through inductor in DC circuit with PWM control

texts:
I am designing a circuit to control an electromagnet (coil with iron core) through a N-channel MOSFET driven by a PWM signal.

I can't figure out how to derive the relationship between the PWM duty cycle and the current I will get in the coil, and I need to know this as the magnetic field generated is a function of i.

These are the system specs:

DC voltage source: 7.5V
Coil L = 15 mH

Thanks for the help!

Update

Thanks for the feedback so far: of course the resistance is missing, I forgot about that!
At this point, I have the coil with L = 15mH and R = 2.4 Ohm. And no, it's not coursework, just a personal project.

So, the current in the circuit should be i = V/R (1 - e^(-Rt/L)). The steady-state value is therefore i = V/R.

With this in mind, I thought of adjusting this to PWM as follows:

V = Vcc * %pwm (%pwm: duty cycle), therefore I finally have a relationship that links the duty cycle to the current through the coil.

This, however, turns out to be off compared to experimental data I just took: for example, for duty cycle of 20%, I would expect V = 1.5 V and i = 0.625 A.
In reality, however, I measure a voltage around 1.1 V.

What is this due to? I thought it might be linked to the PWM frequency, but it's 3.9kHz, which sounds like more than enough!

Finally, I also made a model in Simulink to try and understand the issue, and these are the plots I'm getting:

Funny thing is, I am getting average current and voltage values much higher than they should be! Besides, why does the voltage plot vary as a "sawtooth" rather than the square PWM signal?

Thanks again!

Update 2

Right, so I think I managed to get my model right now, thank you again for the help everybody!

At this point, I think I have a fairly good model of the relationship between PWM duty cycle and current through coil.

This is my updated Simulink output for a 50% duty cycle:

Thank you again

simulate this circuit – Schematic created using CircuitLab


texts: so I have been tasked with making a counter that counts from 0-9 continuously and pauses when the input is 0. Of course this has to be done with T flip flops, but for the life of me I cannot figure out how to do it. We had no previous lectures or homework that can help us with this, and they expect us to do it somehow. Can someone help me please?


texts: 5 Volt power supply using lipo batteries in parallel( using Booster)

texts: In the circuit above, i was able to read a current of 1.7 Amps using a multimeter at the o/p of the converter. But once i connect a raspberry pi at the output, the raspberry pi does not seem to run properly. What might be the problem? PS: the output voltage is 5.2V


texts:
I am working on an antenna and ATMEGA-based reader. It is powered off of 2 6v deep-cycle marine batteries, and the reader/antenna draws 1 amp at 6 volts. I'm not sure about the amp-hours in the batteries, but they can power the board easily for a week or two. we know this because we need to swap out the batteries with charged ones on the systems that have not been converted to solar. As it is an annoyance to keep hauling out charged batteries, we are trying to convert the rest of the systems to solar. I'm trying to find out the length of cable with which the board will still be getting enough juice from the panel.

Here's a link to the panel and charge controller.
This charges the batteries - the charging circuit has already been figured out for me. The max output of the panel is 5 amps at 17.2 volts. Using this calculator, I have been trying to find out the voltage drop.

do I have to account for both + and - leads? For example, if my solar panel is 100' away from my charge controller, do I have to account for 200' of voltage drop?
Does only voltage drop(not current)? do you subtract the voltage drop from the original voltage, and assume the original current?
What is the longest length of wire that you would trust to run the system, considering that the antenna draws 1 amp at 6 volts, the panel can output 5 amps at 17.2 volts maximum, and the cable is 14AWG stranded copper wiring?


texts: Toggling between astable and monostable input to dual 555 timer pulse generator

texts:
Hi there,
I am looking to build a simple analog circuit to generate adjustable pulses for a medical device. The current circuit utilises 2x LMC555 timers - one in an astable configuration to generate free-running adjustable trigger pulses for the second, which is in monostable configuration and from which the output will be sent to a small ERM vibration motor (such as that found here: https://www.digikey.co.uk/product-detail/en/jinlong-machinery-electronics-inc/C1034B018F/1670-1009-ND/6009914). I require the ability to generate short pulses (of around 50ms), with an adjustable inter-pulse interval of around 3-5s.
I would like to be able to toggle between using the first astable timer as a trigger ("free-running mode"), and using a push button to manually trigger the motor output ("manual mode"). This toggle switch is shown above as S1. My question is this: Would the circuit design above be able to achieve this, particularly with regards to all components sharing the same power and ground lines? If not, would it be possible to use a more sophisticated switching set-up such that only one power source (in this case, a 9V battery) can be used to power the whole circuit?
I have previously tried to implement a much simpler version of this circuit using an Arduino microcontroller to adjust the output pulse length, amplitude and inter-pulse interval. However, the device is to be used in conjunction with EEG recordings, and I found that my Arduino-based implementation caused RF interference with the EEG measurements. For this reason, it is necessary to use a purely analog approach.


texts:
As in the topic: Can i connect something else to programming pins in STM32 (SWD)?
For example a single LED with current limiting resistor connected to SWDIO and SWCLK pins. Will this load affect programming via this interface (SWD)? Should I use a buffer?


texts: Isolation for microcontroller that is off

texts:
I have a design where power savings is a huge issue and even the lowest power sleep mode of the \$\mu\$C is too much quiescent current (30 \$\mu\$A).  I'm aware of many and have used \$\mu\$Cs in the past that are extremely low sleep current (in the nA range), but I don't have the luxury of moving to a different \$\mu\$C in my current design (I promise this is the case due to constraints imposed upon me by the design team, otherwise I would migrate to a more optimal). Basically, we're as good as we can get for the \$\mu\$C we have to use and it's not good enough.  So I'm not looking for new \$\mu\$C recommendations.  I need a way to eliminate the sleep current of the \$\mu\$C or at least bring it down into the nA range.

One thought I had was remove power from the \$\mu\$C completely.  That solves the quiescent current problem, but my fear is the unknown resistance of the \$\mu\$C when it is off.  As datasheets don't normally list this figure, I think it would be safer to just isolate any digital I/O connected to the \$\mu\$C so they don't back-feed the \$\mu\$C (causing possibly even more current draw than the sleep mode did).  Are there any good, ultra low-power schemes for this?  I need to be in the nA range for quiescent current.

The design has a CPLD that is always on.  With some clever clocking & manufacturer optimizations my CPLD should end up in the low \$\mu\$A range as well. I'm aware of this and have accepted this hit in power consumption due to design constraints.  Could I route signals through that & employ some tri-state methods inside of the CPLD if needed?

The digital I/O I have connected are:

UARTS
SPI
I2C
Logic/interrupt lines


texts:
We are ordering batteries for powered wheelchairs from relatively big Chinese company specializing in large power banks (I am talking whole-house scale here). Our orders for them is just a side-business probably not deserving much attention. Recently they suggested using "smart BMS" on our packs and sent us couple prototypes. Unfortunately, we were unable to connect to their UART port.

First of all, for some reason they wired the GND from UART connector back to "-" of the battery pack. Pointless, but harmless. What is more puzzling is that neither of the remaining two wires (which I assume are RX and TX) have any voltage on them. Since UART typically idles at "high" I expected to see 3.3V or 5V on one of them. As it is, it could be that they are using inverted UART-TTL signalling, or maybe open-collector TX.

We contacted MANUFACTURER (not some unknown seller on alibaba, as it is often the case) and got back BMS documentation in Chinese with zero information on UART except for mention that it is supported. And also attached was this picture:

My guess is "UART-A" and "URAT-B" is someone's attempt to change from "485A" and "485B" mentioned in documentation as default port configuration. BMS model listed in documentation is "HBL-275-07S40A", and it gives no hits on google whatsoever. At this moment I have no idea what to do next.

Any hints on what electrical specs of this connector could be or how I can test it would be greatly appreciated.

Oh, and I forgot to mention that we did try to connect UART adapter (with 1k series resistors) to those wires and send battery status request packet per documentation, at various baud rates (it is not specified in documentation). There was no change on the other wire at all.

UPDATE:

As requested, I've removed heatsink and took some photos of the PCB. The chips were conformal coated and slightly scratched, as expected. After playing with light angles I got couple shots with partly visible markings. I wasn't able to completely remove sticky crap from the other side of the PCB. As far as I can tell there are four distinct copper pours there, three under FETs (where stitching VIAs are) and one more under the rest of electronics. I believe the ground under electronics is connected at some point to the battery side of FETs.

Two pins on the right of "communication connector" go to D9, which is probably ESD protection, then via 0 Ohm jumpers somewhere in the direction of those 3 white 217B chips, which look like optocouplers to me. The voltage on these pins is about 7 mV. Looks like RS485, but I do not see any transceiver chips nearby. Those pins also connected directly to pads of missing U6 chip. The pinout of that chip is exactly the same as most common pinout of RS485 transceivers (note 2 and 3 tied together, usually !RE & DE. also 2k pull-ups on these and DI pins that further go to optocouplers).

The four pins of the "programming connector" have 0, 3.29, 3.28 and 0V. Two on the right go through 100 Ohm resistors to 16-pin QFP chip. These could be GND, VCC, TX and RX pins of UART port, but UART generally does not need additional chip. Strange.

Also, I translated the BMS documentation. There are exactly 4 places with any mention of the protocol:

in Overview: "Support UART or RS485 interface. The communication interface can realize real-time data such as battery voltage, temperature, current and so on with the host computer."
in Features: "Support UART host computer to view battery data;"
in Wiring: "Communication line interface description: Yellow: 485A Red: 485B"
and in Specifications: "Communication: RS485"

No mention of RS232, although salesperson said it is supported in the original agreement.


texts: Low TC resistors for current measurement

texts:
I have a back-burner project to take an old bench power supply and retro-fit it with two 4 digit LED displays for current and voltage. The power supply is 3A/30V, so four digits means 3000 count and 12-bit conversions (4096 = 2^12).

I've been trying to design an analogue current measuring block that just has a pair of current shunt resistors with a relay and some range detection circuitry etc. But I've bumped into a weird question about which resistors to use.

Ignoring the range selection, let's assume that I choose resistor and current sense amplifier so that 3A => 3V. Then, in order to get 1mA accuracy, I have a maximum error of 333ppm. Round that down to 200ppm to give the later ADC some headroom. Now, it seems that a reasonable temperature range is maybe 10°C - 30°C, which basically corresponds to "rooms I can function in". The 15°C range from the midpoint then says that, assuming I null out errors correctly, I can have a maximum TC of 13.3ppm/°C.

Even ignoring any errors from the current sense amplifier, I don't think that one can buy such resistors! (Or not easily). Looking hard at Farnell/Digikey/Mouser, I can find a few 20ppm/°C resistors but that's it.

So the question: Have I messed up my calculation horribly? If not, how do people build multimeters...?


texts: Input output functions inside a PID Interrupt handler

texts:
According to my understanding, the best way to implement a PID handler is inside an Interrupt Service Routine which is usually a timer ISR with configurable frequency rate. Here we calculate the process output as a function of setpoint and process input, along with other calculations.

I have the following confusions about what needs to be included inside the ISR and main function.

1) Since the frequency of some PID loops is very high, it is a good idea to read the inputs, setpoint and other values from outside the ISR and calculate only the output inside ISR. In this case what will happen if some of my debug functions(usually a printf) delay the reading of an input or setpoint from the main function? What if the ISR calculated a perfect output value but the main program delays the output to the outside world because of the same debug functions? Here the program behaves in a slightly different manner(Sometimes noticeable differences) with and without the debug code.

2) Another option is to implement input and setpoint reading functions inside the ISR. In this case, both input and output may take a significant amount of time to read the values which will affect the ISR timing. For instance, setpoint can be a serial packet which can become a problem for the ISR execution time. Same happens when we output the calculated value to the outside world.

I am a little bit confused which approach to follow while designing a PID controller. What needs to be included inside the ISR(input, setpoint or output routines) and what needs to be included in the main function?

Implementation Details :- The experimentation setup consists of a 60RPM geared DC motor, an H bridge(VNH5019) and a magnetic rotary encoder(AS5048B). The H bridge has a PWM input for speed control and 2 other pins for direction control. AS5048B is an absolute encoder which gives a 14Bit output corresponding to 0 - 360-degree rotation of the motor shaft and the same act as a feedback signal for the plant. I am trying to implement a PID position control setup for this motor. Right now the PID Update function is written inside a timer ISR which runs at a frequency of 10KHz(may be an overkill for this particular application). The input comes from a rotary encoder which will be replaced by a serial packet in future. My plan is to read input and setpoint from a main function, access the values from PID Update ISR , calculate the output PWM value corresponding to the error just like the arduino PID library implementation as shown below

http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/

The variables are shared with the PID Update ISR using pointers. So all the inputs read from within the main is available in the ISR and the output value calculated is available in the main function. The PWM value thus calculated is given to the input of the H bridge IC.

Note : Reading input, setpoint and output to H-bridge is not a part of any ISR right now. Only the calculation is done inside PID Update ISR.


texts: Options for Universal Input Power Supply

texts:
I develop products that are sold all over the world. The line voltage may be one of (100, 120, 220, 240). I am currently considering options for handling this requirement. We typically have a 5V rail that needs a couple amps, and 15V rails that need under an amp. Perhaps another tap with a higher voltage.

Options:

Transformer and Linear Regulators: This is what we presently do. We have a power entry module like this where the user can install the fuse differently to select the correct voltage.

Pros: Clean Supply (we measure extremely small signals with these devices), Simple to achieve Galvanic isolation with multiple secondaries, With undervoltage and overvoltage accounted for, the device is not damaged even if the fuse is installed incorrectly.
Cons: Bulky Transformer, We have to change the fuse drawer based on destination address which adds a manufacturing step. Also, we occasionally sell to OEMs who then resell their system to unknown addresses.

Switched Mode Power Supply:

Pros: Can handle variable input voltage.
Cons: The switching introduces noise which will impact the performance of some of our products.

I am not asking for a decision from the above options, but rather wondering if there are any other options to put on the list. What do you guys do?


texts: Can someone explain to me programming logic behind multiplexing a LED segment display?

texts:
I am new to programming embedded systems, so any help is appreciated with my question. My task is to program (in C) a timer that counts up on a 7 segment common cathode display such that it will read for example: 000, 001, ..., 010, 011, ... 110, ... 999

I am displaying all 3 digits at the same time via multiplexing with 3 N channel MOSFETs, by quickly switching on and off the gates of the MOSFETs (via GPIO).

What I have so far:

I have code that will make a timer for one digit; it displays and increments 0 to 9 but for 1 digit
I also have code that will switch on/off GPIO pins (including the MOSFET gates and each segment of the display

What I am missing is how I can put this all together so that will become what I want. The best I have gotten is that one digit will light and count 0 - 9, then it turns off. Then the next digit will light up and count 0 -9, then it turns off and etc.

Any tips? Not exactly looking for entire code write up, just maybe an outline of steps I can take.


texts: I have a Potentiometer - 5 k ohm 2W from a Mosa DC Welder; With Strange Test Readings

texts:
The pot is a Digikey part.
The readings for the 5 kΩ pot start at .025 Ω to a high of 1.91 kΩ ... but it occurs 75% of the way into the rotation of the single turn pot, and then it drops to 1.39 kΩ at full rotation. It gets nowhere near 5 kΩ. I'm no electronics guy (Mech. Eng) so I wondered if anyone can explain this? I ordered a new pot and its days away. I'm repairing a 2004 150 amp Mosa Magic Welder and there's no help with this thing from the Manu..


texts:
I asked this question yesterday, which got answered and would work, but as I already stacked up on (dual) opamps I might as well do better.

I've come up with this (probably flawed..) circuit, to amplify/convert 98 to 140 Ohm thermistor output across the whole 0-3.3V range for my ADC:

simulate this circuit – Schematic created using CircuitLab

As mentioned yesterday, I don't care about nonlinearity, but less parts to solder would be nice. Using a different topology, I'm supposed to be able to pull this off using opamp, pt100, three resistors (this would take 7 using the values I have on hand) and a capacitor.

Losing some precision is still fine, but I would like to have meaningful output at the extremes, for calibration purposes. Any thoughts?


texts: There's Conflicts in the Definitions of XNOR?

texts:
XNOR has two definitions:

\$1^{st}:XNOR=NOT(XOR)\$

\$2^{nd}: XNOR(A,B)=\overline{A}\cdot\overline{B}+A\cdot B\$

The problem is that these definitions are not equal in Odd inputs, the second definition acts as xor at odd inputs.

is the second really a definition or is it just the SOP of the first definition at 2 inputs?