[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 120 KB, 500x400, 500_F_201897453_EmjgIWz9BQTAxzl2dhFngNc1LeaSU2zZ.jpg [View same] [iqdb] [saucenao] [google]
1651573 No.1651573 [Reply] [Original]

Arduino general

This thread is for Arduinos and all devices in the arduino eco system (esp32, blue pill etc) Raspberry pi is also allowed.

What is arduino?
https://www.arduino.cc/

>> No.1651643

>>1651573
Im a noob with arduino, what are the best resources to learn?

I've found some mechatronics websites but I'm mostly interested in using small solar cells as my main power source.

>> No.1651850

>>1651643
Like with everything today just google tutorials on both youtube and internet

>> No.1651892

>>1651850
Any ideas for something more interactive? I keep trying to learn, but I cant learn for shit without hands on stuff

>> No.1651953

>>1651892
just take up a project you want to do and google and ask if you don't understand something
but lets be real you have no idea what to do with that thing

>> No.1651978
File: 230 KB, 1280x720, maxresdefault.jpg [View same] [iqdb] [saucenao] [google]
1651978

why is lolduino so shit in the audio applications? i just made a simple sawtoothwave generator and it sounds supershit, like the wave sounds strangled and jittery. any way to make it better?

>> No.1652074

So I'm looking at trying to build a recorder for flow and pressure.

Uno rev 3

Only need one analog input and a frequency input. Can I use the digital inputs to read HZ?

>> No.1652100

>>1652074
>Can I use the digital inputs to read HZ?
Probably. It depends on the max frequency you expect to detect, what the signal looks like, and the fastest timer you have running in the system.

>> No.1652117

>>1651978
Do you have a scope to see the wave form at least?

>> No.1652119

>>1652100
Just basing it off of experience with mag meters I'd say anywhere from 0-1000hz, not sure what little turbine flowmeters output in freq.

>> No.1652121

>>1652119
Here's where it gets ugly, what's the signal look like?

>> No.1652122

>>1652119
If the output is clean you can just count the number of times you cross the midpoint of the waveform.

>> No.1652244

>>1651573
Is there a way to make sure an Arduino doesn't loose contact with a ROS system? Something like automatically resetting it on startup or if it loses synch.
I tried using Rosserial and it would periodically stop working. Then, I wrote my own driver to read using the 'serial' package in Python. It seems to be working ok once it gets going (hasn't disconnected in 30 minutes) but sometimes, for an unknown reason, nothing seems to get read by the Python node. I know the loop () was running because I make the LED blink everytime it goes round.

I'm thinking about the arduino equivalent of resetting the registers on a MEMS device everytime you turn it on. I have yet to have an MPU-9250 MEMS fail on me the same way an Arduino does.

>> No.1652256

>>1651978
Duinos are too slow to generate decent audio. They would even struggle pushing data to an external DAC.
Remebmer, arduinos are entry level. If you need more power, look elsewhere.

>> No.1652312

>>1652117
yeah will do in the afternoon

>> No.1652313

>>1652117
also its not that the waveform is ugly. the waveform is sort of fine but it jitters, it isnt stable, which is weird, i expect a digital waveform to be pretty stable no matter what.

>> No.1652319

>>1651573
>OP
so this is the average age of the arduino kids?

>> No.1652343

Do you remember when people didn't need a SoC more powerful than the fucking moon lander to turn a bulb on and off?

I do.
Thanks arduino.

>> No.1652755

I have that generic blue arduino relay with 3 pins, you know which one, and i turn it on and off with ESP32, but i need to guarantee that the relay won't get triggered by some shit like random noise or the ESP32 rebooting (causing the relay pin to be set as input for a tiny moment) should i add a pull up resistor or something to the relay pin?

>> No.1652780

>>1652244
Couldn't you use the watchdog timer to reset the arduino when a serial command is issued by the computer when it doesn't receive any data? Is there an error in your code, like not handling micros overflow (which happens after around 70 minutes)?

>> No.1652782
File: 13 KB, 556x324, circuit-20190724-0539.png [View same] [iqdb] [saucenao] [google]
1652782

>>1651978
stop being lazy and make pic related. with the resistor values and cap values its like a high pitched whistle if you add a speaker to replace a wire off one of the bjts emitter. regardless of what the simulation says its like 120hrz

and if you increase the cao values to 1uf and the low resistors to 3k its like thumping. its steady thumping but slower and this is more like 30 hrz and anything in between you can get and if you only use 1 bjt as the driver by connecting on the collector and make the cap values asymmetrical you can change the spokes to sawtooth or even get near square wave since 1 cap determines up swing and the other determines how long it will be there it can be gradual or steep. just fuck with that crappy simulator nobody likes its the one oscillator i made in it and in reality that works the same way. falstad or something

>> No.1652784

>>1652782
Oh god you are an idiot.

>> No.1652790

>>1651953
Why be a discouraging dick? He's asking for interactive resources to learn. There's no need to make a dig at him for not knowing, when he is actively seeking knowledge.

>> No.1652793

>>1652790
You know very well it's true. That guy has no fucking idea what do to with the Arduino that's why he's asking such stupid question and can't find any tutorial that holds his interest.

>> No.1652819

i have an stm32 f401re, I got it for free but I don't know how to use it. it seems more complicated than an arduino. I have two expansion modules (bt and accelometer). this is my first time with electronics but I don't know where to start

>> No.1652825

>>1652819
again
>hurr durr I want to do electronics but I have no idea what to do
Pick a project you want (we know there's none) and start there.

>> No.1654160
File: 308 KB, 640x358, WellmadeGlassCarpenterant.webm [View same] [iqdb] [saucenao] [google]
1654160

>>1652825
>Pick a project you want (we know there's none) and start there.

Some day I might try to copy this pointless but cool project, that uses 2 arduinos, 4 microphones, and 4 stepper motors to bounce a ball

https://electrondust.com/2018/07/22/stepper-juggler/

>> No.1654967

>>1652819
You could write the Arduino bootloader onto the STM32 and use the Arduino IDE and libraries, I guess. Later get a cheap programmer, install PlatformIO for VS Code, get CubeMX to generate the initialisation code, then start poring through that 1000+ page reference manal to see what it can do without the Arduino framework getting in the way.

>> No.1654986 [DELETED] 
File: 110 KB, 1024x1024, 1559417709664.jpg [View same] [iqdb] [saucenao] [google]
1654986

>>1651573
cunny edition

>> No.1655207

>>1651573
Completely new to electronics here.

Would you suggest an Arduino or a Raspberry Pi for a beginner who wants to learn to code and build electronics?

>> No.1655239

>>1651573
That kids Thumbs are Brilliant had to say ..

>> No.1655306

>>1655207
Neither, RasPi isn't electronics at all it's programming and the Arduino is barely any better.

Buy a bucket of components and build something.

>> No.1655375 [DELETED] 

>>1654986
pedo

>> No.1655608

I want to trigger LEDs with software in windows. Im wanting to make an automatic LIVE/ON AIR light.

I use OBS software and an Elgato Stream Deck (programmable macro keyboard) to stream to twitch. You can write scripts for both of these.

I have not much coding or Arduino experience but does this sound right

>write script triggered by going live (either in OBS, or triggered from pushing elgatos OBS go live button)
>script would trigger Arduino to push out 5v to LED

You are live, the light is on

>script triggered from pressing the stop streaming button
>trigger Arduino to turn LED off

Does that seem reasonable, and would one of those little baby sized Arduinos work?
Im not sure how to go about doing it.

I have a MEGA2560 laying around but think those mini sized ones look cool.

>> No.1655722

If you set an aanalog pin to some voltage arduino creates that voltage by pwming it, so what ios the purpose of some of the digital pins also being amrked with the pwm symbol?

>> No.1655726

>>1655722
Look at the datasheet for the actual microcontroller and it will become obvious, PWM outputs share the same pins as digital outputs, nothing more.

>> No.1655797

awww shit
i accidentally brushed a 15v jack on the bottom of my arduino and now it's fried
and thats why i order them in bulk from chinks
thank god for cheap chinks

>> No.1655917

Every thread has "that one guy", this thread not excluded. smdh.

>> No.1655936 [DELETED] 
File: 250 KB, 600x848, 1550031438314.png [View same] [iqdb] [saucenao] [google]
1655936

>>1655375
I prefer the term "children lover", thank you very much

>> No.1656045

>>1655936
Which is exactly what pedophile means.

>> No.1656055

>>1651953
you're being kind of a debby downer right now.


booooo on you

>> No.1656144

>>1655207
arduino, raspi is way too expensive for all the fuck ups you will do
with arduinos you can just order 10 and start fucking them up
not to mention that for the shit you will do like turning on and off lights arduino was purpose intended, raspi is absically a linux server

>> No.1656145

>>1655917
what one guy?

>> No.1656146

>>1651892
interactive? you can't go more itneractive than youtube and text tutorials
If you want more itneractive than that you have to join your local electronics club and hang with the nosebleeds

>> No.1656150

>>1651892
Have you tried legos?

>> No.1656183

>>1656055
>>1655917
>triggered because it's the truth
>>1656145
who says the truth

>> No.1657550

i feel like i got scammed
arduino """analog""" output is just pwm at 0.5-1khz
can i just toggle digital pins on and off to get moar frequency
also what software should i use to flash a chink nano with assembly via the mini usb

>> No.1657554

>>1657550
>i feel like i got scammed
You mean you can't read.
>can i just toggle digital pins on and off to get moar frequency
yes, that's a dumb question
there's also a PWM fuction
>also what software should i use to flash a chink nano with assembly via the mini usb
I'm sure it's on google

>> No.1657568

>>1655608
You would need to somehow send from OBS for example '1' or '0' via Serial port to Arduino which would turn on/off the led

>> No.1657593

>>1655917
a pedo

>> No.1657955

>>1651573
is it possible to control a RPi's GPIO pins in languages other than python? The manual only included instructions for python and I can't seem to find any answers on RPi forums

>> No.1658011

>>1657955
https://lmgtfy.com/?q=raspberry+pi+gpio+c%2B%2B
https://lmgtfy.com/?q=raspberry+pi+gpio+java
etc

>> No.1658013

>>1658011
you don't think I already did this? dumbass

>> No.1658286

How do I setup an arduino uno so that it calls an interrupt every 125μSeconds?

>> No.1658298
File: 720 KB, 933x1400, proxy.duckduckgo.comhhhhhh.jpg [View same] [iqdb] [saucenao] [google]
1658298

I wanna make a Pip-Boy. Not wrist mounted, but something like this from the earlier Fallout games. I already have a working geiger counter, but I wanted to add a GPS, FM radio, access to PC via USB or something, a SMALL nuclear battery (photoresistors and tritium just for the memes) The radio doesn't have to interface with the program and interface exactly, I just want to have an on/off switch controlled via a program and not a physical switch. Obviously I'm gonna redesign it to be more practical but this pic looks cool and is a basis of what I want.

>> No.1658307

>>1658298
>I wanna make
what is stopping you from actually making it?

>> No.1658315

>>1658307
Not knowing whether or not this is a plausible idea for an Arduino based system. I also am a little clueless on how to work a ton of Arduino stuff and don't know any good books. I have Practical Electronics for Inventors but that doesn't apply much to Arduino, and I also only know very basic coding from a small book. I also don't know how I would lay out all of the electronics and fit them. Are there any books that could show me any practical solutions to these problems? I wanna make one really bad and components are cheap enough to where this would just be a $150 project at the very most. I think I still just need to read the book I have a bit more. I don't know.

>> No.1658316

>>1658315
>>1658307
I also don't know if I could fit all of that into one thing with just an Arduino and I don't want to use one of those Arduino Megas. Couldn't I just use whatever AtMega chip the Arduino has and prototype on a breadboard until I can get it compact enough to make a real circuit board? I'd just need a layout of what pins do what since the chip pretty much directly interfaces with the io pins

>> No.1658333

>>1658286

the clock is 16 mhz so you need to count 125 e-6 * 16e6 = 2000 counts. so use timer 1 or timer 2 and CTC mode with a prescale of 8 and compare match of 2000 / 8 = 250, and enable the interrupt for that. timer 0 is used for millis() and delay() so don't use it.

>> No.1658346

>>1658013
then why are you asking dumbass

>> No.1658352

>>1658316
Yes you can do it with an Arduino.
Why not use RPi and make it into a game console so you get some use out of it?

>> No.1658359

>>1658352
Because I'm autistic and I unironically want to LARP with one of these on hikes and stuff and do it as authentically as possible. The RPi game system idea is a little overdone and too easy

>> No.1658422

>>1656183
Found that one guy

>> No.1658889

>>1658359
> as authentically as possible
I doubt a duino powers the pip in the fallout world. A too would be closer to "authentic" because a pip is more microprocessor based with complex processing and not a small microcontroller.

>> No.1658891

>>1658889
*an rpi would be closer

>> No.1658982

I have a nodeMCU version of the ESP8266 and I've read that the firmware is programmed in the lua language. Mine works fine in the Arduino IDE where my code is C++, but even a simple sketch takes a lot of space: "Sketch uses 269992 bytes (25%) of program storage space. Maximum is 1044464 bytes."

So, is it re-writing all of the firmware, and it's all in C++ using the ESP8266WiFi library, or does it write the lua part as well, or what? When I select another board rather than nodeMCU, like "generic esp8266" it flashes ok but the code does not run.

Not that it matters since everything works fine, I'm just curious as to what exactly goes on.

>> No.1659201

>>1658315
Use raspberry pi instead

>> No.1659757

Which arduino-like microcontoller has the best ADC? I want to read a voltage between 0 and 10 mV. Do I need an op amp anyway? Shouldn't I just use an external ADC?

>> No.1659760

>>1659757
>Do I need an op amp anyway?
yes

>> No.1660121

>>1651892
Just buy some basic stuff like a broadboard, buttons, LEDs, sensors, and motors. As your learning programming just apply that logic to what you have so you can visually see what's going on. Like if your learning loops figure out how to visualize it with a led. Can't get much more hands on that that.

>> No.1660876

>>1657550
arduino only has analog inputs son, the variable voltage outputs are called PWM which is a square wave, nobody ever claimed arduino has analog outputs

>> No.1660881

>>1660876
he's talking about the frequency you retard, how retarded are you that you can't understand simple sentences

>> No.1660989

So apparently, the ATmega32u4 has an amplifier with a gain up to 200x for its ADC. How do I set this gain on an Arduino Micro?

>> No.1661012

>>1651978
max sample rate output for arduino is loosely correlated and limited by the clock, or mips, the processor is capable of. try the same function on an arduino that has a better processor. like on a Yun for example. also try coding the wave output yourself. any intermediary api might be too much overhead. arduino mega should be able to handle most human audible tones, uno probably too.

>> No.1661015

>>1660876
The arduino library itself named the function analogwrite, which is a misnomer that obviously confuses newbies.
This shouldn't come as a surprise since the arduino library authors are idiots.

>> No.1661023

>>1654160
If you van gear it up theres an autist in another thread that needs this platform for his bootleg dryer / apartment fire starter

>> No.1661055

>>1660989
you should be able to change the registers directly, look at the ATmega32u4 datasheet

>>1661015
are you also too retarded to understand the problem was frequency

>> No.1661101
File: 348 KB, 2560x1538, 1098ab3e-6b0b-43d7-8017-e9de8b09af61..png [View same] [iqdb] [saucenao] [google]
1661101

>>1651978
Use the Mozzi library. you can have a demo up and running in 10 minutes if your not a pleb.

>> No.1661456

>>1661055
>frequency
that has nothing to do with analog you retard, it's pwm, analog doesn't have a frequency

>> No.1661488

>>1661456
read that first post again you fucking autist

>> No.1661492

>>1661055
>are you also too retarded to understand the problem was frequency
Are you the poster who said you felt scammed? You really are fucking retarded.

>> No.1661498

>>1661456
>analog doesn't have a frequency
Stop posting, seriously. You are flat out wrong.

>> No.1661500

>>1661101
>Doesn't use a DAC
>16k sample rate
>8 bit audio, 14 with reduced SR
>Tons of processor overhead

Its like you hate life. Just get a DSP for playing with audio. Arduino hardware is terrible.

>> No.1661599
File: 251 KB, 800x1726, month-by-month.jpg [View same] [iqdb] [saucenao] [google]
1661599

so what are you guys working on?

>> No.1661612

>>1661599
I'm trying to see how many ghz of processing power it takes to make a single red LED blink on and off again.

>> No.1661619

>>1661599
What IDE are you using?

>> No.1661623
File: 2.20 MB, 3844x2830, IMG_20190528_191159~2.jpg [View same] [iqdb] [saucenao] [google]
1661623

>>1661599
24 bit audio recorder, on the left. Currently saves to an SD card.
Right side is the player, up to 32 bits.
Going to combine them eventually and code in DSP routines to modify the raw audio.
Using a beefy dsPIC from their 33EP line for it all.

>> No.1661636

>>1661612
How fast? Rule of thumb you need 90,000 kiloflops per second of interval time

>> No.1661644

>>1661599
Nice progress

>> No.1661656

What are FPGAs for? What kind of applications are better for using them than MCUs?

>> No.1661658

I'm scratching my head about the ESP8266. I see talk of NodeMCU and Arduino. Arduino I understand is an atmega chip and a boot loader for flashing programs. NodeMCU seems to be a whole lot more. Will tools I use to compile and flash Arduino work with the ESP8266?

FWIW, I use Arduino-Makefile on Linux, so that means avr-gcc and avrdude.

>> No.1661660

>>1661658

from https://github.com/esp8266/Arduino


Install the current upstream Arduino IDE at the 1.8.7 level or later. The current version is on the Arduino website.
Start Arduino and open the Preferences window.
Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the Additional Board Manager URLs field. You can add multiple URLs, eparating them with commas.
Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation)

>> No.1661662

>>1661656
Well, if you want custom stuff, good luck, building your own ASIC. To me it's the bridge between CPU and ASIC. Something I can develop and debug myself like software that runs on a CPU, but with many benefits from ASICs.

>>1661660
You can use the Arduino IDE for NodeMCU.

>> No.1661664
File: 191 KB, 1920x1080, Screenshot_2019-08-07_13-24-53.png [View same] [iqdb] [saucenao] [google]
1661664

>>1661658

here's the board list which will include nodeMCU after you do all that other stuff here >>1661660

>> No.1661667
File: 201 KB, 1920x1080, Screenshot_2019-08-07_13-26-43.png [View same] [iqdb] [saucenao] [google]
1661667

>>1661664

well fuck, let's try that again

>> No.1661686

>>1661619
visual studio code for development, then I switch to arduino IDE for flashing the controller cause I can't get it to work with internal clock-based setup.

>>1661644
thx

>> No.1661689

>>1661623
that's a huge board.

>> No.1661708

>>1661689

My experience is that once you get beyond a certain level of complexity, that sort of board sucks because with that many jumpers, one will wiggle loose every now and then and you have to waste time finding which one sucks.

>> No.1661723

>>1661689
>>1661708
Not if you take care of the board and actually wire things up properly. I've had this board for a good 10 years. I don't use those pre cut jumper wires for Arduino type boards, I cut and strip solid core wire to fit exact. At worst I'll have a component like a tall capacitor pop out if something get set on it.
It was expensive, but has been worth every cent

>> No.1661724

>>1661686
Any reason you're using visual studio over MplabX?
What programmer are you using?

>> No.1661727

>electronic brainlet
>want to build a lap timer for mini4wd cars
>spend 6 months hacking around, build some bridge-like structure with laser leds and phototransistors hidden in a small hole under the track, write nice little software that reads data using Firmata
>not bad if I say so myself
>lap times aren't registered if a car goes faster than 8 m/sec
>curse the gods for a week trying out everything
>swap the sensors from analog to digital pins
>suddenly 100x the number of readings
At least I learned something

>> No.1661729
File: 351 KB, 1920x1280, i1_wp_com_2019-08-07_21-58-45.jpg [View same] [iqdb] [saucenao] [google]
1661729

>>1654160
looks useless and fun. can you explain what those are or what purpose they serve

>> No.1661732

>>1661727
Guy I know took a VT220, soldered wires to a few keys, solder wires to some switches. When a car goes over the switch, Q, W, E, or R (depending on track) are sent over the serial link. On the computer side, he has the serial TTY autologin and run a program he run. Program displays laps, stats, times and stuff. He built this back in the day. I helped him get it to work on modern hardware (aka USB to serial adapters) with modern Linux.

Of course it would be so much easier with an Arduino for input and a standard video monitor but whevevs.

>> No.1661818

>>1661724
Haven't heard about MplabX before, will try it out. Vscode isn't particularily suited for embeded development, I chose it becase it was my goto IDE for medium-sized webshit and scripting projects. It can do everything that arduino ide does, plus it supports multi-file projects, live linting and code completion. The main downside is that it's an electron app, so it requires a lot of disk space and eats a lot of ram and cpu just idling in the background.

>What programmer are you using?
I use an arduino board as ISP, just followed https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard..

Now you may say I'm a pleb because I'm still compiling and running <arduino.h> on the microcontroller, and have no clue on how to use avrdude from commandline, but I'm amazed by how much I managed to learn so far.

>> No.1661852

>>1661818
>no clue on how to use avrdude from commandline
no one fucking uses avrdude from the command line. It's either baked into a Makefile or run from the IDE.

>> No.1661871

>>1661852
>no one fucking uses avrdude from the command line

it might be a bad idea for him, but lots of people like myself use it that way all the time for assembly code.

>> No.1661875

>>1661871
so you type out the command by hand each time? and you claim to be a programmer?

>> No.1661897

>>1661875

no you stupid motherfucking idiot, who's talking about typing the goddamn thing? when he said "using it from the command line" he meant that he didn't know the way to setup the arguments.

once you know how to set it up, you braindead imbecile, you put it in a script. what is it about the arduino universe that attracts dim-wits like you the way shit draws flies.

>> No.1661899

>>1661729
Those look like the motor drivers.
Bipolar stepper motors I believe.

>> No.1661902

>>1661818
>Haven't heard about MplabX before, will try it out.
I'm not 100% sure it will work well for you, but its worth a shot. Microchip (PICs) bought Atmel (AVR) years ago, and MPLABX is Microchips IDE. They've been building in AVR compatibility over the last few revisions. You can program in assembly and modify every register you want for the AVRs.

I've only used it with PICs and it's great, but more geared towards advanced users, no libraries.

There is also Mikroelectronica and their AVR IDE. But it costs money and only works with their debuggers. Good stuff though.

>> No.1661903

>>1661897
I like you. You sound like my inner voice.
I hope you have an awesome day.

>> No.1661945

Out of my way you fucking brainlets *slaps a PIC on the table*

>> No.1662205

>>1661897
What part of "baked into a Makefile" was hard for you to understand?

>> No.1662225

>>1661945
Explain to me how PIC is better then AVR, beyond your personal preference.

>> No.1662271

>>1662225
far more agile

>> No.1662279

>>1662271
>agile
meaningless buzzword is meaningless

>> No.1662347

>>1662225
Not that anon, but I like the remapping ability of the peripherals.
It has a list of numerous pins that you can assign functions to.
You SPI pins, for example aren't limited to specific pins. You can select which pins use SDI, SDO, SCK, ect..
They also have very tuneable on-chip oscillators that can be tuned on the fly for dynamic speeds.
Their mid line dsPICs have DSP engines for complex digital signal analysis.

>> No.1662353

>>1662347
>It has a list of numerous pins that you can assign functions to.
>They also have very tuneable on-chip oscillators that can be tuned on the fly for dynamic speeds.
This could be useful.

>Their mid line dsPICs have DSP engines for complex digital signal analysis.
One wonders how this would be more useful then a nanopi or equiv.

>> No.1662664

>>1661852
I use it for setting fuses

>> No.1663122

I’m trying to make a backyard bioreactor for my craft beer setup but I’m having trouble getting reliable temperature control

>> No.1663182
File: 699 KB, 3024x4032, received_471340313716704.jpg [View same] [iqdb] [saucenao] [google]
1663182

I have wired up an Arduino Nano to a Gameboy clone called GB Boy Colour. If I run the Nano from a power bank or wall adapter, it presses the buttons the way I want. However, if I try to power the GB Boy with the 3.3v output of the Nano, the system acts like it is not getting any power and just gives me a white screen. The same thing happens if I try to power the Nano with a 9v battery. The GB Boy resets over and over when it is using its own batteries and a 9v on the Nano.

Am I missing something here? All I want is to run the Nano and GB Boy from the same power supply and it is driving me insane. Does anyone have any potential diagnoses?

>> No.1663312

hi guys, my goal is to make my pc able to be turned on from remote, talking about over the internet stuff. I was thinking about connecting the mobo to an arduino and building a REST api in order to do it.

But arduino is not powerful enough for HTTPS since I want to make it secure, so I have to resort to some other board. I'm excluding raspberry pi and similar boards bc I want it to sustain power outages, and to get it back working as soon as electricity is back.

Any suggesions?

>> No.1663326

>>1663312
ESP32 can do HTTPS

>> No.1663335

>>1663326
Nice, I have an esp8266 and I saw it can do HTTPS too. Though, do you happen to know ethernet based boards that can do the same? I would love to get rid of any problems wifi can involve

>> No.1663392

>>1663182
The Nano's 3.3v output doesn't have a huge amount of current output, I've read 250mA, far less then a GB Colour would need.

As to running a Nano off a 9v battery, that should Just Work. Have you tried running the Nano alone, without the GBColour and stuff attached?

>> No.1663502

>>1663392
Hey, thanks for the reply. Yeah, I figured out that the resets I kept getting with the game were an error in my code, not an error with the Nano after I tried another power supply and it kept happening. I didn't realize that there was no delay between one button being pressed and another being released. Because of this, the GB Boy thought multiple buttons were pressed simultaneously.

Any ideas on a portable power supply that I can buy/build that can give the the two parts their current needs, the Nano its 5v, and also giving the GB Boy its 3v?

>> No.1663503

>>1663502
Remove the regulator on the Nano and run it at 3V

>> No.1663522

>>1663502
A 9v battery for the Nano and zenner diode or LD1117-3.3 should be all you need. Do you know how much current the GB draws?

>> No.1663524

>>1663502
If you need a circuit

www.electronics-tutorials DOT ws/diode/diode_7.html

>> No.1663619

>>1663522
Shit, I didn't even think to look for a 3.3v regulator like that. I've only ever used the 7805, I think it is, so I never even thought that they made others. Thanks, Anon. That helps a ton, actually.

>> No.1663664
File: 28 KB, 354x353, IMG_20190630_223808~2.jpg [View same] [iqdb] [saucenao] [google]
1663664

What has been your most satisfying moment lately with Arduino and its family?

>>1663182

>Come up with stupid idea to make Arduino mash random buttons on Gameboy as poor man's portable TwitchPlays games
>Solder wires and make simple random sketch
>Works okay except for resets
>Realize the delay between a button being released and pressed is too long
>Gameboy thinks buttons being held simultaneously
>Fix issue
>Works well, but game pauses way too often to be useful even for random presses
>Tinker with "BlinkWithoutDelay" sketch and make my own that still mashes the other buttons, but presses Start every 7 seconds
>Compiles on first try
>Works great
>Dipshit Arduino names self in Pokemon Yellow, manages to wander Pallet Town and even saves the game
>Anons help with power supply ideas
>mfw shit is working out
>hellyes.jpg

This shit is a blast. I wish I had dicked around with Arduino when I was younger. Will I always enjoy it, or am I gonna get jaded soon and find diagnostics and repair to be awful instead of fun?

>> No.1663668

Are all breadboards pretty crappy and loose or there are better ones? I bough a couple on ebay and they are horrible. Loose like a sleeve of wizard. Either that or wire connectors are too thin.

>> No.1663766 [DELETED] 

With a esp8266, what is the fastest way to measure wifi strength from a specific access point? The RSSI function takes 2 seconds, while I need a reading 100 times per second. Is this impossible? I know RSSI is relative, but an absolute reading of signal strength would be fine as well. I figure my last resort would be attaching an external antenna to the analog read pin, and reading the power output from that, but this would pick up all 2.4gHz signals, which is not what I want.

>> No.1664198

>>1663668
Shitty chink ones are garbage. I have a couple large breadboards made by 3M that I bought from Mouser. They've done very well for the past 10-ish years.

>> No.1664200
File: 177 KB, 640x640, 3M BB.jpg [View same] [iqdb] [saucenao] [google]
1664200

>>1664198
Forgot photo. One this size set me back a good $75

>> No.1664943

>>1663326
But at what cost? You have to hardcode the ssl cert in manually it's tiresome as fuck

>> No.1665059
File: 1.83 MB, 2304x2618, IMG_20190813_103743__01.jpg [View same] [iqdb] [saucenao] [google]
1665059

Posted first on /ohm/ like a retard, but here I have a manually controlled 120V AC winch that I'm trying to control via Arduino over WiFi. I popped open the controller and this is what I found:

When:
Red+Green && White+Black = winch pulls
Red+White && Green+Black = winch unwinds

I figure I need some type of relay switch, but I have no idea what kind I need. Any ideas, anons?

>> No.1665061

>>1665059
Red and black are constant, so you only need to switch green and white (plus an on/off relay if you need that). 2 of those cheapo blue relays should do the green/white switching.

>> No.1665076
File: 1.62 MB, 2304x2348, IMG_20190813_114637__01.jpg [View same] [iqdb] [saucenao] [google]
1665076

>>1665061
Turns out I have two lying around, hell yeah. Should switches go into NC or NO ports? I'm sure constants go in COM but I really don't want to end up in a /diy/ fails thread

>> No.1665077

>>1665076
Constants go around the relays. The output to the motor goes to COM or whatever the middle port is, then G and W go into both relays' NO and NC. The relays have to be operated(or wired) inverse to each other.

>> No.1665083
File: 701 KB, 1873x1161, IMG_20190813_121845__01__01.jpg [View same] [iqdb] [saucenao] [google]
1665083

>>1665077
So this shouldn't start a housefire? If that's right then I think I understand these things now, thanks dubs of help

>> No.1665089
File: 81 KB, 1000x1000, shit.png [View same] [iqdb] [saucenao] [google]
1665089

>>1665083
No, that's total or at least partial housefire. See pic related, but this is assuming your description of the motor is correct, I don't actually know for sure what type of motor it is.

>> No.1665092

>>1665083
>>1665089
Actually, what exactly do you mean by the "Red+Green && White+Black", are you connecting them together on the other end of the cable?

>> No.1665099
File: 1.89 MB, 2304x3568, IMG_20190813_130455__01.jpg [View same] [iqdb] [saucenao] [google]
1665099

>>1665092
So when you press the right button (pull), it bridges connections between the red & green wires AND the white & black wires. Inside the controller there are only those 4 wires, and when no buttons are pressed, the motor is locked and no wires are bridged

>> No.1665105

>>1665099
Okay, in that case >>1665083 is right, but there's no "off" state there. You'd need a third relay on either the black or red lines, before these two relays, that will be switching on/off.

>> No.1665108
File: 1.78 MB, 2691x2304, IMG_20190813_131642__01__01.jpg [View same] [iqdb] [saucenao] [google]
1665108

>>1665089
And that top box is supposed to be the power source?

>>1665099
The AC motor is powered thru a 120v power outlet, so the red/black wires in the controller aren't your typical ground/output wires.

Excuse my shitty pic, color lines indicate where the wires come from

>> No.1665113

>>1665108
Ignore >>1665089, it was made with a different type of motor in mind.
The proper way of wiring on/off with AC would be disconnecting both wires, so 4 relays in total, but assuming the winch is properly insulated you'd probably be fine cutting just one with 3 relays.
Can't say I know what's going on in that control box, but going by what you said >>1665083 should work.

>> No.1665123

>>1665113
Sounds rad, appreciate the help. I'm actually going to try to control 2 winches inversely and simultaneously, so I'll go ahead and order an 8-relay, a 2-relay for turning those on/off, and a WiFi module for the Arduino sending commands to all of them. I plan on having this run for at least a year, are there any resistors or protective components I should add to be safe?

>> No.1665124

>>1665123
Put quick-blow fuses in line with the mains connection, rated a bit over the peak amp draw of the motors.

>> No.1665407

>>1664943
asking anon here; It's not even that hard, I'll generate a self signed and trust it on every machine of mine

>> No.1665701

I have basic-to-intermediate analog electronics knowledge, haven't ever really worked with arduinos before though

I want to make a gay boy riced out motorcycle helmet using RGB LEDs and control it using the arduino. So this means using buttons and potentiometers with it.
I also want to have a little 16x2 lcd display for status information.

Obviously a little nano/uno doesn't have enough IO for this. So, how do you typically expand the available IO on an arduino to accommodate everything you need to add?

>> No.1665712

>>1665701

three pins can drive any number of output pins using 74HC595s. another three pins can add any number of input pins using 74HC165s.

>> No.1665714

>>1665712
So it's going to be down to shift registers then?

>> No.1665740

>>1665714

mega2560 costs a bit more but has an assload of pins and timers and uarts, etc.

>> No.1666169

So I've been looking into using shift registers for adding IO to an arduino. From what I can gather, there's no way to write to an arbitrary pin, you're locked to stepping through which pin is currently latched?
Is it possible to define some sort of counter to keep track of the last latched pin, and then just iterate through all the pins until you reach a specified one so you can kind of get random access?

>> No.1666179

>>1666169
>. From what I can gather, there's no way to write to an arbitrary pin,

I might not have understood your question, but this is what I do: assume I have 3 registers daisy chained so there are 24 bits controlled. If I want to just change bit number 13, I do that in my bytes that I'm going to send out, then I send them then I latch them. So, I always have to send all 24 out, but in this case only one changes state.

Other than being slow, it's the same as random access would be no matter how it's configured, in that you can change 1 or all or any random number of the 24 bits each time you send the latch command. some chips call the pin RCLK and some call it ST_CP, but it's the pin that moves the data from the shift registers to the output registers. If you leave that pin alone, you can shift any number of bits and they only appear on the output pins when you toggle RCLK (ST_CP).

>> No.1666551

>>1665701
Use attiny85 and pixel LED strips, they only need 3 or 4 wires and you can turn on off or set any color to any led of the strip separately
it will be so smol and low energy you will even be able to include the battery in the helmet and have no wires coming from it

>> No.1666559
File: 27 KB, 728x272, Screenshot_2019-08-16_12-20-42.png [View same] [iqdb] [saucenao] [google]
1666559

>>1666551

Uno doesn't have enough GPIO.

Use attiny85.

Yep.

>> No.1667238

>>1665714
or I/O expanders (and/or an ADC if you need extra analogue input channels) via I2C or SPI.

>> No.1667240

>>1666169
Some I/O expanders let you do that, or at least send a bit pattern instead of clocking in each bit like you do on a shift register.

>> No.1668684

I have a fake Chinese arduino.
I have a MacBook Pro.
How can I connect the Chinese arruino to my laptop to practice some projects as I have the kit.
Eventually if I get good enough, I’ll purchase a real arruino to support the teams and such but first I have to know if it’s something I’m willing to do and this Chinese arduino (which should work the same) can help me do just that.

>> No.1668697

>>1668684
>MacBook Pro
what the fuck is wrong with you
get a normal computer with windows or linux and usb ports

>> No.1669022

>>1668684
For arduino clones, you should be able to follow any instructions for regular arduino board, and it should Just Work.

Your arduino does have an USB port, doesn't it?
When you connect the board to the computer, can you see it in /dev/? (mine's called cu.usbmodem141121)
Have you rebooted your computer after installing arduino cask?

>> No.1669188

I'm thinking about using some MCU to emulate an old ROM chip, how reliable are GPIO timings in general? Can I safely make assumptions about how long a single instruction takes to execute? This question is rather in general as I haven't chosen an MCU yet

>> No.1669258

>>1669188
>Can I safely make assumptions about how long a single instruction takes to execute?

Most instructions for AVRs (used in arduinos) take exactly 1 or 2 or more clock cycles, and you can check the spec to see. However, branch instructions take different number of cycles depending on whether or not the branch is taken or not. Pick an MCU and look at the specification, then consider your code. You might be able to write code that includes NOPs to make each branch path take the same number of cycles if that affects you.

>> No.1669291

>>1669188
>>1669258

Just wanted to add that if you are going to try and emulate anything with tight timings, you should write the code in assembly. This will give you exact control over timings.

>> No.1669639

how do i avoid getting CHINKED when buying a raspi usb power supply? the one in the kit I bought was trash, everything on amazon looks equally shady, and adafruit is out of stock.

>> No.1669641

>>1669639
Go into your local recycler. You will find good PSU there in trash.

>> No.1669645

>>1651573
Need to rig up autpmated watering system for house plants. Never coded or used an arduino. Have a wattering kit and plan to fill 55 gallon drum with a hose to water

>> No.1669646

>>1668684
your chinkduino may use a ch340g usb-uart chip. google "ch340g drivers" and install. once you've done that the knockoffs are as good as the real thing, with the exception that the chinese counterfeit voltage regulator definitely does not actually work over its full input range.

>> No.1669706
File: 994 KB, 2000x1500, el abominacion.jpg [View same] [iqdb] [saucenao] [google]
1669706

>>1669641
i made my own raspi usb supply instead

>> No.1669707

>>1669706
Cool.

>> No.1670794
File: 287 KB, 1200x900, 3084-00[1].jpg [View same] [iqdb] [saucenao] [google]
1670794

>>1651573
>want to make a Raspberry Pi dashcam
>have to make it a headcam, since dashcams are illegal in my state ("windshield obstruction")
>try using a Pi 3 B
>it constantly overheats and reboots--not just when using raspivid to record 1080p30 video in my car on a 95-°F day, but even when using samba to TRANSFER VIDEOS OVER WIFI from its μSD card to my computer in my 80-°F bedroom
>switch to a Pi Zero W
>it doesn't overheat when transferring videos, but it still regularly overheats while recording
Would a heat sink (pic related) help, or would it just fall off a headcam that's being jostled by bumpy roads? Or would it not help anyway, because Raspberry Pi computers are just not meant to be used outdoors in the TROPICAL climate of fucking 40 ° north latitude?

>> No.1670819

>>1670794
>fall off
You can literally tie it on, no need to rely totally on thermal glue.

>> No.1670924

>>1651573
Can STM32 bluepill achieve speeds of 1.7MHz over I2C, or am I stuck at 400KHz max?

>> No.1670945

>>1670794
Get a small case with a fan.
A heat sink can only do so much, especially the one in your photo. It will passively dissipate head at a specific rate, and if the Pi generates more heat that it can dissipate, you'll still overheat, it will just take longer.
A fan will actively circulate air over the SoC, and keep it at a lower temperature than a HS alone.
Both a HS and fan is best, but for the Pi, unless you get a HS that is the same size as the Pi itself, a fan is better.

>> No.1670949

>>1670924
I'm not sure if the bluepill supports it, but some STM32 models have a "full speed+" mode that maxes out at 1Mhz.
If it doesn't support that mode, you're stuck at 400Khz

>> No.1671477
File: 53 KB, 725x866, one way SPI.png [View same] [iqdb] [saucenao] [google]
1671477

I havent done much with SPI yet and I'm having a hard time finding an example that relates to my usecase (Pic related). I literally just want the contents of that angle register, how do I get them?

>> No.1671489
File: 7 KB, 264x191, im3ages.jpg [View same] [iqdb] [saucenao] [google]
1671489

>>1671477

Initialize your SPI per that device's pdf: CPOL = 0, CPHA = 1.

Then send bytes per their protocol on pages 12+ in https://ams.com/documents/20143/36005/AS5047P_DS000324_2-00.pdf

If you don't already have pic related, they are wonderful for sorting out SPI and I2C and other communication issues. Use Pulseview from Sigrok and it's amazing. The knockoffs are about $10 on amazon.

>> No.1671490
File: 49 KB, 993x215, sigrok_i2c.png [View same] [iqdb] [saucenao] [google]
1671490

>>1671489

pic related is an I2C example. very good tool to own.

>> No.1671494

>>1671489
How am I gonna send bytes without MOSI? I just want to read

>> No.1671501

>>1671494

I have always used both MOSI and MISO, so I ignored that part, and I think you should as well, unless you or someone figures out why they suggest it.

>> No.1672185
File: 174 KB, 800x800, Kickstarter_Blue_Silver_Front.jpg [View same] [iqdb] [saucenao] [google]
1672185

>>1651573
How come this shit costs 50 bucks?

>> No.1672202

>>1672185
Not everyone can live off of chink margins.
Speaking of which, I give them 6mo. before bootlegs start selling for $30

>> No.1672225

>>1671494
>>1671477
the angle sensor register is register 3FFF, which in bits is 15 ones. all ones. mosi is tied high.
so when the microcontroller clocks the clock line the slave device is reading in high on the mosi, so its the same as you sending it 14 ones, it can't tell the difference between the microcontroller sending 14 ones and the mosi being tied high.


if yuo wire it up like this and want the angle sensor reading all you have to do is send the slave device 14 clock pulses so it can clock in 14 ones and then probably you send it another 14 clock pulses so it can clock out the data you want.
it doesn't matter what data you send it, send it anything you like, it will read in 14 ones then send you the data.

you could even just do a read operation (whatever language/stack you are using?) for 28 bits because that will toggle the clock line, as long as it keeps chip select/slave select engaged again the slave won't know the difference.

>> No.1672237

>>1672225
>>1671477
ok sorry i took the time to actually read the datasheet and realize you are using arduino.
register is 3FFF, but message is 4 bytes, first two are parity and read. parity doesn't have to be correct so who cares.

so you need to set up spi, set chip select, read 8 bytes, the last 4 bytes the first two bits throw them away, the last 14 bits are your value.

so something like

SPI.transfer(0x00);
SPI.transfer(0x00);
inByte = SPI.transfer(0x00) & 0x3F << 8
inByte += SPI.transfer(0x00)

please forgive i never used arduino before!

>> No.1672271
File: 67 KB, 450x796, 37921e8a-28f8-4a88-9483-382a487c507f.jpg [View same] [iqdb] [saucenao] [google]
1672271

Okay faggots.

I need STM32 bluepill and some additional components.
Where would I buy those from?

Figured I could buy components off digikey, but would be nice to buy all the stuff from one place

>> No.1672275

>>1672271
say where you live roughly for localized advice.

>> No.1672277

>>1672275
TX

>> No.1672312
File: 878 KB, 740x547, Numitron.png [View same] [iqdb] [saucenao] [google]
1672312

>>1661599
Numitron clock/watch.

To Do:
>order TPS613221 for 3.3V regulation
>order TPS613222 for 5V regulation
>order 4 SN74HTC595N for 3.3V logic to 5V driving
>order I2C RTC
>program numbers and letters
>program PWM fading

>> No.1672322

Im looking for something like the connection between an NES and the cartridge. Is there a name for this kind of connection? I dont even know what I should google.

>> No.1672323

>>1672322
edge connector

>> No.1672329

>>1672323
Thanks, thats exactly what I was looking for

>> No.1672373
File: 258 KB, 1200x788, DO77SKKU8AADk-3.jpg [View same] [iqdb] [saucenao] [google]
1672373

>>1672185
Because target customers will pay it

>> No.1672590

>>1672277
mouser.com
arrow.com

>> No.1672593

>>1671501
>>1672237
Thanks, I managed to figure it out with the infos of you guys and this example: http://www.massmind.org/techref/io/sensor/pos/enc/ENC2-47P-Arduino.htm

>> No.1673139

me and a fren are putting together a lasertag arena from scratch. The arena, guns and armour will all be done from nothing. we nearly have a working pack/gun prototype done, which we'll post about soonish. were using r-pi's for mostly everything, with a few old computers for servers.
Heres more info if anyone's interested:
https://www.crowdfunder.co.uk/quantumtacticlasertagarena

>> No.1673177

>>1673139
Chris-chan finally got a girlfriend?

>> No.1673202

Dear /arduino/,

Which is better for a small project: A cheap chinese Pro Mini, or a bare ATMEGA328P chip taken off an Uno? In particular, for the bare chip, how careful do you have to be about voltages?

t. incompetent anon

>> No.1673334

>>1673202
>A cheap chinese Pro Mini, or a bare ATMEGA328P chip taken off an Uno?

For a beginner, and for most applications where you're just making one or a few, the pro mini is easier to work with. Why would you take the avr off a UNO? You can buy the chips, and anyway, to answer your question about voltage, all you need is a voltage regulator with associated caps and maybe protection diodes and it's the same as the Pro Mini or a UNO.

>> No.1673335

>>1673334
I should add, that working with a bare AVR requires a programmer like a USBASP, USBtiny, or another arduino.

>> No.1673340

>>1673334
>Why would you take the avr off a UNO? You can buy the chips
I meant I would program it in the UNO board before placing it directly into the new circuit. Of course I'm not buying extra $30 UNO boards just to take the chip out!

>> No.1673376

>>1673340
>I meant I would program it in the UNO board before placing it directly into the new circuit.

no offense, sir, but this is still not the best way to achieve the desired goal. You can make a board to program any AVR in a ZIF or whatever, and avoid that de-soldering from the UNO crap.

maybe I misunderstand you. You clearly know some shit.

>> No.1673470

>>1673376
The chip on an UNO isn't soldered in. It uses the same kind of connector as a RAM socket or a video game cartridge, so you can just pull it out and push a new one in

>> No.1673668
File: 71 KB, 900x569, arduino-uno-r3-clone-with-usb-cable-usb-chip-ch340-21282-27-B.jpg [View same] [iqdb] [saucenao] [google]
1673668

>>1673470
>The chip on an UNO isn't soldered in.

sometimes true. not true for mine, and I forgot about the older ones. new ones save a few pennies.

>> No.1673712
File: 359 KB, 1800x1800, arduino-uno-r3_5.jpg [View same] [iqdb] [saucenao] [google]
1673712

>>1673470
>>1673668
Y'know, it IS a little funny that some Unos use the "dead-bug" DIP and others use the little flat chip. Pic related is the brand-name Uno.
>>1673202
I would go with a clone Pro Mini. The whole board is about the size of your DIP chip (because it uses the flat chip) and just as cheap. Disable the "on" LED by scratching off one of its leads and you'll pretty much match the battery life too.

>> No.1673720

>>1673712
>dead-bug
Do an image search before using that term again please.

>> No.1673749

Protip:
The "little flat chip" is called a QFP
Quad Flat Pack

There are other forms, such as TQFP, Thin QFP

>> No.1673798

>>1652313
do you understand triggering on your oscilloscope? if not google it. Have you tried listening to it? You would be able to detect anything largely abnormal

>> No.1673900

>>1651573
New to tarduino.

Would like a small automatic plant watering system. A kit of sorts would be preffered as i am shoes on hands retarded

>> No.1673996

I want to get some remote telemetry going measuring water tank levels with a battery powered board and wifi connectivity, I've seen the ultrasonic level meter kits which seem pretty universal, but I'd like a suggestion for what platform/board to use, will only need to wake up and upload data once every 12 hours.
>low power state with timer for wakeup
>wifi support

>> No.1674000

>>1673900
Arduino starter kit. The official one is better but any cheap clone should still have a couple motors and sensors, enough to get you on your feet.
>>1673996
There's a hack to put your arduino to sleep for long, timed periods. It uses the "watchdog interrupt" to sleep for 8 seconds (the maximum), increment a counter, go back to sleep... until the counter reaches the desired number.

>> No.1674084

i'm pretty new to arduino, but work at a place where we teach children some basic electronics. we do this with a modified version of the ESP32, which has some sort of firmware on it such that all it does via a USB connection is draw power. Anyone know how I can flash it back to just being a regular ESP32?

>> No.1674385

>>1669706
wtf, use some heatshrink

>> No.1674426

>>1672312
You

>> No.1674433
File: 10 KB, 480x270, dead-bug.jpg [View same] [iqdb] [saucenao] [google]
1674433

>>1673720
>dead-bug

>> No.1674703
File: 788 KB, 661x463, pedantic cunt.png [View same] [iqdb] [saucenao] [google]
1674703

>>1674433
I expected you to have the presence of mind to add "circuit" when you fond nothing electronics related.

>> No.1674881

>>1673139
IR LEDs + lenses or laser modules?

>> No.1675760

Normally i make all my IOT devices with simple wifi enabled arduinos, but today i heard about this fancy new thing called "zigbee" that is apparently all the rage in IOT now, what the fuck is that?

>> No.1675762

>>1675760
and there is also apparantly something called z wave, what the fuck what is all this new shit i never heard about? i have been making iot devices for years now and always only ever used wifi and only saw wifi discussed on iot forums

>> No.1675765

>>1675760
>i heard about this fancy new thing called "zigbe

zigbee isn't new moron. It's been around for many years, an it's a radio that (in some versions) can handle miles of line-of-sight. It costs more than wifi and bluetooth so you use it when you need it. The version I buy is called xbee and the last modules I bought years ago were about $40 apiece. The price might be higher or lower today.

>> No.1675766

>>1675765

I seem to have set a new personal record for inaccurate information in that post. There's still room to improve, if I try.

>> No.1675767

>>1675765
I just checked on ali and that shit is fucking expensive, fuck that, for the price on one zigbee module i can have like 5 fucking esp32 which have both wifi and bluetooth built in.. and a dual core arduino ide compatible cpu
so fuck this new meme tech

>> No.1675802

>>1675767
Anyway, is there any cheap wifi-like module that is more friendly to battery powered iot devices?
I looked around and it seems that wifi is winning in price on all fronts

>> No.1676207

Hey guys I am planning a project, and so concept basically using a servo to twist a glue stick onto a platform and draw whatever I put on a touch screen (or something idk yet still working out the details)

I have couple of questions,

from what it looks like I will need a continuous rotation servo to extend/retract the gluestick

But either im retarded (most likely) or I am missing something. But can the servo detect when it cant turn anymore and stop? as in the gluestick hitting the platform, and can't go further?

or will I need a different motor? I am wanting a small lightweight one to use nothing bulky.

>> No.1676363
File: 1.03 MB, 2987x1760, Circuit Diagram.png [View same] [iqdb] [saucenao] [google]
1676363

will this work? does it blow up if i flip the switch when the relays are activated?

>> No.1676369

>>1676207
What about a gluestick holder with a spring and limit switch for feedback?

>>1676363
That's fine. Basically two switches in parallel

>> No.1676380

>>1676207
servo motors are incredibly expensive use a stepper instead
detection is easy, put a switch somewhere in a corner and have the extruder move there and roll out the glue stick until it touches the switch

>> No.1676381

>>1676363
using ssr for a light is a waste, use one of them cheap mechanical relays instead

>> No.1676388

>>1676381
yea. the sales chick told me that mechanical relays makes sparks and will degrade electrical contact overtime.

>> No.1676391

>>1676363
Sorry anon someone already had this idea
https://youtube.com/watch?v=1vCvVS2jVYE

>> No.1676396

>>1676369
Thats what I was thinking, but this is still early development.

>>1676380
So, stepper motor like this?
https://www.amazon.com/kuman-Stepper-Arduino-28BYJ-48-Breadboard/dp/B01IP7IOGQ/ref=pd_cp_421_4?pd_rd_w=2XUGS&pf_rd_p=ef4dc990-a9ca-4945-ae0b-f8d549198ed6&pf_rd_r=8SPKAD2KT5A3YV2K6VFP&pd_rd_r=6797f32a-d957-411b-a16f-2fc6475030f6&pd_rd_wg=3JKKE&pd_rd_i=B01IP7IOGQ&psc=1&refRID=8SPKAD2KT5A3YV2K6VFP

>> No.1676422

>>1675767
Good stuff that works is expensive. I've been using xbee for years, its not a meme.
They were one of the first wireless designs to incorporate mesh networking, which everyone does now.
This was back before the OMG, IOT! days

>> No.1676712
File: 30 KB, 399x500, exploring-arduino.jpg [View same] [iqdb] [saucenao] [google]
1676712

>>1651892
>>1651643
I imagine you are looking for some learning material that covers most of the basics in a step-by-step manner, and some project ideas to practice what you learn?
Apart from what other anons have already said (Google, YouTube, tinkering etc.) I would suggest the book "Exploring Arduino" by Jeremy Blum. It covers a lot of topics, and the author has a youtube channel where he demonstrates some of the projects he proposes on the book. Give it a try, see if that's what you are looking for.
I wonder what other anons think about this book?

>> No.1676864

>>1676388
>they sales chick told me to buy the more expensive item
HOLY SHIT WHAT NO WAY

>> No.1676868
File: 7 KB, 323x365, 1-s2.0-S0954181001000218-gr1.gif [View same] [iqdb] [saucenao] [google]
1676868

I want to try making a control-theory experiment like pic related. The task is to keep an inverted pendulum (or, in the pick, stack of multiple pendulums) upright just by moving the base back and forth. But what kind of sensors can I use to measure the angles?

>> No.1676876
File: 123 KB, 400x260, 1566980811891.png [View same] [iqdb] [saucenao] [google]
1676876

How would you control an internet connection on a timed schedule?
Software isn't an option.
I was thinking a relay connected to one of the data lines of the ethernet cable.

>> No.1676899

>>1676868
A gyro
https://www.adafruit.com/product/1032

>> No.1676932

>>1676876
>Software isn't an option.
yes it is and every router in existence supports time schedule setting

>> No.1676952

>>1676899
no
No.
NO!
Fuck off jewboy.

https://www.aliexpress.com/item/32952254083.html

>> No.1676961

>>1676932
That's nice. It's still not an option.

>> No.1677088
File: 110 KB, 1440x1068, hc-05.png [View same] [iqdb] [saucenao] [google]
1677088

While I google this, how I reprogram the Atmega using a HC-05? Is there any android app that will send a command to HC-05 so that it toggles the State pin in order to reset the atmega?

>> No.1677091
File: 66 KB, 612x418, latching-relay-circuit-2.jpg [View same] [iqdb] [saucenao] [google]
1677091

>>1676363
It does, but making the relay work together with the light switch can be a pain in the ass. I've come to the conclusion that using a memory relay like this is the best option, since it can be triggered by an optocoupler AND by a series of mechanical switches in parallel

>> No.1677820

>Raspberry pi is also allowed
Here we go then:
I want to control my raspberry pi via a server, what I mean is the raspberry pi hosts a http site or similar with buttons etc, that is only available on the local network via ip, not on the internet because I don't want to bother with intrusions etc.
If I can somehow get python to collect the data the site sends I'm happy.

Whenever I look by myself I find either servers over the internet or shitty apps etc to use. I want it to be a http site or similar though, that seems the best for compatibility etc.

Anyone know how to do it/ What to look for? Since I'm no native I can't help but feel like I don't know the correct terms to search.

>> No.1677825

>>1677820
To explain a bit further: There are basic tutorials out there for doing stuff like turning on an led.

Thing is I want to be able to have multiple people interact with the site and have them get specific info.
Example:
Person A presses "turn led on". Led turns on. Person B presses LED on. They get a message that person A is using the LED right now and that they are position X in queue. Any hints on how that would be done?

>> No.1677887

>>1676868
how is that even possible

how fast would the base need to move to keep m2g zero

>> No.1677987

>>1677887
It absolutely is possible, and you really don't need to move that fast, as long as you can do the calculations and switching fast enough. Stay in the frequency domain, use fft and the complex calculations turn into trivial arithmetic.

>> No.1678618

>>1659201
this

>> No.1678732
File: 2.81 MB, 4000x3000, IMG_20190907_135105.jpg [View same] [iqdb] [saucenao] [google]
1678732

Wish me good luck

>> No.1678776
File: 1.46 MB, 2048x2048, EudhFzO.gif [View same] [iqdb] [saucenao] [google]
1678776

>>1678732
what are you building?

>> No.1679002
File: 101 KB, 800x800, 10dof.jpg [View same] [iqdb] [saucenao] [google]
1679002

>>1678732
Good luck.

>>1678776
Looks like a GPS, a gyroscope/accelerometer/magnetometer sensor board and an I assume a pressure sensor.
My guess is it's going to fly.

>> No.1680837
File: 382 KB, 1280x720, 7_segment_clock_v11.png [View same] [iqdb] [saucenao] [google]
1680837

If you were to build a big ass RGB clock, what would you rather choose:
a) AVR micro + GPS + Bluetooth
b) ESP8266

>> No.1680859

>>1680837
ESP8266 + GPS.

>> No.1680870

>>1680837
Depends, where are you going to put the clock?
GPS signal isn't available everywhere.

>> No.1680896

>>1680870
>where are you going to put the clock?
Inside my bedroom. There's a strong wifi signal. GPS signal from my phone isn't great, but it works, so I guess pulling the time every now and then won't be a problem.
Current consumption doesn't matters, it's powered by a wall adapter.
>>1680859
Isn't that a bit redundant?

>> No.1680998

>>1680837
Why bluetooth?

>> No.1681063

>>1680837
>big clock, permanent fixture
>wifi
>not wired

>> No.1681453

>>1680998
Ideally I'd like to change the color and other settings with my phone, with AVR I'd need a bluetooth module, with the ESP it wouldn't be necessary.
>>1681063
Not sure if I understood, it'd be wired to a power adapter, yeah.

I've got the 3D design already figured out, I just need to start working on the PCBs, and although I haven't worked with the ESP before I think it's the best choice, as it could also tell the temperature outside or the chances of raining.

>> No.1681725

>>1677825
I actually did something exactly like that not too long ago. I got you with a mini tutorial when I get home

>> No.1681944

>>1654967
Easier to just get a STM32 with microSD reader and setting up a platformio build environment to output binaries onto your computer SD. Then just swap the SD back and forth between the STM and the computer. Also means no risk of burning up your USB ports.

>> No.1682349

>>1679002
Fuck yeah it works! They can talk!

>> No.1682350
File: 2.18 MB, 4000x3000, IMG_20190913_235400.jpg [View same] [iqdb] [saucenao] [google]
1682350

>>1682349
Forgot pic

>> No.1682415

I just got one of those cheap 24Mhz 8 channel logic analysers for seeing what's going on over an I2C bus in Sigrok (STM32 drivng an I/O expander). Is it normal that when I connect the clock line of the bus to the logic analyser that it seems to slow everything down, at least judging by the rate at which the LEDs flash on the I/O expander? I can see packets being decoded in Sigrok, it just seems strange that there seems to be a speed impact when the logic analyser is connected.

>> No.1682427

>>1682415
No but you might be messing with the i2c physical layer, the pullup resistors are calculated based on load which you are changing. Just be glad it works at all if it is negotiating a lower speed that's something you will probably rarely come across. What speed are you detecting in sigrok?

>> No.1682585

>>1682427
Yeah, I may need different pullups than the 10K ones I have in there if i'm using the logic analyser, or maybe it's just shit breadboard connections all round. I2C seemed happy to run at 400Khz over it though. I started sampling at 500Khz, and later dropped the I2C speed back down to 100Mhz, same thing happened when the analyser was connected. Maybe it's throwing out NACKs and slowing things down like that instead of the analyser taking over the clock signal and running it at whatever speed it's been set to.

>> No.1682587

>>1682585
*100Khz

>> No.1682598

I need to make simple arduino control for 2D CNC for cutting holes in polypropylene. I know how to write program for it, but problem is I don't know what electronics should I use. I would like to use Arduino Mega 2560 with shield for 4x NEMA 34 and Nextion 10' TFT screen. All I need to know is, what components I need to make it run. And please don't recomend me Mach3 or other sotf. I have found some part lists, but they are not with TFT screen. Thanks

>> No.1682604

>>1682598
>spoon feed me
Fuck off.

>> No.1682661

I need to activate a relay when enough sound is detected through a microphone.

Can I do this with an arduino? Can anyone link me to resources?

I'm wanting to stay away from main electrical and stick with battery packs, but preferably rechargeable lithium ion

>> No.1683021

>>1682427
Turns out that the pullup resistor values were too high. Changed the 10K pullups for 2K and now I can connect the logic analyser without it causing too many problems.

>> No.1683067

>>1681725
I appreciate it, but where the hell do you live that you take 3 days to go home.

>> No.1683286

>>1682661
Sure you can. You basically connect the mic to the ADC capable inputs, include some library for that, done. Google the library.

>> No.1684789

>>1682349
>>1682350
They talk to each other?
Are you creating swarming murder drones?
https://www.youtube.com/watch?v=DjUdVxJH6yI

>> No.1684857

>>1682661
Yes, the simplest would be a piezoeletric mic connected to an analog input, and using a breakout board with a relay on it so you can control it straight from a digital pin.

Google will find you a hundred tutorials on using either element

>> No.1684858

>>1682598
I can recommend Nextion, they're very simple to use compared to other Arduino TFT options

>> No.1684983

>>1674881
all IR with lenses. lasers are kinda dangerous

>> No.1684995

>>1684983
Yeah, that's why I was curious, I've done airsoft -> Milestag 2 conversions before but never found a good long distance tight spot arrangement with IR LEDs and glass.

>> No.1685206

>>1672185
How about this, make me one and I'll pay you $25?

>> No.1685269
File: 60 KB, 483x256, 001-gu256x128d-dxxxm.jpg [View same] [iqdb] [saucenao] [google]
1685269

Has anyone here ever played around with vacuum fluorescent displays ran off an arduino? I recently picked came in contact with a noritake VFD and I notice they have a bunch of code for interfacing with it for arduino's.


If you use LCDs to display stuff thats cool too, I'm wondering what kind of neat things I can do.

>> No.1685273

>>1685269

To me, VFD's are the ultimate night-gear display, especially the dot-graphics displays. make some cool shit for your car.

>> No.1685385

fuck arduino and raspi tards, idiots that need fully fledged computing devices to do things that can be achieved with a couple of gates

an absolute corruption of technology

>> No.1685387

Heyo
They said it couldn't be done, but I have an I2C network over 50 meters long in a modified star topology running reliably.
I eliminated virtually all transmission line effects by turning the clock way down to 10Khz.
Am I the first? Dunno. But if anyone wants to be the second I'll post details

>> No.1685433

>>1685385
Never use a computer system where a microcontroller will do the job
Never use a microcontroller where discrete logic will do the job
Never use discrete logic where an analog circuit will do the job

Those are mine. Except for work, unfortunately, where you must do whatever is quickest to implement.

>> No.1685439

>>1685387
>modified star topology
For I2C? That isn't how the protocol works.
I'm interested now, post you stuff.

>> No.1685440
File: 37 KB, 478x700, Capture.png [View same] [iqdb] [saucenao] [google]
1685440

Anybody knows why this won't compile?
I think it was was working a few months ago when I last edited it, it might have to do with the PGM_P or PSTR macros having been changed or something?

>> No.1685450

>>1657955
For Java, try https://pi4j.com, or if you like modern, reactive frameworks try out https://github.com/riot-framework

>> No.1685462

>>1685387

did you hook up all the points on the "star" to a common bus at the hub?

also, I2C is textbook synchronous serial. who told you you couldn't do 50 meters with that?

>> No.1685489

>>1685440
Maybe Im wrong since I don't think all languages do this, but void methods dont return anything but you're using a return..

Maybe try #define plotTest plotText

>> No.1685490

>>1685489
I've been told it's a "forward declaration" issue, basically that function was declared well below the main section of code and somehow the Arduino IDE forgot about it. Moved it to the top, above "void setup()", it works now.
Other functions are also declared at the bottom and gave me no problem at all, just that one in particular, that bugs me off.
In any case, I think I'll be declaring my functions at the start now...

>> No.1685493

>>1685490
I was going to suggest that too, but I figured you already did that.

>> No.1685499

>>1685439
>>1685462
not quite.
I needed a multi-talker multi-listener network with little or no external components required to interface with it, that could support chaotic bus topology so wires could be run and spliced wherever was convenient. for some home automation stuff that can't rely on wifi. taking I2C off-board at all is kind of a stretch, it wasn't meant for this.
Add all the capacitance of UTP cable and reflections from all the stubs and it doesn't work properly at 100-400KHz.
Wire.setClock() doesn't work as expected because it only writes to the TWBR register, but it's possible to set a prescaler in the TWSR register to get low clock speeds.
with I2C and everything else, most of the hard signal problems go away if you just turn the speed down. Since I'm only sending messages a few bytes long, and latency doesn't matter much, I don't need the speed.
i don't really seem to see people using I2C this way but it's pretty good, it's versatile, low overhead, and zero external components needed at each node. Just 2 pullups at the master.
I have 4 nodes now, we'll see if it keeps working when I add more.
1-Wire was less tolerant than I2C

>> No.1685500

>>1685490
in C you need to declare any function before calling it, but you don't need the definition to call it, you can do that later, so you can use a function prototype like so:

//declare prototype
void PlotText(unsigned int, int, int);

//call function
int main() {
PlotText(x,y,z);
}

//declare function body
void PlotTimer(unsigned int t, int line, int column) {
//code here
}

probably the reason your other functions work is because they have valid prototypes declared before use.

>> No.1685503

>>1685500
ok i copied the wrong thing but you get the idea right?

>> No.1685510

>>1685503
Yeah, thanks!

>> No.1685516

>>1685499

Sounds pretty cool actually. I wasn't hating on pulling it off board, I'm just saying that low-rate SSI over long lines isn't something that people should be discouraging. I'm gonna sound like a filthy nerd here, but model railways use something similar. but again, if you got it, then you do you, you sexy beast.

As far my config question - how are you physically connecting them? are you running with different dedicated ports on a central unit, or is each node still on common bus?

reason I ask - at 10Khz, you could bit-bang a reasonable I2C connection between hubs and set everything up in a ring config. I've done something similar with SPI with decent results.

>> No.1685520

>>1685516
They are physically all connected to the same bus. A few lines branch off from the master going in different directions and those split off or are stubbed off to the nodes. I wanted nodes to communicate with each other and not just with the master.
I didn't want them to be in a ring at all, where any one can bring down the whole network if it fails. I've seen that before, in a professional installation, and it was a nightmare.
what did you do that with SPI for?

>model railways use something similar
wack, I never really gave any thought to what model railways are like now. my experience is limited to old ones that didn't have anything more advanced than autotransformers and relays

>> No.1685526

>>1685520

>I didn't want them to be in a ring at all, where any one can bring down the whole network if it fails.
yeah, makes sense. setting up a ring well is also a pain in the ass if you want to be adding as need be.


what did you do that with SPI for?

For my SPI, I was polling a bunch of remote sensor hubs in the field - literally the field, this was for some environmental stuff - that I didn't want to dedicate any sort of real MCU to.

The funny thing about SPI devices is that manufacturers have kind of taken the "SPI" name and completely ignored the original SPI spec. for many devices, the idea of "slave select" is really more of an "enable" than a literal addressing system; many now allow multiple-device addressing over the serial lines or device-passthru with no additional components or slave select lines. some IC's will even actively relay signals down the bus, hence why i went with a ring config.
I basically used the slave select line to switch the devices on and off, only polling and collecting data when I needed it. managed to run the entire network off AA batteries without replacement for nearly a year.

>> No.1685529

>>1685520
>>1685526


Oh and for

>my experience is limited to old ones that didn't have anything more advanced than autotransformers and relays

If you get some time -

https://www.pc-control.co.uk/dcc.htm

It's actually really freaking cool.

>> No.1685530

>>1685526
that's a creative use of SPI. what MCU did you use as a master?

>>1685529
that was a fun read.

>> No.1685532

>>1685530
Used an STM32 Eval board. didn't flash it with the Arduino boot, so not technically relevant to thread, but still interesting.

>> No.1685721

>>1677987
Wait what are you going on about.. fft and freq domain for a cart pole controller? What??

>> No.1686541

>>1651573
how easy would it be to make an rfid activated/deactivated alarm that triggers if a box is opened, not sure if arduino would be good for this but my basic idea is
>rfid toggles the alarm state
>window sensor runs to arduino pin instead of speaker
>if the pin gets a charge and the alarm state is on then it does a function

>> No.1686783

>>1685433
Quick is good though, life is limited in time, and you still need extra time to drain your balls mate

>> No.1686794

>>1686541
The difficulty will depend on your experience, but you can easily buy the components you listed, and it does seem fairly straightforward

>> No.1686954

I want to press a button and have a small speaker play a certain sound file (recorded speech, not music). I guess the easiest way to go about that is arduino + SD card + other basic components (as seen online).
Would any Arduino suffice?

>> No.1686955

>>1686954
Sounds reasonable
You may be able to use an esp8266 for this too

>> No.1686956

>>1686954
Absolutely.

>> No.1686958

>>1686955
Cheers. I'll look into that.

>>1686956
Thanks.

>> No.1686964

>>1686955
>esp8266
Interesting. Apparently this one has an integrated temperature sensor.
I've thought about putting up small thermometers around the house. Wouldn't that chip be ideal since it also has Wi-Fi? Maybe I'll use MQTT...

>> No.1686989

>>1655608
OBS has a web client that has API hooks for going live and such, so you can do it like that by running a local web server on your PC and pushing to your arduino when said hook fires

>> No.1686992

>>1686964
>I've thought about putting up small thermometers around the house.
if you're a little masochistic, you could set up a 1-wire network. I have 10 DS1822 sensors in my place running that way.
I was wary of using wifi because I didn't think it would be reliable enough. IMO anything that doesn't move should be hardwired.

>> No.1687036

>>1686964
It is ideal, it’s the canonical home automation micro since 2015. You can even buy relay modules with an integrated esp8266, useable out of box or programmable

>> No.1687057

>>1686992
Interesting. How come you chose one with ±2°C (±3°C) accuracy? Thanks for the tip anyway

>>1687036
Nice. ty

>> No.1687061

>>1687057
>>1686992
> The resolution the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, which corresponds to increments of 0.5 °C, 0.25 °C, 0.125 °C, and 0.0625 °C, respectively.
huh

>> No.1687102

embedded systems? single-board computers? integrated circuits? system-on-chip? modules? sensors? buses?
why choose one SBC over another? I2C or 1-wire? parasite power?
where to get a good overview about all these things? I get confused when I browse product categories on different online stores.

>> No.1687114

I need to monitor radon in my apt. does anyone know of any decent radiation sensor?

>> No.1687195
File: 35 KB, 671x378, curve.png [View same] [iqdb] [saucenao] [google]
1687195

>>1687057
>accuracy
ha, yeah, that's kind of a strange thing. that's the accuracy over their entire measurement range, not the uncertainty in any one reading.
I'm still not completely sure how to evaluate their accuracy from the datasheet but it's by far good enough for climate control.

>> No.1687407
File: 59 KB, 771x248, 47084335.png [View same] [iqdb] [saucenao] [google]
1687407

>>1686954
I use pic related, they don't even need an arduino, but you can use one to trigger it.
I made an alarm for my car that played the AE86 speed chime if I left the headlights on and the ignition off.

>> No.1687410
File: 191 KB, 1084x1696, 48400405.jpg [View same] [iqdb] [saucenao] [google]
1687410

What's a good wifi dongle for a raspberry pi with long range?
I only just get reception with a phone where I need the pi to go.

>> No.1687415

>>1687195
curious

>> No.1687416

How susceptible is the Pi 3 B+ to overheating?
>leave Pi running for a few hours, streaming security camera video in a browser window
>interacting with it is now horrifically slow, if I manually refresh the page it takes a minute or more if it even succeeds at all
>unplug Pi for a short while, plug it back in again
>opens up the browser and loads the page just fine
Is its performance being killed by heat accumulation? I noticed that the pins are warm and the chip is nearly too hot to touch while it's in use. I don't have any sort of case on it or anything, should I stick a heatsink on the chip?

>> No.1687661
File: 275 KB, 1200x900, 1651-03.jpg [View same] [iqdb] [saucenao] [google]
1687661

How do you connect other stuff like buttons and whatnot to an Arduino if you have a display shield installed?

Very new to all this, want to try doing a silly thing with an Arduino-compatible board.

>> No.1687897

So i connected some buttons and shit to my arduino and i would like the arduino to sort of look like a HID device to the computer (so like a keyboard for example) so i can assign actions in windows to the various keys on the arduino
Is this possible?
The shit option is writing a separate window app that connects through serial to the arduino and then executes some actions or fake key presses when the arduino tells it to. But i would rather have the arduino look like a legit keyboard device. like for example those usb numpads you can buy

>> No.1687918

>>1687410
Raspberry pi comes with WiFi

>> No.1687934

>>1687918
>with long range

>> No.1688506

>>1687661
you have to use wire wrapping

>> No.1688712

>>1687897
Yes, you can make an arduino appear to a computer as a keyboard

>>1687661
Put a protoboard shield in between the arduino and the screen

>> No.1688909

>>1687897
Yes. Look up digispark

>> No.1689025

>>1651573
This is my first program, it lets me change the r, g and b lights on an rgb led by using buttons, by first selecting which color I want to change, and then using up and down buttons to change the value.
https://pastebin.com/hiTDFUR8

The only problem I'm getting, is I need to press DOWN first on nay of the colors before I can increase any of the values. What am I doing wrong /diy/?