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
DreadLlama
Jul 15, 2005
Not just for breakfast anymore
Oh my god thank you so much!

I don't have male to female jumper pins on hand, but I will on April 2nd. I'm going to try this as soon as they arrive.

Thank you again!

edit: Saving this for a new page:


https://support.arduino.cc/hc/en-us/articles/4841602539164-Burn-the-bootloader-on-UNO-Mega-and-classic-Nano-using-another-Arduino

Adbot
ADBOT LOVES YOU

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I mean, googling "Atmel ISP pinout" is a good assumption that whoever designed the board didn't reinvent the wheel


Foxfire_
Nov 8, 2010

DreadLlama posted:

edit2: If I just connect pins randomly, will I brick the arduino? There's a finite number of possible combinations. One will work eventually, right?
Shorting pins to VCC/GND may or may not blow stuff up depending on how pins will react to overcurrent and any other protection in the circuit.

For how to fish / figure out the pinout yourself:

This is the pinout of an ATmega328p in that package.
The circle on the top of the physical chip is marking the pin 1 corner.

Looking at the board, the brighter parts are where there is copper underneath the soldermask. They will form traces connecting components. The darker parts are where it has been etched away. The metal plated circle vias are conductive down to the other side of the board and connect traces to the other side. You can see the path the traces take from the unpopulated pin header to the leads on the actual chip. (the same interface is also connected to the other microcontroller on there, both will show up on the JTAG scan chain)

You could confirm it by removing power, then measuring resistance with a multimeter from the pin header to where you think it going on the chip. It will be 0ish if there is a trace that goes there. (There may be some stuff in the way depending on the exact design, it is reasonable to do things like put a small series resistor to limit current in case you did short something)

Sagebrush
Feb 26, 2012

I remember when FTDI pulled the serial bricking move...back in 2014! There was a huge backlash and they reverted the change to the drivers that are automatically installed with Windows Update. I have not had any problems with the (presumably) fake FTDI chips on a zillion knockoff Arduinos ever since. Are you sure that the serial chip on this FT232 board is actually bricked? Where did you get drivers that old? It might be something simpler.

