Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Splode
Jun 18, 2013

put some clothes on you little freak
Tear downs of cheap chinese stuff will make you read the china thread in GBS and nod sagely. It is insane. The people who made it are insane. It's breathtaking how much effort has been put into half-assing stuff in such a way that makes it insanely dangerous. First, you'll find yourself exclaiming "surely this is actually more effort than just doing it properly". Eventually, you will stop and let the madness consume you.

Expensive chinese stuff just meant a foreigner was there to start screaming incoherently when presented with a capacitor made of other, smaller capacitors.

Adbot
ADBOT LOVES YOU

Splode
Jun 18, 2013

put some clothes on you little freak
You shouldn't use tantalum caps if you can avoid it anyway, they're a conflict resource.

Splode
Jun 18, 2013

put some clothes on you little freak

ate all the Oreos posted:

Ah I'll keep an eye out for this. The thing i'm working on now has a 1.5A fuse already though (because I salvaged a bunch of SMD ones!) and as far as I can tell the caps are rated 16V vs. the 12V my circuit runs at so I think it'll be okay.

Also I had no idea tiny ceramic SMD capacitors could have such huge values, I put in a few SMD spaces to solder in ceramic caps thinking they'd be in the nF to pF range and I measure some tiny ones and they're 10-100uF somehow :aaaaa:

e: Well tiny by my standards, they're pretty big as far as SMD caps go I guess

1uF is about as big as I go for ceramic SMD capacitors (in the 0805 size anyway). You can get values above that, as you've seen, but they tend to have really lovely other properties or are just expensive. What are you pulling these high value ceramics out of?

Splode
Jun 18, 2013

put some clothes on you little freak
Oh for sure, but I had no idea until someone told me fairly recently, so I figured I'd point it out for anyone else who didn't realise.

Splode
Jun 18, 2013

put some clothes on you little freak

Sagebrush posted:

i'm a big fan of the "standard" on small wall-wart power supplies where the wire with the stripe is positive except when it's negative almost exactly 50% of the time.

*borat voice*
....................NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOO-

I was told the stripe was a minus sign to indicate negative. I am glad I checked. I still check three times every time I use one.

I have a pair of Bluetooth earphones that I had to replace the lithium ion battery in. They'd used black wire for positive and red for negative. Whyyyy.

Splode
Jun 18, 2013

put some clothes on you little freak

Stabby McDamage posted:

General question: What is a nice module to provide an all-in-one interface to an Arduino as lazily as possible? The battery tester I showed above is currently controlled over serial, but that's problematic for a few reasons (have to leave computer on to stream data, Arduino resets on USB connection by default). I've used various little LCD character displays, but I'm wondering if there's a board with a decent LCD which also comes with some form of input mechanism (buttons, touchscreen, etc.), preferably with fairly simple usability.

Basically, I'd like a module I can slap in any Arduino-powered project and quickly have a half-decent interface without a bunch of work. Is there such a thing?

I have a few of these TM1638-based things, which are 7-segments + buttons, but a 7-segment display is a little weak for most applications. Wondering if there's one step up from there.

Yes there is!

https://www.jaycar.com.au/arduino-compatible-2-x-16-lcd-controller-module/p/XC4454

Apologies for Australian supplier, but this will be all over ebay too. Note that all the buttons are on a single analog pin, which makes debouncing a pain, but saves pins. There's also an issue with the backlight control pin being finnacky, I just cut it off once I found it (leaving the back light on permanently)

Works with the default arduino lcd library, and it's very cheap.

Splode
Jun 18, 2013

put some clothes on you little freak
I used to use a heat gun, solder paste and tweezers for surface mount parts. Works for almost everything.

Splode
Jun 18, 2013

put some clothes on you little freak

Stabby McDamage posted:

I was about to reply "how do you connect other stuff if it eats all the pins", but now I see it has a spot for headers, so I'm ordering a bunch. Thanks!

I just soldered wires on to the wrong side of the mounting headers it has because I'm a dodgy bastard. Make sure the holes for extra headers are actually connected because they weren't on mine for some unknown reason

Splode
Jun 18, 2013

put some clothes on you little freak
Yeah that's what optocouplers were designed to do. The datasheets will usually give you an example circuit to show how to use it safely too.

Splode
Jun 18, 2013

put some clothes on you little freak
We used a PIC16Fwhatever whatever in my uni course to learn assembly and C.

