texts: Thermal regulator on DS18B20 and ATtiny2313A

texts:
I'm working on a thermal regulator for a greenhouse. My device will use ATtiny2313A as uC and DS18B20 as thermal sensor. I also use 1602 LCD display to monitor current temperature and set low and high limits for the heater system.

I want to be able to drive heater load for about 2kW (I'm from Russia so in my 230VAC line it will be about 10 amps). I use relay 507-1AH-F-C to commutate heater load. Actually I will break the Live line (which also have the fuse 10A @ 250VAC) while Neutral line will stay connected. As I understood from datasheet this relay can handle 12A @ 250VAC so things look pretty good to me. Coil voltage is 5VDC and I use KSP44 transistor in switch mode to handle such a heavy load (about 106 uA) by uC.

When I was in developing phase, I used breadboard to debug firmware for ATtiny2313A. During test phase, I was able to see some strange glitches such as random restarts of uC or even EEPROM corruption (see the discussion here). I've measured some voltages and discovered that display backlight and relay coil causes serious voltage drop on breadboard rails (about 0.2 volts).

Because of this I decided to make two power sources, which are built on LM7805CT linear regulators. One LM7805 is mounted on the heatsink and supplies power exclusively for relay coil and LCD backlight. The second LM7805 supplies power only to the DS18B20 and ATtiny2313A. Somewhere in the Internet I read that using two linear regulators in such manner is a bad idea.

So because this is my first full-cycle (schematics developing, PCB routing etc) project, I want to learn as much as possible and avoid potential pitfalls. Here I attached the schematics, routed PCB and 3D models of it. I would be very grateful if anyone from the community would tell me some useful advice or point to my errors. I'm only a beginner and want to dive into the world of electrical engineering.

There are main questions of the greatest importance to me:

Is it bad practice to use two or more LM7805s in parallel? In my case they have common grounds. Generally I have solid ground planes on the both sides of PCB.
I use transistor in switch mode. For my calculations I assumed that hFE = 20, Base-Emitter voltage drop is 0.8 volts and Vout for ATtiny2313A is 4.2 volts. I think that it will be OK that collector current is about 150 uA (although relay coil consumes 106 uA) so my math for base resistor is:

(4.2 - 0.8) / 0.150 * 20 = 453 ohm

I took 680 ohm for my R2 value. Is there any miscalculations in that scheme? Also I wonder if there will be any pitfalls because collector is powered from +5V line (the first LM7805) while base is driven by VCC line (the second LM7805)?
How can I efficiently find and understand ground loops? I tried to separate logic and power parts of my scheme and use solid ground zones, but I am concerned if any loops still exist.
Is my variant of snubber for relay good? Or are there improvements which could be introduced? I've read Application Note which stated that this variant should work well, but I want to know real user experiences.

Thank you!


texts:
I'm new to using high current MOSFETs, and as a result, have never used a MOSFET driver. I am planning on using an irf100s201 MOSEFT to control a LED panel, which draws 35A at 12VDC. This panel will not be controlled via PWM, and will stay on for ~20 minutes at a time.

I have found these two drivers: ir44252l and ucc27519. I know that they will supply the > 10VDC that my FET needs, but am unsure of what other parameters I need to consider. I know that the input capacitance along with the switching time needs to be appropriate, but I can't find the specifications on the driver's datasheet.

Thank you.


texts:
I'm drawing the footprint for APDS-9253 and in the datasheet I'm looking at package drawings.
As far as I understand, the top-left drawing is a view from component side, the top-right one from solder side.
It seems the pin 1 is placed at the opposite side of the standard pinout.
Is it correct or am I wrong?


texts: Indoor Location Tracker for Automated Cameraman

texts:
I am new to Electronic Hardware, but have prior experience with Custom built web applications. Recently purchased Raspberry Pi and have been thinking of different projects to make with it as the center point.

My goal is to automate a camera pan and tilt as it follows an object indoors. I have a good concept of the systems needed to move the camera but am getting stomped on how exactly to track an object indoors. I need to track one object which is the speaker at an event. The area is 50'x50' and the single camera is located in the rear center of the area. The ceiling is sloped drop ceiling ranging in height from 10'-20' with plenty of attic space if needed.

I have thought of many different ways to do this and have ruled most of them out.

IR tracking. Set up a fixed camera and use filters to watch for and track IR signals off from a "pin" on the speaker. This would be visible to the recording camera as well unless filtered out.
Face tracking. Similar to first idea but this would be difficult as there could be other people that pass by the speaker and change the focus.
Color tracking. Similar to previous ideas but build software to setup every single session to capture a color specific to the speaker. This could again clash with other people or even surroundings and involves setup for every session.
Passive RFID tracking. Create a "Tag" that the speaker can wear or carry in pocket and triangulate location with receivers posted around area. This is the best idea as of yet. But all my research is pointing to receivers only being capable of receiving signals up to 5'-6' and would require too many receivers to cover full area as needed. and almost impossible to cover area with high ceilings.

I need to keep this project as low cost as possible and need to stay away from setups that use $100 tags.

Similar equipment:

SoloShot focuses on outdoor sports but is available with indoor adapter. This is a good pricey example. but I cannot understand how it learns location with single point of reception for object in 3D indoor space.
MoveNSee is another great example of what I am trying to accomplish. It's setup uses 3 wireless receivers as I expected.

I do not need to have a wireless or all in one setup. This setup will for the most part be setup permanently and used several times a week. This tag carried by the speaker needs to be concealable or able to blend in with lapel already being worn.

Research:

The Study on Using Passive RFID Tags for Indoor Positioning is probably the most helpful research item that I have came across and studied so far.


texts: Equalizing motors speed for balancing robot

texts:
I am currently working on a balancing robot project using Arduino Uno. I am able to get the robot to balance but one of its motor have the tendency to rotate more than the other.

I am using the L298N motor controller with 2 x 30:1 Metal Gearmotor 37Dx68L mm with 64 CPR Encoder from polulu.com. I have also tried to compensate for the difference in speed by monitoring the encoder value on each motor. Unfortunately, the compensation logic seems to contradict the PWM control needed to balance the robot and causes it to oscillate quite a lot.

I am currently using the following code to balance the motor speed:

dPos = leftCounterCurr - rightCounterCurr;
if(dPos > 10) {
  leftPWM = u + k*abs(dPos);
  rightPWM = u - k*abs(dPos);
}
else if(dPos < -10) {
  leftPWM = u - k*abs(dPos);
  rightPWM = u + k*abs(dPos);
}

dPos refers to the difference in the two encoders values. leftPWM and rightPWM are the PWM values to control the left and right motor respectively. u is the output of the PID control and it is adjusted by certain gain value to compensate for the difference in motor speed.

I hope someone with similar experiences can help me out. Thanks in advance.

Edit 1:
@Marko I did some characterization of my motors today. Thought I would post it here in case anyone might find it useful. The results are shown below. It seems that with proper capacitance tuning, I am able to get the motors to give almost similar responses. However, I believe there is still a need to use a control loop for better performance.

For example,if the left motor has a 0.3uF capacitor across its terminals while the right motor has a 0.2uF capacitor across its terminal, we can observed that the two response curve are very close together.

Another thing that I notice was that the motor would not move for duty cycle below 20%. And it seems like a universal problem with PWM control of DC brush motors... or at least I have not find any methods to overcome this behavior yet.


texts:
I am currently stock on a concept I should understand but I cannot get my head around it quite yet: "Latch-up" in CMOS devices.  It is a condition where a significant amount of current flows through Si substrate of NMOS and PMOS parts of a CMOS structure.  By having a high conductivity path from VDD to GND in the CMOS structure, you could potentially damage the device and it would never recover.

So with this definition in my head, I am trying to figure out factors that will help me prevent latch-up in CMOS devices.  Also, why does the conception of CMOS technology in SOI substrates ultimately prevent latch-up?

Thanks in advance for the tips


texts: How can this MOSFET become overheated? How big should the heatsink be?

texts:
I've got a very simple circuit. A MOSFET (TK15D60U) is powering a 3 to 4 Ohm heat bed by 19.6 volts. From my calculations this results in 6.5Amps. The power adapter seams to have its specs at max 6.32A but seems to function fine. The MOSFET should be able to handle 15Amps continous drain. The drain should be able to handle 600v, so that 19.6Vdc should be fine.

The gate is driven by a 25Vdc via a 10k resistor to the gate and 100k resistor from the gate to ground (to allow to leak away to discharge the gate, I thought it was a good thing). So effectively there is (25vdc/110k)*100k=22.7Vdc voltage at the gate. The Gate-source voltage is 30v so that is below max.

What I can read from the datasheet is that the Drain-source ON resistance @Vgs 10Vdc @ 10Amps is about 0.15Ohm. Lets take 0.2. I never really thought about the ON resistance. I thought, the gate would be fully open, so resistance should be minimum and will handle it without a problem. But when the MOSFET is active, it becomes too hot to touch within 10 seconds or so.

Now this part is something I am not so familiar with. Hence the question. Is it true that the formula P=(I2)*R (Watt=Ampere squared * resistance) yields (6.5A*6.5A)*0.2Ohm=6.5Watt that is dissipated via the MOSFET?

6.5Watt is a lot if you ask me on a TO-220. Is it not? How large should the heatsink be to handle that? Should I actively cool it using a fan? All I have now is this very tiny heatsink. This topic is probably a laugh for the experts around here.


texts: Is it safe to rub WD-40 in to a brass insert on a circuit board?

texts:
I am trying to replace the SSD on a laptop. After a Loctite nightmare that I had while getting the casing off, there's just one last screw between me and getting the job done. Despite being confident that I've got the right screwdriver (a 000 Philips), the thing just won't budge. On top of my fear that I may have threaded the screw, I'm worried that I'm fighting Loctite again.

Fortunately, I know that a common Loctite removal trick involves dabbing some WD-40 on the screw with a cotton bud, letting it soak in, and then doing it again before trying to remove the screw normally. I'm ready to attempt this, but I just can't shake the feeling that WD-40 and circuit boards shouldn't mix.

Is it safe for me to put WD-40 so near to my circuitry? I've included a picture below. I'm hoping for the WD-40 to be contained by the (presumably brass) insert. Better yet, I'm hoping that I'm simply misremembering how WD-40 reacts to PCB.

Note: It has been quite rightly said that this appears to be an x/y question, so I will make this note for future readers. The answers given appear to show that WD-40 is safe, which is all that was asked for and is indeed an answer. However, my research indicates that it will be ineffective. This here is the spec sheet for blue Loctite, which is one of the weaker forms of Loctite. Of note, it says that the Loctite only loses 15% of its strength after 500 hours of exposure to acetone. If acetone can only just barely do the job, then I suspect that WD-40 won't be able to do the job at all. In short, this question and its answers seem to show that WD-40 will be safe, but ineffective.


texts: Do I need to alter my reflow profile for a PCB with thicker copper?

texts:
I have always been working with pretty standard 1 oz. copper PCBs and using a Controleo3 reflow oven with great success. However I am now working on boards that will potentially have 3oz or 4oz copper - will I need to change the reflow profile for these boards (longer soak and reflow time ?) since it will take them longer to heat up since more copper = more thermal mass ?
The solder paste I have always been using is TS391SNL50 from CHIPQUIK.


texts:
If you have the following circuit with a step up voltage from L1 to L2, then when do you get a spark across the spark plug? I have three scenarios.

Scenario 1. You have the switch open, then you close it right away you get a spark.

Scenario 2. You have the switch open, then you close the switch. This allows the magnetic lines of flux to expand. A current then is induced for L2. Once a little time passes you reopen the switch, and then you get a spark.

Scenario 3.  Neither of these, I am dead wrong.

simulate this circuit – Schematic created using CircuitLab


texts: predicting brushless motor rotation direction?

texts:
When connecting a brushless motor to an ESC, we are taught to apply power and switch two of the wires if the blade is spinning in the wrong direction.

Is it possible to predict the blade rotation by examining the ESC and motor?

(note: learning-style question, I don't have a practical problem with switching wires)


texts:
I am trying to create Bode diagram for the following circuit:

First I create the transfer function, I arrive to a point that looks like this (C is not capacity, sorry for bad name choice):

I don't understand how do I transform 1/jω to jω.


texts: Values of inductance - what is the "base" value?

texts:
I have a selection of salvaged inductors, and I don't (yet) have an inductance meter.

I would like to know what the inductances are, but I have a problem.

They are numbered with 3 digit numbers - I assume this is in the same format as capacitors and resistors - 2 digits and a number of 0's.

However, what is the "base" value of the inductance?

e.g., I have a "221" inductor:

Is this going to be 220pH, 220µH or 220mH?

Where do they start counting from?

With resistors it's easy enough - it's from 0.  With capacitors it starts with pF.  What do inductors with this kind of numbering system start from?


texts: Can a causal system generate a non-causal signal or vice versa? I included some slides from my power point that discusses the two.


texts: Why are project files in Altium modified every time they are opened? Is there a way to prevent this?

texts:
I use Altium Designer 18. When I open a project file (.PrjPCB), the asterisk ("*") appears next to the project name indicating that the project has been modified, but I haven't actually made any changes.

I've been using Altium for years, and I've always wondered about this. I'd really like to change this if possible, because I sometimes worry that I've somehow accidentally made changes to the project that I didn't intend.

EDIT: I'm aware that in some cases, Altium can't find the library files that are linked to the project and removes those from the project. This is not what's happening in this case. Often, when I open a project, and no library files are removed from the project, the project is still modified and (even if I don't make any changes), I'm asked if I want to save changes to the project when I close Altium.

Also am not making changes to any of the project files (.SchDoc files, .PcbDoc files, etc).


texts: Why capacitors lose charge over time? How to minimize it?

texts:
Capacitors lose charge over time, even when they are disconnected. Why does it happen?

Is there a way to keep the charge longer, like for years.

If you cover the plates with better insulator, will it reduce the charge loss?


texts: The datasheet of the SIM800l claims that currents can peak to around 2A during SIM registration and other network intensive activities. I tried powering up the module with the 5v output of a FTDI-USB converter plugged into my laptop (With a SIM inserted in the module),then regulated to around 3.4v using a LM1117 reg. But the module only restarted itself every 10 seconds or so without avail. Then i tried a NOKIA BL-5C (3.7v Li-Ion, 1080maH) and the module managed to get registered onto the network and I could use the GPRS commands. But now I will be designing the whole system onto a PCB with only a single input, that of a 5V, (1 or 2) Amp adapter. So, how can i efficiently power the SIM module? Can I use diodes in series with the 5v input to drop the voltage to around 4.3 v? Will that reduce the max current supply to the SIM module?


texts: Voltage*time product of pulse transformer

texts:
I am designing a circuit to excite a piezo-electric crystal with 1MHz bipolar square wave at 30V (Vp-p=30V, Vb-p=15V) consisting of 10 pulses, 50% duty cycle.

The idea is to use a pulse transformer whose inputs shall be driven with +15V from either directions to achieve bipolar excitation. First, IN_A will be driven with +15V while IN_B is at ground and vice versa.

1) The voltage * time product in this case should be 15V * (1/1MHz) = 15V-us. Is this correct?