You can check if it is bricked by plugging it into your computer, opening Device Manager, and finding the device in the list. It should appear under Ports (COM & LPT). Double-click on the device name, go to Details, and scroll to Hardware IDs. Should look like this (I don't have my FTDI boards with me so I just used an Arduino):



I think the VID and PID should be 0403 and 6001, respectively, based on hazy recollection and some googling. But any numbers in there should be fine really. When the driver bricks the chip, they (or at least the PID) get set to 0000. If the chip is not bricked, then it probably means that the bootloader on the minimOSD is corrupted. That will have to be recovered with an ISP programmer -- there is no way to do it over the serial port, regardless of whether your FTDI device is working correctly or not.

In either case, though, you should be able to use the USBasp to program the ATMega328 directly. This error:

quote:

avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Failed chip erase: uploading error: exit status 1

Is saying that avrdude, the uploader program that runs underneath the Arduino IDE, cannot find your USBasp device. Did you install the drivers for it, as explained at this link? Windows does not have the proper drivers for a USBasp by default. That may be all you need to do here.

https://electronics.stackexchange.com/questions/416714/avrdude-does-not-recognize-usbasp-device/417509#417509


DreadLlama posted:

edit2: If I just connect pins randomly, will I brick the arduino? There's a finite number of possible combinations. One will work eventually, right?

Don't do this please.

Splode
Jun 18, 2013

put some clothes on you little freak

ante posted:

I mean, googling "Atmel ISP pinout" is a good assumption that whoever designed the board didn't reinvent the wheel




The way I have done it is assuming this pinout is followed, and then identify which pin is ground with a multimeter (as there's two possible orientations for a 3x2 connection, and pin 1 isn't always square).

This isn't as thorough as checking all the pins properly but it's faster, so pick your poison on effort/risk

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
I promise not to try pins at random!

Fortunately multiple people in this thread have provided the same interpretation of the pinouts and I choose to believe that y'all know what you're talking about.

I use that Zadig program to install drivers, like the link said. The guide I followed was this one: https://www.rcgroups.com/forums/showthread.php?2026936-MinimOSD-Failed-to-talk-to-bootloader, which directed me to go to https://www.fischl.de/usbasp/ and install the drivers using the zadig program. It wasn't the guide you linked though. It's highly possible, even likely, that I did it wrong.

As for how I managed to brick my device: I used the minimOSD -extra tool found at https://code.google.com/archive/p/minimosd-extra/downloads, which did not brick my device, but also didn't configure properly. I was connected to a pixhawk flight controller via a serial/telemetry port, and I could get some data to display, like the number of satellites and battery voltage. But the artificial horizon and GPS coordinates would not display. So I "upgraded" to a more recent version of the minimOSD configurator, found at https://github.com/night-ghost/minimosd-extra. My device stopped working after I tried to use the newer version. When I read about the deliberate bricking thing, I assumed that's what happened. But reading more closely, it appears that it was supposed to apply to the FTDI chip and not the minimOSD. So now I really don't know how/why it isn't working. Maybe I unplugged the OSD from the FTDI while it was in the middle of something. There were no progress bars or anything displaying and the program appeared to be frozen, but maybe it's possible that it was doing something. Although I had only told it to "read from OSD"

I'm going to try to burn the bootloader using an arduino using the linked guide and the pinouts you have provided. (Thank you again for that), and then try reinstalling the OSD firmware if that works. But I'm waiting for header jumper wires to arrive in the mail.

But the FTDI is working. I successfully connected it to a different OSD and it was able to read from it using version 2.4.0 of the minimOSD-extra program. It was version 2.4.1.6 that seemed to brick my other one. I don't dare try to connect that version to my only working OSD though. First I fix the broken board. Then I can go back to trying to get it to display properly.



Sagebrush posted:

I think the VID and PID should be 0403 and 6001, respectively, based on hazy recollection and some googling. But any numbers in there should be fine really. When the driver bricks the chip, they (or at least the PID) get set to 0000. If the chip is not bricked, then it probably means that the bootloader on the minimOSD is corrupted. That will have to be recovered with an ISP programmer -- there is no way to do it over the serial port, regardless of whether your FTDI device is working correctly or not.

In either case, though, you should be able to use the USBasp to program the ATMega328 directly. This error:

Is saying that avrdude, the uploader program that runs underneath the Arduino IDE, cannot find your USBasp device. Did you install the drivers for it, as explained at this link? Windows does not have the proper drivers for a USBasp by default. That may be all you need to do here.

https://electronics.stackexchange.com/questions/416714/avrdude-does-not-recognize-usbasp-device/417509#417509

I'm going to try that right now.

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
Update: My dupont wires arrived in the mail today. I have a new error.
code:
avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Admin\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM12
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         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    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         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.02s

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

Failed programming: uploading error: exit status 1
This happened after I re-read the instructions extra carefully and saw that I had skipped Step 6: Click Upload button Upload to upload the sketch to the board.

I double checked the MinimOSD. It definitely says "AT328P" on it.
What's this -F thing? Do I write that somewhere?

I did some more stuff and I think I fixed it.

code:
avrdude: Version 7.1-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is C:\Users\Admin\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.1\avrdude.conf

         Using Port                    : COM12
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328PB
         Chip Erase delay              : 10500 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash                  65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 version 1.x firmware
         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
avrdude: device signature = 0x1e9516 (probably m328pb)
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:\Users\Admin\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.1/bootloaders/optiboot_flash/bootloaders/atmega328pb/16000000L/optiboot_flash_atmega328pb_UART0_115200_16000000L_B5.hex for flash
         with 484 bytes in 2 sections within [0x7e00, 0x7fff]
         using 4 pages and 28 pad bytes
avrdude: writing 484 bytes flash ...

Writing | ################################################## | 100% 0.08s

avrdude: 484 bytes of flash written
avrdude: verifying flash memory against C:\Users\Admin\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.1/bootloaders/optiboot_flash/bootloaders/atmega328pb/16000000L/optiboot_flash_atmega328pb_UART0_115200_16000000L_B5.hex

Reading | ################################################## | 100% 0.00s

avrdude: 484 bytes of flash verified
avrdude: reading input file 0xcf for lock
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against 0xcf
avrdude: 1 byte of lock verified

avrdude done.  Thank you.
The device signature was 0x1e950f and according to the 1st google result for that, the board isn't an ATmega328P, but an ATmega328PB. This requires something called "minicore" . So I did this: https://github.com/MCUdude/MiniCore#boards-manager-installation, and I think the bootloader burned successfully.

DreadLlama fucked around with this message at 23:17 on Mar 27, 2023

Deviant
Sep 26, 2003

i've forgotten all of your names.


ToxicFrog posted:

So my partner is getting into Arduining, and since they didn't really get an education in electrical circuit basics as a kid they're reading through the tutorials on the Arduino site.

In general they're finding that the Arduino documentation tends to assume way more electrical knowledge and way less programming knowledge than they already have, which isn't great in general, but also a lot of the tutorials look like this:

Which has me wondering if this is even the correct site or if docs.arduino.cc is the user-generated-content slop bucket or something.

and how do we engage in reverse polarity protection?

the answer of course is the turbo encabulator

cruft
Oct 25, 2007

DreadLlama posted:


The device signature was 0x1e950f and according to the 1st google result for that, the board isn't an ATmega328P, but an ATmega328PB. This requires something called "minicore" . So I did this: https://github.com/MCUdude/MiniCore#boards-manager-installation, and I think the bootloader burned successfully.

This is a wild ride so far, and I'm here for it.

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
As far as I can tell the bootloader is burned, but I still can't upload a hex file.

The instructions I am currently trying to follow:

quote:

# minimosd-extra (russian is at the tail of this file)

Quickstart Guide (c) Johnex
----------------------
1. Download the latest MinimOSD-Extra build here: https://github.com/night-ghost/minimosd-extra/blob/master/osd_latest.zip?raw=true
2. Run the OSD_Config.exe
3. Connect your MinimOSD to your pc making sure you are using an FTDI that has 5V and not 3.3V.
4. After the usb driver is installed, select your COM port in OSD_Config.
5. Click Options -> Update Firmware. Select the Character_Updater_FW.hex file from the "FW_+_Char" folder.
6. This is a character set uploader, so just click Options -> Update CharSet. Select the latest character set MinimOSD_2.4.1.X.mcm from the "FW_+_Char" folder. Notice that this MimimOSD-Extra has a custom character set and must be updated if coming from another fork or the original, and some newer versions might require a new version, always check the "FW_+_Char" folder.
7. Click Options -> Update Firmware again. Select the latest MinimOsd_Extra_Uni.9XXDV-release.hex file from the "FW_+_Char" folder.
8. Set your video mode to Auto if you have different cam types, or select NTSC or PAL if you have just 1 cam and you know it's type or had issues with Auto.
9. Connect your OSD directly to a monitor or to a video transmitter so you can see the OSD output, making sure you don't forget to connect the antenna to the video transmitter before powering it on if you are using that. Click Options -> Load TLog. Select 2015-09-06 18-40-55.tlog from the "FW_+_Char" folder.
10. Set up the screens as you want. Click "Save Tab to OSD" and then click "Start" to run a simulation so you can see how everything looks without having to set up a copter. If something is not right, click "Stop", do the changes, save the config again and click "Start" again to see the new changes.
11. If you encounter that your screen is not centered, change the "Offsets", Left and Top from the config page. You can also move panels away from the edge if your screen gets cropped.
I'm on step #5.


The one option I need is greyed out. Because of course it is.

I tried using an older version of the MinimOSD tool, one where the "update firmware" button isn't greyed out, and I'm getting the same error as a week ago:


I'm back begging for help again.

I found a program that's supposed to be able to upload hex files to an arduino. https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/
Anyone ever use a program called AVRDUDESS?

I thought I selected the correct options but I didn't and I'm not sure what isn't as it should be.

DreadLlama fucked around with this message at 01:11 on Mar 28, 2023

huhu
Feb 24, 2006
I just got a Particle Boron LTE device and I've setup a Particle account and identified my board with the web app. However, in the webapp, the "device status" is "Waiting to Connect" and the "last handshake" is "never connected" . I've got cell signal with Google Fi and T-Mobile where I'm trying to use the device. Is there something I'm missing here?

Enos Shenk
Nov 3, 2011



Oh god. I've been where you were, trying to get OSD for a radio controlled flying contraption working based on internet guides. I spent about a day on it before getting infuriated and giving up. If you get anything working you're a better goon than me. It was nightmarishly obtuse and either incorrect or outdated, even by open source standards.

So here's a project of my own for a sanity check on my idea for finding a mystery issue. I had a weather station sensor package sitting around my place unused, and I decided to install it (with permission) on a 70ft freight elevator tower at my makerspace. I used to run it at my house, on some incredibly kludgy code. So I rewrote the Arduino portion of it.

https://github.com/enosshenk/TekWeatherReader/blob/main/TekWeatherReader.ino

Essentially it polls wind data every second, averages it every minute, polls the temp/pressure/humidity/rain data and uploads it all to Weather Underground. It's been a goddamn adventure getting it working, but it was in fact working satisfactorily for a few days.

Then issues started happening, like the humidity readings being obviously incorrect. It had an old BME280 sensor that I re-used and it showed some slight corrosion. But it tested okay and now it's on a mast and loving up. So I'm going to be replacing that soon.

The bigger issue is after random times the system will stop updating. The last time I power-cycled it when I visited it ran for 2.5 hours then stopped updating. The first time it looked like the ethernet shield had lost link. I had to kludge the ICSP between the shield and the Mega (Because the terminal strip shield between them didn't have it, and I had to rebuild it out of bits of resistor leads). I replaced that with a proper double height header and haven't lost link since. But it still stops updating.

It's a tricky thing to debug because the Arduino is in a disused elevator penthouse that I have to climb a roof to get to. And the physical sensors are on a mast 15 feet above that. I can't really sit up there plugged in looking at serial monitor until something dies. So I added in some code to save some basic diagnostics to the ethernet shield SD card, mostly the data sent to WUnderground and the response code retuned. Is that probably my best bet to trying to track down where things are failing? Physically every time it's crapped out the Arduino is powered on and 'running' but I neglected to shlup my laptop up there to check if things were executing.

Or if anyone else is bored and wants to have a quick peek at my code, just in case I overlooked an obvious "Yeah that's going to intermittently fail, dumbass" sort of thing.



Yeah I'm not looking forward to changing out the BME280 sensor.

Splode
Jun 18, 2013

put some clothes on you little freak
You could try setting a watchdog timer, so if it locks up it just reboots. You still wouldn't know why it's happening but it could make the problem less serious.
If it still drops out and stays dropped out you know it isn't your code locking up

Enos Shenk
Nov 3, 2011


It's just frustratingly flaky. I was in there today and swapped the BME280 sensor for a new BME680. Pleasantly surprised the code worked just fine on it. But the thing decided to start freaking out and acting like the ethernet shield wasn't connected. Apparently I poked it just right and it decided to operate. I'm starting to think the Mega it's running on is just old and tired. I didn't have a new one to use and set it up on a rather old crusty one.

But it does seem to be running...For now. https://www.wunderground.com/dashboard/pws/KINFORTW318

Hadlock
Nov 9, 2004

Don't put words in my mouth, I've never made any claims about [IQ tests]

-- Hadlock
$5 at Michael's hobby store. Same size as an Altoids tin :getin:

cruft
Oct 25, 2007

Hell yes, you got D-Pad candy!

I heard if you suck the Konami code, you can spit in seven different colors!

Hadlock
Nov 9, 2004

Don't put words in my mouth, I've never made any claims about [IQ tests]

-- Hadlock
Just seems like the perfect thing for a small form factor project

cruft
Oct 25, 2007

:dadjoke:

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.
I'm new to arduino and I'm trying to figure out if I fried my board. I've been trying to find an answer on the internet but it's really hard to tell what the problem is.

The board is an elegoo uno R3 and I was trying to use it to control a 4 channel relay module. The code I had worked to blink the on-board LEDs on and off, but when I tried to wire up LED strips to the relays I think I did it incorrectly because now my computer won't recognize that the board is connected even though it recognized it minutes ago.

The green "ON" LED is lit and the orange "13" LED comes on and stays on, but the board no longer runs the sketch and I can't upload anything new to it.

Does it sound like this board is fried and just needs to be replaced?

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.
I think this board is shot, or at least parts of it. The reset button isn't working at all either.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Deadite posted:

I'm new to arduino and I'm trying to figure out if I fried my board. I've been trying to find an answer on the internet but it's really hard to tell what the problem is.

The board is an elegoo uno R3 and I was trying to use it to control a 4 channel relay module. The code I had worked to blink the on-board LEDs on and off, but when I tried to wire up LED strips to the relays I think I did it incorrectly because now my computer won't recognize that the board is connected even though it recognized it minutes ago.

The green "ON" LED is lit and the orange "13" LED comes on and stays on, but the board no longer runs the sketch and I can't upload anything new to it.

Does it sound like this board is fried and just needs to be replaced?

1) how did you have it wired up?
2) does it work again if you unwire everything?

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.

babyeatingpsychopath posted:

1) how did you have it wired up?
2) does it work again if you unwire everything?

This is the diagram I was following from a question I asked in the electronics thread



I've removed everything from the arduino but I can't get it to respond to anything. Resetting doesn't work and I can't get the arduino UI to recognize that the board is connected. It makes the Windows "something is connected" noise when I plug it in but the ports don't show under the tools menu, which from what I read is the only way to tell if a board is actually connected.

Edit: The power supply I used was 12 volts, which I wouldn't think would be enough to fry anything but I'm completely new to this

Deadite fucked around with this message at 21:14 on Sep 21, 2023

Sockser
Jun 28, 2007

This world only remembers the results!




Hit the button next to the USB port while it's connected and see if arduino IDE suddenly recognizes it

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Deadite posted:

This is the diagram I was following from a question I asked in the electronics thread



I've removed everything from the arduino but I can't get it to respond to anything. Resetting doesn't work and I can't get the arduino UI to recognize that the board is connected. It makes the Windows "something is connected" noise when I plug it in but the ports don't show under the tools menu, which from what I read is the only way to tell if a board is actually connected.

Edit: The power supply I used was 12 volts, which I wouldn't think would be enough to fry anything but I'm completely new to this

If you used the plug-in bit that it came with to give it +12V, it should have been protected. If the polarity was reversed on that plug, then there are some little fusible links that will blow.

When connecting to the computer, use the USB plug ONLY, no power supply, to verify operation.

Follow this setup to see if it's the USB->serial interface chip that's dead:
https://support.arduino.cc/hc/en-us/articles/4410804625682-Set-a-board-to-DFU-mode

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.

babyeatingpsychopath posted:

If you used the plug-in bit that it came with to give it +12V, it should have been protected. If the polarity was reversed on that plug, then there are some little fusible links that will blow.

When connecting to the computer, use the USB plug ONLY, no power supply, to verify operation.

Follow this setup to see if it's the USB->serial interface chip that's dead:
https://support.arduino.cc/hc/en-us/articles/4410804625682-Set-a-board-to-DFU-mode

Oh hey, you are the one who was helping me in the electronics thread and I was too dumb to realize it. Thank you for your continued help, but I might not be smart enough for this project.

Here's a video of me pressing the reset button and shorting out the pins in the guide. Nothing changes with the lights and the computer still doesn't acknowledge that a board is connected:

https://i.imgur.com/vSWAwLI.mp4

Hadlock
Nov 9, 2004

Don't put words in my mouth, I've never made any claims about [IQ tests]

-- Hadlock
Did you give it 12v on the power input barrel/VIN, OR on one of the following: the 5v pin, 3v3, GND

Reverse polarity to the GND pin could fry it too

That particular board will take 6-20v but only via the barrel adapter or VIN

I've fried more Arduino than I can count, at least six. Wiring things up after midnight is a lot like shopping online after midnight you wake up to a big mess. Frying a board can result in all sorts of weird and flaky behavior doesn't mean it won't just light up

eBay has an unlimited supply of Arduino clones for $3-5 I usually buy two and plan on frying one

Hadlock fucked around with this message at 23:29 on Sep 21, 2023

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Deadite posted:

Oh hey, you are the one who was helping me in the electronics thread and I was too dumb to realize it. Thank you for your continued help, but I might not be smart enough for this project.

Here's a video of me pressing the reset button and shorting out the pins in the guide. Nothing changes with the lights and the computer still doesn't acknowledge that a board is connected:

Yeah, this one is probably smoked. There's a decent possibility you just burned the little microcontroller (serial-USB interface) because those are kinda fragile. If you have stacks of these lying around, it's possible to figure out if the main microcontroller (the big DIP package) still works, but it's probably not worth it because you have stacks of these lying around.

For reference, the way I would have done this is wire everything EXCEPT the 12V up and see what kind of lights you get on your relay board when the Arduino is just powered by USB. If all of that works, then is the time to unplug USB, carefully wire in +12V and GND to the appropriate bits, and power it back on.

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.

babyeatingpsychopath posted:

For reference, the way I would have done this is wire everything EXCEPT the 12V up and see what kind of lights you get on your relay board when the Arduino is just powered by USB. If all of that works, then is the time to unplug USB, carefully wire in +12V and GND to the appropriate bits, and power it back on.

That is what I did at first, I ran the sketch you gave me with just the arduino and the relay module without the 12v power supply or LEDs and it worked great, the relay LED indicators turned on and off as expected. It's after that when I tried to wire up the power supply and the LED strips is where I got confused and must have screwed up.

I'm going to have to find these cheap ebay clones and nail this down so I don't fry the itsybitsy when it gets here.

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.

babyeatingpsychopath posted:

Yeah, this one is probably smoked. There's a decent possibility you just burned the little microcontroller (serial-USB interface) because those are kinda fragile. If you have stacks of these lying around, it's possible to figure out if the main microcontroller (the big DIP package) still works, but it's probably not worth it because you have stacks of these lying around.

For reference, the way I would have done this is wire everything EXCEPT the 12V up and see what kind of lights you get on your relay board when the Arduino is just powered by USB. If all of that works, then is the time to unplug USB, carefully wire in +12V and GND to the appropriate bits, and power it back on.

There is one thing I wanted to clarify though, in the diagram you provided the 12v power is connected to the DC+ which also connects to the 5v pin on the arduino, but the diagram on amazon is missing this piece




Is the Amazon diagram just missing this piece and it should be included?

I also originally put the ground in the GND pin on the left under the power section instead of on the right like in the diagram. Would that have caused problems? Why are there three pins labeled GND?

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Deadite posted:

There is one thing I wanted to clarify though, in the diagram you provided the 12v power is connected to the DC+ which also connects to the 5v pin on the arduino, but the diagram on amazon is missing this piece




Is the Amazon diagram just missing this piece and it should be included?

I also originally put the ground in the GND pin on the left under the power section instead of on the right like in the diagram. Would that have caused problems? Why are there three pins labeled GND?

The diagram I posted was based on the specific model I posted. On that board, there's a BAT pin and also a +5V pin. The BAT is rated up to 16V, but the +5V pin is 5.0 +- 0.2V.

For your Uno R3, you don't want to put +12V on the +5V pin. That's what burned out your board. Everything on it is dead now.

For the Uno R3, +12V can go on VIN only.

On your Amazon diagram, the +5V from the Arduino is powering the circuitry on the relay board; notice that those are 5V relay modules? Not shown on that diagram is the USB connection that is powering everything. Your relay board is 12V, so the +12V is powering the relay modules, and also the Arduino via the VIN pin and its onboard regulator. Do be careful about polarity. All the grounds are connected together; no worries there. I would connect the GND over on the righthand side like shown and the VIN on the left side. That way, your wire colors will make it SUPER obvious that you're not putting +12V on the ground pin.

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.
Well mystery solved! At least I feel like I have a better understanding of how this all fits together. I need to find a guide on what all these pin names mean because I understand GND and 5V, but the others along the left I shouldn’t try to guess what they mean.

Thank you for all your help

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
To chime in -

I avoid using the VIN pin for power input for a few reasons - I think some of them covered here already. I THINK a few arduino models have reverse polarity protection on their barrel plugs, but the VIN pin bypasses those, iirc. I use a barrel connector on leads, or one of those y connectors to share the power feed. If I do use VIN for power input, it’s only on something that’s enclosed and I don’t plan on messing with again.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


For Arduino-clones, I go straight to aduino.cc/hardware/

For example, that r3 board is at https://store.arduino.cc/products/arduino-uno-rev3. It's got a full schematic, closeups of the actual board, pin names, everything. If you look at the schematic viewer, the top left corner has PWRIN on the barrel jack, then an input protection diode, then VIN. So connecting things directly to the VIN pin bypasses protection. Exactly as ^^^^ said!

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.
So I got the ItsyBitsy board, and I followed the guide on setting up the UI so I can add a sketch to it. The problem is I keep getting an error when I try. The board is being detected and I think I selected the correct board and port but I'm getting the below error:

code:
Sketch uses 52220 bytes (0%) of program storage space. Maximum is 8384512 bytes.
Global variables use 10224 bytes (3%) of dynamic memory, leaving 251920 bytes for local variables. Maximum is 262144 bytes.
Resetting COM4
Converting to uf2, output size: 140288, start address: 0x2000
Scanning for RP2040 devices
No drive to deploy.
Failed uploading: uploading error: exit status 1


Any idea what I'm doing wrong? Googling this hasn't been very fruitful

Sockser
Jun 28, 2007

This world only remembers the results!




Deadite posted:

So I got the ItsyBitsy board, and I followed the guide on setting up the UI so I can add a sketch to it. The problem is I keep getting an error when I try. The board is being detected and I think I selected the correct board and port but I'm getting the below error:

code:
Sketch uses 52220 bytes (0%) of program storage space. Maximum is 8384512 bytes.
Global variables use 10224 bytes (3%) of dynamic memory, leaving 251920 bytes for local variables. Maximum is 262144 bytes.
Resetting COM4
Converting to uf2, output size: 140288, start address: 0x2000
Scanning for RP2040 devices
No drive to deploy.
Failed uploading: uploading error: exit status 1


Any idea what I'm doing wrong? Googling this hasn't been very fruitful

https://github.com/earlephilhower/arduino-pico/issues/5

Give this a quick scroll and see if that helps

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.

Sockser posted:

https://github.com/earlephilhower/arduino-pico/issues/5

Give this a quick scroll and see if that helps

This doesn't have a BOOTSEL button, just a RESET. Holding that down while plugging in the USB doesn't seem to change anything. I'm also on Windows 10 so I don't know if the Mac info applies. Someone at the end of the comments had this issue with Windows and was able to fix it but they never say what they did!

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.
All the solutions I can find for this "Scanning for RP2040 devices" line involve holding down the BOOTSEL button when you plug in the USB, except this board has no BOOTSEL button

Adafruit you sold me a lemon!

Rat Poisson
Nov 6, 2010

Deadite posted:

So I got the ItsyBitsy board, and I followed the guide on setting up the UI so I can add a sketch to it. The problem is I keep getting an error when I try. The board is being detected and I think I selected the correct board and port but I'm getting the below error:

Any idea what I'm doing wrong? Googling this hasn't been very fruitful

Adafruit's page says there's no Arduino core for the RP2040 ItsyBitsy at the time of launch. Maybe that's still true and you're not going to be able to use the Arduino IDE for the time being?
https://www.adafruit.com/product/4888

Edit: I see that their tutorial involves a 3rd party core. You probably need to hit up the Issues page on the Github for that Philhower core and ask there.

Rat Poisson fucked around with this message at 03:31 on Sep 27, 2023

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Deadite posted:

So I got the ItsyBitsy board, and I followed the guide on setting up the UI so I can add a sketch to it. The problem is I keep getting an error when I try. The board is being detected and I think I selected the correct board and port but I'm getting the below error:

code:
Sketch uses 52220 bytes (0%) of program storage space. Maximum is 8384512 bytes.
Global variables use 10224 bytes (3%) of dynamic memory, leaving 251920 bytes for local variables. Maximum is 262144 bytes.
Resetting COM4
Converting to uf2, output size: 140288, start address: 0x2000
Scanning for RP2040 devices
No drive to deploy.
Failed uploading: uploading error: exit status 1


Any idea what I'm doing wrong? Googling this hasn't been very fruitful

Which ItsyBitsy board did you get? "ItsyBitsy" is a product family, so that could be a RP2040, M0, 32u4, nRF52840, ATSAMD51... they don't program the same.

Adbot
ADBOT LOVES YOU

Deadite
Aug 30, 2003

A fat guy, a watermelon, and a stack of magazines?
Family.

babyeatingpsychopath posted:

Which ItsyBitsy board did you get? "ItsyBitsy" is a product family, so that could be a RP2040, M0, 32u4, nRF52840, ATSAMD51... they don't program the same.

It's the one you linked me to in the electronics thread, the 32u4. It seems to work now if I switch the board on the UI to "Leonardo" for whatever reason. It's amazing to me that anyone finds this to be a fun hobby when just trying to figure out how to do something basic is hidden in riddles, since even after following the directions on the arduino site and installing the package that has ItsyBitsy as a board, apparently the ItsyBitsy listed is not correct for the ItsyBitsy I have, even though it's the only one listed:



So now I think I have the sketch uploaded, except it seems to just turn all of the relays on and off at the same time so I screwed something else up. The LEDs for the relays seem to cycle through intensity kind of in the way I want them to, but I can hear them clicking on and off at the same time.

https://i.imgur.com/UGgd72z.mp4

edit:
Here's the sketch I'm using:
code:
void setup() {
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);

}

const int delay_time=500; // milliseconds.

void loop() {
  digitalWrite(13,HIGH);
  delay(delay_time);
  digitalWrite(13,LOW);

  digitalWrite(12,HIGH);
  delay(delay_time);
  digitalWrite(12,LOW);

  digitalWrite(11,HIGH);
  delay(delay_time);
  digitalWrite(11,LOW);

}

Deadite fucked around with this message at 14:54 on Sep 27, 2023

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