The differences between microcontrollers these days doesn't seem to matter that much, unless you need a very specific set of peripherals there's almost always a micro from both atmel and microchip that'll work fine

Splode
Jun 18, 2013

put some clothes on you little freak
Avoiding playing with microcontroller deep sleep states by controlling the power to the microcontroller is another approach but it's tricky: you're writing code that "shoots itself in the head", so you have to have circuitry to turn the micocontroller back on after turning it off. And if that circuit draws power at all times that can be worse than just putting the micro to sleep.

The difficulty here almost perfectly correlates with just how much power you need to save.

Splode
Jun 18, 2013

put some clothes on you little freak

MockingQuantum posted:

That's what I suspected. They're resistant to using microcontrollers because they've had a lot of issues with them in the past, but I think that comes down to the person implementing them not really taking the time to figure out what they are doing and how to make them robust enough that people going through the room won't accidentally disconnect things. I have a lot more programming experience than electronics experience so I'm honestly pretty sure I could do both of these pretty easily in code. It's mostly the ballistic meter and the actual method (be it a radio transmitter or whatever) of using the EMF that I have no idea on.

If you're a programmer originally definitely just use a microcontroller, whoever they used previously must have been a real dope.

You could do it with an FPGA if you were insane or your wife made the same puzzles for fifty million escape rooms.

Splode
Jun 18, 2013

put some clothes on you little freak
Imagine how amazed they'll be when they discover soldering exists!

That is a very funny escape room problem though, every time I've been at one somebody has broken something while looking for clues.

I don't know why they think the problem is microcontrollers though, different electronics will have exactly the same issues.

Splode
Jun 18, 2013

put some clothes on you little freak

Malcolm XML posted:

So my house lights use an unencrypted u authenticated protocol to set dim levels

If I change house number to, say 10, I gently caress with my neighbors


They came with the house and are wired in with 433.92 MHz wireless controllers, and are considered pretty high end which means the wall switches cost 125 earth dollars to replace

Welcome to the Internet of poo poo

Splode
Jun 18, 2013

put some clothes on you little freak
yeah custom gearing* on that 400rpm 0.1kgcm motor sounds like the solution that's most likely to work, though obviously making your own gearbox* is going to be a bit of a pain.

*gears or belts would both work

I would personally have found a 9V or 12V H-bridge from the start, but if you've already found your components it doesn't really matter. 6m per minute sounds way too slow though.

Whatever you decide on, please keep the thread updated, I have a similar project in mind and I'd love to see how you go about doing everything.

Splode
Jun 18, 2013

put some clothes on you little freak
Stepping up the voltage isn't worth the trouble in this case.

Using the lego gears sounds like your best bet, that's nice and easy.

Splode
Jun 18, 2013

put some clothes on you little freak

ate all the Oreos posted:

KiCAD is one of the easiest ones I've used so... yes. The real fancy paid pro poo poo like Altium has a better workflow in my opinion but also several orders of magnitude more complexity and things to tweak and fiddle with

If you just want something incredibly stupid-simple you can try Upverter, it's browser-based and free and I made my first actual board with it (and then moved to KiCAD because it's more powerful)

Altium is one of the hardest programs I've ever had to learn, but mostly because it doesn't use many of the common software conventions (for example, you press ctrl+c to copy, and yes, this is the correct shortcut, however it will now expect you to click a point that will be the "origin" of the thing you're copying. If you don't notice this and click somewhere, you won't copy. Another example is that you press 'w' in schematic to draw a wire, and 't' in the PCB design to draw a track. Considering that tracks and wires are effectively exactly the same thing, and that it's impossible to draw a wire in PCB mode or a track in schematic mode, there is literally no reason they shouldn't share a hotkey.

The whole program is like this, it took me a few weeks to be able to use it and about 6 months to work out the best workflow (mainly because you don't realise your workflow isn't good until you come back 3 months later to make changes). There's about a million ways to do your component library for a project and all of them are wrong.

And Altium is meant to be one of the best and easiest so, uhh, yeah they're all awful.

Splode
Jun 18, 2013

put some clothes on you little freak

Kea posted:

Motor stuff

Sorry if this is really boring to everyone.

Not at all, and this is the sort of stuff that is hardest to learn. Engineering courses show you the formulas involved, and you realise you're never going to know enough about the finished product for them to be useful, and most online advice for this sort of things starts assuming you have already found appropriate motors. Keep posting updates, and throw some pictures in towards the end.

--

Gromit posted:

Magic random box

Geez this guy claims not to be an electronics engineer but he knows more about it than most mechatronic engineering graduates I know.

--

I have just finished my personal project.
I wanted a way of turning my heater on in the mornings remotely, so that I didn't have to get out of bed to warm the room up (because then I'd be cold).
I also wanted my heater to turn itself off at night after I'd gone to sleep, so I didn't accidentally leave it on all night.
Because I could I figured I'd also add thermostat style temperature control, as the heater itself doesn't have one.

