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
sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Delta-Wye posted:

Can you connect the arduino via USB while it's running close to the dog bark detector? Being able to just stream serial data to your PC in real time makes it stupid easy to record timestamps for barks.

WiFi!
You could even set it up to send a tweet every time the dog barks. #MyAnnoyoingNeighborsDogBarksALot is probably available... That would time/date stamp it too.

Adbot
ADBOT LOVES YOU

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Economic Sinkhole posted:

My dog bark detector/counter project is fairly successful so far, including tweeting the barks. https://twitter.com/barkbarkbarkb I ended up using an Uno and monitoring the voltage on the LED using an analog pin. The Pi runs a python script that continually monitors the serial connection and tweets when the detector hears a bark. I am thinking about trying to add audio recording in to the mix somehow, so I can confirm that it is actual barks that are setting the detector off and not other noises.

It has been a pretty fun process learning this stuff, I am excited to learn more about what I can do with Arduinos.

I'll take a long, deep bow, then walk off stage without saying anything. :drops mic:

That's loving awesome. BARKBARKBARKB!

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Dominoes posted:

It is indeed brushless; thanks.

So you could use an ESC driven with a PWM signal, maybe.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
An IGBT with driver circuit might do the trick.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Aurium posted:

Sort of, with some caveats.

There are 2 problems with high current handling, the first one is while the current is flowing it generates heat. Multiple relays would help here.

The other problem is that current doesn't like to stop flowing, just because because you broke the connection. It'll cause an arc, and the more current flowing, the hotter the arc will be, up to destroying contacts, or welding them together.

So what could easily happen is that since nothing is truly identical, your relays won't open at the exact same time, and the last one to open will take the brunt of the arc.

Since it's not like it would be used often, this may not be much of a problem. How common are these kill switches? I assume the common solution is to just pull the plug. This will also damage the contacts in your connector of course. You could also make your own switch-esque-thing with some kind of busbar type setup.

For what it's worth, your speed controller has a bunch of mosfets in parallel to share current.

Even worse, the relay that arcs will be the shortest path to ground, so the current will want to go there. You'll cook one relay until it sticks shut... They make solid-state controls for these applications for a reason.

Your "hobby motors" are drawing a lot of current, which means lots of heat and some significant hazards if something goes wrong.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
That's the same thing, rite? LOL at garage door company's security. The remotes are semi secure rolling code, but I'll bet :10bux: their internet based stuff is a joke.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
Scrape off the solder mask with an exacto blade and solder directly to the copper, then secure the wires with epoxy. Go slow and use lots of flux when you solder, and it should work fine. You'll never get anything to make decent connection to the carbon traces.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

awesomeolion posted:

Ah I see!! So under those are just wire. Excellent. I'll try this, thank you very much :)

Edit: When you say secure with epoxy, you mean glue the insulated part of the wire near the soldered end to something secure so if it gets pulled on it doesn't pull on the solder?

There's copper traces, that's what the PCB is made from (epoxy substrate, copper traces, covered with solder mask). If you scrape off the mask carefully, you can access the bare copper and solder fine wire to it. I suggested epoxy of secure the wires after you've tested everything, because they'll want to snap off where you solder them if they aren't secured.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

awesomeolion posted:

Gotcha, thanks! Soldered one here and so far so good. Onwards and upwards :)

Sweet, good luck. Remember, lots of flux!

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
Epoxy, Urethane, or Silicone potting compound. 3M makes a bunch of different types. Viscosity is pretty key, you don't want air bubbles. You also don't want a porous surface, as that'll allow tissue to grow into it.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Cardiac posted:

Link to my horrible setup.
This is a hobby thing that I started doing to get a better grasp of electronics so there should be a horrible number of beginner mistakes.
https://imgur.com/gallery/XILIAIA

As it is connected now, the 5V supplies the 433Mhz sender and temperature sensor, the pins go to sender, temperature sensor and 2 leds. All of these are connected to the same ground. I have tested each of the connections by doing a manual connection to a led on a breadboard, since I don’t have a multimeter.
Not getting one is one of those beginners mistakes, right?

Dude, half you pins aren't soldered or just have a blob of solder on the pin and no connection to the pad. Electricity needs more than a casual airgap to work. Add flux, and re-solder every joint. If there's a big blob, then wick it off and add fresh solder. I'm not going to slam you because you're new to this, but that's pretty bad. Take your time, use a good iron and solder, and watch some YouTube videos on soldering.

And get a meter. The freebie from harbor freight will do in a pinch. We all started somewhere, but there's no sense in doing it really poorly from the start unless you like frustration.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Cardiac posted:

I just want to say thanks for all the tips and links on how to solder.

I started by getting some better solder wire, 0.56 mm (my old was 1.2 mm, which my dad used for soldering model trains).
I removed most of the solder on the board and the nano and then resoldered using higher temperature than before and with the new solder wire.
Took my time and double-checked that everything looked ok.
And now it works as intended.
Next step is to connect a Onewire waterproof thermometer to the Nano and put it in a box, and my first Arduino project is done.

Congrats! Take some pictures on the new setup.

I just had to diagnose an odd issue with a board. It would work when screwed down, but not free standing. Turns out an NPN BJT only had 2 legs soldered, and the third was 1 micron above the solder pad. When installed, the board flexed just enough to make it work. This was a professionally reflowed board, too. Simple poo poo, but took an hour to diagnose with a scope and meter.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Bistromatic posted:

One last question would be if anyone can recommend me a power switch that's as tiny as possible? There's plenty of tiny buttons but switches tend to be larger than i'd like.

APEM NK236? 0.1" pin spacing, .4" LOA, 0.1" wide...

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Bistromatic posted:

Thanks, those seem perfect!

Always glad to do some DigiKey parametric searches!

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

CarForumPoster posted:

Snarky sharky

No snark intended. I really like DigiKey's search. It's almost as good as McMaster Carr.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
I've run into an Atmel micro problem, so it's kinda Arduino-related. I'm reprogramming some boards with ATTiny 45's on them. The code is open source and Arduino-based, I made some changes, and I'm trying to program a bunch of these devices. I've had two of these just up and die, and ten successful programming results. I'm confused as to what could cause the micro to stop communicating.

1. One failure was using a soldered-on header, the other was from a pogo-pin jig. The program uploads, but fails on verification. Once it fails, the micro never talks again. I get "device signature 0x0000" if I use my Arduino as ISP, and a similar device initialization failure using a USBasp. USBasp was run in both normal and slow clock mode to try and get things working. Device runs the micro on 5V, and my programmers both run 5V. I tried 3.3V and no change.

2. Fuses are unchanged, and I've verified power and external clock signal are correct and intact.

3. I could get ahold of a HVPP, but I'm hoping there's something else I can try.

Thoughts?

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Splode posted:

Are you programming with jtag, or via the Arduino bootloader?

Bootloader.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Sagebrush posted:

How? The tiny 45 doesn't have an internal serial port. The only way to program them is through isp (or hv I guess).

There's a programming header on the board, and I'm using an ISP to do the programming, so not using the bootloader. Sorry. I know it's not JTAG.

It's a 6-pin:
MISO, MOSI, SCK, Reset, plus +5V, Gnd.
I'm very much not an AVR person, I mostly run PICs, so the tools are pretty foreign to me.

sharkytm fucked around with this message at 18:10 on May 21, 2019

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
I tried to program some more of these boards, and captured the output when one fails.
code:
avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -pattiny45 -carduino -PCOM3 -b19200 -Uflash:w:C:\PROGRAM.hex:i 

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, [url]http://www.bdmicro.com/[/url]
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny45
         Chip Erase delay              : 4500 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        256    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      4096   64     64  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9206 (probably t45)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\PROGRAM.hex"
avrdude: writing flash (3830 bytes):

Writing | ################################################## | 100% 5.41s

avrdude: 3830 bytes of flash written
avrdude: verifying flash memory against C:\PROGRAM.hex:
avrdude: load data flash data from input file C:\PROGRAM.hex:
avrdude: input file C:\PROGRAM.hex contains 3830 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.70s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x53
avrdude: verification error; content mismatch

avrdude done.  Thank you.

the selected serial port 
 does not exist or your board is not connected
After this error shows up, I can never talk to the ATTiny45 again, it only returns the device signature of 0x0000 afterwards.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Sagebrush posted:

So it successfully detects the chip and burns the program, and then the program fails verification from byte zero and the signature disappears?

It sounds like your programmer (or something about the way you've got it set up in the circuit) is frying the chips. Do you have any loose Tiny45s? Can you try burning the same program onto them several times to see if you get the same failure when they're not in the circuit?
Yes.

I'll order some. If I can program them outside and solder them onto the board, it'll save the $400 in paperweights that I have now. This is what I get for using a COTS product instead of designing from scratch. I talked to their engineering team, and apparently once the full board is assembled, it needs to be powered separately as other components are drawing too much power and can cause glitches. I'll give that a shot today.

sharkytm fucked around with this message at 15:13 on May 23, 2019

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
Nope, that didn't help. The board (which is part of an LED light) was powered by a 12V bench supply, and being programmed by my Arduino as ISP. The LED flashed very quickly during the programming, which isn't surprising, because the LED driver is connected to Pin 6 of the micro (shared by the MISO connection). I got a the same mismatch error, and this was repeatable (I could keep sending the program and getting the flashes and error). Once I powered the board down, the micro went silent. I've got 25 ATTiny45's on their way, I'll try programming them off-board and installing them. It's really odd that I had a reasonable number of successes, and now I'm at about 25% success rate. I was previously using my desktop, and now I'm on a laptop, but the settings are identical. Any thoughts?

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Sagebrush posted:

I haven't looked at the circuit itself, but I'd almost put money at this point on it being a problem with programming it in circuit. The fact that it's running on 12v and that the MISO pin is connected to the LED driver is skeeving me out. Get the bare chips and some sockets and see how you make out.

No way to socket them, it's all SMD. And on a MCPCB, to boot, soldering is a royal pain. I just hot-air gunned one out, and it doesn't talk to AtmelStudio. The MFR has some forum posts about programming them in-circuit, which is why I thought it would work (and it did several times).

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
Test socket might be an option. I'll think about it.

So... I programmed the last 4 lights with no failures. I went back to my original setup: Arduino as ISP, soldered headers, and flying leads from the Arduino to the header. No problems. I'm wondering if the Pogo Pins are causing a problem, or maybe something else that I missed. Is there a big difference between "Upload" and "Upload using programmer" when using Arduino as ISP? I know you have to use "Upload using programmer" with the USBAsp, but not sure about the Arduino as ISP. all 4 of these latest ones used "Upload as programmer", but I swear I used "Upload" previously.

sharkytm fucked around with this message at 13:10 on May 24, 2019

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
And no chance of the relay sticking. Diode ORs are the way to go, assuming the voltage drop isn't a real-breaker.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Foxfire_ posted:

Lower voltage drop. You'll be able to accept a lower battery voltage and be dissipating less heat in the diode

Yup, schottkys are the way to go.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Sir Bobert Fishbone posted:

A 1000-cycle rating seems kinda low though for a docking application, no?

That's three times a day for a year. And those cycle ratings are what's guaranteed, not when they'll fail.

Nikon rates their camera shutters at 100k on consumer cameras, and I've got a d7000 that too 400k shots and still works.

I mean, it's a consideration, but I don't think 1k is crazy low.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

taqueso posted:

There are some connectors rated for really low numbers like 10 connection cycles, molex picoblade is one iirc. They are designed to be plugged in once at assembly and maybe once or twice more for rework. They are pretty much dead after 100 cycles, which isn't too hard to hit doing development.
I use Picoblades for programming headers on some of my products. They get 1 plug/unplug cycle. Plug in, program the MCU, unplug, send to customer. They're rated for 30 cycles, though: http://www.literature.molex.com/SQLImages/kelmscott/Molex/PDF_Images/987651-3691.PDF

FFC cables too. If you're lucky, you can release the latch and disconnect/reconnect 2-3 times before the latch loses tension and the pins don't apply enough pressure for connection. They're the bane of all cell phone/laptop repair folks existences.

::edit:: The Pico EZ-Mate is rated for 10: http://www.literature.molex.com/SQLImages/kelmscott/Molex/PDF_Images/987651-7111.PDF

sharkytm fucked around with this message at 19:26 on May 11, 2020

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
Get out the scope and start probing. Clock signals, pull ups/downs, comms busses, etc are likely candidates.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

wolrah posted:

Sounds like you were using the Windows Store version of the Arduino IDE, which runs somewhat sandboxed so it doesn't always have access to the same files an older install might have had.

It's like the new control panel. It's the same stuff, in a different place, with different options. 2 places to get poo poo hosed up! SMH.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Deviant posted:

Argghh! The Seeduino doesn't have eeprom storage, which i need here.

There's a reason I keep an old Dell laptop with 3 small SSDs: Windows 7, Windows 8.1, and... Windows XP!

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Cojawfee posted:

If the 330 ohm resistor is in series, then the most current you could get would be 15mA.

And now we know how it's not blown up.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Splode posted:

yeah don't blow up your LEDs for the thread's curiosity!

I hope your gadget suits your purposes.

Funnily enough you have stumbled on to something I discovered myself at work: it is often better to run LEDs at a tiny fraction of their max current. I had a terrible habit of carefully calculating a resistor value to put 5-10mA through indicator LEDs, and then they'd be annoyingly bright. Now I just thoughtlessly throw down a 1k and know it'll be visible, but not annoying. Less effort for a better result.

Meanwhile I carefully calculate resistor values so they're just barely visible because I'm concerned about that extra couple of mA. 1mA for a year is a D cell. Different strokes and all...

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Deadite posted:

Does anyone have a link to a solid state relay they'd recommend? I'm trying to find one but I'm out of my depth and I don't understand a lot of the acronyms out there. I have a 12v power source and the outputs need to be 12v too.

Would this work for what I want?
https://www.amazon.com/NOYITO-High-...111&sr=8-3&th=1

It looks like it would but one of the reviews says it doesn't work for 12v loads

How much current do your LEDs draw?

Adbot
ADBOT LOVES YOU

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Deadite posted:

I'm not sure, these are the LEDs I use: https://www.amazon.com/iNextStation-SMD2835-Waterproof-Flexible-Outdoors/dp/B07V37X7SY?th=1

and I use 12v/2A power supplies with them

According to the specs, they draw 30w, which would be 2.5A. That's not going to work with your power supplies or that SSR, which is rated at 2A/channel. You should probably run them on a larger supply, and use a meter to figure out their actual draw. You don't want to run the SSR at it's max capacity, certainly not dodgy Chinese ones. You also don't want to overdraw the power supplies.

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