2) Or should it be 30V * (1/1MHz) = 30V-us since the excitation is bipolar?

3) Finally, since the excitation consists of 10 pulses and not just a single pulse, should the calculation of V * t value take that into account as well?


texts: How can I current-limit a current mode DAC?

texts:
I have an OLED display with a current reference input to control brightness.

Absolute maximum brightness is achieved by sinking 12.5uA, which is usually accomplished by a resistor to ground.

I wish to control brightness from my MCU, which has a programmable current-mode DAC.  The DAC is capable of sinking up to 64uA, but I expect the OLED to be damaged at that setting.

I don't want to rely on software alone to protect the device. How can I scale the 64uA maximum sink of the IDAC to the 12.5uA maximum sink of the display?


texts: In a JK Binary Counter from 0 to 9, why is the NAND gate connected to the second and fourth J-K flip flop and not the first and fourth?

texts: In a binary counter design using 4 J-K flip-flops, that counts from 0 to 9, the flip flops are reset when the output from the 2nd flip flop NAND the 4th flipflop equals to 0. Since binary 9 is 1001, why is the NAND connected to these 2 outputs and not the first and fourth since it's the first and fourth bits that are 1s.


texts: What chemicals cause the burnt silicon / IC smell?

texts:
I've had a power mosfet go bad on me before, and I'm sure as many of you can guess, I had to answer "whoaaaa, what did you explode in here today" question many times!

I was wondering, does anyone know specifically what kind of chemicals give the "burnt" smell that silicon devices give off when they light on fire / explode / go bad?


texts: Wiring/controlling 4 channel relay with Raspberry Pi 2b+

texts:
I am trying to wire a four channel relay to a raspberry pi in order to toggle some 5v fans on and off. I have researched extensively but haven't found anything comprehensive relating to the RPI2b+.

This is very similar relay to the one shown here Not sure how to wire my 5VDC to 120VAC arduino relay board
https://www.youtube.com/watch?v=oaf_zQcrg7g (that said, even directly following this tutorial doesn't seem to work for me)

Mine is the 4 channel version. I apologise but I have been unable to fully understand how to use this properly with an external power supply. I can get it to the position shown in the video, but I am unsure how to wire the external power supply and fans into the relay. I thought that this would be a universal simple process,m but it appears there are vast differences between different relays as to how the inputs and even the outputs are wired, and even though this is a low voltage situation, I just want to get it right.

here is a low quality diagram of what I want


texts: How does Power over Ethernet combine cores to send power over longer distances

texts:
Sorry if this is too n00b a question, I'm struggling to wrap my mind around basic EE terms for my project.

In my application I run 20 watts over a single AWG-24 wire at 5 volts. This works fine if the wire is <10 feet long; over 10 feet and my application fails; LEDs stop showing the proper color.  According to those who have come before me, this is because of a "voltage drop".

I'd like to understand why something like Power over Ethernet (PoE) can send 20 watts hundreds of feet but my application cannot using a single AWG-24 wire.  My intent is to roll my own solution leveraging the knowledge baked into PoE.

Suppose a PoE system uses a Cat5e cable.  Cutting open this Cat5e cable reveals that it is made up of 4 pairs (cores?) of AWG-24 wires.  The very same AWG-24 my application uses!  I understand PoE's trick for sending 20 watts such a distance is that it steps up from 5 volts to 48 volts.  Rumor has it that stepping up voltage means you can send power over longer distances.

Hold on though.  I've heard there's something called Ohm's law[1] that says if you increase the voltage you either need to decrease either the current[2] or the resistance.

Since AWG-24 wires universally have the same resistance, the current must be going down in PoE!  Yet PoE can still deliver 20 watts hundreds of feet away, so some kind of "combining" trickery must be happening.

What is this trickery?  Is there some kind of black box that takes as input N (48 volt, M current) wire and outputs one (5 volt, NM current) wire?

Thank you kindly, community of experts, for any assistance you can offer me in my endeavor.

Is Ohm's law what punked me earlier?  Voltage dropped because resistance increases as distance increases?
My understanding is the watts I so desperately crave are composed of volts and amps, and an amp is a way of measuring current. So many marvelous labels!


texts: Are electric linear solenoids the best option to push a capacitive screen button on a smartphone?

texts:
I'm trying to figure out if electric linear solenoids are the best option to activate an interface element on the touch screen of my smart phone.

I have also heard of linear actuators and pneumatics but wasn't sure if those are for different cases, even though they all operate in a similar fashion.

Also, does anyone know if there is a low power solenoid that exists?
The lowest power consumption I saw is 5V-8V at 1 A but I'm looking for something that is really low power.


texts: Op-amp limiter circuit with Zener diodes

texts:
I am new to electronics and we have this course for university.
What is the theoretical analysis for this circuit? How can I find the Vin and the Vout? I think there is more than one case.
The circuit is:


texts: Arduino device (PanStamp) hangs when I change the data that is sent through serial

texts:
I have a PanStamp (arduino compatible) and everything was working fine until I change the amount of data I'm sending through serial.

send_altitude is called every second using timer interruption (TimerOne library).

This is the original function that sends data (and does not hang):

void send_altitude()
{
cli();

float_byte altitude;
byte buffer[6];

// Do one trash read to avoid fluctuations
analogRead(ALT_SENSOR);
delay(5);
altitude.asFloat = getAltitude(ALT_SENSOR);

buffer[0] = 0x05; /* Size */
buffer[1] = HUB_DATA;
buffer[2] = altitude.asByte[0];
buffer[3] = altitude.asByte[1];
buffer[4] = altitude.asByte[2];
buffer[5] = altitude.asByte[3];

send_through_serial(6, buffer);

sei();
}