My first prototype used an Arduino Uno and a relay (interrupting the active on an extension cable) to control the heater. There was a hard coded time zone in the evenings when it would turn itself on, and a switch to override the time period and turn the heater on immediately (the override reset itself at midnight).
To track the current time, rather than using a dedicated RTC, I just used the Uno's crystal. It wasn't super accurate but losing a few minutes a day didn't matter. The problem was that I had to manually set the time every time it lost power, over serial. I set the target temperature this way too. This sucked, as programming the thing with a laptop was more inconvenient than just operating the heater manually, so that winter it just didn't get used.

As a stop-gap measure, I added a bluetooth module I had kicking around from a university project. This let me talk to it using a bluetooth serial terminal app on my phone, and that was good enough that I've been using it all winter.

But, after hearing about ESP8266s I knew I could make a way cooler version of the same device.
The new device uses an ESP8266, which lets me control the device via a webpage on my local network. Now, I can control and monitor the heater from any phone or computer without needing an app, and from multiple devices at the same time.

It also means that instead of doing the time tracking myself, the ESP8266 can just go and get internet time. This means no more reprogramming the time in the event of a power loss. (ti also means if my router goes down my heater will think time has stopped, but welcome to the Internet Of poo poo).




A pushbutton with an inbuilt LED lets me toggle the timer override, and the LED indicates whether it's activated or not (this was a problem in the original prototype, as the timer override could be toggled by either software or hardware, the physical position of the switch didn't give you any indication of whether the timer was overriden or not.)
I replaced the temp sensor with a better one I had lying around from a different uni project, 3D printed a custom case, and bob's your uncle, fanny's your aunt, I never have to get out of bed again.

The thing is basically a fancy remote controlled extension cord. I carefully removed some of the insulation on an extension cord, and only severed the active line. This was soldered to the terminals of the relay board, as I do not trust those lovely screw terminals at all, especially when it's 2400W through multicore cable.

Huge shoutout to the 3D printing thread who helped me beat my uncooperative bargain bin 3D printer into working long enough to finish the long, long print.

Splode fucked around with this message at 07:40 on Jul 28, 2017

Splode
Jun 18, 2013

put some clothes on you little freak

Malcolm XML posted:

Imo if I was ever going to send mains through a PCB id use surface mount wago connectors

Yeah I'm not completely happy with the mains stuff, but the module doing it currently claims it can handle it.

The internal temperature sensor is reporting a temperature a few degrees higher than the rest of the room, but nothing alarming, and that's probably just from the relay coil being energised for long periods.

edit: just did a little more research and it seems like, electrically, the mains connections it should be fine. I am not worried about the physical connection as strain relief is provided by the design of the enclosure.

Splode fucked around with this message at 13:31 on Jul 28, 2017

Splode
Jun 18, 2013

put some clothes on you little freak

ickna posted:

In my experience using a DHT11/22 sensor with an ESP board without an enclosure, there was also an elevated temp reading relative to the room. It turns out the ESP chip itself was the source of the extra heat and moving the sensor about 30cm away gave more accurate readings

Oh right of course, thanks.

babyeatingpsychopath posted:

I've got a thing that's running with relays and physical switches that I want to control remotely. The switches are 120V, switching 120V relays to control 240V power to a number of things. This part is working wonderfully, and I'd like to just replace the switches with something I can control with logic, preferably 3.3V.

There are 8 switches right now, and I'd like to keep the whole project under $40 and I still have to get the controller, but that's going to be some flavor of ESP module.

What's the current go-to for switching a 120V low-amp load for less than $2/module?
edit: The relays pull 30-190mA each, switching ~50A 240VAC.

I'm not sure I am following, are you using relays that have a 120V input voltage? The only way to switch that is going to be another relay.

Assuming I've misunderstood,
To switch a relay with a microcontroller you need a mosfet. Mosfets cost cents. In the event you need to switch a huge load you can use a small mosfet to switch a bigger one too.

