1
4
submitted 1 day ago by geekmonkey@feddit.org to c/ece@lemmy.world
2
5
submitted 1 week ago by Grass@sh.itjust.works to c/ece@lemmy.world

I'm connecting 10 awg to 16, for testing I just used knockoff wago but I don't trust it long term

3
3
submitted 1 week ago* (last edited 1 week ago) by dragontamer@lemmy.world to c/ece@lemmy.world

I have difficulty in imagining the ideal audience for this discussion. An absolute beginner might not know how to use OpAmps yet, while a more advanced electronic engineer will probably find this post too elementary for them.

Nonetheless, I set off with the goal of adding 0.01V to a part of my circuit, and have decided that this particular configuration is ideal. So I'll discuss my reasoning and hopefully other engineers here can comment.

Motivation

I'm configuring a constant current sink (0mA through 500mA) when I started to calculate some "worst case errors". Lets assume the input is varying somewhere between 1V to 5V, and I'd like to program a DAC + Constant Current to subtract a (configurable) voltage off of the input.

For the beginners: the OpAmp sets the voltage at R1 very accurately to the DAC_Output voltage. Because R1 is connected to Ground, this means we very accurately control the current flowing down through R1 (with the NMOS in voltage-follower configuration, the voltage at the source follows the voltage at the gate).

Because R2 is connected on this circuit, the current configured at R1 is innately the same as the current flowing through R2. And now we have an accurate subtraction operation configured with the DAC

Looks straightforward, except for one thing. OpAmps like the MCP6006 have an unpredictable Voffset of 0.003V. Across my circuit, there's three OpAmps this calculation goes through, so I'd like to add 0.009V (aka: three times the Voffset) so that I have enough "wiggleroom" for the DAC to trim-away all possible errors.

Adjustment Circuit

I did switch to MINDI as Microchip's MCP6006 OpAmp is only accurately simulated in MINDI.

As the title implies, its just a combination Wildar+Peaking current mirror to generate a constant current, and then an OpAmp to subtract 0.01V from the feedback (which causes the output to "negate" and become +0.01V).

Basic Current Mirrors

https://wiki.analog.com/university/courses/electronics/text/chapter-11

Analog.com has a great wiki which goes over the Wildar + Peaking current mirror. Although they call it the "Stabilized Current Source".

The original current mirror is as follows:

A matched-pair BJT serves as the basis. (such as the BCM847B by diotec, diodes or many other manufacturers. The "M" is important with guaranteed matching specs). The left transistor converts a current into a voltage... specifically the exact voltage that is associated to the current.

Ex: 500uA current probably turns into 0.53V or so, it all depends on temperature and manufacturing, and Beta... but guess what? The two transistors are guaranteed to match (within 0.002V base offset, and within 10% Beta).

So when you take this voltage from the left transistor, and apply it to the right transistor, the right transistor now "copies" or "mirrors" the current. IE: the right transistor converts 0.53V (or whatever it was) back into 500uA or so.

This switching from Current input -> Voltage in the middle -> Current output is possible only because BCM847B has guaranteed matching specs. Alternatively, you can manually search through a pile of transistors for matching Vbe and/or Hfe/Beta (and in the 80s, people would manually measure and search for matching specs out of a box).

Peaking Current

Ah, but I don't have a basic current mirror in my circuit, do I?

This here is the "Peaking Current Mirror". Analog.com's wiki has a reasonable explanation, but this other article has a better explanation that worked for me: https://www.edn.com/peaking-current-source-has-high-rejection/

The conversion from Current -> Voltage is far more complex with the "peaking" circuit. The gist is that the additional resistor (R2 in this case) serves as negative feedback against VCC. As VCC increases, Q1 will pull pull Vce down, towards 0V (ground). And as VCC decreases, that also pulls Vce down towards 0V (because VCC going down is uhhh... just voltage dropping).

These two dropping effects create a "peak" at exactly Vcb == 0.026 Volts (assuming room temperature of 25C). I've configured the 10k resistor and 59 ohm resistor such that this peak occurs around 5V-input, the operating point of my circuit.

Now why do this? Well, this makes Q1's output voltage more independent of VCC. Or in other words, this "creates" Power-supply rejection. If VCC has noise or other regulation issues, this creates a "Zero-gain amplifier" effect where changes to VCC "refuse" to propagate down to the rest of my circuit... or at least are mitigated slightly at this juncture.

For example: a classic current mirror would output 50% more current as VCC moves from 4V to 6V. However, in this improved "peaking" circuit, the circuit barely changes between 4V and 6V.