But when I changed it to this one (basically I'm now sending a packet count):
Following PeterJ suggestion I moved the buffer and variable outside the function and also removed the sei()/cli(), however it didn't work... One thing that I noticed is that it looks to take longer to hang without sei/cli.

float_byte altitude;
unsigned char buffer[10];
void send_altitude()
{
// Increments the counter;
packet_count.asULong = packet_count.asULong + 1;

// Do one trash read to avoid fluctuations
analogRead(ALT_SENSOR);
delay(5);
altitude.asFloat = getAltitude(ALT_SENSOR);

buffer[0] = 0x09; /* Size */
buffer[1] = HUB_DATA;
buffer[2] = altitude.asByte[0];
buffer[3] = altitude.asByte[1];
buffer[4] = altitude.asByte[2];
buffer[5] = altitude.asByte[3];

buffer[6] = packet_count.asByte[0];
buffer[7] = packet_count.asByte[1];
buffer[8] = packet_count.asByte[2];
buffer[9] = packet_count.asByte[3];

send_through_serial(10, buffer);
}

The PanStamp started to hang without reason....
packet_count is an ulong_byte.

The others functions and data structs:

void send_through_serial(int lenght, unsigned char *data)
{
unsigned int i;

/* Send srync word */
Serial.write(0xBA);
Serial.write(0xBA);

/* Send data */
for(i = 0; i < lenght; i++)
{
    Serial.write(data[i]);
}
}

/**
 * @brief getAltitude
 *
 * Return the altitude (Voltage) of a
 * analogue pressure sensor.
 *
 * Maybe later on it will return the
 * altitude
 *
 * @param ain Analogue pin
 * @return Altitude (Voltage)
 */
inline float getAltitude(int ain)
{
    int aRead = analogRead(ain);
    return aRead*(3.3/1023.0);
}

typedef union _float_byte
{
    byte asByte[4];
    float asFloat;
} float_byte;

typedef union _ulong_byte
{
    unsigned long asULong;
    byte asByte[4];
} ulong_byte;

Timer initialization code:

Timer1.initialize(1000000);
Timer1.attachInterrupt(send_altitude);

The only "solution" I found is use the WDT to reset after a hang, but it's not good because I have some counters that can not be rested.

Thanks to @JRobert it is working now!!
I also made a few more changes:

Timer interrupt only setting a boolean flag;
Buffers inside the function;
Using sei/cli;
getAltitude() is not inline any more.


texts:
I am using an LM2577 as a step-up boost converter (to boost 7V to 12V).

I would like to be able to turn it on/off (there are certain times when it needs to be turned off).

I have tried a transistor (BC516, BC517, 547B):

on Vin pin: only get 1V instead of 7V so the converter only outputs 2V
on Switch pin: converter only outputs 6V instead of the 12V I want.
on GND pin: transistor overheats


texts: if I take the micro controller (ATmega328P) from the Arduino board and simply place it on to a breadboard, do I still need to upload the boot loader ?


texts: Troubleshooting handsoldered TPS73633 SOT-23 LDO whose output is unexpectedly high

texts:
I have the following situation: I have a LiPo battery of 3.7V, 1200mAh. I want to use it to power a microcontroller that requires 3.3V.

To regulate the power, I want to use a TPS73633 LDO, in a 5-Pin SOT23 package.
According to the datasheet, it should be hooked up like this:

So i connected the + of the battery to IN and EN, and the - of the battery to GND. I did not add the optional capacitors.

I was my first time soldering with soldering paste and hot air, at first I soldered at 400 degrees Celsius, which was probably not a good idea. When I hooked up the battery, the LDO was getting smoking hot, and not working the way it should.

I did a second attempt at 250 degrees Celsius, but still no success. The LDO is not getting hot anymore, but the output voltage that I'm getting out of it is the same as the input voltage from the battery (about 4.0V) Any idea what I'm doing wrong?

The datasheet of the LDO can be found here: http://www.ti.com/lit/ds/symlink/tps736.pdf


texts:
I'm wondering how I can these empty rectangles on eagle and label them, so I can reference the blocks my circuit has. For example:

When I open the example file, right click on the rectangle and select "properties", I see that it's type is "Wire", and that it is on layer "94: Symbols". However, when I manually try to draw with wires, the wires are green and there is no way I can select which layer they are on.
How do I make the blocks such as in the schematic above?
EDIT: The "blocks" I'm describing are those that are letting me know which part of the circuit is "Power from ATX PS" and which part it "Power from Screw Terminals & Vreg".
I'm having trouble making the simple rectangle that delimits these two blocks.


texts: Input & output resistance in voltage amplifier design

texts:
I'm currenly taking a course in Analog Circuits in the university and we got a task that requires us to design an amplifier, with characteristics that depend on our ID numbers. My amp should be a voltage amplifier, with the following requirements:

A = 59 dB
f_3db_low = 10 kHz, f_3db_high = 1 MHz (BW is approx. 1 MHz)
slope of rising (in Bode) = 40dB/Dec
slope of falling (in Bode) = -20dB/Dec

and in the frequency range 0.1 kHz < f < 100 MHz, the input & output resistances should be: R_in = 54 kOhm, R_out = 59 Ohm.

(Due to large R_in and small R_out, the amp is voltage amplifier)

The following circuit I designed satisfies all the conditions are satisfied, except the input & output impedances. I tried a lot of things, but it seems that everything I try just destroys the amplification, which is perfect to me.

I'm attaching a schematic of the circuit, Bode plot of the gain, R_in as a function of f, and R_out as a function of f (in this order):

The circuit:

Gain plot:

R_in:

R_out:

the circuit is based on CE, CE, CC stages with current mirror to each stage.


texts:
I am not an electrical engineer. I am a mechanical engineer and trying to improve myself in electronics. So, if there is a silly question please forgive me :)
I am developing a 24V BLDC motor controller, which adjusts the motor speed via PWM that comes from another circuit. However, this PWM is 16-32V. I have to lower this voltage to 5V to read via my STM8A MCU. The PWM frequency is 100Hz.
My main goal is;

Convert this PWM to 5V
Invert the PWM to read LOW side as HIGH (I know we can solve it by software, but I would like to do it using hardware)
MCU pulls (Edit: pulls to GND) the PWM line to send feedback (e.g. 1sec Gnd means overvoltage)

I saw a circuit online and made my own. (You can see it below.) But, I couldn't understand it completely.

Why there is a 24V DC and R2 in this circuit?
How can I know the PWM current?
Do you think there is a problem with the circuit?

simulate this circuit – Schematic created using CircuitLab
##Edit
Insufficient information created misunderstanding. So, I'll try to give more detail.
My BLDC controller is for trucks. There are only 3 inputs for this controller. 24V (Truck battery voltage), GND and PWM. The controller consist of a MCU, gate driver, and h-bridge. There is a 5V regulator for MCU. PWM voltage is the same voltage as VBAT. It is typically 24V but I wrote the range of it. So, we can consider it as 24V.
My circuit should send some feedbacks to the ECU.  Because there is only 1 pin for communication, I send the feedbacks by pulling the PWM line to GND. As you understand from the circuit, PWM should be 5V also my feedback is 5V. There are 6 error feedbacks and I can read all of them. They all have a specific time to be GND. For example, if the motor is stuck I pull the PWM to GND for 4sec, if there is overcurrent I pull PWM to GND for 1sec. So, my question is not about overvoltage protection or reading circuit, just sending feedback.
I have no information about the source impedance or PWM generator.
Also, the maximum working temperature for this circuit is 140°C. So, it is hard to find an optocoupler for these temperatures.


texts: What change should I make in my Lead Compensator circuit below to reduce the DC response? Vin be sine wave with variable frequency

texts: I want to increase my cutoff frequency, Fc. As Fc=1/2piR*C, Should I reduce the value of either resistor or capacitor to increase my cutoff frequency?


texts: Common emmiter amplifier collector current selection when using a current source to achieve symmetrical output swing

texts:
I know how to bias a common emmiter configuration when using resistors, my main interest is biasing the transistor in a way that maximum symmetrical output swing is achieved, when using resistors, this is easily accomplished by placing the Ic current quiescent point at the middle of the AC load line, which is quite simple when using only resistors.

However, when using a current source to bias the transistor, such as the following circuit:

How can I find analitically the optimum collector current to bias the transistor at the center of the AC load line in order to achieve maximum symmetrical output swing?


texts: What is wrong with my buck regulator circuit using the RY8310 IC?

texts:
A component in a larger circuit I've designed is a step-down regulator circuit. It provides an output voltage of 18V from an input of up to 29V.  For no other reason than the PCB manufacturer had it in stock, I chose the RY8310 buck converter.
I read the datasheet and believe I followed the 'recipe' to obtain 18V output.  However, when I ran my initial test using 20V input, there was a brief moment after I closed the Enable switch, where I saw around 300mA flow and then nothing.  I'm pretty sure that I've toasted the circuit, but since it's built using SMDs it's going to be pretty difficult for me to isolate which component(s) failed.
Since it's a pretty simple circuit, I'm hoping someone might be able to spot where I might have gone wrong.  Here's a link to the datasheet for the RY8310, and I've included an image that shows

the typical circuit from the datasheet
the circuit I built
the calculations I used to determine the voltage control resistor
the values I used for the caps, inductor and resistor.

I appreciate any help with figuring this out.

As requested, here are the details of the caps and inductor in the circuit.

Based mainly on feedback from @Adam Lawrence, I've made changes to my schematic and posted a copy of this.  I've also taken a closer look at the failing PCB and can clearly see that a side of the tantalum cap has blown off, and the Vcc track between the buck converter IN pin and the cap has been overheated.  I've attached a picture of the power circuit part of the failed PCB, together with the PCB layout image.
I'm still puzzled by the need for a bypass (1uF?) ceramic cap on the Vin pin of the converter - there's already a 47uF cap between this pin and ground, so is the 1uF still required?  Does it serve a different purpose to the larger cap?
Id appreciate feedback on the changes I've made which comprise

change inductor to be a power inductor
change caps C5 and C7 to ceramics, by aggregating multiple caps
added pulldown resistor to EN pin and introduced voltage divider

If the basic components I've changed are deemed ok, I'll then populate the PCB and share this for further comment on component placement before I proceed with re-manufacture.  I will also look at downstream protection for the board once I've got consensus that the power circuit is likely to work.
Many thanks for feedback.
The damaged board.

My revised schematic, showing new part details.

The old PCB layout - I've highlighted in bright green the track that failed and the side of the cap that failed


texts: microUSB casing to the ground, ESD protection

texts:
I am thinking to use TVS diode TPD1E10B09 for ESD surge protection. The general convention is outer edge of the microUSB is connected to the ground, so any ESD strike happens it will be grounded. But in one reference design, the outer casing of the USB is not grounded. (pic attached below).

1) Will it not make more sense to attach outer casing to ground, what is the significance of attaching it to 33 ohm resistor and then giving it to TVS diode. If VBus has to be given to the TVS diode, then what is the need of connecting 33 ohm resistor to the ground?

2) I am studying another reference diagram, in this USB interface and power supply section, 33K ohm resistor is connected from microUSB outer casing to ground. (pic attached below)

3) Why 180 ohm resistor is being used in the path of VBus and the ESD IC (TPD4E004XXXX). It could be connected directly, what is the significance if attaching 180 resistor in the path of the VBus.

I saw one more development board in which outer casing is being connected to the ground. I am wondering what should be my design strategy, should I connect microUSB outer casing to the ground or to any ESD protection diode.


texts:
Is there any software or method out there that makes laying out a wiring harnesses easier?  I can draw a wiring harness out in just about anything, but mapping all the wires, colors, lengths and connectors can get to be very tedious and error prone. For the most part I have just used a complicated spreadsheet and tape measure alongside a layout schematic.

Is there a better way?


texts: Supermesh Analysis of circuit of two loops

texts:
I have am having trouble moving forward with the following problem. The problem says that Find the value of Vs in the circuit below such that the power supplied by the current source is 0. The final answer is -92.4V.

Using supermesh analysis, I know that i2-i1=3A for the two loops and that Vs=-24V -i1(19ohm). I am having trouble when it comes to the idea that the power supplied by the current source is zero.  If I say the the node above the current source is v1 and the node below is the ground for the entire circuit, shouldnt v1 be 0 for the current source to have zero power supplied.  I am not sure where my logic is wrong or I am completely messing up.

Here's a schematic:


texts: Type 3 Compensation on Full Bridge DC-DC Converter with SG3525

texts:
I'm trying to build a 48V-400V full bridge dc-dc converter. I'm using sg3525 as pwm IC and trying to get isolated feedback from output and planing to do it with TL431.

When I study on it people are suggesting to apply a type 3 compensation on it for several reasons about stability, I'm not good at control systems and trying to find some sources or examples about calculations but I can't find a suitable source to learn how to do it so I need some help about it.

Can any one please share some sources about calculations and design with me please, I've found many circuit examples but I can't find exact formulas and calculations to calculate compensating components or error amp in IC.

I'm also open to your precious advices about whole process.

Thank you.


texts: What type of cable do I use to connect to the power pins on RF equipment?

texts:
I'm using several pieces of equipment from Minicircuits, namely an amplifier and a bias-T. Each of them have a strange power connector - it looks like a small metal post with a disk on the top, or a bare wire that sticks out of insulation. See example image below:

I'd like to find cables that properly attach to this. Any input?


texts: ATmega328p will not enter programming mode

texts:
simulate this circuit – Schematic created using CircuitLab

I'm trying to connect a ATmega328p and Raspberry Pi together, communicating via SPI. The Pi is Master and is used to program the ATmega when first connected, (ATmega is completely blank).

The ATmega will not respond to the programming mode command and I can't find why.

I have the Pi at 3.3V, and the ATmega at 5V (design does not allow for the ATmega to be run at 3.3v) with a 16Mhz crystal. They are connected via a txb0104 level shifter for the 4 SPI lines, and a pull-up resistor and transistor for the reset line.

Viewing the SPI inputs (+ reset) to the ATmega with an oscilloscope, I have Reset and SS going low, and SCK & MOSI clocking in the programming mode command (AC-53-00-00). I then receive no response from the MISO, and Pi is just attempts to send the programming mode command again after 10 seconds.

I have checked that the SPI lines are going to the correct pins, and any distortion from the level shifter seems negligible. I've also used an Arduino-as-isp to program a blank ATmega in the same setup, bypassing the level shifter so the Atmega should be setup correctly.

Is there anywhere I am likely going wrong here? Only thing I can think of is that my level shifter is unsuitable.


texts: Are these valid transformations, Please guide

texts: Please help check if the transformations in the pink are allowed, when solving a circuit. For the given circuit the goal is to find the current I1 which could be found using nodal without taking care of the particular position of the resistor . However,I am curious why or why not the given transformation will effect the any parameter of a circuit. Please do let me know if any more clarification is required.


texts: How could I amplify the output from this UV photodiode sensor

texts:
I have been able to use the following photodiode sensor board to detect changes in the output of the sensor when a UV plasma is active. However, changes sensed when the UV plasma is active are very small (0.01 - 0.05 mV). This is when the following board is directly connected to the the 5V supply of the arduino. How would I go about amplyfying this output signal? I've carried out some research on Op-Amps, and thought I might be able to use it in a transimpedance configuration. Would this work?

Photodiode board: https://www.adafruit.com/product/1918

Datasheet: https://cdn-shop.adafruit.com/datasheets/1918guva.pdf

Thank you for all your replies.

This is the schematic of the photodiode break-out board. Other photodiode's I have tested prior to this operated in large wavelength ranges (350nm to 1100nm) and as expected the output contained a lot of noise, probably due to ambient lighting. However, with a wavelength range of 240nm to 380nm this break-out board does not respond to changes in ambient lighting but only to the presence of weak-UV radiation. It is consistently at 0V till plasma is active. The only problem is that this signal is very small (mV magnitude)


texts:
The below picture is the power supply part of a board from a vendor. We keep having issues where the PIC being powered by it will randomly go back into bootloader. While we don't know for sure we suspect an issue with this power supply. We also have to replace D1 from time to time. One board was missing D1 and instead had a solder bridge, now U2 is blown up. The input power is from and array of 4 12volt AGM batteries. While charging we see voltages as high as 58V. Recently a 48VDC-48VDC external power supply was added to keep the input to this board more steady and to get rid of some noise on the line.

From looking at this schematic is there any obvious issues I should look into?


texts: Why common mode voltage can damage device?

texts:
As title mentioned, why too large common mode voltage can damage a device?
Especially an instrument amplifier?


texts:
We are decreasing corona by increasing conductor size and making it hollow but according to definition corona depends on level of voltage so eventhough you make it hollow and increase conductor size there won’t be any change in voltage transmitted so I didn’t get the fact how corona decreases by conductor size.

Some say it is because of potential gradient, others say skin effect

Skin effect - current flows around the conductor not at the centre so if we increase the hollowness of conductor Is it possible that more air will be prone to ionise than before?


texts:
I am using a voltage divider to read about 9V. This divider n/w is connected to an ADC (analogue pin). Now, I am concerned about the wattage of the resistors in the divider n/w. I am using a KL04 Freescale ARM chip. I bring the voltage from 9V to about 2.5V via 10k and 3k n/w. When reading the current, what is the current that is sunk into my pin? The max of each pin is 25mA. Will the controller sink 25mA each time while reading this pin? I am a bit confused.

Kindly advise me.


texts:
Can someone explain or point to some documentation that explains how the RF front-end works for BLE chips? Specifically, I am confused about why the VCO runs at 4.8Ghz and is then divided by 2. I have a background in EE but not much RF.

Reading here I get this but want to confirm if there are other things to consider:

"Typically, VCO performance is  poor when the control voltage hovers close to the threshold  voltage of the transistors in the Voltage-to-Current (V2I) converter and is also poor at high control voltages when the V2I current sources are pulledout of saturation. So, it may be beneficial to divide the VCO by 2 at low frequencies and divide by 1 at high frequencies to keep the control voltage in the VCO's "sweet spot"."

I see images similar to this online:


texts: Wide Range Input (Sinking/Sourcing) to Arduino

texts:
Figure 1: I am trying to create a circuit that will take a 24 to 3 v digital signal that I can connect to an arduino input. I'd like to have an indicator in the circuit to show that the signal is present. I started selecting smd components but I'm stuck on getting the resistors and current values worked out. I need to use a bidirectional opto-isolater so that I can connect a sinking or sourcing device to this circuit. Any help or guidance would be appreciated.

                                        Figure 1

UPDATED: Figure 2: Arduino Input has been changed to provide a 5v signal when the field input is conducting and 0v when the field input is not conducting. Field Input will either be NPN or PNP (0v on "DigitalFieldInput" or 24v on "DigitalFieldInput"). I've designed another circuit that will dump the excessive voltage and bring it down to a manageable level. I'm still not sure my resistor values are correct.
It still doesn't look right. For PNP, I would connect 24v to the "digitalfieldinput" and 0v to "common" and the circuit should work, however for NPN, I would connect 24v to "common" and the 0v signal would be connected to "digitalfieldinput". In the NPN connection, there would be no current limiting because 24v would go through the leds/opto-coupler and then through the BATS54S directly to ground. I think I closer with this circuit but still not usable. Any help would be appreciated.

                                          Figure 2

UPDATED: Figure 3: Field input to be 3-30vdc. Another kick at the can. After thinking about it longer, I decided to try using a double zener to offload the excessive voltage down to 5.1v. I used a 500ohm resister to limit the current of the circuit to 50ma. 20ma through the opto, 20ma through the visible LED and 10 through the zener. The only thing I don't like about this circuit is the size of the 500 ohm resister needs to be at least 1.5W.

Am I on the right track?

                                        Figure 3


texts:
I am trying to choose a series resistor for a MOSFET (PSMN1R5-25YL) in order to reduce ringing, and I wish to know the guidelines for choosing the right resistance.

I'm not sure if it's relevant, but the application is two DC-DC converters, one is switched in 200KHz with 1A current from the gate drivers, and the other in 1MHz with 4A current from the gate drivers.


texts: what is the meaning of the star on inverter gate?

texts:
there is an star sign on the inverter gate in my homework circuit.
what is the meaning of it?
what is the difference between it and a normal one?


texts:
I should point out that the LED I'm trying to switch is actually an LED strip with a one meter length and a total of 60 LEDs. Total power consumption is 4.8W at 12V. By the way, 'IC1' is the 7805, which converts the 12V DC into 5V DC.

This is the MOSFET I plan on using: http://panda-bg.com/datasheet/860-064009-Transistor-IRF530-ST.pdf (IRF530-ST)

I'm new to the field of electronics so I am not quite sure if it will work so any kind of feedback is very much appreciated :)


texts: Two batteries in parallel: why they deliver "twice the current for the same time"?

texts:
I am reading "Make Electronics - 2nd edition" by Charles Platt, and I am looking at batteries in series in parallel right now. There's a sentence I really can't understand:

  Figure 1-73. Batteries in parallel, powering the same load as before, will run it for for about twice as long. Alternatively, they can provide twice the current for the same time as a single battery.

What puzzles me is the last part: if the V stays the same, how can the battery provide twice the current for the same time? Are we talking about an implicit resistance drop (but in that case I wouldn't need the second battery, would I?), or what, exactly?


texts: Should Class I electric devices be connected to unearthed sockets?

texts:
I rent an old house and most of the power sockets do not have earth/ground. I need to connect Class I devices (such as laptop chargers, full PC towers, soldering irons) which require an earth to operate safely. Some even indicate "Do not connect to unearthed outlet".

I understand that the proper solution is to add earth to existing sockets, but the landlord told me this is not required by regulations for old houses, so they will not do it. They only provide earthed sockets in the kitchen.

Given that the unearthed sockets are protected by an RCD (residual current device), if I decide to connect Class I appliances to them, what is the risk to human life and equipment?

I know that an RCD cannot substitute proper grounding (as the 20ms that it takes for the device to react can be enough to stop a human heart), but I'm trying to evaluate the extent of the risk.

To pre-empt some proposals: I've checked the sockets' back plates, and they're not grounded, so there's no easy fix. Also, using the kitchen's earthed sockets to connect a long extension is too cumbersome a fix.


texts: Using a NE555 for 12V boost to 24V to power an amplifier

texts:
I'm trying to draw a supply scheme for a class D integrated amplifier.

It requires 21V to 24V power supply and about 6/7A of current at 24V. The input is a car battery: 10V to 14.4V.

I found this on the web:

I've a few questions:

Is the NE555 usable for this scope?
How much output current this circuit have?
If the answers to the first two are: "no" and "too low" can you suggest a circuit scheme that it's my case?

EDIT: If you did not understand well, the scheme of this DC boost must be added to the PCB of the amplifier. Also, the output current can also be 3A, i will put two of this circuit in parallel with diodes.

EDIT_2: Ok then, I can't use a NE555, this is a scheme of a DC DC boost circuit that I already have and works very well for my application.

What resistance with what value I've to change to get a 21-24V output? Because it is adjustable, and it want fixed.


texts: What technique (ultrasound/infrared) should I use to detect seeds inside a fruit?

texts: This fruit is simplistic as there is a thin skin surrounding it. Inside it is a tiny ball of liquid and that is where the dense seed forms. The is seed much more denser in comparison with the liquid and the skin, you could almost neglect their presence in regards to density. So my purpose is to manipulate the wavelength of a wave such that it penetrates the skin but reflects of the seed if it is formed.  Like the Rutherford gold foil experiment. I am aware of techniques such as the  "Fourier transform infrared spectroscopy" but I am not an expert on this.


texts: I want to make a small generator from a Dc brushless fan  FD129225HB-N DC 12 volt. can I use this directly to led light of 12volt. I am not good at electrical things please help me.


texts: Regulating a negative output from a bridge rectifier

texts: I've managed to get a regulated 5V output from my bridge rectifier using a linear regulator. I now need to use another linear regulator to regulate a -5V. I can't for the life of me find how I do this though.


texts:
I am currently following this guide for modding an Airport Express for automotive use. It recommends using a AMS1117-3.3 regulator along with a USB power adapter to power the Airport Express.

I was wondering if  this device  is a suitable replacement for the AMS1117-3.3 and if it will do the exact same thing.

EDIT: I have changed the device i'm trying to replace the AMS1117-3.3 for.


texts:
Hello I am trying to improve my circuit schematic and I am looking for suggestions on how to make it more readable, I have read design rules on this forum and I am trying my best to follow them. The circuit is a light chaser that uses a digital pot that connects to a raspberry pi, that uses a voltage regulator to dim the leds if needed.

The voltage regulator has the highest voltage which is 10V, the 555 timer has 9 volts and the digital pot has 5 volts, so I placed the voltage regulator at the top, the 555 timer in the below the voltage regulator and the digital pot below that, The two other chips get 9 volts but seemed to work best at the bottom and the ground which is the lowest of the voltages is the bottom of the diagram.


texts: Confirm AC generator output frequency calculation

texts:
I am working on a project to build a small generator based on a 12 magnet, 12 pole, (6 pole pair) rotor with shaft speed of 2800 RPM. (Output voltage, 240 V AC, 4 kW.)

Estimated load will be 3.5 kW,  constant on heating elements.
The value of output frequency concerns me though. Can some one confirm the formula (RPM / 60 x 6) provided by the seller. The value calculated seems high at 280 Hz or have I just failed to understand.

Will the frequency be suitable for the heating elements designed to be used at 50 Hz?


texts: Why isn't my blinky program working for my STM32F446RE Nucleo board?

texts:
My Code:

#include "../architecture/CMSIS/inc/stm32f4xx.h"

#define WAIT(x) for (int i = 0; i < (x); i++)

inline static void init_led2();

int main() {
  init_led2();                      // setup led3
  while (1) {
  #define INDEX 5
    GPIOA->BSRR = 1 << INDEX;       // set led2 output
    WAIT(0x1FFFF);                  // wait for awhile
    GPIOA->BSRR = 1 << INDEX << 16; // reset led3 output
    WAIT(0x1FFFF);
  #undef INDEX
  }
  return 0;
}

// led3 is connected to GPIO pin PB3
inline void init_led2() {
#define MASK 3                                // 2bit mask
#define INDEX 5                               // index of the port
  RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;                     // enable GPIOA clock
  // set the mode to general purpose output
  GPIOA->MODER &= ~(MASK << (INDEX * 2));     // clear bit field
  GPIOA->MODER |= 1 << (INDEX * 2);
  // set output mode to push-pull
  GPIOA->OTYPER &= ~(1 << (INDEX));
  // set low speed
  GPIOA->OSPEEDR &= ~(MASK << (INDEX * 2));
  // no pull up/down resistors
  GPIOA->PUPDR &= ~(MASK << (INDEX * 2));
#undef MASK
#undef INDEX
}

when i use make program with my makefile that uses openocd to program the board via st-link2 it seems to work fine. I get ** Programming Finished ** and it verifies correctly as well.

But the LED on my nucleo board is not blinking! I can't even get it to turn on if i comment out the reset line. What am i doing wrong?


texts: Confusion with the meaning of a component tolerance in terms of accuracy and standard deviation

texts:
As far as I understand a component's tolerance relates the difference between the actual component value and the value given on the data sheet.

If a 1k Ohm resistor have ±5% tolerance, is this 5% percentage a measure of standard deviation or accuracy? Is this tolerance related to systematic error or random error?

I'm a bit confused about two concepts and how is this tolerance practically obtained. It seems if statistical methods are used this percentage relates to standard deviation but in many calculations it is taken as accuracy. But accuracy and standard deviation are not related (?) Can you give an example to illustrate the idea behind?


texts: Buffering a Digital Microcontroller Signal for Connecting to an Optocoupler

texts:
I frequently work on projects in which I use optocouplers for isolating digital +5VDC control signals (for example, from a microcontroller) from the rest of the circuit. However, since these work by illuminating an LED inside the device, there can be several tens of milliamps load on the microcontroller pins. I am looking for advice on what would be the best practice for buffering this control signal with an additonal stage, so that the microcontroller effectively sees a high impedance, and thereby reducing the current that it needs to provide?

Just naively off the top of my head, I can think of a few things which might work:

Simply use an op amp as a unity gain buffer amplifier.

Use a dedicated comparator chip to compare the input signal with, for example, +2.5VDC.

Use a MOSFET as a kind of signal amplifier.

However, upon doing some reading, I have come across a whole bunch of chips that I have never used before, but sound like they may be designed for this kind of thing. For example:

A Differential Line Driver (MC3487)
A Differential Line Receiver (DC90C032)
A Line Transceiver (SN65MLVD040)
Buffer gates and drivers (SN74LS07, SN74ABT126)

I really have no experience with any of these and am a little overwhelmed by the amount of stuff available! So can anyone help me to learn the differences between these devices, and which ones of them would / wouldn't be suitable in this case. Is there a best / standard way of achieving what I describe?
edit:
Since I could be switching up to around x30 outputs, I do not want to be concerned at all about loading the microcontrollers, and so will not be considering connecting directly to the DIO pins. Therefore, I think I will go for a logic buffer IC. I am going to try using the SN74LVC1G125 "Single Bus Buffer Gate With 3-State Output" for each input, and see how that works out.


texts:
I'm studying computer architecture at my university and I've been recently asked a question: what is CLK used for in UART/USART? The first obvious thing is that it is used for dividing frequency when passing it through BAUD generator. But I've been told that there are some more cases where CLK is necessary. The other obvious thing is that it's used for synchronization ,but what exact synchronization? I guess it is used for some sync with the externals(and internals) of SuperIO.

I'm not attaching to some specific chip and speak about UART and SuperIO IC in general.

So the question is: where clk, connected to UART/USART inside SuperIO, is used disregarding its usage in BAUD generator?


texts: When developing an algorithm for FPGA, should I be aware of amount of logic blocks (and other FPGA-specific properties)?

texts:
I want to see how certain algorithm would fit FPGA architecture and plan to implement it with HLS tool like CλaSH which produces VHDL/Verilog. All I know about FPGAs so far is it's an array of interconnected logic blocks. So I wonder how can I ensure it's gonna be possible at all since every code construct consumes a certain amount of logic blocks of FPGA and it simply might not have enough of it?

For example when developing an algorithm for CPU prior to even trying to run it you need to ensure that it will have enough memory to load the code. It's never the problem with modern PCs anymore but it's very tight with FPGAs, right?

Is there a way to determine how much logic blocks an implementation requires prior to running it (... purchasing a dev board)? Are there any other considerations needed to be accounted for like logic blocks array width/length (which determine the flow parallelism?), etc?


texts: Rotating components in Altium Designer, clearance

texts:
I can't find out how to properly rotate 45 degrees components in Altium Designer. I read two topics about that:

Rotated component placement in Altium

How can I rotate a part in Altium without an collision error?

However the solution presented there, creating 3D body shape seems not working. The component below was created with Altium's Wizard and it created 3D shape also.

The grey area is not rotating with the component.

-- EDIT


texts: PNP and NPN H-Bridge - Drive PNP from opposite output

texts:
To drive the PNP transistors on an H-bridge circuit, the control voltage needs to be at least the input voltage, or a secondary stage is driving the high-side PNPs.
I have come across a circuit that uses the output of the opposite switch to drive the PNP transistors. This circuit exists, and I measured it, and it behaves well.
In this case, VDC=30V and Vctl=5V. Vctl is a square wave (approx. 300Hz with a short dead-time between "on" ~100us), like so:

Component values are measured; but transistors are unmarked, so I used generic ones.
The circuit works well with clean switching at Aout and Bout.
So far so good. I've tried to make such a circuit in LTspice, but it isn't so well behaved.
During the dead-time at the input, both Aout and Bout should be 32V, meaning 0V difference from how I see it.
However, LTspice shows me a voltage dip during the dead-time and a current spike on the input line:

Indeed, building this circuit results in comparable behavior (a dip on both sides), and the transistors get warm (input in this case is current limited), meaning they don't fully turn off.
Now, clearly I'm making wrong assumptions, so
why does this not work and
what is the trick to making this work?


texts:
I ran a simulation for a combinational logic circuit with 8 inputs, 4 outputs inside MODELSIM. When I view the simulated waveform everything looks fine, however when I export result to a list file there are some intermediate valued related to deltas inside a time slot like this:

t(ns) delta               output input
    460  +1                   4'h1 8'h2E
    460  +4                   4'h0 8'h2E
    460  +5                   4'h2 8'h2E
    470  +1                   4'h2 8'h2F
    470  +4                   4'h3 8'h2F
    480  +1                   4'h3 8'h30
    480  +4                   4'h2 8'h30
    480  +5                   4'h4 8'h30
    480  +6                   4'h6 8'h30
    490  +1                   4'h6 8'h31
    500  +1                   4'h6 8'h32
    500  +4                   4'h7 8'h32
    500  +5                   4'h5 8'h32
    510  +1                   4'h5 8'h33
    510  +6                   4'h7 8'h33
    510  +9                   4'h5 8'h33

I want to know what are these intermediate values and will they cause problem for my circuit or not?  e.g. there are 3 value for t=460ns


texts: How do I deal with different XTAL pin capacitance when selecting XTAL and load capacitors

texts:
I'm trying to select a 32kHz crystal and appropriate load capacitors for Atmega48A MCU.

Atmega48A specifies different capacitances for Xtal1 and Xtal2 pins:

18pF for Xtal1
8pF for Xtal2

The datasheet says: "The capacitance (Ce+Ci) needed at each TOSC pin can be calculated by using:C = 2 * CL – Cs" Where CL is load capacitance specified for the crystal and Cs is stray capacitance.

Can I assume that each pin has (18+8)/2=13pF of capacitance? Can I select a 8pF crystal and use it without external load caps assuming ~3pF of stray capacitance?


texts: STM32 Audio class USB not recognized as audio device

texts:
I'm learning about USB classes using STM32F429ZI(on Discovery board). I already tried to implement Communications device class (CDC) and it worked well, now I tried to do some simple test with Audio Device Class.
I am using CubeMX to generate project, chose Audio Device Class there, it created default library files. uVision complied without errors or warnings. I flashed my MCU and in device manager it looks like this:

After my learning about CDC USB, I knew that I need to increase Stack_Size and Heap_Size in startup file. I tried it - nothing changes. I also found some advice to decrease HS_MAX_PACKET_SIZE - still no effect.

Well, the questions are:

Why is it under COM port? Even if some configurations are not correct, shouldn't it be under sound devices?
What is wrong? How to make it work? It would be good just to make it recognized as audio device at least, nothing special.

The error under the device is just generic "This device cannot start" error.

EDIT 1
Actually, I don't know what kind of code to attach, since everything is generated with CubeMX. I can give any snippets on request, if needed.
USB Device description generated by CubeMX.

#define USBD_VID     1155
#define USBD_LANGID_STRING     1033
#define USBD_MANUFACTURER_STRING     "STMicroelectronics"
#define USBD_PID_HS     22336
#define USBD_PRODUCT_STRING_HS     "STM32 Audio Class"
/* USER CODE BEGIN SERIALNUMBER_STRING_HS */
#define USBD_SERIALNUMBER_STRING_HS     "00000000001A"
/* USER CODE END SERIALNUMBER_STRING_HS */
#define USBD_CONFIGURATION_STRING_HS     "AUDIO Config"
#define USBD_INTERFACE_STRING_HS     "AUDIO Interface"

#define USB_SIZ_BOS_DESC            0x0C

EDIT 2
I found that USBD_AUDIO_Init() is not called anywhere by default and this can be the problem. But I have troubles understanding how can I call it when it is "Static uint8_t", so basically not callable from main. Here is the description:

usbd_audio.c

/**
  * @brief  USBD_AUDIO_Init
  *         Initialize the AUDIO interface
  * @param  pdev: device instance
  * @param  cfgidx: Configuration index
  * @retval status
  */
static uint8_t  USBD_AUDIO_Init (USBD_HandleTypeDef *pdev,
                               uint8_t cfgidx)
{
  bunch of code
}


texts: Using a digital potentiometer in a voltage divider

texts:
I'm using an MCP3008 ADC and an MCP4131-103 (10k) digital potentiometer to try and create a sort of "adjustable voltage divider."

For the project, the resistance I'm measuring will vary, and I hoped to use the MCP4131 to adjust my reference resistor on the fly. Namely:

Vin
|
R1
|
|--Vout
R2
|
GND

I'm measuring and logging R1 (a material) over time, and it increases from maybe 500-20k Ohms over the duration of interest. If I use a fixed resistor for R2, I get poor resolution when the value is mismatched with the current value of R1. I hoped to have the digital pot adjust itself based on the running average so I also maintain my resolution.

I believe I have both the MCP3008 ADC and the MCP4131 working individually with my Raspberry Pi 3 using SPI, but they don't seem to work like I expect in a voltage divider setup.

Wiring up the MCP3008 like this Adafruit guide, I used a voltage divider with a 10k resistor as R2 and the following formula to find R1:

v_out = adc * 3.3/1024
R1 = R2*(3.3 - v_out)/v_out

| resistor used |  calculated |
|---------------+-------------|
|          1000 |        1010 |
|          4700 |        4628 |
|         47000 |       46574 |

That confirmed that my ADC appears to be functioning well.

In addition, I cycled through settings for the MCP4131 and manually read the value between the high (3.3V) and wiper with an multimeter. In each case I'm sending a value of target resistance * 128/10000. I plotted the results and get:

That looked good enough for me to believe the pot is also connected and functioning correctly.

Now, when I try to setup a voltage divider like the above to test both the digital pot and the ADC together, I get wonky results. I've tried two configurations to troubleshoot, substituting the 4131 as either R1 or R2, with a fixed resistor as the other one used:

wiper pin of 4131 --|-- resistor -- GND
                    |
                    |
                   ADC

3.3V -- resistor --|-- wiper pin of 4131
                   |
                   |
                  ADC

Using a 10k resistor in the first configuration and setting the digital pot to 5k, I get a raw ADC reading of 403, or 1.3V. I'd have expected:

3.3V * (10000 / (10000+5000)) = 2.2V

This results in a calculation of:

10000*(3.3 - v_out)/v_out = 15384 # should be 5000

Swapping things around and using the second configuration, I get an ADC reading of 624 or 2.01V. I'd expect a value of:

3.3V * (5000 / (10000+5000)) = 1.1V

This results in a calculation of:

5000*(3.3 - v_out)/v_out = 3209 # should be 10000

I'm wondering if because the potentiometer is really a voltage divider in and of itself, it's not behaving like I expect. Should I be, for example, changing my ADC Aref or GND to one of the R_a or R_b pins on the potentiometer? Or perhaps the error is in my code and I need to account for two voltage dividers in a row?

I haven't found any examples of using a potentiometer as one of the resistors in a voltage divider. Unfortunately, a potentiometer is one, searching "using a potentiometer in a voltage divider" gets a ton of hits that simply explain what pots are.

Thanks for any guidance, and I'm happy to post whatever other information would be helpful.


texts:
I am trying to understand how BJT high side circuit works. I ran it in LTSPICE, but I fail to see how certain voltages get computed.
Can someone, please, explain how to arrive at Vbq2 = 14.2V? Also, why Ieq2 = 5mA?
Thanks


texts:
For the diagram below, I can see that it functions as a monostable (I have built and tested it), but I can't really see why it works, I mean, I can see that there is an RC network, which a monostable has, but I don't see how it links up with the logic to make a monostable.

Any help would be appreciated


texts: PHY Register 5 Technology Ability Field Meaning

texts:
I have a question about each bit fields(bit 5 to bit 8) of PHY register 5.
The following is the description page of a PHY.

I know that these fields are Technology Ability Field which is the link-partner advertised during the auto-negotiation.

The following is the table of the IEEE802.3 specification.

In this table, A3 is 100BASE-TX full duplex but A2 is 100BASE-TX without describing duplex.
I think that the A2 is the 100BASE-TX half duplex. But there are no comments in the standard.

I have questions at this point:

Why didn't the specification specify the "duplex type" for the A2 field?
Is the half duplex is the default duplex for the 100Base-TX?
Are there any comments about it in the IEEE802.3 standard?
Do you have any other opinion?

Thank you in advance.


texts: How to measure resistance of resistance of gel electrolyte using multimeter

texts:
How can I measure the resistance of a gel electrolyte using a multimeter?
I know the formula to measure the conductivity of a gel electrolyte is
k = (1/R) * (d/a)

where k is the conductivity (S/cm), R is the resistance (of the electrolyte), d is the distance between the two electrodes, and a is the effective area of the electrodes.

I wanted to measure the conductivity of the gel electrolyte with just a multimeter. Since this is a gel electrolyte, I was thinking to substitute the thickness of the gel electrolyte as d and substitute the area of the gel electrolyte as a. (I know the area (a) has to be that of the electrodes, but I want to measure the conductivity of the gel electrolyte without the electrodes). So now all that remains is the resistance of the gel electrolyte. To do this can I just measure its resistance using a multimeter?

Thank you.


texts: RS 485 communications not working, A, B both low

texts:
My question is: for RS485, does A or B (one of the two) have to be HIGH by default? If there are only 2 communication nodes in the network, should one of the nodes pull A or B (one of the two) HIGH by default?
Here is my situation. I'm looking for debugging suggestions.
I want to have an industrial computer (IPC) to communicate to a LT1785 chip over RS 485. Only 3 wires are used:

A
B
Ground

It does not work. LT1785 receives the wrong bytes, but is repeatable. Here are the experiments we have done:

use this USB to 485 converter to compare vs. RS485 (DB9) port on IPC
use oscilloscope to read A, B signal from 485 port (IPC) vs. USB converter. The signals look different. USB converter has one signal high by default. 485 port has both signals low by default.
485 (IPC) to 485 (IPC): minicom WORKS (two ports can communicate w/ each other)
usb (IPC) to 485 (IPC): minicom WORKS (two ports can communicate w/ each other)
usb (IPC) to LT1785: WORKS (two ports can communicate w/ each other)
485 (IPC) to LT1785: DOES NOT WORK (wrong bytes received, but repeatable)

Here are the oscilloscope readings for 485 port vs. USB converter.


texts: How to connect 20 wireless sensors in one receiver with arduino?

texts:
I live in a house with many doors and windows and I plan - as an easy project - to be able to detect and see which door/window is open using simple leds. What I do not want to do is to have 2 or 3 wires for each sensor hanging on the wall or be on the floor... so I am searching for a way to connect simple wireless window/door contacts (rf 433mhz usually) sold very cheap on ebay. Also I do not want to have 1 receiver for each transmitter because it seems foolish, power & space consuming..

XBee is a very expensive way to do this. Bluetooth could be another option. What's your opinion ?


texts: Why do frequency synthesizers often use N/N+1 prescalers?

texts: Frequency synthesizers, like Analog's ADF411x often have prescalers in their PLL which divide by 16/17, 32/33 or 64/65? What's the 2^N+1 value used for?


texts: Finding Filtered Output using Convolution property of Continuous Fourier Transform

texts:
why the derivative of u[t] is delta[t] ?
also I don't understand why the sin term disappeared once the derivative is taken.


texts: Temperature sensors for an Arduino sous-vide project

texts:
I'm creating a PID controller for sous-vide, like this one, and am trying to decide which temperature sensor to get.

Priorities:

Cost: < £25 delivered in the UK
Accuracy: +/- 0.5C
Range: 0 - 100C
Output: something that can be read by an Arduino with minimal additional circuitry (eg 0-5VDC, a resistance that is easily measured, or digital output such as OneWire etc)
Physical: waterproof, food safe (ideally), and with a lead at least a meter long - ideally not too much work to create this form factor (I don't have a workshop)
Failure mode: would be ideal if a failure caused over-temperature reading rather then under-temperature

Happy to compromise on any of the above if needed, but this is my ideal. Also open to suggestions for what else I should compromise on. I'd be particularly interested in thoughts regarding sensors such as a k-type, a pt100, a TMP36 chip, and a "standard" 10K thermistor (though if these names aren't specific enough, please let me know what I should be looking for instead).


texts: I have several slave devices communicating with a microcontroller master on an I2C bus.  My PCB is only about 1" x 1" and the devices are only communicating at 400 kHz.  What is the best way to connect all the I2C peripherals to the microcontroller?  In a star configuration or in a daisy-chain configuration?


texts:
This question was rewritten to remove several updates and improve clarity.

I have a Cortex M3 based (and rather obscure) MCU. I have a rather big project, written in C++, in Keil MDK5 with armcc compiler.

I have this function:

bool CanHandle::sendMsg(CanMsg & msg)
{
    bool result = false; // <--------- problematic line

    CAN_TxMsgTypeDef txMsg;

    if (format == FrameFormat::EXTENDED)
    {
        txMsg.IDE = CAN_ID_EXT;
    }
    else
    {
        txMsg.IDE = CAN_ID_STD;
    }

    ENTER_CRITICAL_SECTION();

        uint32_t bufN = CAN_GetEmptyTransferBuffer(set.mdrCan);
        if (bufN != CAN_BUFFER_NUMBER)
        {
            CAN_Transmit(set.mdrCan, bufN, &txMsg);
            isTxQueueFull = false;
        }
        else
        {
            isTxQueueFull = true;
            result = false;
        }

    LEAVE_CRITICAL_SECTION();

    return result;
}

When I compile with -O1, compiler produces this assembly listing for it:

0x0800068C E92D41FF  PUSH     {r0-r8,lr}
0x08000690 4604      MOV      r4,r0
0x08000692 2700      MOVS     r7,#0x00
0x08000694 7A20      LDRB     r0,[r4,#0x08]
0x08000696 2600      MOVS     r6,#0x00
0x08000698 F04F0801  MOV      r8,#0x01
0x0800069C 2801      CMP      r0,#0x01
0x0800069E D013      BEQ      0x080006C8
0x080006A0 F88D6005  STRB     r6,[sp,#0x05]
0x080006A4 4860      LDR      r0,[pc,#384]  ; @0x08000828
0x080006A6 6800      LDR      r0,[r0,#0x00]
0x080006A8 F3C00508  UBFX     r5,r0,#0,#9
0x080006AC F8D401FC  LDR      r0,[r4,#0x1FC]
0x080006B0 F000FBCA  BL.W     CAN_GetEmptyTransferBuffer (0x08000E48)
0x080006B4 4601      MOV      r1,r0
0x080006B6 2920      CMP      r1,#0x20
0x080006B8 D009      BEQ      0x080006CE
0x080006BA 466A      MOV      r2,sp
0x080006BC F8D401FC  LDR      r0,[r4,#0x1FC]
0x080006C0 F000FBC4  BL.W     CAN_Transmit (0x08000E4C)
0x080006C4 7266      STRB     r6,[r4,#0x09]
0x080006C6 E004      B        0x080006D2
0x080006C8 F88D8005  STRB     r8,[sp,#0x05]
0x080006CC E7EA      B        0x080006A4
0x080006CE F8848009  STRB     r8,[r4,#0x09]
0x080006D2 B004      ADD      sp,sp,#0x10
0x080006D4 4638      MOV      r0,r7
0x080006D6 E8BD81F0  POP      {r4-r8,pc}

And here's the funny thing: when I try to step over line bool result = false;, I get a hard fault with UNDEFINSTR flag set. PC recovered from stack shows some unexisting address.

But  - and here's the really mysterious thing - if I step over assembly, or step into C code or set a breakpoint on line 2 and press run - everything is fine! No hardfault, program runs from there.
If I compile with -O0 or make result volatile, compiler produces different assembly and hard fault doesn't occur.
I tried using different versions of compiler or IDE - problem persists.

Running this program without debugger produces no fault.

Debugging in simulator produces no fault, but stepping over that particular line doesn't actually step over, it makes program runs indefinitely.

This function is called from main, so after it's end there is just while(1). I believe there is no problem in the outside code.

Code of the function is now at its minimum, if I remove any line, literally any line, problem goes away. I previously posted several wrong guesses, I removed them for now. I can't pinpoint any particular instruction or address that produces hard-fault.
All function calls there are dummies, they return immediately. CRITICAL_SECTION macros do not produce critical sections at all but something has to be at those lines or no fault occures.

I have literally no idea how that can happen. I don't know how debugger works exactly, what's the difference between stepping over and setting a breakpoint and hitting "run".


texts: How to approach the circuit analysis of a BJT in saturation?

texts:
There is a question I can't solve.

I know that \$\beta\ =50\$ and \$V_{ce}\ (sat)\$ \$ =0.2 \$.

I need to find the value of \$ V_1 \$ that the BJT is in saturation.

I've tried some KVL/KCL equation using the \$V_{ce}\ (sat)\$ value but I can't get an answer (\$V_1\$=3.1V).

What is the way to approach things like that?


texts: How do I approximate number of calculations/operations/memory/hardware is required for a 2^18 point FFT on chip?

texts:
I am looking for FFT implementation on Chip/FPGA. I need a high-resolution FFT which is a minimum of 2^18 points. However, I need to approximate how much hardware will I require for this process.
I am aware of advancements in this field of research and I was able to see a lot of people were able to implement their 1024, 2048, etc. point FFTs efficiently by using fewer operations/memory/area/power consumption. My concern is on a high level. I just need to approximate how much hardware will I require for this.


texts: Why does DMM resistance measurement not settle when probing pins on circuit?

texts:
I am probing two pins on a custom circuit board which I believe have been shorted somewhere and am attempting to measure the resistance between these pins with an Agilent 34401A multimeter. When trying to get a definitive resistance measurement, the readout of the multimeter does not settle on a single value, as it would if measuring a passive resistor. Instead, it jumps around between displaying values of 5ohms, 40 ohms, 25ohms, etc.

When measuring these pins on a unit that does not have the short, the readout is between 2-4kOhms, but also does not home in on a single value and instead jumps around in this range.

Is there any conventional knowledge or perhaps a rule of thumb as to why this is happening, or is it an issue that requires more detailed knowledge of the specific circuitry?


texts: How to approach designing a 30GHz bandpass filter?

texts:
How would one approach designing bandpass filters in the 3GHz - 30GHz range, each with ~2.4GHz bandwidth, for a 50Ω spectrum analyzer or sampling oscilloscope? I've learned how to implement some simple RF designs in the 1GHz-5GHz range, and some of what to look out for.

What circuit topologies are used? (Eg. coupled line vs capacitive-gap resonator vs capacitive coupled shunt resonator.)
Any active components?
What bandwidths and falloffs can be expected?


texts:
Say I instantiate a parametrized number instances in an array and each of these instances produces an 8-bit output value if it is selected. What would be the best way to wire these outputs together?

I currently use tri-state buffers as in the following example:

module foo(output wire [7:0] out);
parameter N = 4;
bar bars[0:N-1] (.out(out));
endmodule

module bar(output wire [7:0] out);
wire selected = ...;
wire [7:0] value = ...;
assign out = selected ? value : 8'bz;
endmodule

Here the logic ensures the selected signal will be 1 for one and only one instance.

This all works fine in the simulator as well as in an FPGA. However, since I get warnings about this construct while synthesizing and, as I understand, Xilinx removed internal tri-state buffers in newer FPGAs, I was wondering what the preferred way is to connect these output buses together.

I was thinking about changing the output assignment to

assign out = selected ? value : 8'b0;

and then OR-ing the outputs together. However, I'm not sure how to do this since the size of the OR-gate depends on a parameter.


texts: How do you simulate a supercapacitor in PLECS? or in MATLAB for that matter

texts: I've had a little bit of difficulty simulating a supercapacitor in both MATLAB and PLECS. Any ideas on how to do either?


texts: Convert SPICE Model Netlist to Schematics

texts:
Is there any software to convert SPICE Models to a schematics?
In other terms, I am looking for an alternatif of SpiceVision PRO


texts: Feedback for DC Motor Speed Control using PID

texts:
I'm working on a project in which I have to control the speed of a DC motor using an analog PID(using op-amps). The input will be provided with a potentiometer. The issue is that I can't figure out how to provide the feedback(a voltage proportional to the speed) for this system without using a microcontroller, which I'm not allowed to use.

I was told it could be done by somehow coupling a potentiometer with the motor, but fail to understand how this would provide velocity feedback.

Is there any, not too difficult way to get velocity feedback of a motor without using a microcontroller?


texts: Synchronous Motor Power and Frequency Relationships

texts:
I'm having a difficult time trying to understand what effect the frequency of a power supply has on the power of a synchronous motor.

For example, if the supply frequency were to increase from 50Hz to 60Hz (with the supply voltage remaining constant), what effect does that have on the motor power? I understand that the synchronous speed of the motor will increase to match the supply frequency. Does the power increase proportionally by drawing more current at the same voltage?


texts:
I need to run spectrum analyses on various values of capacitive feedthru style filters.  I have a RIGO spectrum analyser, but seem to be getting response curves that don't seem reasonable.  Am using the internal oscillator, am nulling the instrument as per recommendation.  Type N to BNC adaptors on both rf connectors on front panel, connecting each to a short RG-58 cable with BNC connectors.
Then, inserting the DUT into an alum. box with a bulkhead wall in between.  Each end has a BNC connector.  The center contacts are connected to each side of the filter, which is secured into the bulkhead. Short wires extend from each BNC center pin to the terminations of the filter.
Going through the setup procedure on the analyzer, the resultant curve do not look intuitive.
The freq. breakpoints are 100KHz, 1MHz, 10 MHz, 100 MHz, 1 GHz.
Some suggestions

#1) I called this a 'filter', but that's what they call it.  These are basically feed thru style capacitors.  The ceramic is either a discoidal type (like a typical flat washer) or a ceramic tube.  The wire going through the center of the ceramic is one element of the capacitor, the outer housing (gold or sliver-plated steel) forms the other element of the capacitor.  These are NOT classic 'filters' in the pure sense of the term, since there is no "L" component (in the form of a ferrite bead, etc.  They're called 'filters' more because of the application in which they find the most use ... as conduits for d.c. sources into 'black boxes' of sensitive circuits.  Rightfully, most people would just call them bypass capacitors, since that's their main function.
Here's a schematic of the 'filter':   ---| |---   That's all there is to it, a simple capacitor.  It seems to me that doing a spectral sweep of a simple capacitor is a non-entity, and with fading memory (over 75), I can't recall some critical points, except knowing that IF I want the characteristic impedance of a capacitor, I apply the typical equation   Z= 1/(2PIf*C), for the frequency range of meaning, and then I'll know the impedance range of the element.
It is Friday evening here now, so my next opportunity to use the spectrum analyzer won't occur until Monday morning.
The last time I used a spectrum analyzer was in the early 1970s, when I was a project engineer for a radio communications company, which manufactured a very broad line of comm. equipment. Several of the linear amplifiers that I designed had to meet FCC TYPE ACCEPTANCE for shipboard use.  We had a PANORAMIC unit, which was actually several chassis mounted in an open 19" rack.  As I recall, it was an arduous task to gather the data since each marine band (SSB, AM 2 to 22MHz) had to be individually documented.  There was NO automation or data capture back then.


texts: How are long runs of LED strip controlled from a single switch/tuner?

texts:
I am trying to configure an LED light strip installation, but it seems that a lot of the existing equipment solutions are not designed for high power lighting systems. For example, one supplier quoted me a configuration with 5 controllers. Obviously, the owner does not want to turn on 5 switches every time they turn on the lights in the room. Below is shown a typical configuration diagram:

As you can see from the diagram, it has DC power flowing through the controller to the strips. The problem with this in my case, is that the installation in one of the rooms has 40 amps (24V) of light strip. Since the typical controllers are rated at 5-10 amps, how is this situation handled?


texts: Right wireless tech for 1.5Km with LOS but small-power availability at remote end?

texts:
I'm not very experienced in wireless space.

I wish to communicate with an Arduino device stationed at the back of my property, roughly 1500 meters away.  I have line of sight, although blowing trees may temporarily get in the way.

Running cable is not feasible with regard to cost, distance and terrain.

I have no problem with a directional antenna on my end, but that is less appealing at the device's end as I want to keep it as light, small, and low-power as possible.  If directional at both ends is required, I can make it work.

Wifi?  Zigbee?  Certainly not bluetooth.  Cellular?  Something else I should look at?

At the remote side, my hope is that it can run on battery alone, for at least the order of months.  I currently have it running at ultra low power of only 54 uA for all but 9.6 minutes of each day.  Roughly 100mA for those 9.6 minutes, while it is gathering sensor data and making decisions on what data to send.  As it is, on battery I can run it for nearly 10 months on a 5Ah battery.  I have no idea how much the wireless equipment will impact that.  If I need to add a solar panel, it wouldn't be the end if the world.  Still, energy efficiency is a consideration.


texts: Small solar panel + ultracapacitor + zener

texts:
I am buliding a very small and low power "intermittent" sensor, powered by a tiny solar panel and an ultracapacitor. It works with a voltage from 1.9V to 3.3V, but the transmitted radio range greatly depends on it.

When I used an LDO voltage regulator I had to "target" a lower-than-necessary voltage for it to work properly. But having a constant voltage is not required in my case: I would better benefit from a higher power when the sun is shining a lot.

What are the tradeoff if I ditch the LDO regulator and I simply cap the maximum tension with a Zener diode as shown below?

I do not want the zener to draw energy while the circuit is idle, due to its leakage current. So I moved it "before" the usual schottky diode.

Also, I use a slightly higher zener value to compensate for the schottly voltage drop, so as to charge the cap to the maximum voltage that the circuit withstands.

Still, I have the weird feeling there is a drawback. Am I just too cautious?

Also, the tiny solar panel will probably not reach its dangerous 4V level when loaded. Actually, I could even wake the MCU up to keep a load when the tension is "too" high, but this is a riskier business I guess.

simulate this circuit – Schematic created using CircuitLab


texts:
I was wondering if it possible to construct a reliable burglar alarm, based on an volumetric air pressure sensor. It should measure changes in air pressure when door or window is opened.
We have made some tests with an air pressure sensor, but unless the door is opened very fast, the signal is burried within the sensor noise.
As our knowlegde of these types of systems are limited, we hoped someone here would know, if it even is possible.
Which sensor ( part number) and circuit would be perferred for such a system?


texts: biploar amplifier, voltage gain, and determining resistor values

texts:
i've been struggling with this problem. it says that i need to set the resistors of this circuit that produces the highest voltage gain as possible. i got the voltage gain equation, but don't have a clue of how to set the resistors' values. any suggestions? i also have to see the 3dB bandwith but i didn't even get to finish the circuit values...  the hyperlinked number'2' is the voltage gain equation

]2


texts: How to connect PICAXE 08m2 to computer using audio jack

texts: I am trying to my PICAXE 08m2 to my laptop using a 3 ring audio jack to USB connector and a TRRS breakout board. I only found out that these are different from the official AXE027 USB Cable Driver. Is there any way to program the 08m2 using what I already have?


texts: non-technical understanding of current flow behavior

texts:
Just today I was suddenly curious to know how a closed circuit works. I have learned some basics so far. I understand how it is supposed to work and mostly why. But some things elude me, and my searches to understand the behavior of current always leads back to the conventional vs electron flow debates.

Would appreciate help in wrapping my head around some concepts. I likely won't pursue anything further, I really just want to understand how the current moves.

simulate this circuit – Schematic created using CircuitLab

I have no idea if this circuit actually works, but ignoring the units and sticking to the layout it's the best way I can ask by example. So I guess using conventional flow, if the current reaches that first fork, what happens?

Does the current travel to both LAMP1 and LAMP4 regardless of resistance? Does the amperage of the current now split in half or does it remain equal or proportional based on resistance for both paths?

Assuming the current did travel to LAMP4, would it from there still try and travel to LAMP5 or would it only continue to LAMP3 because the negative end of the battery is not in that direction?

And what about LAMP5 anyway.. would it be receiving current from both sides?

Would the current amperage leaving LAMP3 possibly be different than that leaving LAMP2? If so, what happens when they meet where the wires intersect?

Would really appreciate the insight.


texts: How to shift cursor of a ST7032i based LCD?

texts:
I am using a MIDAS MCCOG21605B6W, I2C interfaced, COG type LCD.

I am also using a PIC16F616 microcontroller to interface it and I am bit-banging the I2C protocol.

I can initialize the LCD, write to the LCD, navigate the cursor to whatever position I like to, clear the LCD, set the contrast, power on/off the LCD, etc. Everything works, except for commands 0x10, 0x14, 0x18, 0x1C, which are for shifting the cursor or the display, left or right. How can I make them work? What I am I doing wrong?

I have noticed one thing; when looking from different angles, and when I give 0x14 command (shift cursor to right), or any other shift commands that I have mentioned in the above paragraph, I see some kind of contrast change, though it is not very apparent, you have to catch the angle.

I have also, for test purposes, sent only "Shift Cursor to Right" command, which is 0x14, then investigated it on the scope, and SDA, SCLK lines and data seems fine, it transfers, and the slave acknowledges.

I have created a dummy I2C tester code to show the traces for SDA and SCLK on the scope, as follows. You can see on the scope-shot that the LCD creates an ACK in the 9th clock pulse by pulling the line LOW.

software_I2C_startCondition();
software_I2C_sendByte(0x7C);
software_I2C_stopCondition();

Below are my I2C routines and my LCD interfacing code.

software_I2C.h

software_I2C.c

main.c


texts: Does USB Host always supply power on VBUS?

texts:
I know a fair bit about USB, but for some reasons I am not able to answer this question myself.

Does the USB Host port (let's say USB 2.0) always supply 5V on the VBUS pin? If not, how does it detect device connection?

For device (bus-powered case) it is easy to detect host by sensing the VBUS pin, but for this to work USB Host should always provide 5V on the VBUS pin, which results in me asking this question.

One thing I can think of is it can provide 5V, 100mA by default, and more only after successful enumeration. But as far as I have observed, the USB ports on laptop have 5V VBUS enabled by default and not limited to 100mA, so I just want to understand from USB standard point of view.

Any reply will be much appreciated.


texts: Switching power to a slave module without wasting power

texts:
I've got two circuit modules, let's call them master and slave.

The master  controls whether the slave is powered (5V and 3V3 rails). Both modules share the same power supply. The slave will be built by somebody else, so I'm planning to use a LTC4217 hot swap controller IC to protect the master from any faults on the slave.

From reading through the LTC4217's datasheet I couldn't find a simple way of using a microcontroller to switch its output on or off. Perhaps there is an obvious example that you can think of though!

Instead, I'm trying to find an alternative method. The slave will be on the vast majority of the time, and the master will be switching it off for approx 0.25s every few minutes.

MOSFETs seem ideal, however they seem generally used to switching things on momentarily - i.e. normally off. My slave is normally on. I've heard that 'depletion mode' MOSFETs could be a potential solution but I am not knowledgeable with regards to them.

Am I overthinking this? Is there some simple normally used solution staring me in the face?

Cheers.


texts:
I would like to build a circuit to mute an RF Class A amplifier to supress noise while I am not transmitting. I transmit ~20 us long pulses at ~1-5 MHz. In the time between the RF pulses, I would like to suppress the noise generated by the amplifier. The peak power is 300 watts (50 Ohm system, meaning I reach ~180 Vp during the pulse). However, the duty cycle is low, typically < 5%. Ideally switching times (arm & disarm) should be around 1 us. I have a 5 V AWG marker signal that I could use to control the blanking circuit.
Do you have a circuit idea for me?
Peter
PS: The amplifier can handle reflection.


texts:
I have a system clock, I would like to use the system clock to drive a DAC clock. I want only send the clock to the DAC when I enable it.
"Anding" the signals together is the first thing I tried:

DAC_CLK <= DAC_SHIFTOUT_EN_H and SYS_CLK;--Output to DAC clock pin

The problem is in simulation there was a runt from the clock going high and the combinatorial logic delay on the DAC_SHIFTOUT_EN_H signal. So I decided to go a different route: I used a this to try and buffer the clock, which worked in the simulation but doesn't work on an Altera Max10 Fpga.

DAC_CLK_COMB : process(SYS_CLK,DAC_SHIFTOUT_EN_H)
begin
  if  DAC_SHIFTOUT_EN_H = '0' then
    DAC_CLK_TEMP <=  '0';
  else
    DAC_CLK_TEMP <=  SYS_CLK;
  end if;
end process;
DAC_CLK <= DAC_CLK_TEMP;--Output to DAC clock pin

I found some resources on the internet about Gating clocks, but they make recommendations based solely on timing which I don't care about because I'm not using logic downstream.
What is the best way to use a clock enable for an output without delaying it by a clock if a delay of less than a clock cycle is acceptable?


texts:
I was looking to protect my 5V device from 20V, since the charging port is Type-C, but used for USB 2.0 communication without any power delivery or bc. Expected to be charged with 1A-1.5A from the wall or USB 3.0 900ma (btw would I need any special IC to request 1A? I think not, but can be wrong)
The protection IC solutions always require power provided to that protection IC (3.3V or 5V). I wanted 0 consumption protection circuit, when charger is not plugged in.
So I quickly conjured up this little circuit on a napkin. Quickly threw it into circuitlab simulation thing, and it works (simulates) as intended. The load is disconnected as soon as Vin reaches 5.5-6V. So the thing works the way I want it to work.
Alternative solution would be to throw in some small linear regulator, tolerant to 20V+, which would power the protection IC (but I kinda feel proud that I invented this circuit in like 5 minutes).
I would like to have some feedback whether my circuit doesn't miss anything critical or makes sense at all. Of course I know I'll have to pick parts carefully in terms of leakage currents and threshold voltages etc. Or am I simply overcomplicating stuff and a tiny USB-powered LDO with protection IC is a no-brainer.
P.S. can't provide circuitlab link, the thing wants paid membership, if anyone wants to reproduce the circuit, I tweaked MOSFET thresholds down a little (default ones don't work at 5V I think). Caps optional.