If those existing relays really do require 120V input, you'll need to buy some 3.3V or 5V (input voltage) relays rated to least 120V and energise them with an n channel mosfet. Most circuits I see for this purpose also have a diode. If you google mosfet relay circuit on Google Images you will see what you need.

Splode
Jun 18, 2013

put some clothes on you little freak

ate all the Oreos posted:

I was going to say that 3D printers aren't meant to run 24/7 unattended but actually that's how most people use them so :shrug:

Yeah nobody is going to sit there watching their printer work for 3 days.

--

I've ordered a beefier relay from a more reputable manufacturer to hopefully swap with the one in my module. I'm hoping it doesn't produce as much heat when operating for long periods (but I'm not holding my breath).
Why can't all household appliances have an accessible serial port and open source command set, geez.

Splode
Jun 18, 2013

put some clothes on you little freak
Flukes are good but seriously overpriced

Splode
Jun 18, 2013

put some clothes on you little freak
Swapped out the cheap chinese mystery brand relay for a nice Polish one today. It's not worth tempting the magical house fire fairy and becoming a cautionary tale.

Splode
Jun 18, 2013

put some clothes on you little freak

poeticoddity posted:

The encoders I've been looking at are the $15-30 ones on Digikey that are generally meant for use with a knob in applications where a potentiometer won't work. They're quadrature output and have 32 pulses per revolution.

I was able to dig up a bit more and it looks like I shouldn't need debouncing circuitry like I did with mechanical ones. The data sheets had me a bit confused at first but eventually I figured out that the bounce specs were just for the pushbutton function, since they were absent in datasheets for encoders without pushbuttons.

Thanks for the tips. If my circuit acts up, I'll scope it out.

Post your results, I'd be interested to hear about it. Last time I used a mechanical rotary encoder debouncing it in software was a huge pain in the arse, so if there's a better alternative I'm all ears.

Splode
Jun 18, 2013

put some clothes on you little freak
I upgraded my heater controller today. Someone in the thread pointed out that the higher than expected temperatures were probably being caused by the ESP8266 getting warm next to the temperature sensor.
So now there's a second ESP8266 with temperature sensor in the room, which communicates over the WIFI using UDP to give the heater controller a more accurate temperature (which is roughly two degrees lower, as expected).

The original temperature sensor inside the enclosure now acts solely as a safety device or backup reading if the other sensor is not available.

ESP8266s are fantastic, I was able to throw this together in just a few hours.

Splode fucked around with this message at 02:41 on Aug 24, 2017

Splode
Jun 18, 2013

put some clothes on you little freak

Fat Turkey posted:

Haha yeah I've been watching that guys videos and it's partially an inspiration for this. I don't have access to old laptops or TVs and felt using LED strips of sufficient brightness would be the safer and easier method.

I guess part of the learning curve is I'm not exactly sure how bright i want the LEDs to be. While i want it to simulate daylight in a dark hall, i don't want it to be like staring into the midday sun! But a frosted covering should spread the light sufficiently for that.

Yeah i wasn't sure about his PWM approach as being efficient which is why i wondered about voltage regulation. Not quite sure how i could get the output of an Arduino be either more efficient and/or actually power the LEDs (they'll need a 12-24 volt supply, which Arduino doesn't output), so i guess i need to read up how that output could trigger the supply.

I'm pretty certain I'll at least attempt the project and can document it for others.

Voltage regulation doesn't work for LEDs. You'll just cross a voltage threshold point and they'll turn off. Their brightness is instead controlled using either current (in a fixed circuit) or PWM (as turning them on and off rapidly adequately tricks your brain).

This is why people have trouble when they try and use old school light bulb dimming circuits to control LED ceiling lights. They just flicker weirdly rather than dim.

Splode
Jun 18, 2013

put some clothes on you little freak
If your hobby project involves gas then perhaps reconsider.

Splode
Jun 18, 2013

put some clothes on you little freak

babyeatingpsychopath posted:

Ok, thread, I'm looking for a speed sensor. I've got a motorcycle that's vibrating all my hall effect stuff to death, so I would like some kind of doppler sensor. Are there cheap ones?

Speeds are normal vehicle speeds, say 0-100mph.

GPS would work for that depending on the accuracy you need

Splode
Jun 18, 2013

put some clothes on you little freak
I have done both of these things!

Li Ion bluetooth headphone battery replacement: yes, you can just swap it with a similar model. Working reliably for months since I made the swap. As others have said, don't be too rough with it, and triple check polarity: my headphones used a red wire for ground and a black wire for positive!