Green is a traditional current mirror between 4V and 6V. Notice how its exactly proportional to the input voltage!!

Red is the "peaking" current mirror between 4V and 6V. By using negative-feedback to force the Vcb voltage down (as VCC goes up), the red line is far more stable against changes to VCC. In the EDN article, they run the current through TWO of these "peaking" circuits to double up on the stability. But one-layer of stability is likely sufficient for my purposes.

Wildar Current Source

Wildar is the legendary electrical engineer who designed the 741 OpAmp. As it turns out, Wildar's primary "move", the addition of one more resistor on the emitter, is compatible with the "Peaking" current source from before.

So why not combine the two techniques?

https://en.wikipedia.org/wiki/Widlar_current_source

The Wildar Current Source has numerous advantages. The main tidbit is that it helps negate the Early Voltage in BJTs (making our current-output more resilient against changes in output voltage).

Note the scale. All of this graph is zoomed in between 9uA and 10.5uA. So the "original" current mirror is still quite good at current regulation (only a 10% difference of current despite the voltage swinging from 0 through 10 volts).

However, we can improve upon this current regulation dramatically by adding the resistor turning us into a Wildar Current Source. The regulation tightens much more, with a minimum 9.78uA current to 10.03uA (only a 2.5% swing). This is because the emitter-resistor is hampering the "Early Effect" (discovered by Dr. Early), which kinda-sorta makes the BJT look like a non-ideal current source.

Note: a Wilson current mirror would work even better, but that requires 1.2V minimum. My circuit actually goes down to 0.9V, which is much too low for the Wilson current mirror.

Wildar Current sources also have additional benefits that aren't too relevant. First they require much smaller resistors, which is a benefit in ICs like the 741 OpAmp (even today large resistors are difficult to build on modern IC processes. Small resistors are just easier to make more consistent). Wildar Current Mirrors also don't need as tight matching between Beta/Hfe or Vbe between the two transistors. The resistors help stabilize the circuit vs changing manufacturing tolerances of the transistors. Finally, the Wildar Current Source actually makes the "peaking" circuit better at rejecting input voltage swings... a bit of unexpected synergy between these two designs!

Questions? Comments?

Its a bit of a stream of consciousness but I hope you all enjoyed this breakdown. Please let me know if I forgot something or if something is unclear.

All in all, a relatively high quality constant current sink can be implemented with just three resistors and one matched-pair BJT, for a total of 5 components on your PCB. Or alternatively, you flip it all around and use PNP Transistors to create a constant current source. Hopefully you analog engineers out there can use this technique to build something cool.

Voltage regulators are commonly solved with dedicated ICs today. But current sources are actually quite easy to make yourself out of just a few resistors and a matched-pair transistor.

The standard current mirror is much easier to think about (configured with basically a singular resistor, or even with "nothing" if you have a signal already in the form of some kind of current-output). However, the "peaking" circuit improves input voltage rejection with only one additional resistor, while the "Wildar" circuit improves output impedance with another additional resistor.

The downside is ... you need to do far more math and simulations to "set" the output current correctly. A lot more math (the emitter resistor on the output transistor has a logarithm relationship to the input... and the two input resistors to the peaking circuit have non-intuitive calculations). But anyone going into this hobby is probably not afraid of a few logarithms or math subjects, right?

4
5
submitted 3 weeks ago* (last edited 3 weeks ago) by Gulliver@lemmy.zip to c/ece@lemmy.world

What would be the salary difference between an RF design Engineer and an IC design Engineer in pourcentage.

Is there clearly one of the speciality with a higher average salary or are they more or less equivalent?

5
10
Analyzing USB (lemmy.world)
submitted 1 month ago* (last edited 1 month ago) by za_warudo_steve_freiheit@lemmy.world to c/ece@lemmy.world

How do people use an oscilloscope to analyze USB packets and such? I saw a video by Ben Eater and the way he did it was by exposing the necessary wires of a USB cable and probing those. Is this standard or are there types out there that have this functionally built-in as some accessory or something?

Edit: logic analyzers are pretty interesting

6
6

I was gifted this ~2010 Toshiba Portégé. Surprisingly small and thin for its age. I was hoping to revive it, but it has only 1GB of memory ootb.

Apparently it can be upgraded up to 5GB with one spare slot that currently sits empty.

I found 2 physically compatible identical 2GB modules but no matter which one I plug in, when I start the computer it just starts the fan on highest setting and nothing else happens.

Before I go into any more detail, I found this info online:

The Toshiba Portege R600 Laptop takes the PC2-6400 DDR2-800 200pin SDRAM SODIMM memory type

