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
Stabby McDamage
Dec 11, 2005

Doctor Rope

ante posted:

ESP8266 or ESP32 with OLED?


You can pick up an ESP32 dev board with an integrated OLED right now for about twelve bucks, or an ESP8266 WeMos dev board and an OLED shield.

From there, you can use them as your Arduino directly, or talk to your Arduino via SPI/UART/I2C/GPIO flags. Interface could be some combination of OLED, webpage over wifi, or WeMos button shield.

Is the ESP32 bullet-proof dumb-mode Arduino compatible yet?

I *can* do fancy crap, but I'm lazy, so I like when the auto-magic Arduino train pulls through and makes everything easy.

EDIT: :swoon: those ESP32 OLED all-in-ones. Bought two just now.

Stabby McDamage fucked around with this message at 22:15 on Jun 11, 2017

Adbot
ADBOT LOVES YOU

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Mine are still in transit so I dunno, but the ESP8266 is pretty bulletproof now using PlatformIO. Miles better than it was last year.

Shame Boy
Mar 2, 2010

ante posted:

Mine are still in transit so I dunno, but the ESP8266 is pretty bulletproof now using PlatformIO. Miles better than it was last year.

I still can't get my ESP-01's to take a program without it dying half-way through the programming step or completing and then being bricked but I'm 99% sure it's because I bought faulty ebay ones? :shrug:

(Before anyone says it yes I have it hooked up correctly, I even went back and etched a programmer circuit specifically for doing it just to make sure I didn't have anything hosed up in the handmade one.)

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Throw it in the trash and buy a NodeMCU

Ethics_Gradient
May 5, 2015

Common misconception that; that fun is relaxing. If it is, you're not doing it right.

Stabby McDamage posted:

From your description I'm a little confused of the situation, but I'll try to answer anyway. If there's a physical relay that switches on/off, then I don't see how you'd get a "loss" of any kind -- it will either switch or not. I don't see how an LED would be dimmer.

Is this system simply a thermistor and a relay with a temperature setpoint? If so, you could replace it with a cheap standard heater controller like this. You can get one alone or in a kit with temperature probe and solid-state relay. I've used them to regulate temperature on a plastic extruder.

Yeah, I don't get the dim LED thing either.

So I know that the probe and "sense it needs to heat" parts work because the light comes on, and I hear the relay, but... :iiam:

Ok, weird. I was just looking up electric brew in bag setups to see if a PID would be OK vs my stock temp controller, and it talks about how SSR's "leak" a bit of current, and gives the specific example of being enough to light up an LED but not turn on the heating element. So I wonder if the relay in my controller is solid state, although that doesn't explain the clicking.

I know I could build my own out of a PID/SSR/heatsink/probe kit on eBay, but long story short it's worth the premium to me to buy an all-in-one unit, as brewing can be pretty splashy and it helps a lot with storage/cleanup. This one had a rough life because I was using an improvised brewing space, I've since built a stand that keeps it out of the way (no more falls onto concrete...) so I think it should last.

One Legged Ninja
Sep 19, 2007
Feared by shoe salesmen. Defeated by chest-high walls.
Fun Shoe
So a few weeks ago I ordered 10 of these boost converters to play around with in various projects, as well as two better made ones from a domestic seller, for an actual project that I would like not to fail. When the good ones came in, I unwrapped one, hooked it up to my bench supply at 5v, and adjusted it to output 12v. All was well.

The cheap ones came in a week or two later, so I dug one out, soldered some wires on, put it on the power supply, and tested it. No good, it was passing 5v (minus the diode drop) straight through, no matter how I adjusted the pot. I opened a second, same thing. I figured you get what you pay for, but I should have a few good ones in this batch. I tried a third one, same result. So I searched YouTube for this part number, and a video came up where a guy melted three of them.

Reading the comments, however, lead me to this Amazon review. Apparently the factory setting for the trimmer pot allows too much voltage to the IC if you supply it with more than 4v or so. If you back the trimmer way out, and only feed it ~3v, then adjust it to near your desired voltage, then you can feed it whatever it's rated for. I've only tested three so far, but it's worked for all of them.

TL;DR: Cheap Chinese electronics are cheap for a reason. Do your research first.

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.

Shame Boy
Mar 2, 2010

ante posted:

Throw it in the trash and buy a NodeMCU

I have one, I just also bought a 10-pack of the ESP-01's because it was like $15 and "boy wouldn't it be great if I could just throw wifi in everything" seemed like a great idea at the time :sigh:

At least they work with the default AT-command mode as far as I can tell

Sagebrush
Feb 26, 2012

Yeh I bought a bunch of the ESP-12s once as well, for the same reason, and then like a month later the WeMos D1 mini came out and for an extra dollar or so and a marginally larger board you get the USB port and all the programming hardware built in. The ESP-12s still work, they're just not worth the effort of hooking up the whole programming system most of the time. Maybe for the final board after everything is completely built and ready to embed.

Oh well.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I've got a pile of ESP-12s, and they work well in the PCBs I've designed for them, using on-board CH340Gs to talk to USB. ESP-01s are kinda the worst of both worlds, though, lovely form factor and not very usable.

Also, early ones had a bunch of manufacturing defects. There was at least one production run(including mine) that put the wrong LED resistor on, which blows up first time you plug it in.

Shame Boy
Mar 2, 2010

I've never worked with PIC's before but I'm making a USB thingy and the PIC16F1459 has USB support, is inexpensive and is in a package I think I'm capable of soldering (unlike the ATMEGA32U4 that I was previously considering). Should I just google me up some tutorials on PIC's or is there a platform for it that everyone likes these days? I know platformio apparently doesn't support it, and there's something called "Pinguino" that aims to be arduino-but-for-PIC that sounds good but I have zero knowledge of if it's actually useful or not...

BattleMaster
Aug 14, 2000

You don't need any of that training-wheels poo poo if you're at the level where you're actually picking out your own microcontrollers and making boards for them. Get the IDE, datasheet, and the USB library and its docs and go at it.

edit: If you need a hand ask away but it's exceedingly easy to write programs for PICs from scratch with MPLAB and XC8 without any framework poo poo that would just get in the way.

BattleMaster fucked around with this message at 16:02 on Jun 12, 2017

Dairy Days
Dec 26, 2007

ate all the Oreos posted:

I've never worked with PIC's before but I'm making a USB thingy and the PIC16F1459 has USB support, is inexpensive and is in a package I think I'm capable of soldering (unlike the ATMEGA32U4 that I was previously considering). Should I just google me up some tutorials on PIC's or is there a platform for it that everyone likes these days? I know platformio apparently doesn't support it, and there's something called "Pinguino" that aims to be arduino-but-for-PIC that sounds good but I have zero knowledge of if it's actually useful or not...

you are only going to find significant documentation and support related to microchips own mplab software, which isnt that terrible. making the jump from arduino style poo poo to c isn't as difficult as a lot of people seem to think. but honestly if you already know atmel stuff just stick with that "unsolderable" one, you only think you cant solder a qfp but actually you can because of the surface tension of solder being so high, i have put 144 pin pic32s on to boards with a regular iron and solder just by using a wide chisel tip and dragging solder over multiple pins at a time.

Shame Boy
Mar 2, 2010

BattleMaster posted:

You don't need any of that training-wheels poo poo if you're at the level where you're actually picking out your own microcontrollers and making boards for them. Get the IDE, datasheet, and the USB library and its docs and go at it.

Eh ok, just wanted to check. I know at least with Arduino while I don't really need it (I've done plenty of vanilla programming for ATTINY's that can't really fit it) it's kinda a nice to have since it reduces a lot of boilerplate stuff to simple function calls. I guess that's not really that big a deal though :shrug:

Shame Boy
Mar 2, 2010

Dairy Days posted:

you are only going to find significant documentation and support related to microchips own mplab software, which isnt that terrible. making the jump from arduino style poo poo to c isn't as difficult as a lot of people seem to think. but honestly if you already know atmel stuff just stick with that "unsolderable" one, you only think you cant solder a qfp but actually you can because of the surface tension of solder being so high, i have put 144 pin pic32s on to boards with a regular iron and solder just by using a wide chisel tip and dragging solder over multiple pins at a time.

Well I also was kinda looking for an excuse to get into PIC's anyway just 'cuz they're cheaper and have a lot more options as far as I can tell. But yeah my main hesitation was soldering the QFP-44, my hands are kinda twitchy and I have trouble soldering 0805's sometimes but I guess this is a bit different since it's bigger and easier to hold on to with tweezers? I was looking at the footprint and seeing the pins are like a third of a millimeter wide and feeling really uncomfortable about the whole thing :v: but if it's easier than it looks I might as well give it a try...

BattleMaster
Aug 14, 2000

Microchip's libraries provide a lot of macros and functions for working with peripherals. I'm a lot more comfortable just manually writing to the registers myself, but they're there.

Dairy Days
Dec 26, 2007

BattleMaster posted:

Microchip's libraries provide a lot of macros and functions for working with peripherals. I'm a lot more comfortable just manually writing to the registers myself, but they're there.

http://www.microchip.com/mplab/mplab-code-configurator
the arduino is coming from INSIDE THE HOUSE
(this thing actually works p good if you cba to pour over registers all day)

Shame Boy
Mar 2, 2010

Dairy Days posted:

http://www.microchip.com/mplab/mplab-code-configurator
the arduino is coming from INSIDE THE HOUSE
(this thing actually works p good if you cba to pour over registers all day)

Huh never heard of this thing, thanks!

Sagebrush
Feb 26, 2012

QFPs have a 0.80mm pitch, which is not that bad to do by hand. I was soldering some 0.50mm 30-pin connectors the other night and it was starting to get a little hairy, but still only took a few minutes each.

There are a lot of techniques, but mine is
- stick the part down with paste flux under the pins
- tack each end/corner delicately (probably the hardest part, since you have to do it without moving the component)
- add more flux if any burned off
- swipe a ball of solder along the tips of the pins -- NOT the tops. The solder will wick up underneath because of the flux, and this reduces the chance of bridging pins.
- don't go overboard with the solder, either. you only need a tiny tiny amount. The quantity you'd use for a single through-hole connection will do two or more sides of an SMD part.
- check that all the pins are connected using a magnifying glass (I have a little 10x geologist's hand lens that is perfect for the task)
- if any pins are not connected, add more flux, then swipe them again
- if any pins are bridged, add more flux, then use solder braid to clean them up.

Note how many times the word "flux" appears

(incidentally I still do not like soldering SMD parts but sometimes the cool poo poo only comes in those packages so :shrug:)

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

An alternative that will let you do a lot of SMT stuff relatively easily is to mod a toaster oven with a temp controller and get stencils from oshstencils
(surprisingly affordable). Place the parts with some small-point tweezers. A mag-lamp can be helpful.

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.

Shame Boy
Mar 2, 2010

Splode posted:

I used to use a heat gun, solder paste and tweezers for surface mount parts. Works for almost everything.

Yeah I have a heat pencil that can dial in temps and it's come in real handy for making surface mount stuff sit right, though the most pins I've ever soldered at once with it was 8, on a fairly big chip. I guess if I get a stencil made it'd be fine.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five
I considered modding a toaster oven a few years back, but I found that an unmodified hot plate with a bit of aluminum foil to keep the hotplate clean works just fine for me and components like LEDs with temperature sensitive upper​ surfaces like it a lot better than my hot air gun.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

ate all the Oreos posted:

I have one, I just also bought a 10-pack of the ESP-01's because it was like $15 and "boy wouldn't it be great if I could just throw wifi in everything" seemed like a great idea at the time :sigh:

At least they work with the default AT-command mode as far as I can tell

I had a few ESP-01s collecting dust for like a year for the same reason, but it actually turned out to work quite well once I
a) Pulled up/down all the pins as recommended
b) Hooked it up directly to a 5v logic programmer instead of dicking around with a level shifter

it then worked perfectly every time after that and I was able to replace my blown $2 LED controller with hours worth of work


But still, don't buy 01s because they suck in terms of form factor, memory, and available pins. Although they do kind of fit nicely into a protoboard.

Platystemon
Feb 13, 2012

BREADS

poeticoddity posted:

I considered modding a toaster oven a few years back, but I found that an unmodified hot plate with a bit of aluminum foil to keep the hotplate clean works just fine for me and components like LEDs with temperature sensitive upper​ surfaces like it a lot better than my hot air gun.

Yeah do that.

Ovens can heat a large board more reliably, but if you only have one tricky package you can’t hand‐solder, a hot plate works just as well.

Stabby McDamage
Dec 11, 2005

Doctor Rope

Splode posted:

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.

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!

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

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
What would be the simplest & safest way to interface a 10A 240V AC mains relay to a microcontroller's GPIO pin, so the microcontroller can detect when the relay is pushing out juice?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Maybe an optocoupler in parallel with the load (and a big resistor)

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.

Foxfire_
Nov 8, 2010

You can totally solder a QFP by hand; it's much easier than it looks. It can be easier than an 0805 because the chip's heavy enough that surface tension won't flip it into the air so you don't have to hold it while you solder.

- Position chip over the pads. Check that all the pins are nicely centered.
- Put a little solder on your tip, touch it to a corner pin. The joint will suck, but it will hold it
- Flux across the pins on another side
- Put a little solder on tip, touch all the pins with flux, reloading the tip as necessary. Don't worry too much about bridging things
- Repeat for all sides
- Flux on all pins
- Touch each pin with a clean tip to reflow it, any bridges should clear.


Also, PIC's are fun, but the little ones are architecturally very different from most things and not high-level language friendly at all. Apparently Microchip has a C compiler for the little ones now, but that's fairly new. Usually you write assembly directly for anything smaller than a PIC18.

BattleMaster
Aug 14, 2000

The PIC16s with 4-digit numbers (PIC16Fxxxx) have an architecture that's different from the 3-digit ones that's designed to be a lot more C-friendly.

I don't like them as much as the PIC18s but they can address more memory and they have a lot more new peripherals that are exclusive to them. I used one in my G-M counter because it had a special PWM module geared towards switching power supplies. I guess since they're now coming out with USB and because XC8 hides the specifics of the architecture from you well enough I don't have much more reason to use PIC18s for things anymore.

edit: Looks like I'm a bit out of date because a few months ago they announced new PIC18s that break the 4 KB address limit, have some peripherals that showed up in 4-digit PIC16s originally, and have DMA (the only PIC18s that had DMA before was one particular subseries and only for DMA)

https://www.microchip.com/pressreleasepage/PIC18K42-family-press-release

BattleMaster fucked around with this message at 03:49 on Jun 13, 2017

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

BattleMaster
Aug 14, 2000

You don't have to spend hours agonizing over minute differences between models, but there actually is quite a big difference between the different architectures just among Microchip PICs. Like some of them never even had a C compiler available for them until recently, and even then can have crappy performance in C depending on what you're doing with them.

edit: though what that really means is "make sure your PIC16 has 4 digits in the model number" right now because the 3 digits are ancient and weird (they're what I learned on though)

asdf32
May 15, 2010

I lust for childrens' deaths. Ask me about how I don't care if my kids die.

Stabby McDamage posted:

I built a battery load tester, and I want to be able to run it with 22V batteries all the way down to 1.5V batteries. Right now I have a potentiometer to scale the battery voltage to a safe range for measurement. The issue is that if I set it to make 22V safe, then the 1.5V measurements will have crappy resolution, so I'd like to do some kind of auto ranging. Three questions:

1. If I set the analog reference to 1.1V but expose the pin to up to 5V, is that situation "you just get maximum reading every time but it works" or "you damage the analog input"?

2. I'm already using a relay to toggle the load, so I naturally thought about using a relay to switch between voltage dividers. That seems incredibly wasteful, as unlike the load switch relay, this would be moving negligible current. Is there a cool semiconductor way to do this? I have all manner of transistors lying around...I'm just not an analog guy. I've used power MOSFETs to do low-side switching of loads, but that's about it.

3. Related to above, even better than rolling my own, is there some kind of auto-ranging voltage measurement module that would magic the problem away? I'm all for laziness.

1) Most ADCs have an absolute maximum equal to their supply voltage rather than the analog reference. But it depends. You can clamp to the reference if you think you need it.
2) "Analog switches". There are lots in small packages with 1-8 switches per IC from ~100ohms down to ~1ohm which are meant for signal switching exactly like this.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

ante posted:

Maybe an optocoupler in parallel with the load (and a big resistor)

Splode posted:

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.

Sounds good, thanks folks!

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I use PICs a lot. MPLABX is actually really good, Eclipse-based, etc, which is a lot different than the broken dumpsterfire it was when it first came out, and the working dumpsterfire it replaced.

Pinguino is a weird Arduino-like thing, but only for PIC32s. I recommend against, though I've never used it.

C is cool and good and works well. The Code Configurator is a nice feature, it only works for newer chips, though. Saves a lot of time troubleshooting exactly which registers you gotta twiddle.

Shame Boy
Mar 2, 2010

ante posted:

I use PICs a lot. MPLABX is actually really good, Eclipse-based, etc, which is a lot different than the broken dumpsterfire it was when it first came out, and the working dumpsterfire it replaced.

Pinguino is a weird Arduino-like thing, but only for PIC32s. I recommend against, though I've never used it.

C is cool and good and works well. The Code Configurator is a nice feature, it only works for newer chips, though. Saves a lot of time troubleshooting exactly which registers you gotta twiddle.

I went ahead and installed MPLAB and all the fancy plugins for configuring things and yeah it's... much nicer than I expected. (Also it's based on NetBeans, not Eclipse, but who cares). I also re-evaluated what I was trying to do and realized i'd probably need quite a bit more RAM than the 1K that was in that PIC16 so now I'm looking at PIC32's and MPLAB's fancy "harmony" thing that apparently does all the boilerplate for you? Anyway it's neat, thanks thread

His Divine Shadow
Aug 7, 2000

I'm not a fascist. I'm a priest. Fascists dress up in black and tell people what to do.
Anyone have any experiences with the TS100 soldering iron, seen some youtubes that pimp it pretty hard. Also the Hakko 888 is high up on my list since I found it in 230V:
http://www.batterfly.com/shop/hakko-fx-888d-silver

TS100 video I saw last night
https://www.youtube.com/watch?v=HgrB5P-rDLw

EDIT:
Eh, got the 888D.

His Divine Shadow fucked around with this message at 08:54 on Jun 15, 2017

Adbot
ADBOT LOVES YOU

Stabby McDamage
Dec 11, 2005

Doctor Rope

His Divine Shadow posted:

Anyone have any experiences with the TS100 soldering iron, seen some youtubes that pimp it pretty hard. Also the Hakko 888 is high up on my list since I found it in 230V:
http://www.batterfly.com/shop/hakko-fx-888d-silver

TS100 video I saw last night
https://www.youtube.com/watch?v=HgrB5P-rDLw

EDIT:
Eh, got the 888D.

I have one, and I'd love to play with it, but the stupid DC jack on it is different than the one China uses on everything else, so I haven't been able to test it yet. By default it comes with no power supply, as the audience is people who will solder a pigtail from an RC battery or similar for it. I managed to power it up by jamming a mismatched connector into it enough to verify it turns on and could heat up. I've since gotten the right connectors, but I haven't had time/interest to play with it more.

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