askelectronics

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

notthebees, in What's your solder of choice?

I have 60/40 leaded solder that worked pretty well. I’m definetly going to invest into some good lead free solder

troyunrau,
@troyunrau@lemmy.ca avatar

I’m all about the leaded solder – but I also use it very infrequently and don’t worry about the motility of my swimmers ;)

nilloc,

I think it’s the your synapses you need to worry about, but I forget, I love my 60/40 too. Still have a couple big rolls from RadioShack.

Really though if you wash hands after handling it, and use it in such small hobby scale quantities as most, it won’t matter. The smoke from the burning rosin is probably more dangerous.

TCB13, (edited ) in I sort of left the hobbyist electronics world back in 2018, and now everything seems to have an embedded Raspberry Pi in it. What's the best way to catch up?
@TCB13@lemmy.world avatar

Now suddenly, there are embedded Raspberry Pis and ESP32s doing realtime facial recognition and video feeds.

Oh yes, you can buy an ESP32-S2 for 2$ and run with Python or something higher level than C and get something that would’ve done with an AVR in days quickly up and running in hours. It is the brand new world of hardware is cheaper than developer time and nobody knows how to code anything and read datasheets anymore. Also there’s the trend of cloud-backed platforms like PlatformIO that essentially make it so you can’t ever develop anything completely offline and become hostage of some provider, ecosystem etc.

Something that might interest you is ESPHome and HomeAssistant. Heads you, you can now flash a microcontroller (be ir an Arduino/AVR or ESP) from a Chromium browser :).

ch00f,

and nobody knows how to code anything and read datasheets anymore.

You seem a bit bitter which I can relate to. As someone who cut his teeth writing assembly for an 8051, I remember feeling a bit cheesed by people using arduinos to do what could be done with a 555.

My career has gotten comfy, but I can feel my skills stagnating with all this new stuff coming out. I of course would never ship a product with a Raspberry Pi embedded in it, but I’d like to have a feel for how to solve problems using newer more advanced hardware. With that in mind, do you have any recommendations?

glibg10b, in Can someone help me identify this potentiometer from a third party Xbox controller?

Found that the resistance of this potentiometer doesn’t change when it’s moved

Are sure you’re measuring across the correct terminals? The resistance between the two terminals of the resistive portion is constant. I would expect the resistance of a failed pot to either be zero or infinite

lemming741,

It might not even be a potentiometer, more likely an encoder

pepsison52895,

There’s a test pad on the PCB labeled “LT” (left trigger). I used that and compared it’s resistance to ground to that of the right trigger’s test pad. I got about 6-10k ohms on the working one (right trigger), and 3.9-4.4 on this one.

BigDanishGuy, in Adjusting SMPS output voltage

As others have said, increasing the output by 5/6 is unrealistic. And even it would work, it’d only be for a short while. Best case is that it works and you’re home and awake when it catches fire.

Better buy a dedicated powersupply. How expensive something is, is in the eye of the beholder, but it is worth it. Most of the ones on this list can be adjusted 10 or 15% and that should get you there from 24V. And they’re actually meant to do it. dk.rs-online.com/…/switch-mode-stromforsyninger-s…

empireOfLove, (edited ) in Adjusting SMPS output voltage

Considering there is what appears to be a fixed-stepdown 12 volt AC transformer on the line side of that board, I’d be surprised if you will change anything higher via IC’s.

This may be switch-regulated for rectification and line voltage correction but it definitely does not look modifiable.

SomeoneSomewhere,

That’s not a mains frequency transformer. Not enough steel. It’s a high-frequency all-switchmode supply.

However, that’s not to say you can simply adjust the feedback and have it safely deliver near twice the voltage. The secondary side diodes and capacitors probably won’t be up to it, or will have a very limited life.

The transformer does have a ratio, and the marking makes it clear that this is a specific part for the 12V model. How much leeway there is will depend on topology. Flyback are generally fairly flexible. Other types less so.

Starting with a 24V model and either adjusting the feedback resistors or adding a few diodes would be near trivial. Many will already have a potentiometer that provides that degree of adjustment. Starting with a 12V model is an uphill battle.

user134450,

indeed it looks like a Royer oscillator in there (because there are transistors before AND after the transformer).

SomeoneSomewhere, (edited )

TO220 package diodes are pretty common in SMPS applications, so I’m not sure that’s a guarantee.

EDIT: Not sure what you’re getting at here? Royer doesn’t seem to need anything other than a rectifier on the secondary, and plenty of topologies use two power transistors on the primary.

