Arduino

549 readers
1 users here now

This is an UNOFFICIAL Arduino community.

Everyone who uses Arduino board or their clones or associated boards and/or the Arduino IDE is welcome here. If it involves Arduino hardware or software it's welcome here. If it connects to Arduino hardware it's welcome here. If you're building your own boards that you use with an Arduino it's welcome here. There will be no Arduino elitist bullshit in this community.

You may also be interested in:

AVR

RULES:

  1. It's always a floating input.

  2. All Lemmy.ca rules apply here.

  3. Everyone (see rule 98) is welcome.

  4. If you’ve seen a question 100 times answer it the 101st time or ignore it. Even better, write a complete, detailed answer and suggest that the mod(s) pin it to the community.

[Did you actually think there were 98 rules?]

  1. If you present something as fact and are asked to provide proof or a source provide proof or a source. Proof must be from a reliable source. If you fail to provide proof or a source your post or comment may be removed.

  2. Don’t be a dick. Yes, this is a catch-all rule.

  3. The mod(s) have the final say.

founded 1 year ago
MODERATORS
1
 
 

If your circuit is behaving weirdly, switching on when you touch a wire or move your hand over the circuit you almost certainly have a floating input. You can solve this problem with a pull-up resistor. Many AVRs have built-in pull-up resistors that you can turn on using code.

In Sketch:

pinMode(2, INPUT_PULLUP);

In BascomAVR:

Config Portb.1 = Input Set Portb.1

There's a great article at SparkFun about Pull-up Resistors.

2
 
 

Looking to get into Arduino for the first time. Have already searched about this topic, looking to seek some additional input, as you all seem to know what you are talking about. For reference the Elegoo clone is around half the price of the official pack. There is a Elegoo clone of the Mega board (as opposed to the Uno) which is almost as expensive as the official Uno one. Or would I be better off buying parts individually? I apologise for knowing nothing about electronics.

3
 
 

Crossposted from: https://lemmy.ml/post/9698836

This setup allows Arduino to read temperature, control relay based on setpoints, display info on OLED screen, and manage date/time settings with user input through buttons. Adjust based on specific hardware/project requirements.

Designed to replace the faulty electronic control of a blue heat radiator.

Code and simulation at Wokwi

Licensed under GNU GPLv3.

4
 
 

This is the replacement controller I built for the wheelchair lift. The controller itself is in the middle. The four board on the left and right are a testing harness. The red and black wires are 24VDC and the green and white ones TX and GND for monitoring with a terminal program on my notebook (puTTY).

Without the test harness it looks like this.

I was trying to squeeze a LOT into the BID box that I'm using for this project. I had to stack boards to get everything in.

The bottom most board is a standard bottom board for the BUD case. It has holes along each side for 2.54 screw terminals and pluggable screw terminals. I'm only using that board to mechanically connect the project to the BID case and for the screw terminals. I almost always use pluggable screw terminals because they're awesome. I can unplug four plugs instead of unscrewing 36 screw terminals and trying to keep the wires straight.

There are two top boards. The one on the left carries four relays which turn the negative logic of the Darlingtons into positive logic for the lift. They send 24VDC out to the contactors that run the motors and the door lock. The other small board at the rear has two safety relays which switch power coming in through a bunch of safety switches out to the battery relay and the main contactor.

This is what it looks like assembled into its BUD case.

This is all built around an Arduino Nano with a program that I wrote in Great Cow BASIC.

5
 
 

I give you Frankenduino. It's an Arduino ProMini soldered onto a piece of protoboard and wired up to the Nano pinout.

I have 10 Nanos on order but I really needed to keep the project moving.

This ProMini has an ATMEGAS168 chip on it but that's good enough for what I'm doing.

6
 
 

Hey all,

I've been sitting on a starter kit for a Mega 2560 R3 board and sensors for over a year. I want to get into it, so bad, but I frankly don't have the time to learn to code this with my job the way it is.

Is there a WYSIWYG program anyone favors, especially for someone new to Linux (I'm using a Raspberry Pi 3 Model B running Raspbian and I have a Raspberry Pi 4 Model B too) and Arduino (board model Mega 2560 R3)?

I found these options. Anyone have experience with them?

Visuino

Embrio

7
15
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

This little power supply board plugs into a ProMini shield stack or the ProMini Backplane boards that I designed. It's basic but it has a couple of nice features.

In this top view:

A - Power inlet

B - Screw terminals for offboard switch

C - Jumper across switch screw terminals

D - Reverse current protection diode

E - 5V regulator

F - 3.3V regulator

G - 3.3V/5V on Vcc rail jumper

The switch screw terminals let me use an external switch to turn the power supply on and off. If I'm not using an external switch I can use the adjacent jumper to tie the power supply on or I can put the jumper on and take it off to turn the power supply on and off.

The power supply puts the supply voltage from the power connector onto the Vin rail on the ProMini Backplane board. There is a jumper on the next slot over to allow me to take Vin off that socket so that I can put the ProMini in there and not have it powered all the time.

You can see two round pads between the white power inlet connector and the green screw terminals. This is an optional 2-pin header that sends regulated 3.3V and 5V from the power supply board down to the ProMini Backplane board to supply screw terminals to allow me to power offboard sensors or other devices easily.

You can clearly see the extra 2-pin connector in this bottom shot.

This board was designed in DS PCB before I switched to Pulsonix. I had them made by All PCB and assembled them by hand. This was a fun little project and I use these little boards quite often.

Here it is in action. The PSU board and a ProMini installed on the left ProMini Backplane board. You can see the 5V, GND, and 3V3 screw terminals to supply offboard power. I've also got two Backplane boards daisy chained together. You can also just see the 6-pin ICP port to the left of the screw terminals.

8
 
 

I needed some LEDs so that I could track what my data lines were doing. I started with a bunch of LEDs and resistors on a breadboard.

From there I made up a small block of SMD LEDs and resistors on a piece of proto board.

Then I moved to an actual prototype on a dedicated protoboard.

Finally, I produced the finished product. BLINKY LIGHTS!

The friend who I work with can design a board entirely in software, we use Pulsonix, without every making a prototype, send it for manufacture, and get working boards back. Even when I build multiple prototypes I often end up with boards that need FECs to make them work.

9
 
 

I built these a few years ago to let me use UNO shields with Pro Minis to speed up prototyping. This was an early version. Later versions had more and more features added until I didn't need the shields anymore. That's when my Pro Mini Backplane was born.

10
 
 

Here is my new serial starting code. It takes some time to start printing the serial after the command is set. Usually you simply add a delay, but that delay can be longer than the time your serial takes to connect, so you're waiting for nothing and when you're trying to troubleshoot that becomes frustrating. The other option is the check if the serial started with while (!Serial) { delay(10); } but then your code doesn't run without a serial connection so it just hangs if you try it off a battery or USB charger block.

Here comes the best of both worlds!

It checks for a serial connection every 10 ms but only for 3 seconds, then it goes on. The commented out line is to print how long it takes for your serial to show up. It was useful to determine 3s was a good number (I landed around 2100 to 2700 ms so 3000 gives me just a bit of padding while still being fairly fast when not plugged to a serial console.

Bonus is the giant ASCII START logo I made so I can easily see where it started when scrolling back up.

You can throw this at the top of your setup() or even better, make it a function and call it, so you only need to comment out a single line when you go testing it without a computer and save those precious 3 seconds at startup.

Enjoy!

  Serial.begin(115200);
  unsigned long time_begin = millis();
  while (!Serial && (millis() - time_begin) < 3000) {
    delay(10);
    // Serial.println(millis() - time_begin);
  }
  delay(10);
  Serial.println(" ");
  Serial.println("       ::::::::   :::::::::::       :::        :::::::::   ::::::::::: ");
  Serial.println("     :+:    :+:      :+:         :+: :+:      :+:    :+:      :+:      ");
  Serial.println("    +:+             +:+        +:+   +:+     +:+    +:+      +:+       ");
  Serial.println("   +#++:++#++      +#+       +#++:++#++:    +#++:++#:       +#+        ");
  Serial.println("         +#+      +#+       +#+     +#+    +#+    +#+      +#+         ");
  Serial.println(" #+#    #+#      #+#       #+#     #+#    #+#    #+#      #+#          ");
  Serial.println(" ########       ###       ###     ###    ###    ###      ###           ");
  Serial.println(" ");
  Serial.println(" ");

PS: it looks like Lemmy can't handle color coded markdown... :(

11
 
 

I'm using this really nice board, it has a RP2040, a round touchscreen and a Gyro/Acc module all in one (plus a RTC and Battery management). My issue is with the IMU, the QMI8658 is supposed to have a fusion algorithm embedded but I can't seem to get it to work. Anyone else has tried this? I'm looked at the chip documentation and tried to modify the registers via I2C but I still don't get any values for the Quaternions... I'm feeling really alone with this issue and I feel like I would have been able to get an answer back on Reddit but I want to try here first..

12
 
 

I'm trying to use an LIS2MDL ic with an Arduino nano on a custom PCB designed in KiCad. I tried the Arduino example compass script for the ic and it didn't work. It just prints "Magnetometer Test" and nothing else happens

13
 
 

I got some bread boards and a kit full of resistors, caps, LEDs, etc. On Amazon, and 3 esp32s (dfRobot boards) from digikey. Very exciting! I already blew an LED (current limiting resistor? Never heard of her!)

14
 
 

I had a gap in the wall from where an old monitor mount used to be attached so wanted to make something to cover it up.

The LEDs are controlled by an ESP8622 running WLED, monitor data from the PC comes from Hyperion software. It can be set to a constant color, dozens of set themes, or match the color output of whatever is on my monitor.

The microcontroller sits under the desk and receives constant power, it is the wired to a button on my desk to turn on/off power to the LEDs.

Laser cutter action:

I tried to give it an aged rock/stone appearance using some textured spray paint which actually turned out pretty well. I think some of that doesn't come across well in the photos, but in person it looks good (to me anyway).

LEDs changing color https://imgur.com/a/8CmepDk

How to get WLED running: https://tynick.com/blog/11-03-2019/getting-started-with-wled-on-esp8266/

More info about Hyperion https://docs.hyperion-project.org/en/user/leddevices/

cross-posted from my post here: https://lemm.ee/post/1063150

15
 
 

cross-posted from laser cutting community [email protected] : https://lemm.ee/post/896795

This was my first real dive into Arduino and multiple button mapping. It took a significant amount of trouble shooting and learning the software to get things to map to the computer action.

Gif of the action https://imgur.com/a/XI9KTeH

Prototype 1:Started this project before I had a laser cutter and had tried to just drill through acrylic. It didn't work well, but it held my buttons during testing

Prototype 2 Still no laser cutter but I cut out using plywood worked much better for manually cutting out the holes

Prototype 3 Much better

16
 
 

This is an early version of the board that I created because I was irritated by the fact that there were no shields available for the ProMini. It includes the ability to plug in one of those cheap, Chinese breadboard power supply boards and I stuck a DS1307 real time clock under it. The ProMini goes in the center then you can plug regular UNO shields into the carrier. These things worked well but I decided to make a bunch of shields specifically for the ProMini.

17
 
 

This is the big daddy of Pro Minis. I have a bunch of these in my Arduino bin and in my biggest project, the Maple Syrup machine room that I call the SapMaster.

This board uses a micro-USB connector, ATMEGA2560, and a CH340G USB to serial chip.

This is an extremely capable chip. I pair it with an ESP32 and a dual FRAM board in the SapMaster controller.

18
4
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

I have a boat load of these in my Arduino bin and spread around in various projects.

This particular ProMini is based on an ATMEGA328P but I also have ATMEGA168s as well. This is a bare bones Arduino with no ICP port, no USB port, no power regulation, no nothing. This is just a 328P with a bit of supporting circuitry.

19
 
 

There are a bunch of these in my Arduino bin and in one project or another. My maple syrup machine started on an UNO but ran on a NANO V3 for several years before moving to a MEGA2560 Pro Mini.

This board uses a micro-USB port, a surface mount ATMEGA328P, and a CH340G USB to serial chip.

20
 
 

I have a few of these in my Arduino bin.

This one has a micro-USB connector, surface mount ATMEGA328P, and a CH340G USB to serial chip.

21
4
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

I have a few of these in my Arduino bin.

They have the classic USB-B connector, a DIP-28 ATMEGA328 chip, and a MEGA16 to so USB to serial conversion.

This board is a workhorse.

22
 
 

The UNO R4 WiFi model will use an ESP32 chip for built-in WiFi and Bluetooth, and includes a 12x8 LED matrix along with some other new features. The boards now support up to a 24V power input.

23
 
 

I was working on a number of projects that used the ProMini as the microcontroller. I was irritated by the lack of shields specifically for the ProMini.

First, I designed a board that I called my ProMini Sheid Carrier which had a power supply, an RTC, some LEDS, a place to plug in one of those cheap, Chinese breadboard power supplies, and connectors for a regular UNO style shield.

image

(Click the pictures for a higher resolution version.)

What I really wanted, though, was shields designed specifically for the ProMini.

So...I designed them.

In the cover photo are (from left to right):

DS1307 Real Time Clock with Battery Backup DS3231 High Precision Real Time Clock with Battery Backup Dual FRAM (or other memory with the same pinout) Buzzer RS232 Transistor Driver Port D Screw Terminals Port B & C Screw Terminals I^2^C 1 Wire LCD with Contrast (ETTeam Connector) Blinky Lights

At first I made them stackable, like UNO shields...

image

but that looked stupid.

So I designed a ProMini Backplane board that would carry them.

image

The backplane includes 6 slots. The boards can go in any slot but the PSU slot has a couple of extra pins to bring down regulated 5V and 3.3V for the screw terminals and jumpers to select which regulated voltage goes to the Vcc line. The ProMini slot next to the PSU slot has a jumper to disconnect Vraw from the ProMini so it can be powered by the regulated supply voltage of your choice. The board also includes a 6-pin ICP slot and they can be daisy-chained together to add slots.

I had a lot of fun designing all of these boards and putting them together.

I put together these kits for my kids. They include one of each board, a breadboard, a USBasp, a programming cable, some Dupont wires, a 1602 LCD and LCD cable, and a little homemade button pad and strip of 8 LEDs with resistors.

image

24
4
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

ESP8266 and a 2.4 inch touch screen. The button turns on and off the LED backlight on the screen.

Inside the base is a charging station that powers the weather display, 2x USB C and the galaxy 4 watch base.

The base is made of layers of plywood cut out on my laser cutter.

Weather station code by Daniel Eichhorn https://github.com/ThingPulse/esp8266-weather-station-color

Weather info is grabbed from Openweathermap, you can sign up for their free API key

Source code https://github.com/ThingPulse/esp8266-weather-station-color/blob/master/esp8266-weather-station-color.ino

I was using adafruit hardware so used their guide/libraries https://learn.adafruit.com/wifi-weather-station-with-tft-display

I had to remove some of their touchscreen calibration code since it seemed to be causing things to get hung up in a loop when turned on.

I also had to adjust the rotation 180degrees so the ESP attached to the back of the screen was at the bottom instead of the top to fit it in the enclosure.

I use pin 5 to toggle the LED backlight.

25
 
 

Most of the projects I design start out on solderless breadboards. The one in the bottom of this picture is a ROM switcher and reset circuit for a Commodore 64 that I'm working on. This circuit will fit inside the footprint of a 27256 ROM chip in a 2364 to 27256 ROM adapter.

Other projects are larger like this early prototype of my maple syrup machine room controller, the SapMaster...

image

or this...something...that I was doing with an ESP32 and a Raspberry Pi Zero W.

image

Over the years I've collected a number of solderless breadboards. Some I bought myself and others came with kits that I bought. A number of them came from Hacker Boxes when I had a subscription before the pandemic. I had the delivered to a UPS store in Ogdensburg, NY and drove over and picked them up once a month. Hacker Boxes are cool. Definitely check them out.

Some of the solderless breadboards in my BREADBOARD drawer were cheap, Chinese knock-off breadboards. They had...issues...

image

not to mention the fact that the contacts were SUPER cheap. They often didn't line up well with the holes and prevented pins from being plugged in. Dupont wires and header strips were a BIG challenge and when plugging in a header strip the contacts often stretched and didn't spring back properly.

I finally decided that it was time to replace all my cheap breadboards with better ones.

The cheap ones can be bought on AliExpress for CAD$2. The better ones cost in the neighborhood of CAD$10. I spent some time doing research and talking to friends in the electronics business and settled on Global Specialties (pictured above.) Just about any of the brands available from Digikey or Mouser will be the same quality.

The contacts are nickel plated phosphor bronze and are rated for 1.5A at 36V.

I've switched my prototypes over to the new breadboards and am very happy with how the feel.

view more: next ›