texts:
I've been trying to reverse engineer the communications protocol used by my home domotics, which I was able to determine uses a RS-485 implementation.

I'm using a USB RS-485 serial dongle and an oscilloscope and it's not been easy so far (I've ordered a cheap logic analyzer to see if I can get further).

So far I've determined that it uses 38.400k baud rate (26 µs cycles on the DSO) and 8 bit data (7bit on the serial analyzer makes no sense EDIT: haven't tried 9 bit when wrote this, maybe it's 9 bit... full edit below).

At this stage I'm dumbfounded on which kind of parity, significance and stop bits it is using.

---EDIT---

(for clarification of the question(s) being asked, premature data dumps were removed and added new data from the logic analyzer that arrived in the meanwhile):

(full-time stamp dump link)

this is the start of what I'm sure it's a timestamp that's sent every minute (that ASCII string will read space-yymmdd.... so we know those 3 bytes must always read ' 19'). Messing around with the settings on the logic analyzer software I seem to conclude that:

there is no parity bit (parity errors with either odd/even)
8 bits per transfer always results in framing errors (regardless of 1, 1.5 or 2 stop bits) unless I use "special mode multidrop bus" which frames the extra bit as the address for the first byte and everything seems to fit (those are the settings of the screen dump above: 8b/2stopbits/MDB)
I can also "fit" everything without framing errors if I interpret it as 9 bits per transfer without MDB.

what I'm trying to figure out: data bits per transfer (8? 9 bits?) stop bits (1, 1.5, 2?) and could this be a multi-drop bus communication protocol?


texts: I have a Radio control circuit for a boat I made and I don't really know which kind of batteries I have to use. Can someone explain me the differences (A, AA, AAA, C, D) and others if there are) and which one is better suited for me. The tension of the batteries doesnt really matter. Is it only the mAh value that changes or are there other differences?


texts: Why is there a difference between how AC is connected and how DC is connected? For DC, the polarity of the connection matters, but for AC it doesn't.


texts: In an op-amp, what does connecting the negative supply to the feedback do?

texts:
I'm trying to understand how the LM317 works?
I've found that a good simplification is the following:

So a practical example would be

simulate this circuit – Schematic created using CircuitLab

Where R2 corresponds to a load.

What I don't have clear is the effect of connecting the negative voltage supply of
the op-amp to the emmiter, instead of earth.

I guess that this is done so there is no need for another pin in the LM317, but would make any difference?
The simulation, doesn't show any difference, but could it affect the stability or something like that?


texts: Why are battery-powered appliances and tools specified in volts?

texts:
"Powered with a suction of 18 volts"

Isn't this just a nonsensical "bigger is better" measure?

The thing you really care about as a customer is the motor's torque or power or RPM or something like that.

Is there any direct relationship between supply voltage and one of these measures of motor performance or battery life?  Doesn't seem like it to me, since every motor is different, could have a different number of windings, different number of coils, etc.


texts: Problem using Quad buffer gate (SN74HC125N)

texts:
I've ordered a couple of quad buffers (SN74HC125N) from AliExpress and they don't seem to behave.

I tested it using an Arduino Uno with the following wiring:

(Arduino pin -> SN74 pin)
1. 5v -> 14 (Vcc)
2. GND (Under 5v) -> 7 (GND)
3. GND -> 1 (OE not)
4. 5v -> 2 (1A)

The output (1Y) was connected to a led + resistor, sharing the Uno ground.

Here's a schematic (I couldn't find the same chip but it has the same pin numbers) :

This configuration completely shut the Uno down (On Light is off, USB disconnects). It shuts down the immediately after I connect pin 1 to gnd.

I tested 2 parts this way, both gave similar results. Am I doing something wrong?
Could these parts be faulty?


texts: I was under the impression that arcs form due to high voltage, that the breakdown of air was typically 3 million volts per meter. However, arc furnaces typically use low voltages, around 30 to 40 volts, and high amperages, usually a couple hundred amps. Do arcs form from high amperages too, or do they form from high power or what?


texts: STM32F7 device freeze: cannot access registers

texts:
I am encountering random freezes with the STM32F7. This issue is difficult to debug as any debug session launched in Eclipse crashes when trying to halt the core, which makes it impossible to see where in the code the freeze occured.

Similarly, I am not able to access the device registers to inspect the program counter, the stack pointer and the IPSR, either via the eclipse debug session or using the ST-Link Utility software (the device resets when connecting and the state is lost).

I would appreciate any information on how to extract the device state when frozen, or whether any states can be recovered after a reset. Also if this situation sounds familiar to anyone, please let me know if you found a root cause. I am available to answer any questions and provide more detail.

additional details

(a) The hardware - I'm afraid I can't give you too much info here, it's a custom proprietary  design.

(b) The history - This freeze issue has only become a problem recently. When I retested our older code however, the issue was seen, albeit less frequently (I think). I have been reverting  bits of code to see if the issue still occurs. The issue is that I have no logs or debugging capabilities when the device freezes, so I cannot pinpoint where the code is failing.

The issue occurs infrequently, so it is difficult to say whether or not a change has had any effect.

(c) I haven't tried reducing the (system?) clock speed, and I will retest the device more thoroughly with different connections removed.

(d) Failure rate is roughly 1 failure per device per day, but it is difficult to quantify any improvement/regression (device is running all day).

(e) You ask about capturing data after a reset, but you report the problem is the MCU "freezing", not that it is resetting. I guess (but it isn't clear) that the problem is always that the MCU freezes. It's you who can perform a manual reset, and you are asking whether any useful info can be captured after manual reset. Is that correct?

Correct. Retrieving info during the freeze would be even better though.

Debug steps

(i) This problem is not reproducible with a test despite my best efforts.

(ii) what you are doing after that e.g. are you performing a manual reset?

Trying to read the registers, pinpoint where the code hung.


texts: DIY adjustable buck boost converter with serial interface

texts:
I'm looking for a chip or schematic designing an adjustable buck-boost converter for charging supercapacitor cell with CC & CV capability and control it using the microcontroller serial interface. the output must bear 0-60 volts with at least 5A current. an example is attached from Droking company.
any idea?
https://www.amazon.com/DROK-Regulator-Converter-Transformer-Capacity/dp/B071LGTTRN


texts:
Basically I will be calibrating circuits to a high degree of precision. Keeping it minimalistic, I figure all I needed for that are resistor networks, voltmeters and a few high precision voltage references. Like I said it has to be very high precision, so I figure the voltage differences would be in the microvolt range.

I've looked at different options from expensive high precision lab voltmeters to oscilloscope preamps (I suppose it could be adapted as a preamp for a voltmeter?). They are all so expensive.

Since my circuits have to work both with AC and DC signals, we could simplify everything by only calibrating against DC signals. So noise becomes a lot less of a problem, since it's DC.

So now I figure, just get a Low Noise Instrumentation Amplifier (or preamp) that will amplify by a fixed factor of 1000, to bring the microvolt to millivolt range, which my multimeter can then measure.

Is there any problem with this whole approach? If you have really good schematic designs for an Instrumentation LNA, can you guys share it with me?


texts:
I just want to clear my understanding about a basic source follower circuit. Following is the circuit

Here is my question:

Considering Vi > Vgs(th);  Vo = Vi - Vgs. Also Vo = Id*Rs as shown in the picture. Now Id is defined by Vgs*gm. That much current MUST flow. If Rs is big then Vo will be high enough which will reduce Vgs to be less than Vgs(th) and drive the NMOS in cut off. Is my analysis correct?


texts: Troubles reverseengineering a weight scale

texts:
I'm starting a project of wireless body scale, so I bought a scale on Amazon to see the electronics inside.
The scale uses 4 load cells, a half-bridge, 4 metal electrodes, a Bluetooth module and a tactile module.
Unfortunately because it was a cheap scale, there is resin on one of the only chips of the board. It seems to be an all-in-one chip.
Do you have any idea what chip that can be?
I saw that a commonly used chip was the HX711, but this chip doesn't handle the metal electrodes for body composition, so I don't think that's it.
Here are the pictures of the PCB:


texts: Laying out a 10-pin JTAG/SWD connector on a final design

texts:
I'm designing a board with an ARM microcontroller on it (LPC1347FBD48) and I want to include a 10 pin jtag/swd connector, as is standard, for in-circuit debugging of my final design. Here is the pinout (datasheet pg9):

(don't mind the cut-off text on pin 4, it doesn't have an important signal on it.)
Relevant signals are: TDI (32), TMS (33), TDO (34), TRST# (35), SWDIO (39), SWCLK (29), SWO (28).

My concern is that the specification for the standard header indicates that certain signals should be connected together (TMS/SWDIO, TCK/SWCLK, TDO/SWO) and these signals are on different pins. Am I supposed to just tie these signals together and route them both to the appropriate pins on the header?

Let's say I tie TMS and SWDIO together on the header. During normal operation, these pins would be connected to GPIO signals, and since they're tied together, I can't use both of them as outputs simultaneously, correct? (unless I put some kind of buffering circuitry between them)

There's some kind of example implementation here (it's the schematic for the LPC1347 lpcxpresso board) but I can't make heads or tails of it. It appears that, on the LPC1347 side, the LPCXpresso board has simply left the JTAG signals unconnected, and only uses the SWD lines (see schematic pg5). Is this an acceptable implementation, and if so, should I duplicate it (or not?) and why?

After reading this question, I'm also kind of worried about what signals should be pulled up or down, so if there are any comments on that, I'd appreciate them as well. I peeked through the question chain left by that user, but couldn't find much of a concrete answer for what pullups/pulldowns should be used (and more importantly, why).


texts: CMOS Buffers minimum voltage for logical high

texts:
I'm looking at the datasheet for a non inverting CMOS buffer CD74HC4050 What is the lowest voltage that can be placed on 1A to cause 1Y to be logic High? I know it's somewhere in the datasheet but I new to this and don't know which value. Thanks
Datasheet https://www.ti.com/lit/ds/symlink/cd74hc4050.pdf?ts=1609459927711&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FCD74HC4050


texts: I wanted to program my AtXMega16A4U with an Atmel ICE Basic, using Atmel Studio, but even if the supply voltage on the µC is at the perfect range (3.3 V) I get the error "Read voltage is outside of operating range: 0.8V" (Voltage does not vary). What can I do to find the problem, and how can I fix that?


texts:
I'm trying to feed the LM2596 (DC to DC) booster a 9V battery. Now, I see that it has a minimum voltage required of 3V. My question is this:

What happens when my 9V battery drops below 3V? Would that damage the booster, or it would just stop working? Would a minimum voltage drop increase the overall temperature on the LM2596?


texts: What's the best way to mount this on a PCB so that it is more reliable? Should I go with the flat tabs an no holes like they show and just solder the tabs to the dedicated pads or bend the tabs and put them into holes and solder that way?


texts: So I am trying to get started soldering, but I was wondering if there was any common household component that I could somehow take out the soldering wire or flux. Although any alternatives will be helpful.