The second smaller transformer below the main one does tend to suggest it could be a Royer, at least from my reading. I don’t see the extra switches needed for it to be a PFC stage.

There’s still a little SO-8 and optocouplers.

user134450,

skipped reading the silkscreen … it says Q1 on the lowermost package but the other three are diodes. so could also be a forward converter or something similar.

Rolive,

Well there certainly is some regulation because attaching a load does not decrease the voltage by much. Increasing the voltage is indeed ambitious for the 12V model but lowering the voltage of the 12V model seems doable.

Saigonauticon, (edited ) in How should I get started?

The most important thing is to tackle projects frequently and get yourself involved with other people doing the same. Learn by doing! I found books, videos, and so on of limited utility by comparison. I’ll include an unreasonable quantity of my notes below.

Some useful resources:

  1. Learning Python – a decent programming language to start with since it’s flexible and enforces some good habits : python.swaroopch.com
  2. Your local hackerspace, makerspace, or fablab: wiki.hackerspaces.org/List_of_Hacker_Spaces
  3. Websites with details on other people’s cool projects: hackaday.com
  4. You should also learn C / C++ (unless you are an assembly-language degenerate like me)
  5. KiCAD is fantastic these days (and free!): www.kicad.org
  6. I’ll point out that Microchip Studio is awful and buggy but for some microcontrollers you’re stuck with it. Everyone working with embedded systems gets stuck with some lousy manufacturer-supplied software sometimes.

List of initial things to learn:

  1. How to read component datasheets (you will be doing this a lot). Actually I think a lot of my electronics knowledge was picked up from just absorbing datasheets like a weird sponge of some sort.
  2. How to order from Mouser / Digikey / RS Components / Arrow / McMaster (these are also a great source of datasheets)
  3. Basic laws of electricity and magnetism (any freshman university physics textbook is OK – these pop up used all the time, and even an old one is OK). Just do all the problems in each chapter and you’ll be fine. Or you can tackle “The Art of Electronics” if you like.
  4. If you’re into analog, this is a classic (and free!) text : web.mit.edu/6.101/www/…/op_amps_everyone.pdf
  5. Soldering is actually pretty easy, just buy some resistors and some prototyping board and get some practice in. You’ll need to learn surface mount soldering to get access to good and cheap parts later on, but thankfully, it is way easier than it looks. Like, really a lot easier than people make it look.
  6. How to order manufactured circuit boards from a factory using a design in KiCAD (this is actually pretty easy and cheap!)
  7. These days, a lot of components can be purchased on pre-built ‘modules’ that fufill a certain objective. For example, a temperator sensing module might have a sensor and all the supporting components on a little board, so you just connect power+ground and data. These are made specifically with learning in mind and are made in Asia at a very reasonable price – do note though that reading the actual datasheet of the parts in question will give you much deeper knowledge over time.

Tools to buy:

  1. A soldering station. Some people suggest fancy expensive stuff, but frankly, some brands of Chinese tools have gotten quite good. Yihua is a good and affordable brand of soldering station. You can get a soldering-iron-only version if you need to save money, but I’d recommend a model that also includes a hot air rework tool. This makes fixing mistakes on boards way easier, lets you salvage components more easily from junk and failed projects, and also adds a lot of flexibility later on.
  2. A multimeter / parts tester. Should measure voltage, current, capacitance, resistance and diodes. Pro’s Kit is an OK brand from Asia.
  3. Eventually you will need an oscilloscope, but not at the start. Hantek, Rigol, and Unit-T make good entry level ones. Siglent is midrange. Tektronix is for rich kids. An old used scope is fine but often shipping is expensive if it’s one of the heavy ones.
  4. Tweezers, wire cutters and strippers. Lots of protoboard and solder.
  5. If you’re really into low-level microcontroller stuff, an AVR-ICE will be pretty cool to have a few years down the line :)

Platforms and Communities to Consider:

  1. Arduino – largest friendliest community with the most tutorials, but as such has a ton of beginners and students looking to copy/paste code without understanding. So sometimes it’s hard to find someone knowledgeable, and if you do, they might be sort of exhausted. It’s probably the best place to start these days overall.
  2. AVR Freaks – the opposite of Arduino. Hostile, but super knowledgeable. I’ve learned so much by searching their forums, I’ve never needed to ask a question! They are great too, but really not a place for beginners to ask questions. It is a good forum to read if you want to learn assembly / C for microcontrollers, but has a steep learning curve – I’d save it for later :D
  3. Raspberry Pi – makes everything super easy, generally at the cost of being horribly inefficient and somewhat expensive. It can be a good place to start, but be careful not to learn bad habits here – e.g. using a whole computer system with Linux to blink an LED. You’ll end up having to unlearn a lot to make reasonable battery-powered devices later on. Awesome where processing power is actually needed – machine vision, some robotics, and AI. The raspberry Pi Pico has fewer of these problems (and you can code in Python!) – it’s pretty fantastic and I would personally choose it as my first microcontroller.

Other Stuff:

  1. Avoid playing with mains power / high voltage until you know what you are doing.
  2. Avoid selling things until you know what FCC / CE is. You can teach courses on what you’ve learned to fund your studies though! I bootstrapped this way.
  3. Lithium batteries can be sort of tricky / hazardous. When starting out with them, use the metal cylindrical cells at first. The TP4056 is an OK charge controller to use, and pre-built modules are like a dollar in bulk.
  4. I own a prototyping company in Asia, this introduces some bias on my tool recommendations: low cost, high value – but only ‘good enough’ performance and convenience. I also hate solderless breadboards and consider them more trouble than they are worth – some people disagree with me and they are also correct. I also find surface-mount soldering way easier and more reliable than through-hole (most people disagree with me but it’s worth thinking about). Finally, I’m a 700 year old Taoist immortal that still uses a slide rule and writes poetry in Assembly language. So I’m part of an older engineering tradition and it’s worth keeping that in mind when weighing my advice.

Ping me if you get stuck or have questions :)

AzzyDev,

Oh wow! this is a lot of great detail! is Rust at all useful for embedded applications, or am i essentially restricted to C/C++? Is Adafruit also a good resource or not as much as the others? Also, besides the obvious differences in form factor and ease of use, what’s the objective difference between the RP2040 chip, and, for example, Sparkfun’s “Pro Micro” or “Thing Plus”, or is the ease-of-use by itself the main selling point?

Saigonauticon,

There are a lot of differences, but I’ll try and go over the high level ones. The RP2040 is a chip, and the others are boards – so I’ll compare the chips on them.

The RP2040 chip is really powerful overall, and does some odd things with I/O that let you do a bunch of very fast, precise things. You also get a lot of I/O pins and they are very well-behaved. The main advantage though is that it works well in both Python and C++, and is well-supported.

The ESP32 based board (Thing Plus) has integrated WiFi. The ESP32 is a great chip, I use it a lot, but it has some unfortunate quirks. First, it has a very high clock speed and decent memory, making it quite powerful. However, if you glitch out the network stack via your code, it can have some problems with unexpected resets. This was much worse with the earlier-generation ESP8266. Secondly, the I/O work much more slowly than the system clock (if I recall correctly), and they are picky about what state they have on startup – some go high as part of the boot process, others must be high or low on boot but can be used after. This is actually quite a pain sometimes. It’s a great chip overall though and works well in C++.

The Pro Micro uses an ATMEGA32 chip. I’m a huge AVR fan so I don’t have many bad things to say, I like it a lot. It is much slower than the other two chips though, and has less memory. Probably it’s best to use C++, but you ought to be able to use Assembly too if you like. The I/O on AVRs are really well-behaved and usually operate at the same speed as the chip, which is nice when you need precise timing! The best thing about it though, is it can use much less power than the other two options, if you use the sleep modes right. So you can build neat battery-powered applications. Finally AVRs have excellent datasheets – there’s rarely any ambiguity on exactly how any system on the chip works.

Overall, I’d choose an RP2040 board if I wanted to use Python and do IoT/Robots/whatever (you can buy boards with or without WiFi), an ESP32 based board if I wanted to do IoT stuff in C++, and the Pro Micro if I wanted to do low-level, low power embedded stuff in C++ or assembly (and maybe branch out into other AVR chips). The C++ options mean you can use the Arduino IDE and their libraries.

AzzyDev,

Holy shit (sorry)! You really know your stuff, or at the very least, I don’t know my stuff! I’ll keep in mind the stuff you said about the ESP32 and the ATMEGA, but I was more so referring to the editions of those dev boards that use the RP2040!

www.sparkfun.com/products/18288www.sparkfun.com/products/17745

After reading a bit more, it seems that pretty much the only difference is the IO and other supporting hardware besides just the chips. If someone (me) were working on a project where solutions like these particularly-powerful microcontrollers are required, when would it make more sense to use one of these pre-made boards for computing rather than making your own PCB designs including the chip? Is it mostly for projects where extremely compact form factors (and/or other shenanigans) aren’t necessary?

Saigonauticon,

Glad to help :)

Besides the I/O and supporting hardware, the clock speed is wildly different between these 3 chips – that’s worth considering. By that metric, the ATMEGA based designs are the slowest by far – although somewhat faster than you’d estimate since they usually operate 1 instruction per clock cycle, whereas the other chips are a few clock cycles per instruction (they are still way faster than the ATMEGA line though).

Regarding pre-made boards vs. your own? I think there are three things to consider:

  1. Pre-made boards are awesome for prototyping. Making sure the damn thing will work (feature-complete) before designing your own board is a good idea. Then, make your first board with all features added in (this is important), but expect to iterate at least once (make revisions and order boards a second time). There’s no such thing as premature optimization in hardware design – it’s not like software where you can just design the core of an application and then build features as you go. This is why always designing prototypes to be feature-complete is a good workflow, and generic development boards are a good starting point for this.
  2. Designing your own board is really easy for AVRs. I do this all the time, lately with the Attiny10. Honestly there are a ton of AVR chips out there, and not all of them have affordable / popular development boards, so often it’s worth making your own for use in item 1 above (…really you just need at minimum power and a header to break out the pins for ISP programming). Then when you want to make your final widget, you just expand your development board design, which lets you make a really miniaturized and streamlined thing! You will need an ISP programmer though, like the AVR-ICE (which has a nasty but minor bug in the design – ping me before buying one and I’ll save you 2 days of headaches setting up).
  3. A neat trick is to design your own boards and still use a dev board (so making your own boards and buying premade dev boards are not mutually exclusive options). This is especially useful with the Pi Pico and ESP32 (where making a dev board is less beginner-friendly) – a cheatcode is “castellated mounting holes”. These let you solder (for example) a Pi Pico dev board directly to your own design as a surface-mount component. You can do this by just adding a socket and using header pins too, but SMT + castellated mounting holes lets you keep the design small and reliable.

BTW when designing your own boards, committing to SMT parts (where possible) early on is one of the things I’m really glad I did. You don’t need much tooling to do it. Just a solder paste syringe, a toothpick or pin, some tweezers, and a hot air rework station (included in some soldering stations). Even 0402 parts (about the size of two grains of salt) are pretty easy to do by hand. It’s amazing the level of miniaturization that you can achieve these days this way, as a private individual with a very modest budget!

Finally, the Arduino products are generally very good dev boards, whether or not you’re using the Arduino IDE (you can still program them ASM or non-Arduino C++). So for any chip that an Arduino exists for, it’s an excellent starting point – although you may want to design your own board one day to remove unnecessary stuff if it comes out cheaper and you go through a lot of them, or just for the experience.

sramder, in How to solve power supply whine with continuous dimming LED?
@sramder@lemmy.world avatar

What’s limiting your PWM frequency? You want it above 25 KHz so it’s outside the range of human hearing.

nucleative,

I think the limitation is my own knowledge of this LEDC library. When I run it with the frequency value of 25,000 it doesn’t output anything on my GPIO pin that I can detect with my multimeter.

sramder,
@sramder@lemmy.world avatar

I’m reading the docs and it seems capable of running up into the MHz range although at higher frequencies the duty cycle resolution is reduced. Although I wouldn’t expect most multimeters to detect a frequency that high, anything should pick up the voltage.

Do you get an error on the serial monitor? It should report if the frequency/duty-cycle range you’re requesting isn’t possible.

E (196) ledc: requested frequency and duty resolution cannot be achieved, try reducing freq_hz or duty_resolution. div_param=128

SpaceNoodle, in What's the thinnest E-ink screen that is closest to 3.5×2.5 inch?

Even if you find screens that thin, all the electronics you’re going to need to make them usable will add considerable thickness.

mp3, (edited )
@mp3@lemmy.ca avatar

But once the display is updated, the circuitry isn’t really necessary. Maybe you could reduce the thickness and the duplication of circuitry by having a “dock” with the circuitry where you insert the card to update it.

Corkyskog,
@Corkyskog@sh.itjust.works avatar

That’s exactly the idea! They would have pins somewhere on the buttom, you would plug all your “cards” into a dock that would act as a carrying case. There would be an open source website where people can design different games and then you choose one of the games and it refreshes all the cards to whatever game you want to play.

That’s the idea anyway, whether it’s feasible for something people are willing to pay is a different question.

WaterWaiver, in How to improve my battery measurement circuit?