Mains relay guy: neither of those modules appear to support 10A, so you would need to be very careful about which appliances you used with it, and integrate a 2A fuse. I made one of these with a seperate esp board and a pcb relay module with an electromechanical relay (not solid state), and ran a heater through it because I'm a crazy person. Don't worry thread, I've since retired it. It did work totally fine but its a big risk. If you find those UL certified modules post them in the thread, they'll be bulky and expensive but a safer option.

Splode
Jun 18, 2013

put some clothes on you little freak
That's the best textbook

Splode
Jun 18, 2013

put some clothes on you little freak

ate all the Oreos posted:

I'm pretty sure this is true but I want to verify before I melt anything: I have a motor rated for 24V, I would like it to be able to spin faster than it does at 24V, but only for short periods of time. I can feed 30V into it and then use PWM to control the speed, and as long as I keep the duty cycle on the PWM low most of the time it won't destroy itself right? I assume the main mode of failure here would be overheating, am I leaving anything out?

I assume there's some reason you can't achieve this with gears?

Splode
Jun 18, 2013

put some clothes on you little freak
I just use side cutters to strip wires. Took a day or so to get the hang of it, now I can reliably strip any cable of any size with probably the most common electronics tool, so it's worth learning how to do it.

Splode
Jun 18, 2013

put some clothes on you little freak

His Divine Shadow posted:

Well poo poo.... installed a transformer today for the LED strips outside, but in my hurry I put the bloody thing the wrong way around, turned it on and a breaker flew, unfortunately the transformer got damaged:


Most of the board seems ok, it seems the copper path is what blew up, and also it looks like a component named C12 bridged the positive and negative of the output side, I assume a diode? Think this can be salvaged? Thinking bridging the broken path by soldering a wire perhaps. Not sure what diode would be needed.

Yeah this will never work again sorry mate

Splode
Jun 18, 2013

put some clothes on you little freak

His Divine Shadow posted:

Well I don't know how to make sure of that, other than trying it, been outside now running all last night and this morning.

Then it Works Fine™, congratulations

Splode
Jun 18, 2013

put some clothes on you little freak
I assume comparators are generally cheaper than rail-to-rail op amps so that might be a reason for that rule of thumb?

Splode
Jun 18, 2013

put some clothes on you little freak

insta posted:

I have a potential need to monitor voltages in a battery pack. The pack voltage is 144v nominal (185v peak) and there are 10 taps along the way. What is the normal, automated way to do this? (ie not sticking a volt meter in the taps).

Analogue to digital converter behind a negative gain amplifier?

That would 'work' but I've never worked with anything higher than 48v so I'm not entirely sure how easy it is to make an amplifier that can handle 200v.

Edit; oops didn't refresh thread

Splode
Jun 18, 2013

put some clothes on you little freak

Mudfly posted:

I watched a youtube video in which a guy controlled a DC motor with a TRIAC and a rectifier. Looked easy, so off I went to ebay and bought a couple.
I pushed the rpm past a certain point on the motor and the breaker went in the house. A large blue spark occurred, possibly from the TRIAC controller. Now whenever I try to start the motor with the dimmer switch blue sparks come out of the triac. Any idea what I've done?

What kind of DC motor?

Splode
Jun 18, 2013

put some clothes on you little freak
I have done it with a stencil, I've also done it with a syringe full of solder paste. Both methods aren't much fun.

Getting the paste on with the stencil can be tough but it's reasonably ok putting down components afterwards with tweezers. QFNs and 0402 passives suck but it's the only way.

At 150 units I would use a pick and place machine for sure, but obviously you probably don't have access to one. Might be worth looking into assembly services if budget permits.

Splode fucked around with this message at 08:50 on Feb 6, 2018

Splode
Jun 18, 2013

put some clothes on you little freak
I use an exacto knife for that kind of repair, it works fine you just have to be gentle.

Your procedure is fine but I've never bothered to fill the gauges or put tape over the repair. Tape is going to rip the wire free if you ever remove it to check the mod.

Adbot
ADBOT LOVES YOU

Splode
Jun 18, 2013

put some clothes on you little freak

ate all the Oreos posted:

I finally got around to making a dinky little breakout board for one of the PIC16's I bought a while back and trying to program it and jeez these things are way nicer than AVR's I can't believe I haven't tried them until now. It's just amazing how you can assign almost all the functions to any pin you want :aaaaa:

I never thought I'd meet someone who preferred PIC to AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply