texts:
I'm having an issue where the "low" level being output from one device isn't low enough for the device on the other end to interpret it as such. I'm guessing I'm not the first person to have this problem, but I haven't been able to find a solution.

Here are the details:

I'm trying to interface between the ALDL connector in my car and a Teensy++ 2.0. ALDL uses a UART-like protocol at 8192 baud, except transmit and receive are on the same wire. The circuit I'm using (from here) is below:

When the "Receive Control Pin" (a regular, software-controlled, digital IO pin on the Teensy) is low, the ALDL data line should be able to drive the Teensy's receive line. When it is high, the Teensy's transmit line should be able to drive the ALDL data line while the Teensy receive line is held high.

So far, it hasn't been working. I think the problem is that unless the ALDL data line is brought very close to ground when low, the Teensy's receive line doesn't read it as such. To test this, I disconnected the ALDL line and manually jumpered it to ground. The Teensy's receive line dropped to 0.93V, and it read a byte. Then, I jumpered the ALDL line to 0.45V (from a voltage divider). That time, the Teensy's receive line only went to 1.65V, and it didn't read anything.

The little documentation I found said the ALDL line can output as high as 0.8V when low. Is there any way to modify this circuit or build a different one to avoid this problem?

Edit:

The ALDL signals are at a 5V level. Specifically:

Transmit
Low level output voltage: 0.8V max
High level output voltage: 4.0V min

Receive
Low level input voltage: 2.0V max
High level input voltage: 2.8V min


texts:
I recently just finished my Eagle schematic for a simple robot that moves and plan to order the parts and the PCB soon. Unfortunately with the soldering iron, helping hands, lights, solder, parts, and PCB all add up to $125.

Is this a lot of money? Or is my perspective not correct because I'm 14, entering high school, and have no sustainable income?

I've ordered all my stuff from adafruit.com, is there a cheaper option?


texts:
Is there an IC which provides 1 bit of memory?

I'm thinking something like an IC that has GND, VVC, input value, input set/clock, and output. It maintains its output value at HIGH or LOW until set/clock is pulled HIGH (or LOW), at which point input value is read and duplicated to output. If the supplied voltage drops below its operational range, it could either reset to LOW (volatile), or retain its value (non-volatile); either case is fine.

What would a part like this be called?

Is there a similar IC which has n input and n output, and is functionally n bits of memory? What would a part like this be called?


texts:
I am an embedded SW developer who wants to get more familiar with HW design. I have an LPCXpresso board with an LPC1343 on it. I want to build some circuit around that. I thought I'll start by finding out what is the maximum current I can get from the GPIOs.

This is where I got confused. I went to Static characteristics (pg34) in the datasheet.

The table contains the minimal value for IOH but not the maximal value. What is that supposed to mean?
Datasheet tells under static characteristics that VOH is Vdd-0.4, so that is a maximum of 3.2V. But user manual tells in 7.3.2 (pg89) that for LPC1343 max output voltage is 2.6V. That seems to contradict...
Why are no HIGH level output current values for I2C pins in datasheet (pg34)?
I did not find the value of pull-up and pulldown resistors anywhere in the documents... why is that? :)


texts: Hey everyone I am recently trying to map out a faulty circuit board on LTSpice and have come to a grinding stop. there is a resistor that I honestly cannot decifer the code for and sadly my multimeter is on the fritz..... I am attaching a picture of the resistor for reference, any help would be greatly appreciated!]1


texts:
In this document, we can read:

  Passive:
  Read range from near contact up to 25 meters

about UHF RFID. This is impressive indeed.

Which kind of passive tags can be found up to a 25 meter distance?

What kind of reader is necessary? All I've found are 300-1500$ reader devices on eBay, so it's not really available for electronic-enthusiast DIY projects.

Is this technology nowadays available with small unexpensive modules?

(NB: I'm not asking about shopping recommendation, but only to know if this technology really exists with a 25 meters range, and if it's really available for home DIY projects, or if it's still a professional high-end technology that requires high-price investment and/or weeks of engineering to make it work)


texts: What is the difference between the different types of PIC compilers?

texts: What is the difference between the different types of pic compilers such XC, Hi Tech etc?


texts: Schmitt trigger IC/circuit with thresholds set by voltages

texts:
I want to make a Schmitt trigger for a signal, X, who's thresholds are set by two voltages, A and B.

I think I'm having a brain fart. I don't think it's possible to do this with just a single comparator and some resistors, but It would be interesting to know what simplified options there are to do this.

My inelegant half-solution is below:

simulate this circuit – Schematic created using CircuitLab

Perhaps assume that A is always greater than B, but otherwise they may be any value.


texts: Finite state machine to detect if a number is divisible by 5 if LSB comes first

texts:
If MSB comes in first, we can keep track of the remainder for each new bit since the additional bit will either cause the number to be 2x or 2x+1.

But if LSB comes in first, how can we come up with the fsm? I found some fsm but I wasn't able to understand how they came up with it. Can someone please explain how to go about doing this?

I was just wondering how one can come up with this fsm? I didn't really understand the description in the other post.


texts: What is anti-reflection coating and in which application it is used?

texts: I would like to know about anti-reflection coating and I am interested to know whether this can be used in antenna design also.


texts: How does GSM Module store incoming SMS in its "SM" or "ME" memory?

texts:
I am using AI Thinker A7 GSM/GPRS/GPS Module demo v7.1.(The Rx, TX, GND pins of this module are connected to tx, rx, gnd pins of the prolific Rs232-TTL converter and a virtual com port is open in Terminal)

I am trying to send and receive SMS through AI-Thinker Serial Tools V1.2.3.0

This module is working fine with making a call and receiving a call, sending and receiving an SMS. They work exactly fine.

The problem is that it does not store SMS in the memory.

I have done a lot of things to make it work, but there is no progress.

For instance, my AT commands and their responses are here,

  AT+CPMS=?

  +CPMS: ("ME","SM"),("ME","SM"),("ME","SM")

and

  AT+CPMS="SM"

  +CPMS: 0,35,0,35,0,25

and

  AT+CPMS="ME"

  +CPMS: 0,25,0,35,0,25

And I have tried CNMI settings like these,

  AT+CNMI=1,1,0,0,0

  OK

After these, I send msgs, and then tried to check through AT+CPMS and AT+CMGL, but there are no messages stored.

then I tried

  AT +CNMI = 2,1,0,0,0

  OK

and the same with

  AT +CNMI = 2,2,0,0,0

  OK

similarly

  AT +CNMI = 0,1,0,0,0

  OK

But still, I have not succeeded in getting message stored in memories.

  AT+CMGL = "ALL"

  OK

is always the response no matter how many SMS I sent to this module from another phone number.

Though, incoming SMS does give notification to the serial port or sometimes message itself depending upon the configuration of AT+CNMI command. But I have tried every combination of this command to check if it stores that incoming SMS, but doesn't help.

Does this module even store incoming SMS? Because I know it stores SMS using CMGW commands and they appear in AT+CMGL commands with their stored indexes, but incoming SMS are not stored?

Please help, if there are any other settings I need to do or my commands are wrong or my module doesn't support storing SMS (I highly doubt it since it has memory spaces which are showing that 25 SMS in SM, 35 in ME can be stored)?


texts: I'm new to this solar stuff. I bought an 20W solar panel. I'm planning to upgrade to 100W. But the problem is I've searched about mppt systems and get bit of confused. So please correct me if I'm wrong. So the voltage of the solar panel changes depending on the light. So with mppt we are tracking maximum available power could get from the panel. What is the power(V.I) in this method. I mean which I or which V. V=open circuit? I=short circuit? If like that how can we measure them at the same time and put a result(power) and decide at which voltage the power is the max ? Also , let's say we have found a the peak of power. So we set the voltage to that voltage level via mosfets. And what next , we put it into an DC-DC converter and after that to battery ? Here I've tried to make a circuit. Could you also tell what is wrong with that circuit. Many thanks..


texts: lead acid battery charger from solar input

texts: Good day, I have a 12V 24ah lead Acid battery that I have to charge with a solar panel input. My initial solution to the problem was to implement a buck or a buck-boost DC-DC converter with MPPT and control the charge  by sensing the output voltage and current. I then realized that when implementing MPPT I can not keep the output voltage constant.The alternative to this is to use a casacade boost-buck converter to charge the battery, that way I can simultaneously implement my MPPT and charge controller independently. I can use the boost to control MPPT and the buck to control the charging, is this a feasible solution?? if not are the any alternatives especially any involving single stage configuration.


texts: USB data and Power cable with Switch to power Arduino. Is it a safe design?

texts:
I have some projects with Arduino and a separate battery power source and I'm tired of plugging and un-plugging my usb cable when to program the arduino using my laptop USB. Sometimes it even broke the tiny micro usb connector in the arduino.
So I want to put a on-off switch on the USB cable. When I'm about to program the arduino I disconnect the battery and turn on the cable, and when I want to test the programmed arduino and circuit, I turn off the cable, and just connect the battery. The USB cable would always be connected in both arduino and laptop.
So I want to do this. Put a led in parallel with the 5v and GND to tell me when the cable is "On" or "Off", so I don't mess with plugging the battery with the cable "ON"
Which would be the best setup? How do the data lines behave, if they are always connected between the laptop and arduino (when powered by a 7.4v battery)? Will the data lines be turned off also, if USB supply line is cut?
Is it best, or safer, to cut the power by the putting the switch in the 5V line (A) or in the GND line (B)?
Could and Arduino (or any clone that has an USB programming/power port), if connected to a battery (but still connected to this USB cable in an OFF switch position) be able to light the led, by "supplying" current to the cable? Even if the connection with the computer is cut?
Thanks


texts: How do I measure a PT100/1000 with a Arduino over I2C?

texts:
How do I measure one or more PT100/1000 (PTC Resistor) with a Arduino/ATmega328 over I2C?
Are there any ready microchips? Do I need to construct my own circuit? If so, are there any ready schematics?


texts: DC PSU questions (+/- voltages, home-built ammeter)

texts:
This turned out to be several questions, though they're all closely related; I hope that's OK. Due to this, I'll create a small "summary" with just the questions at the end.

I'm looking at designing a dual-rail PSU build from a dual secondary transformer (2x12 V / 2x1.7 A, total 40.8 VA). The transformer will be the only part shared between the two rails, so I'll have two full-wave rectifiers, two big smoothing caps, two voltage regulators, etc.
To be clear, this is not a center-tapped transformer. It has 4 output pins, not 3, so each "rail" has two connections which are unshared, and as far as I understand, its own winding in the transformer as well.

Now, the goal here is to have a PSU which can power two things at once (not just tiny loads; more like 1 A each), at different voltages. Also, a secondary goal is to have a +/- capable supply.
My understanding is that you can wire a dual supply such that you get a +/- voltage - IIRC by connecting + from one rail and ground from the other?
If so, does this mean that the current goes backwards through one supply? If it does, and I assume it does, then how can I measure output current from each rail with a µC? My home-hacked ammeter design (shunt resistor + opamp to amplify the tiny voltage across the resistor + ADC to measure it) won't like it very much, I take it? Not only is the opamp powered by positive and "ground" (not +/-), but the ADC doesn't support/tolerate negatives either.

So, to summarize the questions:

When connecting the rails together for a +/- voltage, will there be a reverse current through one supply? If yes, will a standard linear supply design (transformer/rectifier/LM317) handle that with no problems? Considering electrolytic caps and such.
Also, if yes above: how can I home-hack a µC based ammeter that can understand current in both directions?
For a transformer with this pinout: pin 1-2 = 12 V, pin 3-4 = 12 V, what happens if we measure voltage between pins 1 and 3, or 2 and 4, with a multimeter? Is a 0 volt reading guaranteed, or does something else happen? I don't really have a clue about which phase the voltages will have, in case it differs between transformers.
My current design has a 0.1 ohm shunt resistor (the supply is 1.2-13 volts or so, at up to 1.5 A). Is this a decent value? Lower is of course better for the output voltage, but the opamp has to amplify it more. I don't want to lose too much precision due to amplified noise!

Bonus question:

Assuming all voltages ultimately come from the same mains jack in one room, is it ever dangerous to put a multimeter set to voltage between ANY two places? For example, between the DC PSUs output and earth ground, or between earth gorund and a wall's live wire, etc? I'm not about to try this with the mains voltages, but I'm curious if I can poke around a bit and still feel (and be) relatively safe. I would almost assume this is safe due to the huge input impedance of the multimeter.


texts: Common-emitter amplifier not working in LTSpice

texts: I'm trying to simulate common-emitter amplifier just like the one in this video. However it is not amplifying. What am I doing wrong?


texts: Driving step motors using microstep drivers with teensy 4

texts:
I am trying to drive two stepper motors NEMA23 with two DM542 microstep driver (one for each) and a Teensy 4.1 as controller:
http://tinel.com/uploads/DM542.pdf
Please find datasheet of DM542 here:
https://kitaez-cnc.com/f/dm542.pdf
I am able to drive both motors if I am using an Arduino Mega2560 as controller without issue. However when I switch to a Teensy 4.1 after changing some parameters in my software for compatibility between Arduino and Teensy, I thought to be able to drive my stepper motors. However with the Teensy the motors starts to run and then stops randomly.
Output of Arduino is +5V instead of +3.3V for Teensy, so I am using a LLC (transistor based), to convert +3.3V to +5V to feed input of DM542 which need (+5V to +24V as input).
My DM542 is connected in cathode mode. The only difference between the two configuration (the one with  Arduino and the one with Teensy) is that my STEP signal is inverted and that I am using a LLC to convert my step signal +3.3V to +5V.
This image will explain better:

My questions/remarks:

output of LLC (HV1) has a pull up resistor 10 kohm and in the datasheet of DM542, if you drive with a +5V signal you must not have any resistance in the PUL(STEP) line and on the other lines (DIR and EN). Can it be my issue ? I put a resistor in parallel to decrease the value of the pull-up, it's working better but my motors still stop randomly before ending their respective cycles.

DM542 is currently in cathode mode, should I plug it in anode mode ? What is the better ?

output of my LLC (BOB-12009) is not +5V, why ? Should I use another LLC ?

the signal sent to DM542 is inverted because LLC transistor (BSS138) is closed when Teensy send no signal to LV1 and is open when Teensy send +3.3V signal to LV1. Can it be an issue to have the signal inverted if DM542 is connected in cathode mode ?

can it be a software issue ? My code is running without error and the libraries I am using are compatible between arduino and teensy.

Thank you a lot for your help,
I am really stuck and I don't understand what I am doing wrong here...


texts:
I want to analyze the cutoff frequencies, order and Qs of filters inside a complicated electronic circuit. Instead of solving equations, as a rookie I find using SPICE a lot easier. However, the results so far don't speak for themselves, for example take the band-pass filter:

After connecting the IN and OUT to an AC battery and then running a SPICE simulation in order to graph the frequency and phase response, the results aren't even indicative of a band-pass filter. What needs to be done in order to make the approach work?


texts:
I am planning to create a broken wire detection between a UART communication. The main idea was to check the Tx and Rx lines with a retriggerable astable Multivibrator which creates a HIGH Level on positive edges. The output of the multivibrator then goes together with the line level in an OR gate. So if the line is in idle state or sending data, it is in a HIGH state.

However, I am not sure what happens when the Rx is unconnected and I check the unconnected Rx line. Does the Rx have a LOW level (GND) then? Or does it have some unpredictable voltage level?

Maybe anyone even does have suggestions for a better approach to detect a broken wire on a hardware level?

Any advice would be much appreciated.


texts:
How can I create an device running Linux (Android OS) with video output?

PS. I don't want to use an existing very sophisticated dev board, I want to create one.

Thanks!


texts: Logic Behind MQx Sensors Calculation - Raspberry Pi

texts:
Would you please explain the logic behind this snippet of code which is taken from here for calibrating MQx Sensor(s):

def MQResistanceCalculation(self, raw_adc):
      return float(self.RL_VALUE*(1023.0-raw_adc)/float(raw_adc));

in which raw_adc is the MCP3008 reading, and RL_VALUE is the load resistance on the board, in kilo ohms and equals 5.

The thing is, as far as I understand it, the ADC works according to this equation:

Resolution of ADC / System Voltage = ADC Reading / Analog Voltage Measured

but I cannot see it implemented in the above-code (because I was following this tutorial but for Arduino).

Furthermore, to get the value of RS in a gas according to the second above-mentioned tutorial, we follow this equation:

RS = [(VC x RL) / VRL] - RL

which also not seen in the entire code of the project that the first snippet of code comes from.

The Schema of this design is:

MQx Sensor -> Logic Level Converter -> MCP3008 -> RPi

I'm sure I'm missing something, or maybe I'm mixing up things.


texts: Whats the effect on Voltage and Amps when 244 9v batteries are connected in a series?

texts:
There are many opinions about a stunt a guy did on youtube, where he connected 244 9v batteries together in series.

Can someone clarify the magnitude of

Current being limited by the chemical reaction within the batteries
The affect of above on Voltage (is it the same thing)
Are there any current or voltage maximums in this configuration? How many more batteries are needed?  What are they and how would I figure that out?

From what I read, he was doing something very reckless, and could could severe injury or death.


texts:
I have 2 op-amps in series, one is configured as an inverting AC amplifier and one as a voltage comparator.

The purpose of this circuit is to detect a 4mV AC signal and trigger a transistor at the other end to switch a logic level on/off at an mcu pin. 4mV is the trigger threshold (in theory).

The amplifier is run from a single 5V supply, and this side of the circuit works fine and I am seeing a DC bias of 2.5V with a 4mV*(200/10 + 1) AC component at point B.

The second op-amp is being used as a comparator, and this is where I'm having trouble. I'm not 100% on using a single supply design for this. I've set my reference voltage on the positive input of U1A using a pot. divider, to give the DC reference voltage 2.672 V. The comparator is then being triggered by the AC signal seen at B, but is only switching between 3.4V and 1.6V (at point C) rather than the rails, which ideally will then be used in turn to switch a transistor.

I think this is where I'm tripping up, but I'm not sure why. Any help greatly appreciated!

RAIL net = 5V
SPLIT net = 2.5V


texts: How much RF-interference does a typical desktop computer produce? How much does a metal case without windows reduce it?

texts: It's fairly common now to see desktop computers in cases with large windows cut in the sides. I've always been under the impression that if unshielded, computer equipment will produce a lot of radio frequency interference. Given the ubiquity of cell phones/wireless routers, etc, I can only assume it's not radiating all that much. What I'm interested in is how much power, over the whole RF spectrum, a shielded and unshielded computer system could produce. My desktop has a 900 Watt power supply. If it radiated even 1% of that power, there'd be a huge amount of radio interference in my apartment, wouldn't there?


texts: Fast voltage translation from 3.3v to 5.7v

texts:
I need to translate a 3.3v signal to 5.7v with transition of around 60ns or less. Voltage translators such as the TXS0101 usually specify the logic high level for the input as VDD x ~0.65 (= 3.7v in my case), and their upper level is usually 5.5v. I have tried with a P and N MOSFET (see diagram below) but the P MOSFET is not saturated because 3.3v - 5.7v = -2.4v which is insufficient. Adding a resistor between 5.7v and the P MOSFET source fixes the saturation but the switching time becomes too long.

Is there in fact an IC which can do what I want? I've looked around but can't find one.

One other consideration is that a voltage drop at the output (to around 4.7v) is acceptable, but doing that without burning quite a lot of watts seems to be tricky. I tried using a 4.7v zener to drop the P input to 4.7v but it wastes a lot of current.

Update with 2nd attempt here. It's not quite as quick as I'd like but think it can work. Thanks for the input, the baker clamp was new to me, works like a charm.

2nd attempt:

Fall time:

Rise time:

simulate this circuit – Schematic created using CircuitLab

[edit] relaxed timing requirement to 40ns

[edit] relaxed timing requirement to 60ns

[edit] added 2nd attempt


texts: Can this gaming problem be represented as an electric circuit?

texts:
I'm creating a game where every user has a network of connected nodes that each have a specific amount of energy. The nodes will try to distribute energy evenly amongst themselves. If a node has more energy than the average, it should deliver to the network. If a node has less than the average, it should receive from the network. An example network would be this, where + means more than average and - means less than average:

Now the one question I've been trying to solve for a while now: how can I calculate the cumulative amount of energy that flows through every edge when the network rebalances itself? For example we know that the node in the top left will distribute 7 energy to the network, but will it give 5 down and 2 to the right? Or something else?

Could we potentially this problem as an electric circuit and then solve it like that somehow? Note that every edge has the same 'resistance'.Should the energy sources be represented by voltage sources ?


texts: Is this loop problematic for the analog readings?

texts:
Two single-ended output transducers Tr1 and Tr2 are powered from the same power supply and their output is connected to shielded twisted pair. Their ground and the shield connected at the source ground which is recommended. The transducers' grounds are internally connected to their DC power ground. The transducers are floating with respect to earth and they are grounded on the data-acquisition side to AIGND. The AIGND is tied to the earth. Below is the drawing for the system:

The data-acquisition device multiplexes each differential inputs one by one by one and establishes the connection to the inAmp as shown above.

So far so good, but when I looked at this configuration carefully I noticed a loop following the points A-->B-->C-->D--A.

My question is, this is not a ground loop since the source is not earth grounded in source side. But is this loop still problematic? If so each traducer should use a separate power supply?

edit for a comment:


texts:
I'm building a homebrew computer. I want some way to get video out, preferably along the lines of 80x25 text. I'm not interested in framebuffer graphics.

Does such a thing exist as a single-chip text generation system, complete with clock, internal character generator ROM and video memory? Preferably speaking something like I2C...

Back in the old days there was the SAA5243 Teletext video generator, which did almost all of this. It would surprise me a lot if there wasn't something similar (but better) available today. I have found things like the MAX7456, but that's really intended for OSD use and only does 30x16, which is a bit small. Is there any kind of modern equivalent?

Of course, I'm aware that any reasonably fast microcontroller can bit-bang composite video in software, but then I'd have to write it myself and I'd kinda like something which works.

(Incidentally, and this is not part of the question, but if anyone knows where I can get hold of an HD44780-style character LCD larger than about 80x16 I would be delighted.)

Update: Of course, anything that emits VGA is fine too. I basically want some form of video that's cheap and easy to display.


texts: Component Symbol identification; Rectangle with large T-shape

texts:
I've been searching for days and still have not come up with an answer.

What is this symbol?:

The component in question was found on this mosfet amplifier schematic from the 1980s.


texts: Implementation integral windup in a digital proportional-integral (PI) controller

texts:
I'd like to know how I can get the Imax and Imin values.

if (I_error > Imax) {
    I_error = Imax;
}
else if (I_error < Imin) {
    I_error = Imin;
}

I don't want my integral to keep summing up the error infinitely so to say therefore the above code.

Can I just pick a reasonable value randomly?


texts: stm32f373vb produces a short circuit after some time

texts:
I designed a custom board with stm32f373vb lqfp 100. I made the soldering from the 4-th attempt. It was easy, when you know the technique and have a microscope. Anyway I checked the pins with the microscope and there was indeed one problematic pin which was out of the pad and stacked between its pad and the pad of the next pin. With a pinset and the microscope I was able to smash it and make it very thin so that there was no visual connections.

Then I tested the micro-controller with the JTAG and Ulink2. Interestingly it was not working before I placed the jumper within the Ulink2 to 3.3V, which for the previous prototype was not necessary as well as for another board with stm32f105. Then it worked perfectly. After that I was soldering other components responsible for display power supplying, among them one r2s-0515 dc converter, but it was still working, and suddenly after some time the uC became very hot and started to make a noise. I checked the supply voltage - 3.4 V, though previously was 3.31 V,
then I checked with debugger - programming successful, still the processor hotter and hotter, and finally I checked for short circuit with the multimeter and boom. First I though this is very weird, the processor working, but VDD is grounded, and the voltage on the 3.3 regulator is 3.4!? I started to remove everything on the 3.3 V line, and all caps were O.K. the regulator itself was O.K.so this means that the uC is shortening somehow and somewhere the VDD? How is that possible? And what could be the reason for that? How to avoid it?

Here is the part of the schematic:

Thanks!


texts:
I have the two signals and need to determine whether they are energy type or power type:
$$x_1(t)=A\cos(2\pi ft), -\infty<t<\infty$$
$$x_2(t)=1$$

I have solved the first one using the expression for the energy of the signal and found that energy is infinite so it must be a power signal.
For the second one I don't know how to solve that as I don't know what limits to use.$$$$Any help will be appreciated.


texts: How to handle delta function after finding the impulse response?

texts:
I am pretending that laplace does not exist because I am being tested on these concepts separately.
Essentially, I have solved for the step response of a first order circuit and found it to be:
$$v_{c}(t)=\left(\frac{-5}{99}e^{-5t}+\frac{106}{99}e^{\frac{-t}{20}}\right)u(t)$$
I'm only dealing with LTI systems so I know that the impulse is the derivative of the step, but I will be left with some terms attached to the delta function, and some terms attached to the unit step function.
$$h(t)=
\left( \frac{-5}{99}e^{-5t}+\frac{106}{99}e^{\frac{-t}{20}} \right)\delta(t)
+
\left( \frac{25}{99}e^{-5t}+\frac{53}{990}e^{\frac{-t}{20}} \right)u(t)$$
If I want to use the impulse response in the convolution integral, how do I handle these delta terms to make it less... convoluted? Do they reduce to a constant?


texts:
I am working on a project where I have to control a vehicle barrier gate like this:

Our team has planned to work with Arduino but we are open to other suggestions.

My question is, can I use a DC motor for this sort of task or should I look into AC motors? And what kind of motor should I use? Is this even possible using Arduino?

I looked into some of the tutorials of automated garage door openers which kind of relates to what I am trying to do. But the problem is, most of them use commercial garage door openers which are already built in to the system. So I have no way to know which hardware (specifically, which motor) they used for the purpose.

I have worked with Arduino before so have some idea on how it operates.


texts:
MT9M001 is a CMOS image sensor. As its output it provides FRAME_VALID, LINE_VALID and DATA. The output signals are synchronized (edge-aligned) by PIXCLK, which is generated by the sensor. The datasheet is for example at http://www.onsemi.com/pub_link/Collateral/MT9M001-D.PDF

I read the senosr output using FPGA, it somehow works, but I have a hard time understanding timing of LINE_VALID. Since this is the most critical signal for the image shape, I cannot ignore these problems anymore.

The datasheet claims that the maximum frequency of the camera is 48MHz. This is the frequency I use, the period is 20.833. I am supposed to read at falling edge, which means at the 10.416 mark. This is a diagram from datahseet:

To setup valid timing constrains, I have to focus on t_PLH and t_PLL. Let's see how they are defined (min, typical, max values):

Acording to these data, LINE_VALID goes from low to high after up to 7 ns after rising edge of PIXCLK, which is at least 3.4 ns before falling edge (at 48MHz). This means t_LVS min value should be 3.4 ns, not 2 ns ...?

But never mind, let's see t_PLL. Maximum value is 13 ns, which means LINE_VALID goes from high to low no later than 13 ns after PIXCLK rising edge. But PIXCLK falling edge happens 10.4 ns after PIXCLK rising edge, so LINE_VALID falling edge arrives later than PIXCLK falling edge. But only sometimes, because there is no typical or minimum value. Furthemore, if t_LVS is 2 ns, t_PLL would have to be lower or equal to 8 ns.

How to handle this? For me it's a real problem, as my line lengths get messed up sometimes (especially when I overilluminate the camera).

Based on t_OS and t_OH my data signal constraints are:

create_clock -period 20.833 -name cam_pixclk [get_ports CAM_PIXCLK]
create_clock -period 20.833 -name cam_pixclk_virt

set_input_delay -min -1 -clock cam_pixclk_virt [get_ports CAM_DATA*]
set_input_delay -max  1 -clock cam_pixclk_virt [get_ports CAM_DATA*]

derive_pll_clocks
derive_clock_uncertainty

But how to continue with LINE_VALID?


texts: What is so special about being multiples of 22, 47 and 56 for standard capacitor and resistor values?

texts:
Why is that special numbers instead of multiples of 10?
Same goes with some resistor values of 47, 560 220 ohm ect.?

Where and why is this issue originate from?


texts: Do circuit breakers trip on Apparent or True Power?

texts:
The thermal and magnetic protection for AC circuit breakers take into account both the timing and the magnitude of the AC current passing through.
Does a standard circuit breaker trip on the current related to the Apparent (kVA) Power, or the current related to the True (kW) Power?
I would understand they act on the current related to the True Power (kW), and the amount of Reactive Power (kVAr) should in some way (?) affect the tripping curve (such as the B, C or D in the miniature circuit breakers) or is there no effect and just the current related to the Apparent Power is which is effectively sensed by the internal coil?
Edit 1:
So Far:

The Circuit Breaker should act on RMS Current \$I_{RMS}\$, which is the current acting on the Thermal (Power Dissipation Time Average, over a Bimetalic element) and Magnetic (Magnetic Flow Time Average, magnetizing a ferromagnetic element) actions in a Circuit Breaker (at least, those depicted, whose operation is based on these actions).
The Power Factor of the load have no impact on the tripping action, hence the RMS Current, as in the Apparent Power (kVA), is the key factor, regardless the load is Resistive (kW) or Capacitive|Inductive (kVAr).

Edit 2:
Some confusions I have read in answers and comments.

Note that a trip in a CB do not imply a fault. They are absolutely different concepts. A trip can be caused by an steadily increase of the load connected to the CB, without involving any electrical fault at all. (The operation is affected and that would constitute a fault, but a design, operational, or management fault, not strictly an electrical one, at least compared with classical faults, discussion which escapes the scope of this question...).
A trip, hence, do not imply a drop in the supply voltage. That is a mistake, from the above confusion. We straightforwardly can think on counterexamples of this (which one?).
Apparent Power, Reactive Power, True Power, Impedance are definitions, and the question uses them. At the very end, Breakers and Distribution Panels are used to control Power.


texts:
I have a problem with my circuit. It's an audio mixer with a PFL module - I've decided to send pre-fade signals via relays.

The transformer in +/- power supply is rated 400 mA for each rail.

There are 3 minature relays (4.5V, coil resistance 180 ohm). I'm powering them with a 7805 regulator placed on the main board. The regulator takes the power from +12V rail.

As you can see one of the relays (relay 1) is driven by a transistor, because I'm using a NOR gate and wanted to be sure that there will be enough current for relay to work.

Now my problem:

When I turn ON the device and NONE of the relays is switched ON I have +/- 12 volts on my rails. Everything is fine.

When I switch ON relay 2 or relay 3 the voltage on positive rail drops from +12V to +7V. When I switch ON relay 2 and relay 3 the positive rail voltage drops to 5V.

When I switch ON only relay 1 nothing bad happens - there is +12V on the positive rail.

I've measured current draw of the whole circuit:

When every relay is OFF the circuit draws 80mA of current.
When relay 2 or relay 3 is ON the circuit draws 120mA of current.
When relay 2 and relay 3 is ON the circuit draws 140 mA of current.
When only relay 1 is ON the circuit draws 40mA of current.

The transformer is rated 400mA for each rail - I'm not exceeding the current, but the voltage significantly drops, like there is not enough power.

Another thing that confuses me is when I turn ON relay 1 the current draw decreases.

I've tried to power the relays with a 9V battery - turning on relay 2 and relay 3 causes 1V voltage drop on supply rail.

Are the relays drawing too much current or what?


texts: Quadrature encoder interface loses count

texts:
I am trying to read the encoder signal of a drive amplifier using an ARM (TM4C). The amplifier has differential outputs (+- 5V), the MCU has 2 QEIs (Quadrature Encoder Interfaces).

First I have tried to use the A and B signals like single ended ones, and sometimes I get a steady signal / count number. (Compared to the drive amplifiers configuration software both of them are dead on the same count).

BUT from time to time, the counts start to float even if the motor is not moving. Or while moving from one direction to the other it starts to lose count.

I have measured the signal with my Rigol DSO and there are spikes on the encoder signals. So I have decided to use both A and notA feed them to a UA9637A to make the differential signals single ended and get a nice square wave, but no joy.

The problem persist.

Side notes:

Drive Amplifier = Hiwin D2
Encoder = 13 bit incremental (RS4222
Differential)
MCU = TM4C123G LaunchPad

What shall I try to get the proper count of steps? The cable coming from the amplifier to the breadboard is not shielded but it's only like 20-25cm long. Does this matter?

I am open for any ideas that might fix this issue.


texts: Can someone give me some insight on how to simplify this problem?

texts: It is hard for me to understand how to start solving this problem. Should I start using the superposition theorem? Can it be simplified before?


texts: What is the equivalent resistance in this part of the circuit?

texts:
I broke the circuit down into as basic as I can take it, and I know what X and Y are, but I can't figure out the equivalent resistance of the circuit in the middle. It seems to me like the current would flow around the resistor, but then there'd be no point of the resistor even being there...

Most basic:

It used to look like this (with a battery connected to two of the vertices):


texts: Are processors designed using different technologies?

texts:
Can/Are processors be designed using different technologies ?
What I mean here is: in, for example, Intel's 28nm processors, are all the gates in that processor built in 28nm technology or are only the most critical parts of that processor built in 28nm, the other, much much less critical parts being designed in other much less expensive technologies such as 65nm or more for example ?

If yes [processors are a mixture of technologies] how can this be done in practice (i.e different technologies on a same die) ? And why is this done ?

I'm curious about all this so any extra info related to these questions is also more than welcome


texts: Rule of thumb for surface tension when placing components on the secondary side of a board

texts:
I've been working on my first multi-layer PCB design, and have been placing a variety of components on the secondary side of the board (mostly decoupling capacitors and QFN ICs). However, some of these components are fairly large, and I am beginning to wonder whether they would fall off the board during reflow.

Is there a general guideline dictating the maximum size of passive components allowed on the secondary side of the board? Is 0805 too big?
At what point does a component become too heavy for the secondary side? Would a ~14mg (0805) inductor be likely to fall off?


texts: How to disconnect solar charge controller from battery when AC charger is plugged?

texts:
I am building a portable solar generator that I want to be able to switch between 2 charging sources. When the AC charger is plugged, it should disconnect the solar panels.
Availability of components and cost is an issue in my country so i am wondering whats the simplest way to do this?


texts: How exactly does a point-contact razor blade diode work?

texts: The original foxhole radio used a razor blade with an oxide layer and a makeshift cats whisker to form a diode.  How exactly did this makeshift diode work?  Is it actually a P/N junction, or does it work through some other principal?


texts: Differential POE 1000base-t signaling through analog multiplexer

texts:
I want to make a test device which can route network inputs to one output. For example it could sit between two computers and a network switch. The TS3L301 looks promising, but I am unclear about the differential signal pairs and this device.

The drawing in the datasheet only shows it attaching to a phy, I want it to be between devices. Can I get away without using magnetics here? What about with a POE signal device?

Example:

              +-----------------+
              |                 |<------+Input 1
Output<-------+     TS3L301     |        (7..0)
(7..0)        |                 |<------+Input 2
              +-----------------+        (7..0)

This is just standard ethernet. Each pair should be a LVDS signal, though when using POE the differential pairs would be at different relative voltages. How does this work when the signals aren't actually referenced to anything in my circuit? Does that happen internally?

The datasheet for the TS3L501E says "This device can be used to replace mechanical relays in LAN applications" which would make me assume this would work. The TS3L301 datasheet doesn't say this. Are there major differences between the two devices? I prefer the package of the TS3L301.


texts: Advice needed for split core clamp-on power monitoring circuit

texts:
I am trying to get started with the analog end of a circuit to measure power with a split core transformer.  I'm wondering if I can get any pointers about what kind of circuits I might need right after the transformer to make the signal readable by a microcontroller, as well as any links to schematics on the web, which seem strangely minimal.  This is for a 120V AC circuit at a max rating of 30A.

This would seem to point to using a transimpedance amplifier directly after the transformer.  Since it's only 60Hz, the amp wouldn't really need a whole lot of (any?) roll-off/frequency response shaping at all.  Then, it would be on to an ADC, which would have to sample the voltage from the amp (representing current), along with the line voltage, and be doing it fast enough to figure out the phase difference between the two and perform as close to a "true" RMS power calculation as possible (by integration I think?).

Is this the way "it's done" typically?  Am I missing any critical components/steps?

Thanks!
-Dewey


texts: Question about the derivation of filtering roll off

texts:
I don't understand the following step in my notes:

It is about filter roll-off.

$$H(\omega)={1\over 1+j(\omega/\omega_c)}$$

$$\Rightarrow|H(\omega)|= {1\over \sqrt{1+(\omega/\omega_c)^2}}$$

where $$H(\omega) = {v_o \over v_i}$$

$$\omega_c = \text{cut-off frequency} $$


texts: Digital Logic: What are "hamming code" and "Binary code" state machines?

texts: I'm asked to draw the circuit for a state machine in one hot, hamming code and binary code models. I know what is one hot state machine, but i'm not sure what are the other 2. Google also didn't help. Any ideas?


texts: I like playing with simple processors. They are easy to use and there isn't a huge learning curve. I've played with the 6502, Z80, W65C816. But they are 8/16 bit. Is there a 32bit processor out there similar to these?


texts: 7-Segment display won't light up fully for each number in 2-Bit Counter

texts:
My 7-Segment display is not lighting up all the segments. I am supposed to recreate the TinkerCad circuit below in physical form. It's supposed to count from 0 to 3 and then reset to 0, and then count to 3 again, and so on. For 0, only the B segment turns on, and for 2, the E segment does not turn on. The TinkerCad circuit works fine, but when I build it physically, it does not work. I've checked multiple times, my wiring seems correct. Please help, I have like 4 circuits due on Tuesday, and I'm really freaking out.

This is my Energia code:
int Y_PIN, Z_PIN;

int y_value, z_value;

int counter = 0;

void printOutput();

void setup()

{

  pinMode(14, OUTPUT);

  pinMode(15, OUTPUT);

  Serial.begin(9600);

}

void loop()

{

  if (counter == 0)

  {

    y_value = 0;

    z_value = 0;

    digitalWrite(14, LOW);

    digitalWrite(15, LOW);

    delay(1000);

  }

  if (counter == 1)

  {

    y_value = 0;

    z_value = 1;

    digitalWrite(14, LOW);

    digitalWrite(15, HIGH);

    delay(1000);

    digitalWrite(15, LOW);

  }

  if (counter == 2)

  {

    y_value = 1;

    z_value = 0;

    digitalWrite(14, HIGH);

    digitalWrite(15, LOW);

    delay(1000);

    digitalWrite(14, LOW);

  }

  if (counter == 3)

  {

    y_value = 1;

    z_value = 1;

    digitalWrite(14, HIGH);

    digitalWrite(15, HIGH);

    delay(1000);

    digitalWrite(14, LOW);

    digitalWrite(15, LOW);

  }

  printOutput();

  counter = counter + 1;

  if (counter > 3)

  {

    counter = 0;

  }

}

void printOutput()

{

  String outputString = "Counter = ";

  outputString += counter;

  outputString += ", YZ = ";

  outputString += y_value;

  outputString += z_value;

  outputString += ", Y = ";

  outputString += y_value;

  outputString += ", Z = ";

  outputString += z_value;

  Serial.println(outputString);
  return;

}


texts:
I have always been confused when it came to how much charge does a battery charge.
Let's say, a phone battery:
It says 1900 mAh @3.7 v.
Now i know it goes up to 4.2v, but those 1900 mAh are available in the 2.5v ( cut off  voltage i think) - 4.2v area or the 1900mAh are available in the entire 0v-4.2v, meaning that some of the battery s energy remains unused, right?
Let's say that i want to power a 1A led from this specific battery, it will be on for about 2 hours?
Also, on car batteries there are writings like 12v, 55Ah, 550A.
Does this mean that this specific battery can output 55Ah for 10 hours?

I am sorry if the question sounds dumb, but i am just trying to learn...


texts:
I need to operate a small 120VAC motor for short bursts of 1 to 3 seconds using a 12VDC supply (it's for a remote antenna switch).

Operations are typically minutes to hours apart, so the duty cycle is very low.  I don't know the precise power draw but it's likely in the 10-15 watt range, so not very great.

A typical inverter seems like overkill where the average power requirement is so small.  In my mind I picture some caps storing energy for the output pulses, but I can't picture a nice implementation.

Any suggestions for a simple and physically compact circuit that could handle this?

Thanks!


texts: Measuring power output of Thermoelectric Generator with multimeter

texts:
I am using TEC1-12706 to generate electricity from hand heat. When I measure the voltage with multimeter , the reading is about 72mV and without connecting any load I also measured the current(about 64 micro watts). Is the multiplication of voltage and ampere actual watt output or I need to measure the voltage and current with a load connected to it?

Note: The peltier has internal resistance of 2-2.2 ohm depending on the temperature.


texts: ATMega chips come with the Arduino bootloader

texts: Do the Arduino Duemilanove USB Board with Atmega328 come with the Arduino bootloader?


texts: Using a Zener diode to ease a voltage regulator

texts:
I was reading a tutorial on how to hook up a zener diode to ease
a voltage regulator. Here if you follow this link, as one can see the zener diode is dropping
some amount of voltage to ease a voltage regulator: http://www.flickr.com/photos/oskay/6683456487/

My question is: Is that also possible to use this configuration with a 10V
zener diode:

Is my figure applicable?

Which config would you prefer? Why?


texts: Make a one-way switch with a BJT or relay?

texts:
I've been trying to figure out how to make a one-way switch with some analogue electronics.

i.e.: my first idea was to use a BJT. What I'm trying to find is a design that when the base current is applied the transistor is activated and current flows connector->emitter, but then you can remove the base current and the device stays on. ("one way switch"). I can't figure out how to get that to work.

Or should I be looking at a relay for this?

Thanks!


texts: How to shutdown the entire system after certain time period?

texts:
Background

I have TPS61240 Boost converter module. In my system, TPS61240 is used to convert 3V DC to 5V DC. This 5V supply is then used to power whole system. Moreover micro controller driven system (Atmega16).

Requirement

I want to turn off the whole system, lets say like 1 minute after the start-up. TPS61240 has ENABLE pin. If supplied high logic to ENABLE pin, boost converter produces the output voltage of 5v. All I want to do is make micro controller to control this ENABLE pin.

Problem

If I connect the Enable pin to micro controller pin, Then at first how do I power the System.


texts:
I'm doing a project on designing an off-grid PV system to power a constant load at 900W at 12V, 24/day.

If I choose PV systems that are rated at 48 V or any other voltage will that mean that any layout will not be sufficient to power the load at 12V? Will it create problems as such or anything? I am using an MPP charge controller and it is backed by a battery system.

Any book recommendations are welcome as I want to improve on the field.


texts: What have countries gained by increasing/decreasing mains voltage by 10V?

texts:
Reading the list of standard plug and socket types on Wikipedia, I see that countries have made their mains voltage higher or lower.

For example, in Mainland Britain (Wales, Scotland, England) the voltage has been lowered to 230V from 240V.  On the other hand, in Northern Island it has increased from 220V to 230V.

Have they just moved the voltage to informally meet the rest of the world? As the vast majority of countries are either 230V or 120V.

Are there any other things that could be gained from this? I understand that lowering the voltage could decrease power dissipation because \$P=VI\$, but increasing the voltage?  What is there to gain other than more losses?


texts:
I'm currently working on a Guitar DSP project, based on STM32F407VGT6 but as I progress I come to conclusion that I'm gonna need a bigger unit (with SDRAM). The question that is ringing in my head is which is better, low end DSP, or high end MCU.
For instance let's compare STM32F439 in 144 QFP package, with ADSP-21489 in 176 QFP.
Both units are around 100PLN (~22euro/unit), and that is quite a lot of money compared to classic MCU's that are 1/10 of the price.

Why is stm32f439? It is 180Mhz unit with DSP and FPU units in core, CortexM4F based with SDRAM controller. Currently it is ceiling top unit on mcu market, as far as I know there is nothing more powerful (M7 is not on market yet).

On the other hand we have Analog Devices low end DSP, with 400Mhz and all kind of DSP goods on silicon. (I cannot tell much about it as I've never used it).

The question is which is better? The advantage of STM32 are cheap tools, well known core, good and free tools. Is classic DSP much better or is the difference negligible?

Have a good day everyone,
Chris


texts: In a class C amplifier, how does RB biases the base of transistor?

texts:
In a class C amplifier, I read that:

"Resistor Rb is connected to the transistor Q1 base. A biasing resistor which connects to the base of Q1 try to pulls the base of transistor further downwards and set the operating pointer dc bias point below the cut-off point" (picture below)

I know that if I want to increase efficiency, the transistor must conduct less than 180°(better if it is just little "pulses") so biasing is important so that signal will only conduct in its peak.

BUT, How can RB helps in biasing the emitter diode? I mean it is in parallel to emitter diode and not in series so how does that even biases the emitter diode?

The link of the picture and the quoted explanation:
https://electricalfundablog.com/class-c-amplifier-working-principle-applications-advantages-disadvantages/

I also found the very same explanation for RB here:
http://www.circuitstoday.com/class-c-power-amplifier]1


texts: Why do switches have a current and voltage limit?

texts: I want to attach a switch to a 5 Volt battery pack to be able to turn it on and off. The batteries will power 4 DC motors. The current draw will be about 1 Amp. The switch I have is like the one here. It says 5 Volt and .3 Amp. What are the dangers of using that switch? What can happen?


texts: What is 1/8 unit load in RS485 communication?

texts: Something I saw is 1/8 unit load. In that document, it states that RS485 will allow up to 256 transceivers on the bus by using 1/8 unit load. My question is, what is 1/8 unit load and how do I use it?


texts: Ways to configure and persist settings in Arduino-based hardware

texts:
I'm currently building an Arduino-based LaserTag Game.
After solving a lot of technical challenges I'm now at the point of programming and configuring my first prototype.

Next challenges:

The "Taggers" should be customizable to the players needs (damage, bullets in mag..)
Rules should be customizable before each game
The Player shouldn't be able to reset health and ammo by just restarting the Tagger

Ideas:

My first Idea was to use the arduinos EEPROM but I read that it would only survive around 100k write/delete cycles. Which is not much when I write to it after every shot.
My second Idea was to use an external I2C EEPROM to persist settings and current game data. Atleast I wouldn't break my arduinos when I reach the point when it breaks. Also I can save a lot more data on it.
Another Idea is to customize the firmware for every player (I already have a tool for compiling and flashing firmware to the tagger) and also define the most common game rules in the firmware and just activate it over a serial connection. But then again, how can I persist the current tagger data like health and ammo.

Questions:

Are there any best practices out there?
Are there any technics I'm not aware of?
What about SD Cards? They seem a bit overpowered for my use.


texts: 3 momentary buttons controlling 3 relays

texts:
I have an automotive 12V project that has 3 momentary push buttons and they all have to operate individual relays. (3-4A)

The problem is I need only 1 relay to be active at a time while toggling between 3 buttons.

I need the function of button push to disconnect other 2 relays first, so no 2 or 3 voltages cross at any time and then activate its assigned relay. Any ideas?


texts: Parasitic insensitive switched capacitor circuit

texts:
I'm trying to simulate the parasitic insensitive switched capacitor circuit shown here:

I am using cadence virtuoso. My input is a sine wave of 1 V amplitude, 0 DC and 1 kHz frequency. I am using non-overlapping clocks with period 1us and pulse width 0.4 us. Both caps are 1pF. The schematic is shown below:

The opamp is generated using a vcvs with open-loop gain 1e20.

However, the output of my integrator seems to have a huge unexpected gain, instead of the predicted gain of 1. (Check out the swing in the next image). It also has some strange offset.

Does anyone know where I am going wrong with my simulation? Thanks.


texts: Current mode operation of a Source Measurement Unit (SMU)

texts:
I'm studying semiconductor parameter analyzers. In particular, I have difficulties in fully understanding the circuit in the following slide, which represents an SMU operating in I-mode (i.e., it injects a current in the device under test and measures the voltage on it):

I start assuming ideal "error amplifier" block, thus the concept of virtual ground applies; as a consequence all the current which flows in R1 must flow in R2 as well. In this way, I easily find the output voltage of the "differential amplifier" block of the picture.

Question 1: why is it written that this voltage is also the voltage on Rr? The voltage on Rr should be de-amplified by the gain of the "differential amplifier" block

Question 2: It can be a stupid question, but this circuit has created in me a doubt: what about if I apply virtual-ground concept for the 2 inputs of the "differential amplifier" block? Rr would be short-circuited and the circuit would have no meaning, then the question: why am I allowed to use virtual-ground concept for the "error amplifier" block and not for the "differential amplifier" block?

Thank you


texts: What is format of output data of a webcam?

texts:
I'm in the situation of turning a Spatran3 FPGA into a classic USB webcam (Yes it's weird I know).

I have a thermal analog camera which is connected to a SAA7113H ADC. I need to interface USB port of FPGA board to a Linux desktop system, such that v4l see a webcam on USB port (and users can grab frames from USB port using OpenCV). At this point some question arise:

What is output format of a webcam?
Do webcams contain some encoders? Or they send raw data?
Do I have to implement an OS-level protocol like IEEE 1394 on FPGA?

(Note: I'm a software engineer, having a poor knowledge on electronics)


texts: How do I choose the correct capacitors to use with my Crystal?

texts:
I am looking at using this crystal for a new circuit design. It will provide the main oscillator for my PIC application.

Here is the part on digikey.

The datasheet indicates that it has a load capacitance of 8pF. This seems very low compared to most. I have read that the load capacitance should be equal to:

$$ \frac{(C_1\times C_2)}{(C_1+C_2)} +C_{stray}$$

where Cstray is the capacitance of the PCB traces which are typically between 5 and 15 pF.

This equation is provided in a Microchip FAQ sheet. If this is correct my PCB trace capacitance is likely already equal to the load capacitance of the oscillator. So does this mean that I really don't need any capacitors connected between the crystal and ground?


texts: Building a display system with depth - HUD (Iron-Man)

texts:
I hope most of us have watched iron-man and got excited on certain parts of the movie. Everyone got their personal favorite. My favorite is the HUD(Heads Up Display). This inspired me to start a project in this. Not head mounted like an oculus rift. But more of a wearable like a bike helmet.

So my questions are how the depth of various images are projected in his helmet. Is it better to project it on a glass screen or replace the glass frame with a thin bendable LCD. Which is better or has less constraint on the user's eyes. We are not going to play 4k videos but just get multi-colored widgets. Like this one.

If observed closely some widgets are placed forward and backward (3D). Do we need a 3D projector or a display or is there a way to trick the eye to make it look like 3D?

I apologize if this is in the wrong section. Please help me move it to a more appropriate SE rather than just closing the post.


texts:
I have several 3.7V 1800mah and 700mah Lipo batteries that also have the 8205A MOSFET and DW01a chips mounted to the top.  I've seen the two types of TP4056 boards (one with these two chips for lipo batteries with "protect" printed on the back and the kind without the chips designed for li ion batteries) and I'm wondering if the Lipo batteries that have these components are compatible with the TP4056 board for li ion batteries.  From what I've read so far the TP4056 will only charge batteries greater than 1000mah so the 700mah batteries might be out of the question.

I've tried to find the answer on other forums regarding the Lipo battery protection circuit mounted on the battery as opposed to the TP4056 but so far I've found nothing.


texts:
I develop a home sprinkler controller, and would need a fuse. Traditional fuses (those glass cylinders with a wire inside) take too much space, and don't play well with SMD. My research found some poly fuses, including SMD poly fuses. However they seem to be for a small voltage (6-30V), and it is unclear whether they will burn if overvoltaged (think main connection or lighting strike). It is also unclear whether they can handle significant inductive load such as sprinkler solenoid connected via a long cable.

What are the honorable community members using nowadays in lieu of glass fuses? Is there a better alternative to the "traditional" glass fuse?


texts:
While in a mood to purchase a Peltier strip, I visited the amazon page which stated the specs of a Peltier thermoelectric cooler, one stated 12 V and 92 W and other one stated 12 V and some 77 W.

As I already know power is the product of voltage and current drawn. And the amount of current drawn is dependent on the resistance the circuit has to the battery, the less the resistance the more the current, the more the resistance the less the current. So why should power be part of the electronic instrument's specification?

Will a set of 8 pencil cells (1.5 volts each) are not enough for each one of these two peltier devices? my assumption is that since one will draw 92 watts and another will draw 77 watts so the batteries operating 92 watts device will consume more quickly than the other batteries with 77 watts device. But eventually both can be operated on a 12 V battery with different performances depending on their power requirements, am I right?


texts: How do you model differential inductor in LTspice?

texts:
I wonder how I can model a differential inductor in LTspice?

I've an inductor that has half the turns on one side and the other half on the other side.

It's intended to be used in a bridge tied Class D amplifier simulation.

Edit, extra information:

The inductor is wired in such away that half the wiring is on one side of the inductor and the other on the other side, in the way that is supports current flux ratio in the same direction (the opposite of a CM-choke!), hence differential inductor. The combined turns in series makes up the total inductance.

I've now tried to model an ideal DM-choke,
however I get some error at the end of simulation, see below.


texts: Why is a shielded cable not effective with high impedance sensor?

texts: Could some one simplify what this means? Why is the shielded cable not effective with a high impedance source/sensor?


texts: DVD player power supply circuit strange behavior. Need help to understand root cause

texts:
I have an old (~8 yrs) Cyberhome dirt cheap DVD player that worked well for the time I was using it. I bought it in 2004 from a Best Buy and was using it regularly till 2010. After we got a new DVD player, it had been lying around packed nicely and securely. I recently brought it out just to connect it to another TV and found that it doesn't power on. I opened it up and was able to isolate its power supply (the pic shows it was very easy to do so). It works from 110 V to 240 V AC input 50-60 Hz. I have been using it in India which has 240 v AC @ 50 Hz usually. The DC out of the power supply circuit is like so +5V-GND-GND-+12V. I have assumed that the +5V was for the decoding circuit while the +12V would have been used by the player motor and maybe also the Class 1 laser.
The +5V out works fine, but the +12V doesn't. The first time I checked it showed +17V and remained steady there. When I switched off the power, it very slowly (over 10-15 mts) ramped down to nearby 0 V. Based on this, I decided to wire up a voltage divider to bring 17 to 12 on a breadboard. Before I connected the +17V to the voltage divider, I checked again to make sure and now it showed ~+12V! It was slowly ramping up and 5 mts later was at +14.30V and has been holding steady there since last 10-15 mts. Switching off the power supply doesnt slowly ramp it down but goes down to 0 V pretty fast.

What is the reason for such behavior? Obviously, something has gone poof in the power supply circuit, and I am interested to know the root cause. Some pointers will definitely help and using those I may try to debug through the board to figure out more. (I plan to wire up the input of the system to +5V-GND-GND-+12V independent of this power supply board to check the player but that's later as I don't have a +12V source handy currently. I tried with +5V and the dvd player powers on fine - but without the +12 doesn't do much apart from that).


texts: Female Rectangular Headers with Long Pins (Pass-through style)

texts:
Female Rectangular Headers with long pins (passthrough style) are used to stack/connect an Arduino shield board to the Arduino board. 1x8 and 1x6 position headers are easily found.

Problem: However for the Arduino Mega, it has a 2x16 position header. Does 2x16 female pass-through headers exist? Or must we modify 1x8 headers to turn them into 2x16?


texts: How to connect IO-Link sensor to a Linux running machine?

texts:
Some sensors I need to use have IO-link interface. Our infrastructure in Linux based (RPi, Jetson and servers with Intel CPU), and we could integrate device that communicates via Ethernet, RS232, I2C, SPI or the like. I have no clue what to do with IO-Link.
One of the possible solutions would be to manipulate GPIO pins from device like RPi we have done once for SPI. This would only work if IO-Link device has no strict timing requirements. Another approach is obviously to find an adapter that converts IO-Link into something more manageable.
I cannot believe we are the first with with problem. How it is typically solved?


texts:
I have to design a circuit in which I have to transfer data through lasers (serial transmission of data). Now what I was thinking was to check if the laser light is on then '1' is passed and when the laser is off '0' would be passed. Now I need to check if a 1 or a 0 was passed.

How would I check for this and another problem I'm facing is if it's on it may keep on passing 1's. How would I check for this? I though of using LDR's (Light Dependent Resistors)? Would this be okay or it there a better method?


texts: sbit definitions with SDCC - Error: "initializer element is not constant"

texts:
I am facing this error when try to compile a C program using the SDCC compiler:

The part of programme that is causing error.

include(reg51.h)
define cmdport P3
define dataport P2
define q 100

(following  3 line are causing error.)
sbit at  cmdport^0  rs ;  //register select pin
sbit at  cmdport^1  rw ;  // read write pin
sbit at  cmdport^6  e ;  //enable pin


texts: Why is the error waveform of an ADC a sawtooth wavefrom?

texts:
The analog to digital converter has a staircase waveform. But the error waveform of this staircase signal is a sawtooth waveform. Why does this happen?

I have come to know that, the sawtooth signal is the
difference between the quantized output signal (solid) and the
analog input signal (dashed). But when I look at the graph, it seems to be like a triangular waveform. How does this turn out to be a sawtooth waveform?

Just for the note, I have found out the RMS value of this error signal which is a triangular waveform.

Thanks in advance.


texts:
So I was asked to find the power absorbed by the 2 ohm element and I found it. But I am confused on why Power is calculated using the voltage at the node instead voltage drop across the 2 ohm resistor.
This question was E.93 in Basic Circuit Analysis, 11th Edition


texts: Helicopter rotor blade system detection approaching objects

texts:
I am working on this project to detect anything that is entering the zone of RC helicopter blades (around 10cm diameter) region and stop the rotor. It needs to detect any solid object so metal or plastic or human body.

I was thinking to use ultrasonic sensor such as HC-SR04 placing on top and bottom of the rotor in such an angle that it just scans the region right outside blades (because I don't want the spinning blades to cause any feedback). But since it only has 30 degree angle of accuracy and I need a full 360 degree sweep (because object could approach in any direction), it means I would need more than 8 of them, which is too many. Then I was thinking to let 3 or 4 of them spin at top along with the rotor shaft in a slower rpm. But I am afraid that since it's not guaranteed the same receiver gets from his pair transmitter, the time will be mixed up, which might cause Arduino to think something is close when it's actually far away.

I was also thinking of using maybe infrared sensor such as SHARP 2Y0A21, and place them on top and bottom, but it also needs many of them to cover the 360 degree which is not ideal.

Therefore I am really confused at what is the best approach and what sensor/implementation should I apply? I realise my wording is hard to understand, so please don't hesitate to ask me any question.

Thank you!

PS: at this moment can assume the RC helicopter position is fixed and only consider the rotor system (blade, motor, sensor system). And the system should detect object in advance so the blades can slow down. for example if it's hand approaching, the blades should not injure the hand.


texts: Building small, low-power pedometer/odometer with memory and time/date log

texts:
Background

I'm a researcher looking at the use of personal tracking devices and apps (like Strava app or Fitbit device) for cycling. At the moment I'm designing a simple experiment where I want to measure the overall level of activity for a group of cyclists over a period of 1 month. Now, you will say: ask them to use an app to track it or ask them to write down the result from a low price odometer every day. The problem is that those solutions have a low reliability because they are dependent on participants commitment to track/report. What I want is something that will independently measure participants activity, and is hidden from them - let's say installed in the seat frame.

I looked at the range of low price odometers available on the market but they all have the same issues. They show the speed and distance when you cycle, but they don't give you much option for the storage of results in memory, nor they give you an option to timestamp the results. They usually have no automatic power management option - they don't turn on when you start cycling and turn off when you stop to save the battery.

Requirements

So I thought maybe the best way would be to build such device using Arduino components.

Here is the summary of the simple device I would like to get for my experiment:

turns on when the user moves bicycle
starts recording some activity-indicating data - steps, distance covered, speed, etc (whatever is the simplest to do)
records all the activity data in the memory
creates the time stamp every X minutes (or date stamp daily if thats easier)
turns off when person don't cycle for X minutes
is small enough to fit in a space like inside seat frame
can run on single battery for 1 month or more
can be build/obtained with low price (no more then ~£30)

Questions

Is it realistic to create such device using Arduino if I'm a beginner in this?

If not - what else would be realistic?

If yes - how would you do this, and what components would you use?

Alternatively, if you know existing (low price) device that meets my Requirements, I would also appreciate your feedback on this.

Update

Just to address a point by @DavidBrown and to clarify - can't use GPS, or even anything that has GPS. I wish I could use it (that would solve my problem). But ethical approvals at uni to use anything that even have a potential to track location of users are hell to obtain (i.e. takes long time).


texts: Voltage regulator protection diode - connected by pours?

texts:
I've got a voltage regulator in a circuit, along with its recommended protection diode:

On my PCB, I'm using large copper pours for the Vin (Pin 1) and Vout (Pin 3) connections, as these are used frequently in other high current components in the rest of the circuit.

My top copper pours are split exactly in half, with the Vin pour to the left of the chip (red) and the Vout pour to the right of the chip (blue). I have a seamless Ground plane on the bottom layer.

Can I simply place the protection diode near the chip - with its terminals connected to the Vin and Vout planes as below? Or should I be routing traces specifically to isolate the diode/chip from the pours (forcing the diode to be the "gateway" to the pours for the chip?)


texts: Why are SMT electrolyic capacitors so much more expensive than their through-hole counterparts?

texts:
I noticed recently that there's a large discrepancy in price between electrolytic caps that are surface mount and those that are through-hole, particularly at higher working voltages.

Here's a good example: two different 220uF 80V caps:

Surface mount: $1.70 CAD @qty. 100. http://www.digikey.com/product-detail/en/UUJ2A221MNQ1MS/493-7442-1-ND/3768822

Through-hole: $0.40 CAD @qty. 100. http://www.digikey.com/product-detail/en/EKYB800ELL221MJ25S/565-3990-ND/4843800

These two parts illustrate a wider trend: generally, an SMT part that's roughly equivalent to its' through-hole counterpart will be far more expensive.

Is there a reason that there's a 4x price difference? I can see how one might pay more for a cap that can be reflowed (potentially eliminating wave or manual soldering) but it's hard to imagine that alone justifying such a large price difference.

And unless I'm not reading the datasheet correctly, it's not like the SMD part has, say, 4 times the current rating (quite the opposite, actually!)

So what gives?


texts: How to determine electrical energy and the convert it to heat?

texts:
I've been stuck on a problem for quite some time now. I really cannot get my head around it. It's been a while for me, and I just recently been taking up a class again in electrical
engineering. I've really been reading since yesterday however I don't know if I should start by calculating the power (the thing that's messing with my brain is that there is two current sources)

Could someone be so kind and lead me into the right direction on this problem?


texts:
I am a beginner in Verilog

I would like to know why the port connection rules as outlined in the attached description are necessary.

Why must inputs be internally of a net type signal? And similarly, why outputs must be externally connected to a net type signal?


texts:
In Kicad v5.1.9-1.fc32 release build, I have the following schematics.

When netlisted for Ngspice, it provides the following netlist.
.title KiCad schematic
U2 O0 Net-_R1-Pad2_ GND Opamp_Dual_Generic
R1 NC_01 Net-_R1-Pad2_ 100
R2 Net-_R1-Pad2_ O0 1000
U1 O1 Net-_R3-Pad2_ GND Opamp_Dual_Generic
R3 NC_02 Net-_R3-Pad2_ 100
R4 Net-_R3-Pad2_ O1 1000
U3 NC_03 NC_04 Dual_amp
.end

From the toplevel netlist it we see that bus members I0 and I1 for example are netlisted as individual nets, which is OK, but the bus connection from IO to DuaLamp is presented also as a single net, which is incorrect.
I would like to know, how to use bus pins ins Kicad schematics and symbols in a way the they get netlisted properly for ngspice in hierarchical desings. It seems that the pin naming in the symbol is not sufficient information for the netlister to get the connections right. Browsed through quite a lot of manuals and examples, but could not find any useful information about this.


texts: How to see the content of the SDRAM in my DE1-SOC while running (JTAG Altera cable)?

texts:
I have made a simple design in Quartus Prime, in verilog code, not using megawizard, but directly accessing the pins of the SDRAM. I am saving 2 x 16 bits binary numbers on 3 of the 4 banks of the SDRAM.

I have downloaded the design on my board DE1-SOC, and now I want to read the content of the SDRAM to see if the numbers actually passed to the SDRAM chip.

What should I do in this case?

There is a In-System memory content editor but I think it only works for on-chip RAM, or am I wrong?


texts:
My goal is to figure out a relation between output voltage and input SPL:

$$dB(SPL) = f(V_{out})$$

First, I get the sensitivity in volts from this formula:

$$Sensitivity_{dB(V)} = 20 * log_{10} (Sensitivity_{mV/PA})$$

For example, a microphone's sensitivity is -46dB(V)/Pa.

$$Sensitivity_{mV/PA} = 10^{-46/20} = 5.0119mV/Pa = 5mV/Pa$$

Since 1 Pa = 94dB(SPL), can it be written as 5mV/94dB(SPL)? Can that sensitivity then be rewritten as 53uV/dB(SPL)? So the final equation is this?

$$dB(SPL) = V_{out} / 5.3e^{-5}$$

Something tells me that it doesn't work this way, but I can't figure out where I've gone wrong.


texts: What is the difference between frequency response and transfer function?

texts:
I would like to understand the difference between frequency response and transfer function. I know the former can be obtained by substituting \$s = j\omega\$.

But what is the difference in information I can get from both representations? What are the respective limitations and where do I apply which method?

I'd also be glad for some literature recommendations.

Could someone explain the calculations of the second answer (by Chu) a little more extensively? I don't quite get how he determines the values of \$ \phi \$ and X, and how he compares it with setting s equal to \$ j\omega \$ in the transfer function.


texts: Do I have to power-on reset CMOS counters?

texts:
I am designing a project that contains several CMOS counter ICs (CD4017 specifically).

What is the state of the counter on power-on? Do I have to incorporate circuitry that pulls the reset pin high on power-on to ensure the counter starts at zero?

I checked datasheets from multiple manufacturers, and none of them mention this subject. I found several claims online that the state of the counter is unpredictable on power-on. However, I also found many projects which do not include a reset circuit, and the issue is not mentioned either.

The reset circuit adds complexity and additional parts, which I would like to avoid if they are unnecessary.


texts: Logic expression with k-map or minterms-maxterms

texts:
I have 4 inputs and 3 outputs.

Two of the outputs contain both 0s and 1s, so their expressions are easy to write.

However, one of the outputs has only 0s. How can I write its logic expression by using a k-map or by minterms and maxterms.


texts:
I'm using a development kit which is made a camera board and a FPGA board. So far, in this kit, the camera board is directly plugged onto the FPGA board.

I have tested a new code for my FPGA. However, this new design requires a specific hardware where the camera board should be connected using a flexible "cable" to the FPGA board. The length of this cable should be about 150-200 mm.
It must carry the following signals:

6 differential pairs (LVDS 720 Mbps)
9 single wires (1 MHz - 72 MHz).

On the PCB, I used the following specifications for the traces (based on the development kit I'm using):

differential pairs: 100 Ohms (+- 5 %)
single ended signals: 50 Ohms (+- 10 %)

So far, I was considering using a cable such as this one. That's the first time I read about micro-coax for LVDS differential pairs but this solution seems appealing to me (also because of the tiny connector they use). Are this type of cables used for LVDS signals around 720 Mbps or are they designed for much lower speed?
Are there any other proper solutions to make the connection between the two boards (flex-PCB, ribbon cables,... maybe)?

My last question is more about the PCB layout. If I'm using a cable instead of a direct board-to-board connection between my board, are there any specific points I must take care of in my PCB layout?

Thank you

EDIT 1:

I have checked different commercial type cables (comments of MadHatter). The ones I have seen so far do not have enough wires: SATA (2 pairs), HDMI (4 pairs and 7 single wires), USB 3.0 (3 pairs), RJ45 (4 pairs).
Even though I could have multiple cables going between the boards, I would like to have the smallest camera board as possible (40x40 mm2). Ideally, I would be happy with one cable for signals, one cable for power (but I did not talk about this one in my initial post since there is no problem with it).

EDIT 2:

I accidentally found this link: Micro-Coax connector product series.
They basically say cables such as this one are basically good up to 20 Gbps speed which is really far above my specifications.


texts:
Knowing, that
$$
i_c(t)=70\sqrt{2}sin(314t+60^\circ)mA
$$
$$
R=2k
$$
$$
X_L=7k
$$
$$
X_C=7k
$$
find ir(t).
I'm sure, that the angle is -30. What about RMS?


texts:
I have a Peltier module rated 12V 12A. I want to regulate voltage on it continuously from -12V to 12V, i.e. make an adjusted heater or cooler from the module.

There are some industrial solutions, but they are extremely expensive for me.

1) Is a switching regulator my only choice?

There is an alternative circuit here for 6A. Is it better or cheaper than just a switching regulator?

To reverse polarity I will need an H-bridge.

2) Is an electromechanical relay simplest and optimal solution here?

I do not need to switch it often, so limited cycle count is not an issue.
Building H-bridge based on FETs seems to me very complex and expensive solution in this case.

Do you have any advices in solving this problem?


texts:
I have two MOSFET circuits; one is working and the other fails and I'm not sure why. I just want to turn on/off the LED, nothing special, no fast switching.

Below is the working circuit (series gate resistor):

simulate this circuit – Schematic created using CircuitLab

Below is the non-working circuit. By non-working I mean when I apply a '0' to the gate, there is 2V sitting on the gate and the LED dimly comes on. Why is this happening?

simulate this circuit

I understand that a MOSFET has high gate impedance and a gate resistor is not a necessity but I wouldn't expect the MOSFET to completely not work right. Am I missing something?


texts:
I am currently connecting an AVR ATXmega 16A4U in my circuit. According to AVR (http://www.atmel.com/Images/doc8278.pdf, p6) the external reset circuit should look like

simulate this circuit – Schematic created using CircuitLab
But I want to use the RESET/PDI_CLK-Pin also for programming. For this case AVR suggests to remove all capacitance from the reset line.
What should I omit now: The capacitor, or should I risk getting a smeared CLK-signal while programming the µC?


texts: Why is parking not allowed under some overhead power lines?

texts:
At work, among others, we have overhead power lines for the main grid connection (400 kV, about 1600 MW). The power lines cross a parking lot, and the positions directly under the power lines are blocked with large rocks.

There are some ideas about the reason why parking is not allowed under the power lines, including protection from exposure to electric and magnetic fields, protection from falling ice (it’s in a Nordic country), protection from downed power lines, protection of the power lines (which need a very high availability) from accidents (i.e. fire) of parked cars, and accessibility of power lines for maintenance (however, moving any cars would be easier than removing the rocks).

Anyway, what is the real reason why parking is not allowed under the power lines?


texts: How plot result in 'Measure' of HSPICE programming?

texts:
I need to plot "result" parameter in below command in HSPICE:
.measure tran result ...

How do this?
thanks.


texts: Is it necessary to use a specific switch controller for a flyback converter circuit?

texts: For example, this DA2077 is labeled as design for use with the NCP1027 switching controller. I have some TNY290 switches I order a while back but did not use. I do not see any problem with using the TinySwitch, but wanted a second opinion.


texts: How does a Successive Aproximation ADC Handle Negative Voltages?

texts: First, apologies for what must seem a simple question to most of you. I do understand the SAR algorithm. And Two's complement representation. My question is algorithmic. When a negative voltage is presented to a bipolar SAR ADC, is the "sign" stripped and MSB set to 1, then the normal SAR algorithm applied, then is the resultant bit code converted to Two's Complement?  Or is the algorithm generating Two's Complement code directly? How?


texts: How to make an antenna for a custom frequency range?

texts:
I'm interested in omnidirectional antennas or maybe I should say antennas that don't care too much if you move/rotate them. Now how would you build a good antenna for a specific frequency range. (e.g 1920-2170MHz or 2401-2473MHz or 87.5-108MHz)
And what's the magic behind getting the best dbi?

I heard that the antenna height is very important and that the ideal antenna height is the wavelength divided by two, is that correct?

Also: Could you use two antennas and wire them together for better results?
And does it matter if you roll up or bend an antenna? (Is there a limit, maximum angle or so?)

Edit: One more thing, I found an antenna that claims to be optimized for 890 - 960 MHz / 1710 - 2150 MHz. How is that possible? Does it really not pick up 960-1710MHz?


texts: How does work the trigger/start of this buck converter?

texts:
Im watching this video but since its in german I dont fully understand the way it works, specially the startup side with the pulse source and the mosfet.
Could someone explain me this part of the circuit, please?

It would be the same than using the IRF150 instead the IRF840?


texts: How does the Processor unit identify if the decoded instructions when it wants the next instruction?

texts:
I have read that to avoid cache misses, a lot of instructions are fetched together and decoded and kept in the cache, as it is mostly the case the instructions near the REQUESTED INSTRUCTION will be requested in the near future.

I have just started Computer Architecture and am confused as to how does the PROCESSOR knows which instructions have been decoded and kept already in the cache?

Computer is a machine right? So, when it encounters a request for a instruction from the processor, the cache is read, but how to know that the cache has that instruction already decoded?

Is there a marker e.g. HELLO, I am the decoded instruction INSTR2 which comes after instruction one INSTR1 and i belong to this process....?

Please help me out here, I am a beginner in computer architecture and would like some pointers regarding the question,

thank you


texts:
I'm using OPA551 op-amp and I was reading the data sheet. It says that
input voltage range        min((V-)-0.5V)        max((V+)+0.5V)

I don't get what it means. Does it mean that 5VAC is the maximum voltage for both (+) and (-) an op-amp?


texts: LDO Voltage Regulator - Will there be an issue

texts:
I am working on a design that utilizes a LDO Fixed Voltage Regulator. The voltage in is 24V and expected voltage out is 3.3V. I know the part is spec'd for 24V (Vin-max) and output of 3.3V, but should I be worried about the part overheating if the expected current draw on the load side is 0.2A (max)?

Power dissipation: 24V-3.3 = 21.7V --> 21.7V * 0.2A = 4.34W

4.34W seems like a lot of power dissipation for such a small part.


texts: Simple PIC18 USART Interrupt not working

texts:
I'm trying to implement a link between and Arduino and a PIC18F25K22.  I can transmit from the PIC and read the data on the Arduino, but am having trouble going the other direction.  I think the problem is with my interrupt service routine, but could be anything, of course.  I'm using MPLAB X 1.60 with XC8 1.12.  From the compiler's user guide, i've found this example.

  An example of an interrupt function is shown here.

int tick_count;
void interrupt tc_int(void)
{
if (TMR0IE && TMR0IF) {
TMR0IF=0;
++tick_count;
return;
}
// process other interrupt sources here, if required
}

  Code generated by the compiler will be placed at the interrupt vector
  address which will  execute this function after any context switch
  that is required.

my own code is modeled after that, basically exactly.  Main is only setup, then a while(1).

void usart_setup()
{
    TX1_PIN = OUTPUT;
    RX1_PIN = INPUT;
    TXSTA1 = 0; // page 277, 8bits tx, async mode, low baud
    TXSTAbits.TXEN1 = 1; //tx enabled
    RCSTA1 = 0; // page 278, 8bit rx,
    RCSTA1bits.SPEN1 = 1; //serial enable bit
    RCSTA1bits.CREN1 = 1; //continuous receive enable bit
    BAUDCON1 = 0; // page 279
    BAUDCON1bits.DTRXP1 = 0; //Non inverted polarity
    BAUDCON1bits.CKTXP = 0; //idle state is high?
    // page 280, set to 9600 baud (actual 9615)
    SPBRG1 = 12; // baud rate low byte
    SPBRGH1 = 0; // buad rate high bit
    rx_pos = 0;
}

void setup(void)
{
    OSCCON = 0b11100110; // setup internal oscillatior to 8MHz, TCY is 0.5 microsecond
    RCONbits.IPEN = 0; //no interrupt priority
    INTCONbits.GIE = 1; // enable interrupts
    INTCONbits.PEIE = 1; // enable peripheral interrupts
    PIE1bits.RC1IE = 1; // enable USART receive interrupt
}

void interrupt ISR()
{
    if (PIE1bits.RC1IE && PIR1bits.RCIF) // if the USART receive interrupt flag has been set
    {
        PIR1bits.RCIF = 0;
        usart_tx_byte(RCREG1);
        //dealt with interrupt
    }
}

For now, it should just echo anything received back, but instead does nothing.  I've double checked the connections, and I know transmit works, so I'm at a loss.

Edit

So talking to the duck and some more searching here seems to have solved it.  On power on and reset, ports are set to be analog.  I now disable this in my setup.  It was a problem between this and my RX1 pin.


texts: Adding harmonics to the square wave means

texts:
I have generated two imperfect square waves by:

Adding fundamental frequency with 10 odd harmonics.
Adding fundamental with 20 odd harmonics.

What difference should I observe between two imperfect square waves by increasing the number of harmonics?


texts: Programmatically generate padstacks for Cadence Allegro

texts:
I am laying out a complex board, with many components. One of the steps is to create padstacks for the footprints of each component. It turns out I have (nearly only) two types of padstacks to generate:

For through-hole components, the pads are circular with a circular drill hole.
For surface-mount components, the pads are rectangular.

In both cases, the pastemask is 0.07mm all around the pad.

The problem is that those padstacks come in about 50 different sizes. I want them to be consistently specified and typoless, and the Cadence Allegro padstack editor being awful makes generation tedious and error-prone. The obvious solution, given I only have two types of padstacks, is to script the padstack creation with the dimensions nicely specified in just one clean file.

Unfortunately, the .pad output files of the Cadence Allegro padstack editor are binary files, meaning that I cannot just follow a "template" and populate the numbers programmatically.

Is there a way to programmatically generate Cadence Allegro .pad padstacks?


texts: How does a channel know to drive in I2S TDM mode?

texts: I'm learning I2S right now and am curious how to work in an environment where 8 or so audio devices could be in the setup. I understand TDM mode would allow the Controller (Master in legacy terms) to read N channels on the single bit serial data line (as shown in the picture). However, I don't understand how the audio device knows when to drive the serial data line with it's data. How is contention avoided?


texts: How can this logic be formed by using the Karnaugh map?

texts:
I’m trying to implement a circuit by using logic gates where the output is ON only one of the three inputs is available.

Below I wrote down the corresponding truth table and the Karnaugh map for the inputs A, B and C:

Now in this Karnaugh map there is no grouping possible. How can we proceed to form a logic from this point?

Edit:

Here is what I came up with if not wrong:

But this circuit requires 6 AND gates and 2 OR gates.

Is this the limit for simplification? Can this be simplified more?

Edit 2:

Logisim simulation:


texts:
I'm still new to the world of electronics, so forgive me if the question is too simple.
What I'm trying to do is build a component which takes n wires, of which only one at a time (or none) will be powered. It is connected to a 7-segments display: each state corresponds to a letter on the display.
This is the design I'm using:

simulate this circuit – Schematic created using CircuitLab

However, I see a potential issue: when one of the input wires is triggered, the signal also flows "backwards", specifically in all the wires which share at least one output with the original wire [It's hard to explain with words, you might understand looking at the picture.]
I definitely want to avoid this effect. However, the only solution I can think of is placing diodes between one insertion and another, which is not possible due to scarcity of materials (this is a school project thing, so I'm likely to have access to 10-12 diodes).
Are there more resources-efficient methods to achieve this?

I'm using 9V DC current. The wires will be triggered on or off at low frequencies, since it will rely on hand-operated switches to control current flow.


texts: How close can a circuit board be to an overhead power line without being effected by EMI?

texts:
I am researching a technology that will need to put some circuitry near a power line used on the electric grid and I was trying to determine how close can I get to the power lines with my circuit boards without causing issue due to EMI or other factors. My expectation for the technology is that the board will run within a one foot radius of the power lines and possibly other equipment such as transformers, but I am concerned with EMI and other factors disrupting my circuits. Does anyone have any experience with this and know how close they can be?
Some details: The circuit boards will be both grounded only via battery in some cases, and others will be grounded through a grounding wire or grounded material. Depending on guidance here I may adjust my design. My understanding is that the grounding should help with the EMI and other noise related issues.
Thanks!


texts: How high should I make an FSK modulation index value?

texts:
After consulting with the radio manufacturer about a setup for my FSK radio module (HM-TRP), they have suggested I program it with the following values when setting up the module for 115kbps:

Receive bandwidth: about 120Khz
Frequency Deviation: about 57.6Khz
Modulation index is 1

Looking at this: https://www.silabs.com/community/wireless/proprietary/knowledge-base.entry.html/2015/02/04/calculation_of_them-Vx5f suggests that the manufacturer took this equation into account:

(2 x Deviation) / data rate

I read post #4 from here https://www.physicsforums.com/threads/modulation-index.684409/ that I should aim for a higher modulation index for improved SNR (signal to noise ratio?).

What should my maximum modulation index value be if I want the radios to work at a range of about 200 meters?

And do I need to adjust the modulation index if I want to test the radios when they are only one meter apart?


texts: With Bluetooth turned off in PC settings, do keyboards and mice still emit radiation?

texts:
Do you know if a wireless mouse emits radiation in wired mode? Using the USB cable, With Bluetooth turned off, but with the switch set to "On"?
And also do you know if a wireless keyboard, also with Bluetooth turned off, emits radiation? Or just uses the radiation that already is available for the PC to be connected with wireless?
Thanks!


texts: best way to adjust/set SMPS comp / compensation parts

texts:
I’m having difficulties with settings the right values for the comb / compensation for some SMPS circuits I’m working one.
Is there a good way to set them right? To make sure of stable operation in the full load range of the SMPS.

Hope some one can give me some tips on what the best way is for this


texts: PNP transistor interface is not switching PWM inputs with low duty cycles

texts:
The following transistor circuit section(using a PNP transistor BC557B) is inverting and buffering a 25kHz PWM pulse train coming from one of the Nano's PWM supported digital pins. The following is the schematics diagram in LTspice:

As you see above, 25kHz PWM signal with 300ns ON time works fine in simulation.

In practice I tested this on a breadboard:

It looks a bit messy but it is exactly the same circuit. The 5V for the PNP transistor comes from Nano's +5V supply pin. I guess it supports up to 500mA or even some more.

So when I set the PWM to 25kHz and the ON time to around 300ns and when I probe the PWM output right before R4 the scope shows the following:

But at the output(probing between R3 and GND) the output is constant 5V as:
(Sorry for the blur photo)

So the PNP obviously does not turn ON at this duty cycle unlike in simualtion.

Then I gradually increased the ON time of the PWM and it started to switch barely fine when the ON time was 1.5μs. Here is the scope screen for this at R4:

And below shows the output(at R3):

I tried to lower the values of both R4 and R3 down to 330 Ohm. But it didnt make any difference.

What could be the limiting the switching behavior of the transistor at low duty cycles here? Is the transistor not fast enough? What could be a remedy to lower this limit?

EDIT:

I found this PMOS and its SPICE model in a site as:

.model TP2104 PMOS (LEVEL=3 RS=0.73 NSUB=5.0E14 DELTA=0.1 KAPPA=0.0411 TPG=-1 CGDO=6.1716E-10 RD=1.91 VTO=-2.10 VMAX=3.0E6 ETA=0.12098 NFS=3.384E11 TOX=1.0E-7 LD=1.6980E-9 UO=865.45 XJ=6.5E-7 THETA=4.063E-5 CGSO=9.10E-9 L=2.5E-6 W=0.5E-2)

Then for a 10ns pulse(10 MegHz) input I compared the outputs in simulation for the BC557B and TP2104. Below shows the plots:

At least in simulation this particular PMOS worked better. But I didn't try it on breadboard yet.


texts: Brushless DC motor sometimes running backwards

texts:
I'm working on a motor control system I've inherited.  It's custom designed but I have access to all the schematics and source code.  The way the code is written the motor controller responds to commands over the serial port to go X hall counts forwards or reverse.  In a test we ran the other day we had the motor running in hall count steps equivalent to .2 degrees of rotation of our mechanism; thus it would step .2 degrees, then be instructed again to step .2 degrees etc.  It was rotating fine in the chosen direction, but then went into a state where it free ran at full speed in the other direction until we cut the power.

Any clues on how to debug this?  My first step is going be recording the hall count and direction commands sent from the master to see if a bad command is telling it to go in reverse.  If the commands look good then what else should I look at?

Thanks,
Fred