You could probably increase the 82K and 10K resistors to be much bigger (by a factor of 10x or maybe even 100x). Lookup the input impedance for the ADC of your model of ATmega, as long as it’s >10x the size of your resistors then your circuit will probably be accurate enough.

A couple more things to keep in mind:

  • a fresh alkaline 9V battery is actually 9.6V or more, not 9V.
  • 9V battery voltages droop noticeably when under load because of their high internal resistance. Make sure to measure under the same conditions.
nilclass,

You could probably increase the 82K and 10K resistors to be much bigger

That’s what I thought initially, but this stackoverflow post dissuaded me. The argument there is that the measurement will be wrong, if the input current is not enough to charge the internal cap within the measurement period. But I’ve done some testing now, and measurements done with 820k and 100k agree well with what my voltmeter measures, so I’ll go with this solution!

a fresh alkaline 9V battery is actually 9.6V or more, not 9V.

Indeed! 9.6V * 10k/92k = 1.04V is still below 1.1V, so I should be fine in this case :)

9V battery voltages droop noticeably when under load because of their high internal resistance. Make sure to measure under the same conditions.

This is a good point!

My firmware will be pretty monotonic though, basically:

  1. wake up
  2. measure battery
  3. measure some other sensors (the actual task of the device)
  4. turn on a transceiver, send all the measurements (including battery voltage)
  5. turn off transceiver & go to sleep

So, the load should be always the same at step (2).

brendan,
@brendan@mastodon.brendans-bits.com avatar

@nilclass

@WaterWaiver

From the stack exchange post: " 10 kΩ or less source resistance is recommended, otherwise the low pass filter effect of the capacitor with the source resistance becomes a major issue, requiring a longer sampling time for conversion and as a result limiting the maximum frequency."

In other words: a higher source impedance (caused by large resistors) is only going to drastically affect the results when you need to take fast repeated measurements (e.g. an AC source)

dmention7, in What is this e-paper connector?

The connector on the PCB is called a ZIF (zero insertion force) connector. Normally they are specified by the number of pins, the pitch of the pins, and whether there is any locking feature or “ear” on the sides of the ribbon cable. It looks like a standard latching connector made by any number of companies.

The ribbon cable looks like it is custom designed for the display’s electrical pin out and the mechanical design of the enclosure.

If you can figure out the mfg of the display itself, you should be able to figure out the ribbon cable pinout.

I know a fair bit about connectors and circuit fab, but not an EE so hopefully this helps!

agressivelyPassive,

I added a picture of the panel, but as written in the other comment: no manufacturer to see - at least to me.

At least pin-count-wise, the driver I linked above should fit, and all e-ink displays for hobby use do seem to be driven by SPI, but whether it’s the “same kind” of SPI and pinout…

FlanFlinger, in Radial resistors... has anybody seen these before?
@FlanFlinger@lemmy.ml avatar

I’ve had to buy some in the past for railway equipment, probably more 50’s/60’s than 70’s and 80’s

dack, in What tip should I be using to solder wires together?

Outside of a few specific cases, a standard chisel tip is all you need. Yes, even for surface mount.

The wires found in some thin flexible cables (like USB or headphone cables) are sometimes coated. Solder won’t stick unless you get it hot enough to burn off the coating, or scrape it off before soldering.

FearlessPhoenix, in How could a DC oscillator produce AC after a capacitor?

True AC is sort of “balanced” in that it has just as much positive as negative. The positive area of the waveform is the same size as the negative area. For waveforms that are sort of symmetric across the 0V with a time offset, such as a sine or square wave, this means that it is centered along the 0V line. A DC source, on the other hand, never changes voltage.

The 0V to +10V source you have is actually a -5V to +5V square AC plus a +5V DC. The capacitor is getting rid of the DC component leaving just the AC, which happens to be the -5V to +5V AC that you are getting.

pneumapunk, in Connecting several tracks to the same pad

It mostly doesn’t matter.

If it’s a high-current, high-frequency, or low-noise circuit then maybe the inductance or resistance of those traces would matter, but they’re very short so probably not.

If you’re mass-producing it, then sometimes the reflow or wave solder process works better if the traces leave the pads in particular ways. You’d talk to your manufacturer about this.

If this is a hobby project, you’re overthinking it; arrange them in a way that pleases you!

crm, in Help finding replacement charging jack

They are available on ebay, for example: https://www.ebay.com/itm/362503636436

OddFrog,

THAT’S IT thank you!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • askelectronics@discuss.tchncs.de
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #