Saigonauticon

@Saigonauticon@voltage.vn

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

Saigonauticon,

An international parts order is too complex for such a small thing. I’m not in the USA or China. So no TP5000 for me, got to work with what I have.

I agree, no charging at 4.2 volts. The current charger I built seems to work well enough. I ran some tests and it charges within spec. The reason I turn off the charger to measure cell voltage is because otherwise I’ll mainly be measuring SMPS noise.

Anyway it beats the charger available in the local market, which is clearly unsafe, no matter how much they assure me that it’s ‘totally OK’.

Saigonauticon,

Makes sense!

I’d order online if there was a LiFePO4 charger on the market. However, in my country I’ve been unable to find one, and importing (excise & duties, paperwork) is more work than building it myself. I’ll also likely need a design that I can cheaply include on custom PCBs for manufacture (not for sale to end-users, but for internal use by maintenance technicians).

I gave it a test on a cell today and it seems to charge fine and at a reasonable rate – but in a sudden flash of brilliance, I forgot to physically connect the ADC pin to the battery, so it couldn’t shut off. Well, that’s what testing is for I guess.

Anyway after fixing this, it looks like I can call this a win and move on. If it undergoes destructive optimization, I’ll report back here with a warning to others.

Looking for really small motors

Im building a flashlight and i want to test if a fan in it would be a good idea but the flashlight is really small so i would need a motor thats smaller than 1 cm preferably. I found really good ones at maxon group but unless you order them in bulk(1000+ units) they cost like 400€. So do yall know anywhere i could find them?...

Saigonauticon,

These are the smallest fans that I know of: www.mouser.com/new/sunon/sunon-mighty-mini-fan/

They go down to 9mm x 9mm x 3mm.

If this is to cool some component in the flashlight, have you considered a heatsink instead?

How should I get started?

Hello y’all! I’ve always been interested in computers and programming for as long as i can remember, but recently i’ve decided to try to get into some of the deeper stuff behind that, into the wonderful world of electronics. Where should I start? What courses or books or youtube series should I consume? What are some...

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.

Considering positioning strategies for autonomous mechanum-wheeled robots

Disclaimer: this is not specifically for a commercial product, but various things I design sometimes get commercialized. I mention this so that you may decide whether you want to weigh in. If it’s commercialized, I will probably make very little money but a bunch of university students may get a neat STEM program in the...

Saigonauticon,

Good advice all around! Thanks!

I’ve also messed around with the ESP8266 and various models of ESP32. Their WiFi time-of-flight stuff is interesting. I’ve quite a few projects with both actually! My main complaint is that the GPIO don’t behave nicely (also the esp8266 is a power hog and reboots if you screw up the network stack). They are much slower than I’d expect, and have weird states on boot. It’s not too bad to work around this stuff, but I chose the Pi Pico W so as not to have to explain it.

It still blows me away that I can easily do public-private key encryption on the ESP32. And graphics. At the same time!

Attiny85 the right choice for 24h led timer?

My wife gifted me this super cute mini miffy diorama from a gachapon. It uses two 1,5V cells and has a tiny led in it. I would really love to to add a 24h timer. ( it should stay on for 4 hours after turning it on then go to “standby” for 20h before turning back on) Do you guys think an attiny85 is the right thing for the...

Saigonauticon,

I use the Attiny10 in this context. At 3.5V operation and using the Watchdog timer + deep sleep… that should cost you about 4.5 uA when the lamp is off. Then a bit more when it is on (about 40uA assuming whatever the GPIO is connected to is high impedance), as you have to enable the I/O clock (but most things and peripherals can stay off). So an average consumption of 10.4 uA, or 31 years of operation off two 1.5V cells – of course they’re not rated for this long and the actual light will consume far far more power. The point is that the current consumption of the system is absolutely dominated by the light-producing component, in other words the control system is highly efficient.

You can implement as a state machine, e.g. something vaguely like:

Set WDT to trigger an interrupt instead of the RESET vector. Then set WDT to trigger after 8s. Then on wake increment a register (you will need 2 registers, 8 bits isn’t enough). Compare these registers to constants that set the timer duration. On compare match, change the machine state.

Machine state 1: GPIO HIGH, timer duration 4h, I/O clock enabled. CPU sleep mode IDLE. Machine state 2: GPIO LOW, timer duration 20h, sleep mode POWER DOWN.

I think in assembly language but should be a similar process in C++. I’ve successfully implemented very similar (night-light timing) algorithms on this chip. I can’t give you power consumption metrics as none have ever run out of power over the past 6 months.

Continuous operation of a general purpose relay?

Hello, I have a circuit that will need to return connected hardware to a default state if power is lost. The hardware can handle continuous voltage, so I’m thinking a simple solution would be to use a battery to provide that fallback power source. To avoid draining the battery, I’d like to connect it through a relay on the...