texts: Effects of no-clean flux or RMA flux residue on signals

texts:
I keep on hearing that no-clean solder paste or flux  is bad for analog or digital signals because it makes analog signals "noisy" and promotes cross talk on digital signals.
Like this claim:

Flux residues can add noise on analog-to-digital conversion circuits.

Source: Mike Jones - Expert Comment
or this:

'No-clean' fluxes have been found to be electrically conductive and
are not easy to clean (requiring strong solvents and scrubbing).

Source: answer to "Why do we need to remove flux from circuit boards?" - Spehro Pefhany
I realize that it's probably not good to have anything on the surface of the PCB between traces. I realize that corrosion is bad. But if no-clean residue or RMA flux residue is left on a board, what happens? Most people say, it's bad don't do it.
My question is, through what mechanism does leaving a residue on a PCB affect performance? How does it affect performance Is it a parasitic resistance? Parasitic capacitance?
I could see a promoted parasitic capacitance with a residue and leakage current. How much?
Is there some other mechanism besides promoting cross talk that I'd have to worry about?
Has anyone ran into this problem directly?
Edit:
What is the mechanism for this noise? Can it be traced to some physical process?


texts:
I want to apply Kirchhoff's Voltage Law on the circuit showed below. When I apply it, I form this equation : $$-20 + Vx - 3Vx - 6i = 0$$

However, my book forms this equation:

$$ Vx + 3Vx + 6i - 20 = 0 $$

What mistake am I doing here ? I'm assuming clockwise current flow.

simulate this circuit – Schematic created using CircuitLab


texts:
I need help solving this task, if anyone had a similar problem it would help me.
The task is:
What is the equivalent resistance in a circuit?
I tried the following:
\$Re = \frac{(1000+1000) \times (1000+200)} {(1000+1000) + (1000+200)}  = 750\ \Omega\$

Is it exactly 700 or 750 ohms ?


texts: Using Arduino Mega to wirelessly transmit IR signals

texts:
I’m trying to control my Air Conditioner using an Arduino Mega. Just like in this tutorial here.

But unlike in the tutorial, I’m planning on using an ESP8266 wifi module instead of an ethernet shield, and also the Blynk library. I’ll also be powering the arduino using an ACDC 12V 1A Adaptor.

After further googling however, i became confused.

For the IR LED, over here, and here, it says that continuous 100mA is the absolute maximum rating, and 1.5A is the surge forward current. While the Arduino Mega can only supply 40mA per pin. Does this mean i can’t power the IR LED with the arduino? If so, how do i use it with my arduino then?

Is there any other boards i can use instead of the Arduino Mega + ESP8266 for this project? I wanted to use an ESP32 because it’ll be cheaper. However, it seems that i can’t use it because the ESP32 can only receive IR signals.


texts:
I am trying to read data from / write data to a Xilinx Zedboard (FPGA platform) using an external microcontroller via the I2C bus. The schematic for this would currently look as follows:

As you can see in the schematic, the microcontroller uses 1k pull-up resistors for the I2C bus.
I noticed that after the first transaction, the microcontroller will not read/write anymore data.
I cannot debug this on the microcontroller because I cannot make any changes to the microcontroller software. The microcontroller has been verified to work correctly with other I2C peripherals.
When I look at an oscilloscope trace, I can see the Zedboard does not pull down the SDA line to the logic low level of the microcontroller while sending an ACKnowledge. I think this might be the reason why the transaction fails. See the capture below, where you can see the SDA low of the Zedboard is about 600 mV above the SDA low of the microcontroller.

I think the reason for this might be because the pull-up resistors are quite low. However, I cannot make any changes to the microcontroller board, and therefore I cannot replace them for higher resistances.
Do you have any idea what might be the problem here and how I can solve this?
Thank you and regards.


texts:
New to Altium here, so my apologies in advances if some of my terms are off.  Anyways, I'm looking for a setting that enables traces to be highlighted when clicking on a pad or via.

This is the result I would like that I have set up on a separate computer.  The pad was simply clicked and all traces on all layers that connect to it are highlighted, making it easier to ensure they connect to the center.  On another computer, I have this:

I don't know what this setting is called, much less how to configure it.  Any ideas?


texts:
I want to sense mains voltage at a frequency faster than 5000Hz, with a microcontroller. The idea behind this is to visualize the actual shape of the AC voltage, and eventually to compare it with the current to determine its cosphi.

I have read that I need to use a optoisolator to isolate both circuits. How do I choose which one I need for an analog output of the scaled voltage?


texts: LoRa CSS modulation chip rate and bandwidth

texts: In this question, as well as in many other detailed explanations of how LoRa CSS modulation works, each analysis starts by saying that the chip rate, Rc, is equal to the bandwidth BW. Why is that?


texts: Need help reading a schematic, is this a 220k log b pot?

texts: This is saying a 220k log b potentiometer for the tone pot VR8, correct? That is such an extremely odd value, but I don't see that sort of notation very often either and I wanted to make sure I'm not misinterpreting. Thanks!


texts:
In RF front-ends the diagram shows an antenna followed by a band-pass filter.

I am also working on a project involving a micro-strip patch antenna followed by a dual-band band-pass microwave filter.

The antenna resonates at a particular frequency and the received energy is transferred to a filter which further passes only required frequencies which seems to be redundant.

Why not just design an antenna with the required frequency response to avoid designing a separate filter after the antenna?

Thank you.


texts: Difference between LVDS SerDes and FPD-Link III SerDes?

texts: I'm new to the world of video interfaces and am working on a project in which parallelized video stream data is transmitted and subsequently received by processing components on the other end of an interface. I've been exploring several different technologies such as FPD-Link, but I am uncertain about how it is different from existing LVDS SerDes given that it implements LVDS. Is it just the back-channel and built-in signal integrity tech? Why would one choose FPD-Link for over standard LVDS?


texts: For a project I'm designing, I'm using an IS42s32800 (TSOP) SDRAM with an LPC1788 (QFP) microcontroller. On the PCB I have 4 layers with a ground plane right below the top signal layer and a VDD plane right above the bottom signal layer. Average traces between the CPU and the RAM are 60 mm long with the longest trace being 97 mm, the clock line 53 mm long and no line has termination resistors mounted. What I'm curious about is whether it's absolutely necessary or not to have termination resistors on DRAM lines. Would this design work without them or should I not even bother to try it without the resistors?


texts: Dotstar (APA102) LED strips decoupling capacitor on PCB

texts:
I am trying (based on very distant memories of EE in college) to design a fairly simple Arduino shield PCB to control several LED strips in parallel. Each strip would connect to its own 4 pin terminal block, providing 5V, GND, clock and data to the strip.

The schematic below has a few more features but the problem I'm having can be boiled down to the following elements:

one 2 pin terminal block connects to an external regulated 5V supply (this Pololu D24V150F5)
several 4 pin blocks connect to LED strips
header pins attach this whole contraption to the shield headers on an Arduino Mega

My problem is on the power distribution / regulation side of things.

According to this, it's a good idea to place a capacitor between 5V and ground as close to these programmable LED strips as possible.

This sounds simple enough in theory but I am having a hard time putting it into practice on a two layer PCB.

My understanding was that, for many reasons including ease of routing, it would be reasonable to have a ground plane on one side and a power plane on the other. I don't understand how to actually route traces in such a situation.

If I just drop my capacitors on the PCB, they show as already correctly routed, since they do connect to 5V and GND already through the respective planes.

This feels wrong however (why have a cap "for each strip" if they all just connect to giant ground and power planes anyway?), and this question here leads me to believe it is incorrect to do this, because noise would "flow around" my capacitors, essentially?

Hence these questions:

Is it reasonably to have one capacitor per strip output, for safety?
If so, how should they be routed to avoid having them just connect to the ground and power planes directly?
If not and if the right solution is just one or two capacitors, where should they go and again, how do I deal with connecting them with "the shortest possible traces" to where they need to go, instead of just blindly attaching them to the power and ground planes?


texts: Switching Mode Supply providing half of AC current

texts:
For my senior design project, I'm part of a team tasked with coming up with a driver circuit to drive a constant sinusoidal current having a peak of 1.5A through a coil for a range of frequencies from 1kHz to 20kHz.

My teammate came up with a push-pull current source configuration for the driver coil, here is a schematic of it:

I'm tasked to come up with the supporting circuitry for the negative end of the drive coil, so a 20V DC input coming from a wall adapter needs to be converted to -18V.

The converter I'm looking at is the LTC3704 switching inverter. I was reading the datasheet for it and it is using current mode control. I'm wondering if this converter is feasible to use in this particular design, since its switching frequency range is from 50kHz to 1MHz, and the coil impedance in this case is dependent on frequency.

I'm curious and unsure if the variable impedance of the coil will affect the ability of this converter to output that constant current it needs. Am I just looking too much into this issue?

Also, will the current source control circuit interfere with this converter? From what I know, the inductor in this converter outputs a voltage ripple due to the switching.

What should I be looking at to come up with a working design?

I apologize if this question is not specific enough or unclear. I'm a bit confused at the moment.


texts: STM32 chip specs do not match the datasheet?

texts:
I've recently purchased a couple of STM32L152R8T6 chips from a local electronics shop.
According to the page 11 of the datasheet, this chip is supposed to have 10K of SRAM and 64K of FLASH.
However, when I query one of those chips (that I've already soldered onto a perfboard, along with simple transistor UART 3.3v<>5v level shifter) with 'stm32flash', it responds with this:

$ stm32flash -b 115200 /dev/ttyACM0
stm32flash 0.4

http://stm32flash.googlecode.com/

Interface serial_posix: 115200 8E1
Version      : 0x30
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0416 (L1xxx6(8/B))
- RAM        : 16KiB  (2048b reserved by bootloader)
- Flash      : 128KiB (sector size: 16x256)
- Option RAM : 16b
- System RAM : 4KiB

And the linker script from STM32L1xx Standard Peripheral Library v1.3.1, for Medium Density devices, sets the size of FLASH to 128K, and the size of RAM to 16K.

The questions are:

Why memory sizes do not match the ones described in the datasheet?
Do I have some dodgy/fake/counterfeit chip?
What memory size should I state in the linker script? (that one is probably a bit offtopic).

I've also tried to use it with ST's own Flash Loader Demonstrator (through Windows 7 on VirtualBox VM, don't have it on the actual hardware, maybe I'll test that later), but it keeps saying that it's an "Unrecognized device... Please reset your device then try again".

I use an Arduino Mega 2560 as an USB<>UART bridge, using RX0/TX0 to connect to STM32. Of course, Arduino's AVR chip is disabled by wiring its /RESET to GND.
With such setup, I can easily, without any errors along the way, upload and verify (with stm32flash and a serial port) a simple program to blink a LED, and it will work. I've also played around with integrated DAC and ADCs, they also seem to work just fine (although a bit slower than I expected, but that's probably not related - I'm only starting with ST micros).

I've also stumbled upon this thread that might have an answer to this question, but I don't know if it explains why ST's own tool is not able to see the chip.


texts:
There are 4/2 USART/UART ports in STM32F407 (Page 15) MCUs as shown in the image. I need 4 UART ports in an application. I wonder if its possible to use 2+2 (UASRT+UART) ports for my purpose in this MCU?

Edit:

Included link to the datasheet. Page 15


texts:
Hoping to identify what this 2-pin connector is so that I might 1) order more of them and 2) order a crimping tool that would work with them. I believe the wire in the photo is 26 gauge. Is this enough to go on? Can provide more photos if necessary.

EDIT:

Here is another photo of the connectors:

And here are a couple of the male end:

EDIT 2:
It occurred to me that I may not actually need to know what type of connector this is, as my real need is to be able to cut these wires to shorten them and then reconnect the existing connector/housing. From the photos, it appears that these housings are an IDC and won't even require crimping? Can anyone sanity check that line of thinking for me? Is it possible I don't need any equipment or parts or knowledge of what this thing is if it is in fact IDC?


texts: CPLD best practice for resetting a counter

texts:
My application has a bog-standard count-until-a-certain-number-then-reset-the-counter section.  My experienced friend tells me that when using actual chips, it's common to increment the counter on the rising edge of the clock and reset the counter on the falling edge.  That way the designer has a lot of time to do what needs to be done before the next clock arrives.

But he's never used a CPLD and I wonder if this changes the rules.  Or if his information is technically sensible but not practically needed.

My design has something like

always @(posedge clock) begin (increment the clock) end
always @(negedge clock) begin (reset the counter conditionally) end

I'm not trained at all in electrical engineering, I just read and dabble.  But I can't let it rest when I don't feel I have a certain (n00b-level) understanding of what's going on.

I just read an example from a university course where the instructor didn't care about when the counter was reset. His design was something like:

always @(posedge clock) begin
    counter = counter + 1;
    if (counter == some_number) counter = 0;
    end

This leads me to believe I'm over-engineering, the instructor is instructing not building an industrial app, or the synthesis process handles such things.

Of course I could try it in the simulator or actually plop it into the CPLD.  Eventually this is going to be driving a powerful machine and it's got to work every time.  I can't have an edge case where the machine misbehaves.

EDIT - more context.  While it may not matter with respect to the answer, I am counting pulses generated by an encoder attached to a rotating spindle.  I have to count every one of them, and I can't lose any.

EDIT 2 - example of a loop that increments a counter, then on some condition, changes it.

module slow_count(
    input clk,
    output reg [3:0] count
    );

    reg[19:0] snooze = 0;
    always @(posedge clk) begin
        snooze = snooze + 1;            // Set the counter
        if (snooze == 1000000) begin
            snooze = 0;             // And change it here
            count = count + 1;
            if (count == 10) count = 0;
            end
        end

endmodule


texts: What would happen if you measured voltage between power strip GND/neutral an external object?

texts:
Probably a totally stupid question but I'm a novice trying to understand fundamentals.

If I stuck one multimeter test lead into ground or neutral on a live power strip with some things plugged in, then connected the other to e.g. a radiator or something metal that might be connected to the physical ground, would the meter show a voltage? Would anything short circuit?

Thanks


texts: How to drive a MOSFET from AC wih max efficiency?

texts:
Short version: if I needed to drive a MOSFET from mains AC, that will be switching (PWMing) mains AC as well, and needed to do this "fast and often"* how should I derive the power to drive it's gate from the same mains AC?

Fast = turning the MOSFET on or off as fast as it allows = sourcing/sinking as much current to/from gate as is it reasonable = 1+ amp per mosfet (IRF830).
Often = PWM frequency of in the range of 20-30kHz.

Long version: I am making a kind of sine wave dimmer for incandescent bulbs and for this I need to drive two MOSFETs (gates and sources tied together) that will PWM-switch mains AC. Everything will be packed tightly in a closed box, so I figured that switching MOSFETs on/off as fast as possible should keep them as cool as possible. I also thought I must use gate driver because my attiny (PWM source) cannot source/sink as much current as the MOSFETs are ready to accept. The only power supply that I got is mains AC and I need to step it down to ~12V to drive the gates and provide reasonable current so I can switch them "fast and often" in 20-30 kHz.

Initially I was thinking about capacitive PSU, but all schematics that I've seen were for very low currents. I didn't take chances designing my own, as I wasn't sure if it is feasible at all (for much higher currents that is).

Then I tried it with SR087, but the 100ma that it provides wasn't enough.

Now I am thinking of getting a open-PCB-type SMPS that gives me 500ma and use it to drive the gates. Something like this, for example. What I am not sure, is can I connect it's ground to the rectified ground from mains AC. I suppose I could, as the SMPS output is floating, but I guess there's only one way to find out. Here's a rough diagram:

It does not include optoisolated UART to attiny and filters that I have yet to figure out how to design. And 1k gate resistor is not neccesary 1k, I'll try to keep is as low as possible with the final choice of gate drive PSU.

Or is there any other way to drive MOSFETs from mains AC @10V+ and at least several hundreds of miliamps?

Thanks a lot in advance!

General info: I have very basic and limited knowledge in electronics and circuit design and no formal education. I do, however, understand all the risks associated with mains AC and take it with a healthy level of paranoia.


texts:
I've salvaged a linear scanner from an HP scanner cum printer. The scanner senor model is CA4B94. It's got two portions on a single flat ribbon cable. One is for the motor, so I guess it's safe to ignore that entirely. I need to use this sensor as a detector for scanning purposes.

Please guide me with how to start finding the pins on the ribbon cable and understanding their function. The IC is a custom with no details on it.


texts: Driving an LED with resistor directly from 3.3v GPIO pin of a microcontroller

texts:
Schematic

simulate this circuit – Schematic created using CircuitLab

I am a newbie in electronics and I am trying to drive an LED with a series resistor from a 3.3V microcontroller. The max strength of my microcontroller is 6mA and I have purchased an LED that has a forward current of 5mA and forward voltage of 2.9V (SMLE13BC8T from element14).

LED Datasheet - http://www.farnell.com/datasheets/2291105.pdf?_ga=2.248677317.314538259.1522008542-1628637695.1510818085&_gac=1.187272666.1519702428.CjwKCAiA_c7UBRAjEiwApCZi8b1AXd13x8uo1jKdDvDSS0hVLYvivMQv_-U7Wa3ZxPwHUqg1C72JOhoCITMQAvD_BwE

I did the resistor calculation and found that a 100 ohm resistor will be able to drop my voltage to a usable range for LED. Before testing this on the actual microcontroller I tried the LED - resistor combination by supplying 3.3V and found that the LED is super bright and heats up in few minutes usage. Hence I measured the current across my circuit using a multimeter and found that it is 71.6mA. I tried to increase my resistance to 200 ohms and the LED did not glow. Can someone help me to solve this. Am I using a wrong LED ?

I did search the forum for similar issues and did not find the answer, hence please don't close this as duplicate.


texts: Making a program that sends data to USB port

texts:
I want to create a program that is able to communicate to the USB port on my laptop. From this program I want to send data to the USB port constantly. Basically something like a hyperterminal, but more graphical. Like buttons, graphs etc. (GUI)

I never created programs, so don't know where to start.
I have experience with Eclipse, C-language and Java, if this is important.
What program should be better (and maybe easy to use) for my purpose?


texts: 2-time constant (On + decay) timer circuit

texts:
Required is a timer circuit to switch on an LED with 2 time constants, when a switch is depressed as follows:

when switch is closed, light an LED 10 ~ 20mA
when switch is opened again, keep the LED on for approximately 5s more
then fade LED  off for approximately 10s.
circuit voltage = 3v
assume a standard red LED , Vf =~ 1.8v
prefer to have  maximize brightness
small SMD low leakage caps <~22uF
no ICs that consume continuous quiescent current; but accept minimum idle current (< 0.25uA @ 25'C)

I'd like to use a mosfet to minimize voltage drop and maximize brightness.

I think that it would involve some chain of transistors or mosfets that are held on by capacitors, but I can't figure out how to keep it on full brightness for the first 5s, as they would start to fade immediately as the voltage drains out of the capacitor.


texts:
So after being informed on the Amateur Radio Exchange this isn't quite HAM/Amateur Radio, posting here.

So I'm, well, very new to general RF/radio in general other than basic WiFi, but I'm looking at the feasibility and cost of a long range (>200M between nodes, sometimes probably 500+M) in flat terrain, relatively low power (solar + 12V SLA, short term usage) and probably fairly low bandwidth needs (couple of hundred Kbps?), but bi-directional/fully shared. So in starting doing some searches/research, I came across SX1276 based module (https://www.adafruit.com/product/3072) that's relatively cheap, even if I need it for a few dozen or more nodes.

My concept is to use a fixed mesh, or star mesh topology as the distance between a centrally located node and the furthest away may be as much as 2+ km, possibly 3+. That's long term planning, my first attempt would likely be a handful of nodes perhaps 400-600m from a central point. The advantage of this area is flat as a pancake, although lots of varying height temporary structures, although the antennas would not be placed very high, 6-10 feet off the ground so they may or may not have perfectly clear line of sight.

Based on my reading of LoRaWan, it's really designed to be a central star network topology without much bi-directional communication, in general. And LoRa could, in theory, perhaps, do a mesh network but it'd need a non-trivial amount of software layered on top of the transceiver access code.

I did come across https://ieeexplore.ieee.org/document/8048465/ which is very interesting. In my naive reading of it, it implies that if you simply immediately re-transmit each packet once received (and ignore it once you've re-transmitted it) you essentially can flood a mesh network of LoRa devices reasonably efficiently despite collisions and such. I did see there's more to it than that with seeing to do offset concurrent transmission and other bits that I didn't get to. If that concept actually works reasonably well, it shouldn't be too difficult, in theory, to put a basic layer on top of a LoRa transceiver to spread data through a mesh (that doesn't actually know about each other really) in an Easy™ to implement fashion which spans several square kilometers.

So...disabuse me of this and show me how naive and unknowing I am and I should tuck my tail between my legs and run away :)


texts:
I have to prove that:
!(a(b + z(x + !a))) = !a + !b(!z + !x)

I am assuming that I have to use DeMorgans Rule so this is as far as I'm getting with:
!a + (!b!z + (!xa))

I'm not sure where to go from here. More specifically I'm not sure how to get rid of the a in (!xa).


texts: Adapter load switch MOSFET schematic questions

texts:
I have a few questions concerning a input adapter load switch schematic for a battery charger IC (bq25780S). I posted a screeshot of this part of the schematic from the reference design (BQ24780S Reference below and marked the relevant part in yellow.

ACDRV is the charge pump output for the N-FETs \$Q1\$ and \$Q2\$. CMSRC is the charge pump input for ACDRV. Note that CSD17308Q3 are used for \$Q1\$ and \$Q2\$.
I understand that \$C13\$ is used to soft-start \$Q1\$ and \$Q2\$, and \$R12\$ and \$R13\$ will limit inrush current of gate capacitances.

What I do not understand:

According to datasheet the ACDRV and CMSRC pins of the IC need \$R12\$ and \$R13\$ to "limit the current due to the ESD diode of these pins". Why do ESD diodes, that usually "clamp" high voltage peaks to ground, need inrush current resistors for FET switching?
Is \$C12\$ used for prevention of self-turn on of FET during hot adapter pulgging? If yes, why can't I just use a FET with a high enough \$C_{GS}\$ compared to \$C_{GD}\$?
What is the purpose of \$R7\$? And why can't I just use \$R1\$ or \$R2\$ (3.9 Ohm) instead to reduce unique component count?


texts: Losing power when using breadboard with Raspberry Pi 3

texts:
I am controller a DC motor with Raspberry 3 via a breadboard.
It works very well. The aim is to open and close a door of a chicken coop.

My issue is that the motor does not have enough power.

If I directly power on the motor, it is turning faster and it has a strong torque. When it goes with the breadboard, it is less.

Do you think this is normal ?
Maybe the jump wires does not conduct the electrical current enough ?
Do I need to get rid of the breadboard when using it in production ? By soldering all pieces together ?


texts: How can a high-voltage transistor be in such small packaging?

texts:
For example:

STN0214 - Very high voltage NPN power transistor

It is said to accept more than 1 kV between its collector and emitter. It comes in a SOT-223 package (3 pins plus a tab). With a dielectric strength of 1 kV/mm for humid air, cannot an arc appear between the electrodes?

Or do you have to enclose the package in glue or other material with higher dielectric strength than air?


texts: Problem with photodiode luminance measurement

texts: I am using a BPV22NF photodiode, the problem is that I don't know how to relate the current reading of the photodiode with the intensity of light detected. Looking in the datasheet, I don't find a function of these two quantities either (Link). I'm a beginner at this and I may be overlooking something.


texts:
simulate this circuit – Schematic created using CircuitLab

Edit: Impedance value below has been found incorrect and would apply to a purely parallel circuit instead. Question has been answered in below comment. Deleting unrelevent information from this post to give the below answers more relevance.

Question : How do I find Voltage across R at 1000Hz. I built/measured VR in this circuit and VR should be about 2.2V at 1000Hz.

I have calculated:

XL = 20.734 Ohms

XC = 15915.494 Ohms

Z = 18.9908 Ohms  < Z found to be incorrect. Now given correctly in comment below


texts:
I have used IL300 to isolate 0~5V PWM signal before and it works great.
The circuit is shown below.

But now I need to isolate -12 ~ +12V PWM signal. Is there any possibility or suggested circuit to achieve it?

I have no idea about the negative voltage, but I have found some IC like Adum32XX etc. but the input voltage are all about 0~5 V.


texts:
I've started to play with a cheap TFT display, called HY28B. It's pretty well known, I guess...
Anyway, I want to change the orientation of the display to landscape mode, but somehow it doesn't do what I want.

I tried to config the display with this configuration (ILI9325): http://henningkarlsen.com/electronics/library.php?id=51

And I changed the Entry mode (0x03) register value to 0x10B0, but my string is still appaer in portrait mode. I draw the string with the display's sample code from ebay.

This is the exact config what I'm using:

  LCD_WriteReg(0xE5, 0x78F0); // set SRAM internal timing
    LCD_WriteReg(0x01, 0x0100); // set Driver Output Control
    LCD_WriteReg(0x02, 0x0700); // set 1 line inversion
    LCD_WriteReg(0x03, 0x1030); // set GRAM write direction and BGR=1.
    LCD_WriteReg(0x04, 0x0000); // Resize register
    LCD_WriteReg(0x08, 0x0207); // set the back porch and front porch
    LCD_WriteReg(0x09, 0x0000); // set non-display area refresh cycle ISC[3:0]
    LCD_WriteReg(0x0A, 0x0000); // FMARK function
    LCD_WriteReg(0x0C, 0x0000); // RGB interface setting
    LCD_WriteReg(0x0D, 0x0000); // Frame marker Position
    LCD_WriteReg(0x0F, 0x0000); // RGB interface polarity
    //*************Power On sequence ****************//
    LCD_WriteReg(0x10, 0x0000); // SAP, BT[3:0], AP, DSTB, SLP, STB
    LCD_WriteReg(0x11, 0x0007); // DC1[2:0], DC0[2:0], VC[2:0]
    LCD_WriteReg(0x12, 0x0000); // VREG1OUT voltage
    LCD_WriteReg(0x13, 0x0000); // VDV[4:0] for VCOM amplitude
    LCD_WriteReg(0x07, 0x0001);
    delay(200); // Dis-charge capacitor power voltage
    LCD_WriteReg(0x10, 0x1090); // SAP, BT[3:0], AP, DSTB, SLP, STB
    LCD_WriteReg(0x11, 0x0227); // Set DC1[2:0], DC0[2:0], VC[2:0]
    delay(50); // Delay 50ms
    LCD_WriteReg(0x12, 0x001F); // 0012
    delay(50); // Delay 50ms
    LCD_WriteReg(0x13, 0x1500); // VDV[4:0] for VCOM amplitude
    LCD_WriteReg(0x29, 0x0027); // 04  VCM[5:0] for VCOMH
    LCD_WriteReg(0x2B, 0x000D); // Set Frame Rate
    delay(50); // Delay 50ms
    LCD_WriteReg(0x20, 0x0000); // GRAM horizontal Address
    LCD_WriteReg(0x21, 0x0000); // GRAM Vertical Address
    // ----------- Adjust the Gamma Curve ----------//
    LCD_WriteReg(0x30, 0x0000);
    LCD_WriteReg(0x31, 0x0707);
    LCD_WriteReg(0x32, 0x0307);
    LCD_WriteReg(0x35, 0x0200);
    LCD_WriteReg(0x36, 0x0008);
    LCD_WriteReg(0x37, 0x0004);
    LCD_WriteReg(0x38, 0x0000);
    LCD_WriteReg(0x39, 0x0707);
    LCD_WriteReg(0x3C, 0x0002);
    LCD_WriteReg(0x3D, 0x1D04);
    //------------------ Set GRAM area ---------------//
    LCD_WriteReg(0x50, 0x0000); // Horizontal GRAM Start Address
    LCD_WriteReg(0x51, 0x00EF); // Horizontal GRAM End Address
    LCD_WriteReg(0x52, 0x0000); // Vertical GRAM Start Address
    LCD_WriteReg(0x53, 0x013F); // Vertical GRAM Start Address
    LCD_WriteReg(0x60, 0xA700); // Gate Scan Line
    LCD_WriteReg(0x61, 0x0001); // NDL,VLE, REV
    LCD_WriteReg(0x6A, 0x0000); // set scrolling line
    //-------------- Partial Display Control ---------//
    LCD_WriteReg(0x80, 0x0000);
    LCD_WriteReg(0x81, 0x0000);
    LCD_WriteReg(0x82, 0x0000);
    LCD_WriteReg(0x83, 0x0000);
    LCD_WriteReg(0x84, 0x0000);
    LCD_WriteReg(0x85, 0x0000);
    //-------------- Panel Control -------------------//
    LCD_WriteReg(0x90, 0x0010);
    LCD_WriteReg(0x92, 0x0600);
    LCD_WriteReg(0x07, 0x0133); // 262K color and display ON


texts: Why WiFi modules can't listen to remote HTTP requests?

texts:
I can see that ATMEL has this WiFi module -  ATWINC1500. I know that modules such as the ESP8266 are not capable to listen to requests outside the network ( which means I am not at home and I want to control it from my iPhone).

I am trying to understand what keyword should I look for in the data sheet, to understand if I can set it as a station that listen to HTTP requests all the time.

Why for example with ESP you have to set a port forwarding to do this, and when you buy a smart coffee machine it can be done without any hassle ? what is the difference in the hardware that enables these companies to make smart device that are accssesible without all this port forwarding dirty technical hassle ?
How is that my computer is accessible from anywhere and these modules are not?


texts: criteria to consider 180 degree as phase cross over frequency in bode plot

texts:
Why 180 degree is taken as phase cross over frequency in bode plot?
In bode plot, grid impedance(Zg) and inverter impedance(Zi) is plotted for both magnitude and phase. The frequency at which Zg and Zi crosses in magnitude plot,
 see the phase in phase plot of bode plot at the same frequency.if the phase is above 180 degree,the system is unstable and stable when phase is below 180 degree.

here my question is , why we choose 180 degree  as the point to be a system stable or unstable


texts: Joining power jack wire to charging port

texts: Do I need to weld the charging port to the wires of the broken power jack. Because this is not working. The LED of the power button just goes off and on occasionally with this. Is it necessary that I need to weld it to make it work?


texts: Is the value of the inductor important in chua's circuit?

texts:
In Kennedy 92, the author gives a worked example of Chua's circuit experiment. The circuit diagram is given below:

The author (in section 7.1) discuss how the value of each component might be chosen, except the inductor L. He uses an 18mH inductor. I don't know how he chooses this value.

What if I use a 15mH inductor instead, but keep everything else the same as the article? Will it still work? I cannot buy 18mH inductors...


texts:
Well.I am new to electronics. I have just started creating small circuits. Coming to the point,I have a circuit with 5v input and current in the circuit is 2ma but I have a requirement to increase it to 200 ma in a circuit. When I googled for the solution, I found threads like increase voltage or decrease resistance (using V=IR) to increase the current But those values are to be fixed in my circuit. Basically I Studied that CC transistor has high current gain so I thought to use it in my circuit but people on internet says it amplifies signals current(probably an ac signal i guess so) and I am unable to understand what does that mean.

What does voltage gain and current gain mean in a Transistor? Does it amplify only ac signals? If I apply 5v dc input to a CB configuration that has high voltage gain, Wont it make it as 20v at the output? Similarly if I input 10 ma current of a DC circuit to CC amplifier, Does not the CC make it as 1 Amp at the output?

After seeing the comments I added the circuit picture. Now I want to increase the current in the circuit where R is 2.5Kohms and E1 is 5volts and the current is 2 ma but I want the current to be increased to 200 ma but keeping the R1 and E1 fixed. But Im unable to figure it how.Please kindly clear me this. and let me know what should i prefer if i want to increase current in a circuit keeping the voltage and resistance values constant in a circuit.Thanks


texts:
I am creating a set of 50+ remote imu sensors. They will all be in a small distance from one another. Less that 3 meters. Each remote board will have a on board sd card for logging the imu data and a led that flashes when the imu begins its sampling. My remote board needs to be small, around 25mmX25mm all up. But the smaller the better!!!

The problem is that i cant figure out a reliable solution to send sync wireless from one master unit to these remote imu sensors. These sensors all need to be in sync so the data logged is valid and usable. The sync pulse will be between 24Hz and 120Hz and generated from an external source.

I have been looking into BLE because of the very small modules available  with build in antennas and that i can talk directly to the imu. But i can only have up to 8 slaves connected to a master. I could use the broadcasting features and broadcast message to all modules that are listening, but im just not sure.


texts: Problem using Keil uvision in Debugging mode

texts:
I cant get both of the yellow and the blue arrows to the begging of main()
and I cant see the local variables of main like : counter for instance in the call stack + locals section
how can I solve this problem ?


texts: Help, Cant get my first LM741 inverter circuit right

texts:
Im trying to configure my first (and basic) LM741 op amp inverter.
My Vcc is +5V, my input is a 1.5v DC battery, the positive connected to the inverting input pin 2, and the negative connected to non-inverting input pin 3.
Rf is 473k, Rin is 220k, so looking for a gain of about 2, and therefore looking for an output of about -3v, or thereabouts.
But using my multimeter, +ve lead on output, -ve lead on V-, I measure +2.06V
What am I doing wrong?
Thanks in advance
matthew


texts: ADC PCF8591 - change range for measuring

texts:
I'm doing my first project on my Raspberry pi with analogue signals,  using the PCF8591 ADC.

I managed very easily to measure 0 - 5 V with the chip, connecting the Reference Voltage (VREF, pin 14) to VDD (5V).

How can I change the range to some mV? Can I just apply, let's say, 20mV to VREF, and 20mV on my analogue input will be digitised as 256 (8 bit)?


texts: ST MCU Calculating external capacitor values for oscillator on STM32F2

texts:
Im using the equation CL = (CL1 * CL2 / (CL1 + CL2)) + CS  from ST AN2867 OScillator design guide to determine the external capacitor values for the main and low speed oscillators.
But for the STMF207 development board https://www.st.com/en/evaluation-tools/nucleo-f207zg.html#resource the low speed oscillator capacitors fitted are 2pF for NX3215SA-32.768KHZ-EXS00A-MU00525 where CL = 6pF
And the same for the high speed oscillator; 4.3pF are fitted, NX3225GD-8.000M-EXS00A-CG04874 where CL = 8pF
Shouldn't these be ~12pF (NX3215SA^) and ~16pF (NX3225GD^) if not does the PCB add capacitance to shift the values that much? Or am I missing something?


texts: I'm using 12volt to Arduino UNO, but I have questions

texts:
I have this project where I use a stepper motor controlled with an Arduino and bluetooth module.

It says that I need 12volts to power the Arduino to control the stepper motor, my question is if I need a voltage divider to the bluetooth module (says 3.3 to 6 Volt)  to not burn it.


texts:
I am very new to FPGA development, but I have a relatively simple application I'm trying to implement on a Microsemi ProASIC3. The hardware I have to work with has no external clock source (i.e., no crystal or resonator). At first, I assumed there was some way to generate an independent internal clock, as you can with some microcontrollers, but reading through the datasheet this doesn't appear to be something this family can do (indeed, reading the internet, it seems to not be a feature of most FPGAs).

For this application, there isn't strictly a need for a clock - nothing is time-driven. The FPGA is simply maintaining an internal register that corresponds with a bunch of outputs. This register's value changes depending on the present state of some inputs and some internal logic.

But, looking at the various FPGA resources I see that clocks are fairly ubiquitous in example designs. While I'm fairly confident that I don't need one - I fear that half way through development I will find a need for one will arise in some unexpected place.

My question is: should I throw out this hardware and get something with a clock onboard, because clocks are effectively required for all designs and I'm wasting my time working without one? Or is it entirely possible to build sensible FPGA designs that never need external clocking?


texts:
I have a fresh installation of KiCad 5 on Windows 10 (no other version of KiCad was installed ever before, actually the computer is brand new). I have used KiCad a lot, but only on linux and I have never worked with version 5, which - I found out - has a different library management.
I'm facing the problem that there are no default footprint libraries neither in eeschema nor in pcbnew.
When I installed KiCad I selected the option to copy all footprint libraries and in deed there are around 5 GB of footprints in C:\Program Files\KiCad\share\kicad\modules (note, that "Program Files" is "Programme" in the file explorer):

I have configured a library path to this directory:

When I try to simply add a footprint in pcbnew, the declared folder appears, but it does not contain the footprints:

I can add a library by adding a path to the specific .pretty folder, but the default kicad modules consist of quite many of those. It doesn't feel right to start adding them all manually and also this was not neccessary on linux, where I have only few paths declared.
Question: How do I get access to the default kicad modules?
What I expected:
After a fresh installation of KiCad, I can add footprints of the default kicad modules to a layout in eeschema without having configured anything.
EDIT: what eventually solved the problem was the fact that one can select several footprints in the "add footprint" dialogue at once. So adding them manually one by one wasn't neccessary.


texts: DAC behaviour on reset / startup LPC1768

texts:
I am programming a mbed LPC1768 for a constant current discharger. I plan to use the DAC output on the LPC1768 for setting the current in my discharge circuit.

edit: The trouble i am having is related to the voltage from the DAC during start and reset. I already made and tested the discharge circuit and it's NOT connected at the moment. At the moment i only have Rpulldown connected on the DAC and am viewing the DAC output on my scope.

simulate this circuit – Schematic created using CircuitLab

I noticed that under start and reset the uC DAC goes to around 2V for a very short time. I guess it goes to some state untill i define the output in my code, but im not sure of it. edit: how do people usually deal with this kind of problem?

In my circuit these 2V is equal to 20A of discharge current. I dont want this to happen!

I tried pulling the DAC down with a 1K resistor and it sure clamps the DAC on start (goes to around 50mV on reset), but it also pulls the analog voltage down from what its set at in my code. Also tried 12K but that was not enough to clamp the DAC.

I have some different solutions to this problem, but they all involve transistors or relays. I was thinking there must be a more elegant way to deal with a problem like this and i can't be the first to have such a problem.

Can you guys please give me some tips on how to solve this problem? Should the DAC behave like this or am i doing something wrong?

Many thanks in advance!

Edit: added schematic, cleared up some confusing text.

Edit: This is how i am currently dealing with this problem. Any problems doing it like this or is it acceptable? It works but to me it seems a bit like a cowboy solution :)

Base is held high by a pullup resistor and this closes the relay loading the DAC output with 1K and pulling it to gnd. When enable is pulled low in my code the relay opens ands the DAC funtions as supposed.

edit: some code i tried running. just cycles the DAC between 0 and 3.3V. When i push / hold the reset button the DAC exhibits the behavior im talking about.

#include "mbed.h"

AnalogOut out(p18);

int main()
{
    out = 0;
    while(1)
    {
    out = 1;
    wait(1);
    out=0;
    wait(1);
    }
}

edit: added scope capture of glitch.

Only DAC output on start, no load attached:

With 10K across DAC:

With 1K across DAC:

1K across DAC, running a program that should toggle DAC between 0-3.3V. Goes to 3.3 with no / lighter load:


texts: What DIY Function Generator is Suitable to drive a Pasco WA-9857 String Vibrator?

texts:
Preface... total amateur. I picked up 8 Pasco WA-9857 String Vibrators off of eBay for an art project. I need some way of driving them individually.... cheaply. So I bought a $12 XR2206 Function Generator DIY to try it out. Because that XR2206 kit outputs DC there is a 10MF capacitor on the Sin output to mimic AC current (at least that's my understanding).

I'm using a 12V 2.5amp PSU, Sin, and 3K - 65KHz settings on the Function Generator. The result is a high pitched squeal from the Pasco unit if I play with the Amplitude, Fine and Coarse potentiometers but no movement from the vibrator.

Is my problem here the 12V power supply, the settings on the function generator, the not-so-awesome function generator itself, or something I'm not familiar with/considering? If it is the function generator is there something I can use that is cheep and in a small form factor like what I bought.


texts: How to modify the supply voltage requirement in a circuit?

texts:
I am a beginner in Electronics; I am learning the basics and am trying to take up circuitry as a hobby! My query is regarding power supply requirement for any circuit.
Take, for example, a circuit to light an LED. I can tell the supply voltage by knowing the LED's Forward Voltage Drop, its maximum current rating, and the resistor in the circuit. By choosing a different valued resistor (or a different LED, perhaps), I can choose a different supply voltage.
Now consider this circuit. What changes needs to be made to use a different supply voltage? More specifically:

Is it only resistors which matter?
How to know which resistors to change out to use a different supply voltage and which ones to leave alone?

On that note, how come some circuits have a fixed supply voltage while others have flexible ones (see this)? I know that I can't light an LED with anything between 1.5V and 9V without making any changes to the circuit!

I am not asking about voltage converters/regulators; see the LED lighting example above.

I have been stuck on this for quite some time now, reading articles and tutorials, but I can't seem to find anything which answers my query. Any help would be appreciated.


texts: Why Deliyannis bandpass filter with high Q does not have the expected transfer function bode plot

texts:
What i need is to design a delyiannis band-pass filter with Q enhancement technique.

The theoretical analysis of this technique is referred here in pages 107-112.

For those who don't know how to design delyiannis band pass-filer here is an example:

And here is the expected bode plot

In my case, i need to design a filter with f0 = 825 Hz and Q = 36.

Although i do the same process like the above i don't get the expected results for my case.

Here is my circuit:

And here is the bode plot (where 825Hz is not on the top as expected)


texts: Calculate battery percentage on LiPo battery?

texts:
I have voltage measuring on my LiPo battery that is defined full at 4.2V and empty at 3.2V. This reading is very accurate but I want to convert this to percentage numbers. I know that the percentage of energy left in the LiPo is not linear to the voltage levels, but I would be fine with defining a linear approximation of the percentage left. Something like (4.2V-3.2V)/100 would give me 1% increments.

The issue I'm facing is how would I program this to show the percentage? It seems like ridiculously bad coding to have a switch statement with 100 cases, each for every percentage like the pseudocode under:

Switch(BattVoltage)
case: BattVoltage > 4.19                         "print 100%"
case: BattVoltage < 4.19 && BattVoltage > 4.18   "print 99%"
.
.
...

How would one do this in a smart manner?


texts: AVR Watchdog interrupt mode and reset mode

texts:
I am going through datasheet of AVR2560V. In page 65 , table 12-1, it says that AVR2560 has 3 mode for watchdog

Interrupt mode - WDE = 0, WDIE = 1
Reset Mode - WDE = 1, WDIE = 0
Both - WDE = 1, WDIE = 1

This means if we want to use watchdog timer as source of Interrupt, then i should disable WDE. Am i right? Because when i disabling WDE in code, Watchdog timer is getting disabled.I had look at this link also and even he is doing the same. WDE make sense that it need to be enabled, just that table in the datasheet is confusing me.  Can anyone please help me in clearing out  this doubt.

Below is the Watchdog_init function which i am using.

 Watchdog_init(){
        MCUSR &= ~(1<<WDRF);

        WDTCSR |= (1<<WDCE) | (1<<WDE); // as per datasheet WDE should be 0?

        // timeout in 8 second
        WDTCSR = 1<<WDP0 | 1<<WDP3;

        // watchdog interrupt enabler
        WDTCSR |= _BV(WDIE);
    }


texts: I bought some li-po batteries and they were in antistatic bags. They have protection circuits. Do they need esd protection (grey bags)?


texts:
I am generating PWM using timer 2 of PIC18f2420. I have 4MHz external clock crystal. The maximum frequency I can get from the PWM is 3.9KHZ with 1:1prescaler and postscaler. I need to get 100KHZ, any ideas? Will changing external oscillator to 20MHZ work?

Regards


texts: Is an all-pass filter a linear phase shift filter?

texts:
Im in need of an application that needs to add linear phase shift to a signal similary to the one produced by a Bessel Filter, meaning constant delay, my question is: does a standard 1st order all pass filter provide a linear phase shift? if not, what circuit provides a linear phase shift similary to a Bessel filter, whilst providing linear amplitude response?

The type of all pass filter im familiar with is the following

simulate this circuit – Schematic created using CircuitLab


texts:
I am a beginner!

I've been trying to devise a very simple circuit to confirm in my mind how capacitors work. The goal is to make an LED flash on and off using a capacitor or two and one or more transistors.

I've tried various things but I'm getting nowhere fast. I've seen circuits online but they tend to involve two LEDs, inductors or other strange setups.

Can anyone explain the theory behind what I'd need to do (without delving into the maths too much please)?

As far as I can tell a capacitor could be used to control a transistor to make it switch off after a second or so.. my problem is getting it to turn back on!

If anyone can describe what needs to happen (logically) in order to make the LED turn on and off that'd be really good!

Cheers,
John.


texts: Probe circuit for measuring higher voltage on oscilloscope?

texts:
The only oscilloscope I have is a tiny DSO138 (input section is on the top left of page 4 in the linked PDF). The scope has a limit of 100Vpp (actually displays only 80Vpp). At the highest attenuation (100x), there is 1V input to the first op-amp.

I want to see the output of a step down transformer. The transformer secondary shows 40V AC on my multimeter. Assuming this to be close to the RMS value, peak would be 56.5V and peak to peak at 113V. This is slightly higher than what I should put into the scope.

How can I go about attenuating the signal? Will a pair of 100K resistors as voltage divider work (with input set to 100x on the scope)? Will I need to attach any capacitors? I will probably never use it for more than 200Vpp ever, but there is an audio amplifier project coming up. If I can make a decent probe to view 100-200Vpp, it will be helpful.

All advice will be helpful. My electronics knowledge is rather limited (but I cannot go out and buy a proper probe or scope just yet). Also, I've never used a real scope.

Here is the input section of the scope:

edit:
As far as I understood, standard scopes come with a 50Ohm and a 1M resistor inside them, and probes are 1x/10x/100x/1000x with reference to that, with 10x being most common. Is this XXXx multiplier with reference to the first op amp input voltage (somewhere around 0-1V)? That would mean my scope already has the 1x, 10x, and 100x probe circuits built in, right? Would that mean using an additional 10x passive divider give me grossly innacurate results? Are scopes mostly used for seeing waveforms in the 0-10V range?

Another question: The input opamp TL084 has a bias current of 30pA (max 200pA). With the input 100K on the lowest range, that would mean my lowest ranges are not protected upto 100Vpp. Only protected upto +=5V and +-50V, even though there is a 100K resistor on the input of the lowest range?


texts: Why do we need block, sector, "all" protect bits in flash device?

texts:
I am reading the datasheet for the A25L032 "32Mbit I/O  Serial  Flash  Memory". The page 15 of this datasheet explains that there are non-volatile bits in the status register that can be used to "write protect" a section of the flash memory.
Flash is a non-volatile memory and it changes when we write to it and never otherwise. It has features which prevent data corruption also e.g at power up. To do write first we send a "write enable" instruction and then once write is complete the "write enable" bit inside is automatically reset so no one can ever "accidently write" something into the Flash. Now why in the world would one need bits to write protect parts of the flash??
To top this up, there are also non-volatile "status register protection" bits.
Edit:
Another aspect of this problem is "software protect mode" and "hardware protect mode". These are stated on page 7 of the datasheet. The software protect mode is when we use the block protect, sector protect, top/bottom and complementary protect bits. Hardware protect is when we set the "write protect" bit so the bits I just mentioned before themself become write protected. What is the logic behind using the term "software protect" and "hardware protect" for these two?


texts: Auto off water pump only when tank is full

texts:
The water pump installed at my residence is operated on and off manually through a conventional switch wall socket.

Now, I want the pump to be automatically switch off whenever the tanky is 90 percent filled through an external circuit diagram or relay. However, the pump should be operated ON by the manual switch, and only AUTO OFF by the circuit diagram.

Please kindly provide appropriate diagram for the said project and the suitable BUTTON SWITCH TO MANUALLY ON the pump.


texts: How to use TIMER 2 as simple counter in STM8S103F3?

texts:
I am new to STM8S and not yet that good at microcontroller programming in general. I am trying to learn about timers/counters in microcontrollers.

I wrote following code to toggle an LED in each second which is connected at PB5 pin.

#include "stm8s.h"

int main() {
  // Default clock is HSI/8 = 2MHz

  PB_DDR |= (1 << PB5); // PB5 is now output
  PB_CR1 |= (1 << PB5); // PB5 is now pushpull

  TIM2_PSCR = 0b00000111; //  Prescaler = 128
  TIM2_CR1 |= (1 << TIM2_CR1_CEN); // Enable TIM2

  while (1) {
    if ( ( ((uint16_t)TIM2_CNTRH << 8) + (uint16_t)TIM2_CNTRL ) >= 15625 ) {
      // Reset counter back to 0
      TIM2_CNTRH = 0;
      TIM2_CNTRL = 0;

      // Toggle LED.
      PB_ODR ^= (1 << PB5);
    }
  }
}

My microcontroller is not connected to external clock and using internal clock to operate.

After I reading datasheet, I see MCU clock will be HSI/8 = 2MHz by default. I set 128 as prescaler for TIM2. So, TIM2 counter will increment in each 64us. So, when it reach at 15625 it will be 1 second (64 * 15625 = 1000000us = 1s).

So, I assumed the LED to toggle in each second.

The problem is the LED stays ON all the time.

Could somebody help me to identify the problem with my code?

Thanks in advance.


texts: Altium: can not remove or change black rectangle in panelization

texts:
I have a panelized pcb in altium. Opening it, a black rectangle shows in the background, as you can see in this picture:

The rectangle has no relation with the panelized pcb.
I want to remove it, or at least change its size, because if I print the pcb, it shows up, as you can see here:

I found this question and I tried to disable rooms, but it appears didn't help, so I guess it is not a room.
I also tried unchecking every item in the PCB printout properties dialog, and also tried hiding all the layers, but the rectangle is still there.

I didn't designed the pcb or its panelization, I just need to obtain a pdf for documentation and the rectangle makes the image unclear and ugly, so I'd like to remove it.

I appreciate any hint.

Thanks,


texts: What is the term for an LCD readout that is, by design, still visible after power-off?

texts: I am looking to build an electronic device that has an LCD panel on it with a feature I noticed my Western Digital MyBook external hard drive has which is the ability to display data and it stays visible after power-off. I suppose this is probably the same tech that e-book readers use, come to think of it. But if I were to start shopping around for some programmable components, what is this called?


texts: I'm looking into measuring clock signal jitters in the range of 50 to 100 ps peak-peak, at clock frequencies up to 250 MHz. What kind of measurement equipment do I need for that? A super fast oscilloscope like Tektronix DPO7000C Series? Any other (cheaper) suggestions?


texts: Large voltage drop across source terminal

texts:
I am using an N-channel MOSFET to enable another IC.
My gate voltage=1V, the drain voltage=3.3V.
After rigging up the circuit, the voltage across EN_DC23 was measured with reference to ground and it was 0.7V
Can someone help me in finding out the reason for this large voltage drop?
I am using a Diodes Incorporated ZXM61N02FTA MOSFET.


texts:
I'm looking for some advice on converting from dBuA/m to dBuV/m at 10m. I'm trying to convert 10dBuA/m @ 10m.

I'm struggling with the uA to uV conversion at distance and can't find online tools to do this, and I'm struggling to find any equations I can work through.

I'm assuming I need to work through some other steps (maybe field strength) to get my result. Unfortunately RF calculations isn't my background or experience.

Thanks.


texts: Help developing rpm calculation from encoder pulses

texts:
I have having a bit of difficulty calculating rpm of a motor using feedback from an encoder. The encoder datasheet is attached here: Encoder datasheet.
The encoder has two channels at 1000 PPR, so 4000 PPR that I can count with my FPGA, as I am counting both the rising and falling edges. The max motor speed is 4500 rpm.
I have synchronized these pulse edges with the FPGA 100MHZ clock and I generate a pulse on each rising and falling edge that lasts for one 100 MHz clock cycle. I then have a counter that increments by one on the falling edge of the 100 MHz clock if an edge pulse has been generated. This counter value is clocked into a register every 100 ms which is the count value from the encoder. I then display this count value on a seven segment display to test it.
I have inputted a 20 kHz square wave into the FPGA to simulate one channel of the encoder and the display reads a count value of 4000 on the display. So the hardware on the FPGA end is working perfect, as the counts per 100 ms from 20 kHz is 4000.
I am unsure how I can scale this count value from the encoder mathematically into an RPM value that I can display? At 4000 rpm, the encoder inputs will be 66.6 kHz each. So for around 4000 rpm, the count value per 100 ms will be 26640. I tried to use the following algorithm:
$$  RPM = \frac {(CountValue per 100 ms) (600)} {EncoderPPR} , $$
But to remove the division by 4000 and to shift right to divide by 4095:
$$  RPM = \frac {(CountValue per 100 ms) (600\frac{4095}{EncoderPPR}) } {4095} , $$
So this leaves:
$$  RPM = \frac {(CountValue per 100 ms) (614.25)} {4095} , $$
With the encoder my display is not displaying 4000 rpm so would like to know if anyone can spot a mistake in my calculations.
EDIT
So I actually changed the shift value from 12 (4095) to 14 (16383) and the rpm is not being displayed correctly as far as I know. I have a digital tachometer to measure the speed of the motor shaft as they fluctuate within 2 rpm of each other. I am guessing the extra to shift bits was because 614.25 has two places after the decimal point?


texts: Should neutrals be tied together or left separate?

texts:
I'm working on a control panel. The panel is powered by 120VAC single phase (USA).  The panel has a battery backup unit (UPS) which powers the panel if the incoming power goes out, and which filters the incoming power.  The incoming single-phase power is connected to a standard 3-prong wall outlet inside the panel, to which the UPS unit is plugged. The incoming earth ground is also tied to the panel backplane.

From the UPS unit, a 3-prong pigtail plugs into one of the UPS outlets, and the other end is wired into the main terminal blocks (power rails) of the panel. Also, the earth ground wire of this pigtail is tied to the backplane.

The question is: Should I connect the neutral wire of the incoming power to the neutral wire which comes out of the battery backup?

Testing the UPS (CyberPower 685AVR) indicates that when OFF, there is no connection between the "battery" output side and the input cable.  Neither the Line or Neutral wires show continuity (earth ground does, of course).  When ON, there appears to be about a 30VAC difference between the "battery output" Line pins and the input cable's Line pin.  Same with the Neutral pins.

FYI the panel is hard-wired into the mains, so there's no chance the user would plug the cable in backward, thus placing 120VAC on the neutral wire.

I wanted to ensure this configuration doesn't risk unexpected voltages in unexpected places, and that I'm not backfeeding the earth ground when the neutral should be used instead.

My thought was that the neutrals should be kept separate, and that's the way we built the panel originally.  It has worked fine so far, but I keep wondering if this creates a safety hazard or increased possibility of surge damage etc.

Here's a quick schematic for clarity.

Thanks for any advice!

simulate this circuit – Schematic created using CircuitLab


texts: Capacitor charging circuit review needed

texts:
I recently posted a thread about using a coin cell to power an electronics project that features an SD card (here). The problem at hand is that the SD card will pull high current during read/write operations, much higher than a coin cell can handle. However, the fact that the SD card pulls very little current outside of read/write operations leads me to believe that I can use a capacitor charge/discharge circuit for supplying higher power to SD cards when it is needed. I'm hoping I can get some verification regarding my design.

After doing some rough hand calculations, I've calculated that I will need to write to my SD card every 2 seconds. The amount of data that will need to be written is 512 bytes. Referencing a previous post I made, the user jonk provided this picture:

I will be using an 8Mhz clock, along with a 3.3V power supply, thus I calculated an SD card write speed of 4 Mb/s. Using this clock rate on my 512 bytes, that comes out to a write time of 0.000128 seconds. Because I assume there is overhead involved, I rounded this up to a 'hopefully generous' 1ms.

So my calculations suggest that I can charge the capacitor for up to 2 seconds, and then can discharge it at a rate such that an appropriate voltage is sustained for at least 1ms.

Referring to my circuit design, I am using a 3.3V coin cell (CR2032) whose voltage is regulated by a 120mA switched cap regulator. This regulator acts as the main power source for other components that can consume 6mA current continuous. Note that I am open to selecting a different coin cell that can provide a higher continuous current. Also note that I realize that the 6mA by itself is higher than the rated continuous current of a CR2032 coin cell, however, I am willing to lose cell capacity for higher current. While I'm ok with 6mA, I am not okay with an additional 30mA pulsating SD load.

I've selected a 3.3K resistor to limit the capacitor charging current to 1mA max, and I've select a 180uF capacitor given that it seems to charge to 3.3V in the allotted 2 seconds.

I've estimated that the SD card will pull 30mA during write operations, the 180uF capacitor appears to be able to hold enough charge to sustain a 30mA current for 1ms. I did a quick simulation in SPICE and after 1ms of capacitor discharge, the voltage dropped to 2.9V which is still acceptable for powering an SD card. I modeled my SD card as a 100 ohm resistor that would switch on every 2 seconds for a duration of 1ms.

So my questions:

How much overhead is involved when writing to an SD card (FAT32 file system)? Would my estimate of a 1ms write time cover all the overhead required to write to a text file on an SD card?

For my application, is it fair to model an SD card as a resistor that switches on periodically?

Does it appear that I may be overlooking anything?


texts: Are there vertical through-hole USB mini B plugs?

texts:
I can't find any manufacturers who make vertical through-hole USB mini-B plugs. I can find plenty of receptacles, and plenty of micro-B and A plugs, but no mini-B. Not even discontinued models.

Is there any particular reason they don't seem to exist?


texts:
I hear that thermocouples, especially type K, got really low output voltage
( 41µV/°C. )

Someone told me that if I had 16 bit DAQ device I would need a range from - 1 V to 1V to measure 1 °C.

So the problem is if my DAQ usb device would record the temperature changes without any signal amplifier ?

I got in mind two devices :

I. USB 2416 24 bit
Voltage Mode: ±20 V, ±10 V, ±5 V, ±2.5 V, ±1.25 V, ±0.625 V, ±0.3125 V,   ±0.15625 V, ±0.078125 V

II. NI USB-6218 16 bit
Input range : ±10 V, ±5 V, ±1 V, ±0.2 V

According to the mentioned statement, I should be fine with both but I need to know for sure because it's not a cheap ride.

BTW Does differential measurement have anything to do with the "sensitivity" level apart from noise elimination ?

update:

Ok so it seems that I'm forced to use signal amplifier so I'd better start looking for wires, connecting amps with my DAQ device. Thanks for answers.


texts: I am trying to design a four mode buck boost converter based on the LTC3789  controller such that I want to completely substitute all the PLL functions, clock and everything else internal to it so that I can exercise complete control using a PIC16F877 micro for my charge controller project. Please How do I do this?


texts: What is a "safe" amount of amps to draw from this pack

texts:
I've been working on a quadruped project, and need some help determining the... safety... of my power system.

To start, there's two packs, a larger "main" and a smaller "reserve"

the two packs are built from the same type of battery:
Coolplay 3.7V 500mAh LiPo

the smaller pack is two of these wired in series to get 7.4V 1Ah, and the larger one is 8 of these wired to 7.4v 2Ah (4 packs in parallel to make 4x 3.7V 1Ah, in which they are series paired into 2x 7.4v 1Ah, which in turn are wired in parallel to get 7.4v 2Ah)

I've done the prerequisite searching, and can only find safe current to apply to parts and IC's, not the safe current to pull from the battery. So, my question is, what would be a "safe" amount of current to pull from either of these packs?

At idle (all IC's powered, but servos not powered), the build pulls about 0.2A, and the packs don't heat up at all, but when the build enters a "pose" such as standing (all servos powered up and under load), the load jumps up to 2A usage, and the pack temperatures start to rise, and my overcurrent kicks on and shuts the packs off (I have it set very low because, well I don't trust LiPos).

So, is it safe to run my pack under these conditions? and if so, for how long? I have adjustable overcurrent protection and temperature monitoring installed, so I can utilize those as well.

And if its not safe to run like this, what could I change?

One of these packs powers a Syma X5C drone for 7 minutes. So some quick and dirty math tells me that the drone pulls around 4.5 amps from the packs for the duration of the 7 minutes, and the packs are pretty warm from this. So with the new information that these individual batteries get 4.5A pulled from them, what is the verdict on this?

**EDIT: RESOLUTION
So, thanks to @MarcusMUller and his insight, I've determined that the packs should be safe to run in these conditions but should be monitored more closely (as marcus pointed out, cheap batteries are unreliable and inconsistent) and should be housed better. Thank you @MarcusMuller for the feedback and insight

**NOTE: Batteries are dangerous, but I dont need to say that. As marcus pointed out (more or less), batteries with poor documentation should make you nervous. Good batteries are a good investment, and shortcuts should only be taken by those that know the path, and even then it should make you nervous.  Be safe with batteries


texts:
I'm a bit of a beginner at circuit design, and wanted to tinker around with creating a circuit that uses a z80 microprocessor. I found a pinout diagram, which shows that the chip I'm looking at uses 5V (a range of 4.5 to 5.5).

My question is, 5 V..at what. Clearly, current does matter as there are much more powerful and higher-clocked ICs running a 1.5 V; and it doesn't take a genius to figure out that connecting it to 12 A would cause it to instantly explode or catch on fire.

Would I be right in assuming that the correct approach would be to measure the resistance and calculate the current using Ohm's law? And if so, how would I go about doing that?


texts:
I am currently taking a class on analog electronics and this is one of the problems that came up:

  V 1 = 15V V 1 = 15V, Ueb = Ube = 0.6V, Uce(sat) = 0.2V, β =200,
  VT = 25mV, R2 = 39Ω, R4 = 4.7kΩ, R5 = 470Ω

I am asked to find the values of R1, R3 and R6 such that the quiescent collector currents of Q2 and Q3 are both  8 mA, and the collector of Q2 is at the potential V1/2 when there is no input signal present(what does this tell me? Is it even relevant since I am only doing dc analysis here?) Are there any general steps  to follow? I did some similar analysis with two transistors, and what always needed to be done is find expressions for Ve,Vc and Vb for each transistor and by comparing them make an assumption in which mode it is operating. Here however, I came to a contradiction, namely Q2 seems to be in linear mode, and therefore R6=(V1/2-V1-0.7)/8mA <0. I hope I didn't ask a question too broad. I am not asking for a solution, but merely to tell me the recipe for this kind of analysis.

EDIT:Awkwardly enough, I only now noticed that in fact what seemed to me as a node between the collector of Q1 and the base of q3 isn't one. One can tell just by observing carefully.


texts: simulate a motor with resistor and inductor

texts:
I want to simulate a motor with a resistor and inductor. It means I want to connect a resistor and inductor to 1-phase or 3-phase instead of a motor. For achieving this goal I have to measure both active and reactive power and calculate the value of resistor and inductor. Is it possible? I mean is it a right way to consume active and reactive power with resistor and inductor?
And if it is right, how is the connection of resistor and inductor. Parallel or series?


texts: Most energy efficient way to detect motion

texts:
I am hacking together a prototype wrist band, with BLE as the main component.

I'd like the device to detect a bump or a wave. What would be the most energy efficient way to do so? I'd like the charge on the device to last at least 6 months.

Any ideas would be appreciated.


texts: I have a usb powerbank(w 1.1 & 2A outputs) and I would like to power a router since I have no access to a power source. My issue is the least I've seen routers rated for are 9v min. usually 12v. Im assuming I don't need to worry about amperage because that is built into USB to self-regulate. However I'm worried about voltage. I'm wondering if there is a way around this? I've searched the internet and come up with nothing.


texts: Providing house wall switches with 3.3v/5V supply?

texts:
It's a bit non-technical, but I'd love to hear the opinions of the pros.

I'm trying to figure out what is the best way to connect my home's wall switches (lights, etc.) to 3.3V/5V. The plan is the embed a tiny wireless module and a relay into each switch's housing, and allow the switch to be remotely controlled.

I can think of three options to do that:

Try to find a small and cheap Chinese phone charger and copy its design
Deploy 3.3V/5V wires in the walls, next to the mains wiring
Using batteries

The 1st option is preferred, since I don't want to handle maintenance or do major infrastructure change.

I looked into solutions from Power Integrations but not sure if it's compact enough.


texts: Best choice for low-power, short-range wireless communication

texts:
I'm working on a project which relies on wireless communication, and I'm looking for the best alternative. These are the design requirements:

Is easy to interface with Arduino
Works over a small range (5-6 metres at most)
Consumes little power - the least possible
Devices mustn't interfere with each other
Doesn't need to be real-time, the delay can be in the order of hundreds of milliseconds
In general, the devices aren't within sight of each other (meaning IR and similar solutions won't work)

The scenario is:

  About 10 devices in the same room, communicating with each other, sending short (30 characters at most) messages to each other once in a while, for a few hours (without changing batteries).

The best I could find is Bluetooth (BLE, specifically), mostly because there are a few ready-made Arduino+Bluetooth modules and the promising "Low Energy" label (at most half the energy consumption of normal Bluetooth), but I'd love to get an opinion from people with more experience in this field.


texts: Which programmers work with the Atmel Raven boards?

texts:
This post answers the question of if it possible to program an Atmel AVR Raven board with avrdude or not.  Yes, it is possible.

My question is which programmers will work with the Atmel Raven + avrdude?  I'm trying to avoid buying the $300+ AVR JTAGICE mkII.  There are clones available for $50 (for example the AVR-ISP500 from Olimex).

Can anyone confirm having used a clone programmer with avrdude to program the Atmel Raven boards? Which programmer(s)?


texts: Implementing our own network physical layer for fun (e.g. Ethernet) - is it too difficult? what is the suggested approach?

texts:
We are interested in creating our own network stack. For the other layers (application layer ~ link layer), I have done Stanford CS144 and CMU 15-441 so a toy has been implemented. However, I have no idea about how to implement the physical layer. We only want to create a toy, so things like performance are not a problem.
My naive thought: We can implement the Ethernet protocol in the physical layer. We can use an Arduino board. Some of its pins will be connected to the Ethernet wires. Then we write C++ code (for Arduino) to control the voltage of those pins (thus controlling the data on the wires). The other end of the wire will be connected to a standard commercial device (maybe a switch).
In other words, as a whole, my application-layer HTTP server (already implemented) will talk to my TCP stack and other layers down to link layer (implemented). And my link layer software code (in a Linux machine) will talk to physical layer (in Arduino). Then those high-voltage/low-voltage signals will be transmitted from the pins of Arduino to a normal device (e.g. a switch), and from there we will connect to anywhere in the Internet. Finally, my home-made HTTP server will be able to talk to anyone in the world who wants to see it.
Question: Is my naive thought OK, or not feasible? Will it be too difficult (e.g. I want to implement it within a week, can I)? Are there any easier approaches that you recommend?
Thank you very much!


texts: Do capacitors limit maximum current in a circuit?

texts: Do capacitors limit maximum current in a circuit when used after a rectifier? If yes, what's the formula for that maximum current?


texts: Why not using high frequency AC at homes?

texts:
I am a student at school but I learn electronics in parallel as I love it, all my knowledge came from the internet, so if there is a problem in my question please fix it.I came across something called "conductor's skin effect" which states that the higher AC frequency the less it harms the human body as electrons move on the outside on the skin and not the inside.

Why the mains voltage in homes are clocked at 50 or 60 Hz which are deadly, rather than in kHz? If my knowledge is correct it's less deadly.

Is the problem is because all devices won't work, and it will take ton of time to change the frequency worldwide or the problem is due to some electrical characteristics like power loss or EMI or what?

In short why 50 or 60 Hz is used in homes rather than frequencies in kHz?


texts: Controlling a 0-20mA transmitter from an isolated PWM signal

texts:
I'm trying to generate a 0-20mA signal for controlling an industrial actuator (the position of a 3-way valve) from a Teensy 3.2 system. Preferably, the mA-output should be galvanically isolated from the microcontroller  to protect it properly.

In order accomplish that, I currently have a setup, where I am sending a PWM signal (at ~488Hz) from the teensy through a 4N26M optotransistor (4N26M datasheet).

The output of the 4N26M is sent through a RC filter into a TI XTR117 Current Loop Transmitter (XTR117 datasheet). This chip controls the current in a separate current loop sourced from a 24V PSU coupled in series with the actuator, which is controlled with the current signal. I measured an internal resistance of 100 ohms in the actuator.
According to the datasheet, the XTR117 generates an output current which is a factor 100 higher, than the input current going into (pin 2) I_in.
Therefore, the input on pin 2 needs to be between 0 mA and 20mA/100 = 0.2 mA to provide an output of 0-20mA.

The XTR117 features a regulated 5V line (V_reg) on pin 8 relative to pin 3 (I_ret). A pull-up to this line ensures a 5V output of the optocoupler, when it is in the ON mode.

The collector to emitter saturation voltage of the optotransistor is 0.5V according to the datasheet. When the optotransistor is "open", a voltage of 4.5V at pin5 of the 4N26M is expected. This means, that a current through R3 and R4 in the RC filter at 4.5V/22.5kΩ = 0.2mA is expected, which means an output of 100*0.2mA = 20mA in the main current loop. See the schematic below:

However, there are two problems in the circuit:

When the PWM duty cycle is 100% (LED on in optocoupler) an output of approx. 2mA is generated, and not 0. I suspect that this is due to the saturation voltage of 0.5V in the optocoupler. At 0.5V, the current into XTR117 pin3 should be 0.5V/22.5kΩ = 0.02mA which should correspond to 100*0.02 ≈ 2mA on the output side. However, I can't think of a good design to avoid this scenario. What can be done?
When the duty cycle is 0% (LED off), a measured output of 19.9mA is generated, which is acceptable in this scenario. However, the signal seems to be unstable, as the controlled valve is turning a bit back and forth all the time. But when I touch with a finger at the joint between R3 and R4, the problem is not visible (valve position is stable). This effect can be replicated every time. So what is the effect of touching it, and how can I implement that in the circuit?

I hope I'm making sense! Also, if you suggestions for completely different components, which can generate the desired signal, they are more than welcome!


texts: Is a BMS supposed to be rated at your discharge current or the battery's?

texts: So if I'm making a 13s2p 48v 16Ah battery out of these cells that are rated at 200A each, (3.7v 8Ah), and if I want to power a ~30Amp motor, do I need a 200Amp BMS or a 40amp (40 not 30 because 40 is bigger than the motor discharge current to be safe)


texts: Am I exceeding a power supply's specifications?

texts:
I recently aquired an adjustable power supply and would like to know if its suitable for my project.

It is a 300W power supply with the following specifications:

Input voltage: 13V - 62V
Max input current: 5A
Output voltage: 0V - 60V
Max output current: 5A

Manual can be found here, specifications are on pages 4 and 5.

My project requires 19V with maximum load of 7.2A. From what I calculated, my project needs about 136W of power and that is well under the rating but at 19V the output current needed (at maximum load) is 7.2A and that is over the max output current rating.

Can the power supply give out the needed 7.2A even though it goes over the current limit but the wattage is still under the limit?


texts: Breadboard Wiring with Seven Segment Display

texts:
So I'm planning on building a skee ball machine and as I've been looking into it I've decided to use some seven segment displays from here:

As I've looked into this more I know I need a breadboard and I'm planning on using a solderless one found here

So my plan is to use an arduino to get input from the arcade machine and then hook up a raspberry pi to get information to the bread board and light up these displays (I'll have 7 seven segment displays, so I have enough to have the word "highscore" on display at one time).

I'm fairly new to this breadboard thing and want to know what wires I would need to connect these SSD (seven segment displays) to the breadboard. I've found a couple of different wires and they're all confusing me.

Here's the first one:

My fears with this one are:

Will they be long enough, they look rather short. 2. Are they even the right type to connect

Here's the second one:

My fears with this one are:

What's the difference between the male and female ends compared to my first one?
Will this one work?

So I'm really confused on which ones work and would appreciate some help and guidance and hopefully gain some knowledge of this.


texts:
I want to find the current through branch AB, CD, EF and GH and find out which batteries are being charged

However, the potential at A,C and E are the same(because B,D,F are equipotential and because of the way the batteries are arranged) and hence by ohm's law no current should flow through AC or CE. Consequently, the circuit across AB and CD is not a closed loop i.e it is an open circuit.

Why should any current flow through AB or DC at all?


texts: Trying unsuccessfully to heat a 12 V 1 A jacket with an 18 V battery and 5 ohm potentiometer

texts:
I"ve an electrical jacket that takes a 12 volt craftsman rechargeable battery.  If I hook it up to my power supply and set at 12 volts it works and draws 0.6 amps.   I am trying to get it to work with an 18 V rechargeable tool batter by using a potentiometer to dial down the voltage to 12 volts.  My voltmeter shows the output at the potentiometer at 12 volts but when I hook the wires to the jacket input the jacket does not turn on.  I measured the two wires going into the jacket with my voltmeter and it is 12 volts.  So I guess maybe I am not getting enough amps into the jacket or maybe too many?  But shouldn't the coat itself limit how many amps are going in based on the requirement?  I'm missing something here and any advice would be appreciated.  thank you.  -david

OK.  Thanks for the advice.  I've added a circuit diagram.  I put the middle lead of the potentiometer directly into the positive side of the jacket leads and the negative to ground.  I tested the leads going into the jacket and i can get them to measure 12 volts by adjusting the potentiometer but the jacket still does not light up.  It is turned on so should if it had the right power.  when i test the jacket leads at 12 volts for Amps I get 10 microamps when the voltmeter dial is set to measure microamps and 1.6 Amps when the voltmeter is set to measure Amps (I don't understand the discrepancy here either).  In the diagram the one on the right will light the jacket up when hooked up directly to my power supply.  ( I also bought 10 LM782 voltage regulators on ebay for $5 bucks!)


texts:
What's the best way to dim a lamp, and why? Also, which method is typically used in most typical residential dimmers? I originally thought it was as simple as wiring a potentiometer between the source and load, like this:

Or this:

Apparently not. I guess potentiometers are prone to overheating.

I notice a lot of schematics online simply add a transistor (BJT or FET):

Slightly different configuration:

I don't really understand how that's supposed to be any better, but it's relatively simple and I see it a lot.

Here's a (kind of confusing) monostable 555 PWM circuit:

Here's a 240VAC pulsing circuit that uses a diode bridge rectifier, capacitor and potentiometer:

Slightly more complicated:

Two capacitors:

And an unusual one with a transformer:

I'm sure there's probably more, but these are the schematics that I've simulated, and have on hand.


texts: How do you know that an oscilloscope is displaying the actual waveform?

texts:
As oscilloscopes get faster and faster, when designing a new scope how do you know that what it's displaying is the same as the actual waveform?  For the fastest scopes, you don't have something faster that you can use to verify that the measurement is correct.

For testing a new scope design, is there perhaps some reference circuit that produces a waveform with known characteristics so that you can tweak the probe/amplifier/digitizer until you measure what you "know" the reference circuit is producing?

Do you perhaps measure single frequency sine waves and then assume a certain rise time waveform can be measured based on the bandwidth across which the scope can accurately measure the sine waves?  What about intermodulation distortion?