My sticks look like this:

Are they compatible to PC2-6400 DDR2-800 200pin SDRAM SODIMM? I honestly can't tell.


I read the manual which says the modules need to be "Toshiba approved" but it does not say which/what Toshiba approves.

Plus this, which I did follow (note the negative):

Do not try to install or remove a memory module under the following conditions.

a. The computer is turned on.
b. The computer was shut down in either Sleep or Hibernation Mode.
c. Wake-up on LAN is enabled.
d. Wake-up on Wireless LAN is enabled.
e. The wireless communication switch is turned on.

And this does not happen:

If you install a memory module that is not compatible with the computer, the Power indicator will flash (on for 0.5 seconds, off for 0.5 seconds) in the following way;
■ If there is an error: repeatedly flashes orange twice, then white or green once

The power indicator ⏻ stays white all the time and does not blink.


TIA

7
31
submitted 2 months ago by inquanto@lemmy.world to c/ece@lemmy.world

So i have these Rode Wireless Microphones at Work that you connect to your phone with a USB-C cable. Thing is the cable they ship with is absolute trash and breaks after about 3 uses. So i got the idea to try and build a 3d printed thingie with a protruding usb-c port that you could slide onto your phone sort of like the old iphone music docks. Then on the back you could slide in the rode receiver, thus eliminating any cable twisting. I thought this would be easiest if i had the pictured usb-c breakouts, because they have mounting holes that i could fix firmly into the 3d printed part. I picked a 24 pin version thinking this would cover all the necessary usb-c specs to get at least something like a usb 3.0 connection as I don't think the rode mics need super high data transfer or power delivery above 5v. Alas the pictured "cable" didn't do the trick and the mic wasn't recognized by the phone. So I'm wondering would it even be possible to build something like this with breakouts or am I missing things. Do usb-c cables usually have chips that negotiate voltage and transfer specs between devices? Am i missing shielding, or is my wire gauge totally off?

I can probably still build a mic holder thingy using a short premade silicone cable, but I'm still curious if this setup could work in theory or if there are other breakouts that could make this work.

Thanks for your help!

8
8
submitted 2 months ago by Zaelaa@lemmy.zip to c/ece@lemmy.world
9
14
submitted 3 months ago* (last edited 3 months ago) by Zaelaa@lemmy.zip to c/ece@lemmy.world
10
7
submitted 3 months ago by dragontamer@lemmy.world to c/ece@lemmy.world

AVR is one of my favorite chips as a hobbyist. 8-bits, manuals in the less than 500 pages region (very small compared to Cortex-M0+ which are closer to the 1000 or 2000 page long regions if we include instruction sets and other details), etc. etc. So I'm happy to see Microchip continue to support simpler 8-bit chips for those who need them.

For those looking to use this chip exactly: it seems like AVR LA specializes in low-cost, low-power, and capacitive touch. Most components have been stripped out, the ADC is only 10-bits, there's no more dual power supply (like AVR DD, DB, or DA), there's no special features like op-amps (AVR DB), or programmable gain differential ADCs (like AVR EA or EB).

You do get event system, CCLs (AVR's feature of LUTs, functioning as useful "glue logic" that can implement a few simple XOR, AND, OR, NOT gates for those who need simple glue), RTC, and PTC (aka: Peripheral Touch Controller, Microchip's system of building capacitive touch).

At 1.62V minimum (and up to 5.5V maximum), this is seemingly the lowest voltage I've seen from AVR lines. For anyone with a buck or boost converter in their designs, this should lower power usage a fair bit over the 1.8V previous minimums.

Finally, the 5k unit pricing is around 50-cents or so. This is the cheapest AVR 8-bit you can buy, if anyone were doing a large scale mass manufacturing line. But for most hobbyistss, I don't believe we can sufficiently tell the difference between 50c chips and $2.00 chips.

So its very barebones outside of capacitive touch. Still, this shows a commitment from Microchip to continue to support AVR chips and their ecosystem. I would recommend beginners use the AVR DB instead (which come with 3x OpAmps and far more features), unless you really want a barebones capacitive touch controller.

11
10
submitted 5 months ago by Valuy@lemmy.zip to c/ece@lemmy.world
12
43
submitted 5 months ago by Valuy@lemmy.zip to c/ece@lemmy.world
13
7
submitted 6 months ago by Valnao@sh.itjust.works to c/ece@lemmy.world
14
12
submitted 6 months ago* (last edited 6 months ago) by Valnao@sh.itjust.works to c/ece@lemmy.world
15
14
submitted 6 months ago by Valnao@sh.itjust.works to c/ece@lemmy.world
16
10
submitted 6 months ago* (last edited 6 months ago) by emotional_soup_88@programming.dev to c/ece@lemmy.world

I ordered a MiniTools test clip to start experimenting with flashing EEPROMs. There was no information on the retailer's website regarding the width of the pins. This is what I got:

I asked MiniTools if they have any solution to this. They said "no". I then realized that this clip was probably meant for soldering. Which I haven't had the energy to learn yet.

I ended up buying the expensive Pomodo one.

The flashing went well.

17
2
submitted 7 months ago* (last edited 7 months ago) by emotional_soup_88@programming.dev to c/ece@lemmy.world

cross-posted from: https://programming.dev/post/47186720

Edit: this guide doesn't seem to mention it https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t480-type-20l5-20l6/20l6/20l6s01q2y/document-userguide

I was flashing Libreboot on to my ThinkPad T480, when I noticed this little button. Sorry for the poor images!

18
8
submitted 7 months ago* (last edited 7 months ago) by Valnao@sh.itjust.works to c/ece@lemmy.world
19
5
submitted 8 months ago* (last edited 8 months ago) by Aleyan@lemmy.world to c/ece@lemmy.world
20
11
submitted 8 months ago by Tobirik@sh.itjust.works to c/ece@lemmy.world
21
8
submitted 8 months ago by ch00f@lemmy.world to c/ece@lemmy.world

I've been researching micros for a new project. I've already got some prototype code running on an STM32F407 disco, but I thought I'd try finding a costed down option for the final design.

I was surprised to find that the STM32H725 is not only cheaper, but it can run at 550MHz, has twice the memory, and has more advanced peripherals. Even the power numbers are similar if you slow it down to 170MHz to match the STM32F4.

The only real knock I could find on the H7 is that its smallest package is 10x10 over 7x7 on the F4.

So what's the deal? Is the price based on the actual value of the chip or is there some legacy stuff priced in?

I've never worked with an M7 core. Any other caveats I should be worried about?

22
-4
submitted 8 months ago by nelkazzu@lemmy.world to c/ece@lemmy.world
23
3
submitted 9 months ago* (last edited 9 months ago) by leseci@sh.itjust.works to c/ece@lemmy.world
24
14
submitted 9 months ago* (last edited 9 months ago) by emotional_soup_88@programming.dev to c/ece@lemmy.world

Edit: this post and my questions within were poorly formulated, mostly because I made the assumption that there is a correlation between common word sizes in CPU architecture and why I couldn't find decimal to signed binary converters online that allow me to set "word size"/number of bits I want to work with.

I am a complete beginner in the field of computers.

I am reading Code - the hidden language of computer hardware and software by Charles Petzold (2009) and I just learned how we electronically express the logic of subtraction without using a minus sign or an extra bit to indicate positive/negative: we use two's complement (yes, I realize that the most significant bit incidentally acts as the sign bit, but we don't need an extra bit). Anyway, I experimented with trying to convert both decimal and binary values into their signed counterparts, just as an exercise. To be sure that I wasn't doing anything wrong, I wanted to double check my calculations with some "decimal to signed binary calculators" on the Internet.

I was trying to express -255 in signed binary using 10 bits. I wanted to use only 10 bits because I wanted to save on resources. To express the 1000 possible values between -500 and 499, I only need 10 bits, which unsigned goes between 0 and 1023. I calculated -255 to be 1100000001 in 10-bit signed binary (because 255 is 0011111111, which you invert to get to one's complement and finally you add 1).

I couldn't find any converters on the Internet that allows me to set the maximum value/length, in this case 10 bits. I found a few that are 8 bit and a few that are 16 bit, which made me think of our gaming consoles that to my knowledge evolved in increments of 8, 16, 32, 64.

I understand that we use binary to express Boolean logic and arithmetics in electronics because regulating voltage to have transistors be in one of two values is consistent with the true/false values of Boolean logic and because of the technical difficulties in maintaining stable voltages in ternary and above.

But why didn't I find any converters online that allow me to set the bit length? Why did the gaming consoles' maximum bit length evolve in those specific increments? Are there no processor architectures of other values than these?

25
1
submitted 9 months ago by waleyou@lemmy.world to c/ece@lemmy.world
view more: next ›

Electrical and Computer Engineering

3130 readers
4 users here now

Electrical and computer engineering (ECE) community, for professionals and learners. Discuss ECE related topics here, for instance digital design, signal processing, circuit analysis, electromagnetics, microelectronics, power electronics, RF electronics, etc.

founded 3 years ago
MODERATORS