Saigonauticon,

I was thinking about that, but if they are using 12VDC + light load a MOSFET would be more cost and space efficient, and probably more electrically efficient too. No real voltage drop, and just a few milliohms added to the load.

I mainly use SSRs to switch mains power, although it’s true they can be used for other things too.

Saigonauticon,

I only concern myself with ‘how’. ‘Why’ is a question for philosophers and cowards, of which I am neither.

Saigonauticon,

I suppose you could model the Earth as a thermos, or some type of vacuum flask.

Do you think there will be a future where your phone can automatically detect if you are trying to record police activity and disables your camera? What do you think the odds of this happening is?

I remember a while back Apple filed a patent that allows concerts to disable iPhones cameras if a certain signal is emitted from the stage. Apple never implemented this, but my pessemistic ass always try to think of worse case scenarios, like being used by government. Do you think this could occur in the future?...

Saigonauticon,

Hm, uniting people in general is like herding cats. Uniting hermits? Sounds hard. I’ll stick to science :D

Being mercenary is largely overrated – better to try and live a calm and happy life filled with friends and family.

Many opinions have been offered on whether the most valuable attribute in warfare (and by this I mean business) is loyalty or bravery, but few people are willing to admit it’s actually just hunger.

Saigonauticon,

In the interests of being wholesome and helpful, I used a secure method to retrieve the contents of that URL without providing my own cookie info.

I accessed and extracted the .png image directly using a similar method, then dug through it with a hex editor. As best I can tell, there’s nothing particularly weird about the image itself or its metadata.

The HTML file pointing to the image contains a bunch of trackers from imgur. Google analytics, Facebook, scorecard research, etc. Those are certainly things to be concerned about, but I didn’t specifically notice anything unusual beyond the ordinary corporate-surveillance crudware (which was indeed written in JavaScript). None of these were in the image itself though.

Obviously it’s impossible to prove that anything is safe, and I only spent 10 minutes looking into this, so you should still follow the OP’s advice about not clicking on random links without thinking. However my quick analysis did not find anything particularly alarming.

Saigonauticon,

It seems like a way to take all the things I don’t understand particularly well, and put them in a category that I fail to define precisely.

My preference is not to do that, because I have a hard time believing in something that I can’t characterize reasonably well.

Saigonauticon,

Those things are indeed more common!

However, if the circuit was in an abnormal state (e.g. the contact with the case), then a resistor could very well blow. It would not be surprising if it took some other components down with it, and that this damage is not obvious yet. “The transistor blows to protect the fuse” is a common fail-state, facetiously stated.

Another possibility is just… bad design. You could call me adequate at circuit design (I mostly design prototypes, not finished systems that have to last thousands of hours), but regularly see commercial products designed poorly with some stupid point of failure. For example, using a 1 watt resistor that is dissipating close to 1 watt, instead of designing a more efficient system that doesn’t require dissipating heat at all.

I spend a lot of time answering questions for people just getting started. Probably 75% of them boil down to a few things. Here is that list in case amusing / useful:

  1. Relays are not a great solution in general, and there are many better alternatives (MOSFET, SSR, etc).
  2. Output impedance matters: you can’t power a huge motor off a microcontroller pin.
  3. Back-EMF from inductive loads can burn out your control system unless you add a protection diode.
  4. Lead acid batteries aren’t a magic solution to power everything. Especially automotive ones. Understand and use lithium ion.
  5. Connecting LEDs in parallel then adding a single resistor will lead to failure pretty quickly.
  6. Generally, don’t pass significant power through a switch. Use the switch to control the state of a power MOSFET or similar.
  7. Button debouncing.

Most of the rest is refusing to do other people’s homework, help people build weapons, or do unwise things with mains power / high voltage / centrifuges. Occasionally people ask me really interesting questions though, so I don’t mind that the interactions are a bit scripted the rest of the time! I’ve noticed on Lemmy I’ve gotten much more interesting questions so far!

Saigonauticon,

That sounds like a possible fail state. Also shitty design. It should use a resettable thermal fuse or something to detect faults without parts burning.

Consider maybe adding a fuse to the design?

Saigonauticon,

Sounds like science! Let us know what happens.

Saigonauticon,

Well, arguably keeping the resistor the same value would result in a somewhat known state, and changing it would put it in an unknown state. The unknown state could be better or worse. I can't see enough to know what the circuit does to say.

What you could do instead, is set the resistor to the same value, but rated for higher thermal dissipation. Then measure how hot it gets to identify if the real problem is somewhere else. Another part might burn/explode instead though, so I'd consider carefully how to proceed, and probably wear goggles + have a fire extinguisher in the room.

My main concern is by 'fixing' it with a resistor with higher thermal dissipation, I've created a fire hazard because that dissipated heat now has to 'go somewhere', which may be the plastic case. A thermal camera is handy to see if some part of the board gets unacceptably hot during normal operation.

Saigonauticon,

Well, for #2, there are excellent modules based on the TP4056 that cost 1$. They charge lithium-ion batteries only. So check the label (yes, I know it clearly says Li-ion but don't trust strangers on the internet for safety facing stuff...), if it says Li-ion, then these are great.

For #1, probably one of those fat traces in the flexible cable is BAT+ and the other is BAT-. I would look for a way to safely remove the plastic coating in such a way that I can't accidentally short circuit it. For example, exposing the copper for BAT+ on one side, and BAT- on the other.

Saigonauticon,

Wow, OK. It failed pretty hard. Fail on the light test, and failed to switch with the base saturated. Also measures a resistance close to zero between all pins.

I'm actually quite surprised! The potting compound 'surgery' went very smoothly, like peeling off a sticker. Well, these things happen when abusing semiconductors I guess. I've got spares, so no big deal. If it fails again, I'll go find an alternative BJT that does not have potting compound.

Thanks for the tip!

Saigonauticon,

Sure. From ancient memory, I think I had looked at this one: https://www.researchgate.net/publication/274365321_On_the_Piezoelectric_Effect_of_Bone

However there's a weird little caveat -- some papers attribute the piezoelectric effect to organic collagen fibers. Others attribute it to the inorganic component (apatite). In the end this paper seemed to have a reasonable measurement process so I've just ignored the exact cause of the piezoelectricity for the moment. From their tests, orientation of the bone is highly important.

They use an applied voltage of 100V then amplify (100db). I'm reasonably competent working with moderate voltages, but would prefer to try something under 30v as a matter of convenience (e.g. what I can reach with a DC-DC boost converter).

Normally though, I just hook up a crystal oscillator to a hex inverter @5V or to an MCU with some caps. I'm not entirely sure how I'd build an equivalent circuit at 30V! Doing unnatural things with crystal oscillators hasn't really come up much in my studies or career.

Saigonauticon,

I'm in the habit of being consistently unsatisfied with my own work. Even by achieving my initial goals, I learn new ways it could have been better, and it instantly becomes mediocre in my eyes.

I think this is a good habit of mine, but it requires that I attempt to accomplish meaningful work constantly. It doesn't matter too much to me exactly what I make, as long as it's something (sometimes it's code, but sometimes it's a nightmare of brass and iron and science).

Coding is not the only thing software needs. It needs bug reports, documentation, graphical designers, funding, how-to videos, and so on. There are many problems to solve and many ways to contribute, requiring a diverse set of skills!

There's a neat math proof that proves you can code if you can follow a flowchart. However, if you don't like coding, it's unlikely to be of particular interest and perhaps those other methods of contribution would bear more fruit!

Creating new content to share on Lemmy is another way to help it grow! Tell us worthy tales, share your best thoughts!

Saigonauticon,

I have the opposite problem where people think I'm being sarcastic, but I'm not. Is there a tag for that?

Saigonauticon,

The most painful lessons in life concern trusting the wrong person.

Weird cable with USB A connector with 5 pins

Hello, I recently bought a USB A to C cable and it is pretty weird. It is a USB A to USB C cable, seemingly USB 2.0 but the A connector has 5 pins, the 4 pins of USB 2 and what looks like pin 7 of USB 3.0 so in the middle of the back row, the other pins of USB 3.0 are not there and the plasting moulding only allows for that one...

Saigonauticon,

In my experience, if they don't include the conductor in the connector, there will generally not be a wire for it in the cable. So replacing the USB-C connector is probably not going to add any functionality.

I have a stack of USB-A to USB mini/micro cables that are a bit like this. Two conductors, only do charging. So if I replace the connector, there's no wire to connect the D+ / D- lines to. It's quite possible the manufacturer of your cable had some similar or otherwise reduced feature set in mind, and wanted to save 5 cents of copper.

I also have some cursed cables that have normal ports, but only two wires inside the cable (power/ground), or are otherwise out-of-spec in ways that make the data lines mostly fail. These have wasted quite a bit of my time over the years.

Saigonauticon,

It probably is at that retailer – although that’s not that good of a price for a good pan locally.

The Vietnamese market is super demanding when it comes to these things, it really drives price down and quality up. I bought a large, quite good, enameled cast iron pot recently for less than this pan costs :D

Dispose of financial records? You got it, boss.

So I once made the mistake permitting a client to store some (say a dozen) boxes of financial records in my home for a couple of weeks. By 'permit', I mean they just dumped them there, and I didn't physically restrain them from leaving. This is in Vietnam, where you are required by law to keep your corporate records for 35...

Saigonauticon,

I mean, it would have been better if they didn't go out of business, and paid my invoices. Barring that, at least I'm left with something to laugh about!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #