kiki_lambwhat's a decent, Arduino friendly SPI DAC suitable for audio use?
HrdwrBoBit depends
HrdwrBoBwhat are you trying to do
kiki_lambDoesn't need to be hi-fi grade, 12-bit or better is fine with me
HrdwrBoBif y ou're trying to play things
HrdwrBoByou're better off with a board that plays sounds from SD card
kiki_lambwhy so?
HrdwrBoBbut by the time you want to do audio stuff, you're probably better off with a raspberry pi zero or something
HrdwrBoBdepends what you're doing
HrdwrBoBease of use, etc
HrdwrBoBstorage of audio files
kiki_lambright now I'm just trying to identify a general purpose audio DAC that I can buy a pile of for things like sample playback, playing syntesized waveforms, playing back processed audio
kiki_lambtypical musically oriented DSP stuff, basically
kiki_lambtrying to stay away from R Pi, programming with an OS and a hardware abstraction layer is too much like work.
HrdwrBoBit's easier
HrdwrBoBI mean by all means do it the hard way
kiki_lambeh, at that point i'm just writing audio software for Linux though, which i'v done enough of and am bored of. living closer to the metal is part of the fun of doing embedded stuff.
HrdwrBoBok, that's cool :)
HrdwrBoBthe average person that comes in here is typically ... less experienced
HrdwrBoBand is more wanting to achieve a goal
kiki_lambit's also more like actual music hardware... like, the synths or samplers you buy at a music shop are (for the most part) not running a normal consumer OS.
HrdwrBoBtrue, but for everyone running the synth/sampler from the shop there's 10 runing it on a PC/mac/phone
HrdwrBoB that seems like what you want
HrdwrBoBgoes through a range of options
kiki_lambheh, sure. but personally, i myself am more interested in trying to build the hardware.
kiki_lambcool, checking it out
kiki_lambhm, they seem fond of the MCP4921 (at least, they mention it twice), those don't seem too expensive.
HrdwrBoBnothing is really expensive
HrdwrBoBuntil you look back and realise you spent $300
kiki_lambheh, that's not false, sure
kiki_lambbut if you just search 'spi dac' on eBay, there's a pretty wide price range, so seeing a vote of confidence for one of the less costly options helps
HrdwrBoBalso depends what quality you want
kiki_lambyeah, but that can always be tuned later. right now I just want something that can put out decent quality audio that I can start experimenting with, can always upgrade to higher quality parts later on if it seems like some module would benefit from it.
HrdwrBoByeah exactly
kiki_lamb'at least 12-bit, fast enough to put out at least 22.5 khz' is my current ballpark. Not hifi by any means, but lotsa decent music was made with 12-bit samplers in the 80s/early 90s, so I figure that something in that range should be good enough to let me build some useful machines while I figure things out
kiki_lambonce i've gotten the hang of building some functional devices, buying better DACS and doing the same thing with more bits isn't a big step.
Hail_Spacecaketwo questions
Hail_Spacecake1) is anyone investigating hte use of rust on arduino?
Hail_Spacecake2) who's in charge of maintaining the arduino gui dev environment?
Flea86ACTION questions the use of rust on an 8-bit microcontroller with no mmu and only 32K/2K of ROM/RAM respectively.
zap02) arduino company.
Hail_Spacecakemostly I want better functional programming support than C++ gives you
zap0C++ has lambda
zap0and async and futures
blathijsHail_Spacecake: I've looked at rust as an alternative, but at that time there was no AVR support in LLVM. I think there is now, so it might be feasible to run rust on an AVR (though I don't recall what I thought about the overhead needed)
blathijsHail_Spacecake: And indeed, c++11 (which is enabled on the Arduino now) already has some nice functional-ish features (though the syntax often sucks)
blathijsHail_Spacecake: And as said, the arduino companies and its developers (including me to some degree) is in charge of the repo, but contributions are welcome.
IcePicisn't there a huge undertaking in getting the "runtime" part going in order to run rust stuff on such a small cpu?
blathijsIcePic: Depends on how much of the runtime is target-specific and how much is generic
IcePicI'm blissfully ignorant on recent Rust, I'll admit, but last time I checked the webpages were like "we can take standalone hello world from 600k to 18" or something
IcePicso of course llvm support will help everything related to code generation, I was more wondering about the smallish libc environment you would generate code against, and how to make that small enough
emeraldHey guys, I have a question, before I go out and buy an Arduino, do I need anything else to go with it cause at the moment I don't have money for any accessories, only the board itself, is there anything that I can do that just uses the Arduino?
cehtehwhat do you want to do with the arduino?
emeraldAnything really, just want to start with new hobbies I guess.
cehtehand usually no, you need some stuff around, electronic components, measuring equipment, soldering iron
cehtehyou may look into cheap chinese arduino clones when you dont have much money
emeraldOkay cool, thanks!
cehtehbut just arduino isnt much fun
cehtehyou can make few programming excercises but not control anything real
emeraldYeah I see, would you say Elegoo do good starter kits or are they just cheap and bad?
cehtehi wont use a starter kit
cehtehdo you know programming in C?
zap0emerald, you can get an arduino board for $10 from aliexpress/ebay. and an LCD display for $3.
emeraldNope, I've started about 20 minutes ago haha, I know some Python, VB and some C# so it should be rather simple to pickup I guess.
cehtehi think its better staying with your PC and learn programming
cehtehunless you have some real project where you want to use an arduino
cehtehand you can get arduinos for $3
cehtehbut they are just builing blocks, having a naked arduino doesnt give you much
emeraldYeah, do the cheap ones not work as well or use not as good components?
GeDaMoC is fairly different to Python, VB and C#
cehtehthey usually work as good as the originals
emeraldAh okay, I was wanting to get an original, I should probably get a cheap one then, that'll increase the budget a lot hahah
cehtehwhen you order, order 2-3 then you have a spare
cehtehand starter kits are overrated imo. just some leds and resistors for testing (blinking leds is a good debugging thing)
emeraldOkay, I suppose it might be best to get alot of stuff in bulk cause usually thats cheaper?
cehtehand when you do something real, just buy the components you need, maybe at bigger numbers because they are cheaper (resistors in 100's)
GeDaMoemerald: you might check to see if you have a local hackspace
cehteh*but* when you are short on budget and dont have an actual idea/project you want to do with an arduino, then it makes no much sense
cehtehjust learn programming first, play a bit with electronics (salvage components from old devices)
emeraldYeah fair enough, I'd speak to my school tutors and stuff about this but I've finished now, just wanting something to do over the summer :D
emeraldI have a lot of old stuff that I could maybe take apart so that would be useful.
cehteheventually you want a digital multimeter and a soldering iron
emeraldOh wow theres a hackspace about 10 miles away from me, thats quite surprising, I live in a rural area.
emeraldYeah I think my dad has a soldering iron so I might see if I can use it when I need to
cehtehvisit them
cehtehsmall enough one (for electronics?)
emeraldI'm not sure to be honest.
emeraldI'll have to ask him when he gets home.
cehteheither electronic soldering station (where you can adjust the temperature) or something around 20-40Watts with a fine tip
emeraldOkay cool, I'll have a look on an site thats close to me, see if they've got one in stock too
emeraldAh damn its an American site, I'm in the UK :D
emeraldI'm looking around for some
cehtehhaha .. buy that stuff before the brexit :D
emeraldYeah ahah :D
emeraldOh wow this is cheap
emeraldI was originally planning on buying this...
cehtehyes thats the original
cehtehchina delivery may take few weeks btw
emeraldAh right that's why its so costly I guess.
emeraldOh wow haha
emerald"3-5 business days" hmm
emeraldThe cable is just a standard printer cable right, I think I have a few laying around.
cehtehdepends on what arduino you choose
cehtehi usually use the 'nano's
emeraldAh okay, I'm probably just going to get the UNO.
emeraldI've got some old AGP graphics cards laying around, should I take the capacitors off of them and reuse them or should I buy new ones in bulk? They don't seem to be bulging.
cehtehwhatever you need
cehtehsalvaging surface mounted components can be tricky
cehtehusually not worth it
emeraldBut wouldn't I just need to unsolder them?
emeraldThese are the kind...
emeraldExcept they're not leaking :D
redrabbitcaps cost nothing on aliexpress
redrabbitwith a bit of liquid flux you should be able to remove them from the card
redrabbitwithout damage
redrabbitis it worth it though
spuzhi, i'm getting data from an i2c accelerometer at 50Hz. for the most part the signal is stable while the device is not moving, varying by about 0.05g, however once in a while, the g values will spike by about 0.15g for just a single sample. usually it's the z axis that has the biggest spikes. any ideas why this is or what to do about it?
spuzi'm currently taking the variance over the last 50 samples to detect vibration but unfortunately these spikes are causing detections when there is no movement
spuzactually, all three axes seem to show a spike but the z axes is definitely the largest
pwillardCaps like that cost pennies on Tayda
pwillardspuz: You want to learn about kalman filter... for example...
pwillardPeobably worth glancing at:
alphaferretno... \o
spuzpwillard: interesting, i'm pretty sure i'd seen that article about the kalman filter a while ago but it had completely gone from my mind
pwillardwell, its kind of good t making spurious wild values go away... that's why I mentioned it.
pwillardI have never had an accelerometer not throw odd values sometimes
spuzpwillard: here is a demonstration of what i'm seeing:
spuzi wasn't sure if maybe i was interfacing with the device incorrectly by not syching my reads to the refresh rate of the sensor or something like that
spuzi actually think a median sensor with a window of 3 samples should work for me
pwillardI've seen this happen... so its not unusual
TAsnHey, assuming I have a piece of electronics that is voltage sensitive, is it safe to use the digital PWM for that? Or could that fry that circuit?
HrdwrBoBit depends
TAsnHrdwrBoB, on?
HrdwrBoBwhat the electronics is
TAsnOK, so shouldn't risk it, thanks.
Guest76594Does coding differs for various transmitters and receivers in arduino?
pwillardTAsn: "OK, so shouldn't risk it, thanks" That is absolutely NOT what HrdwrBoB meant
TAsnpwillard, my response was essentially: OK, I don't want to fry my stuff, so I'll just get a voltage regulator. Or am I missing anything?
TAsnI probably need a current limiter too anyway. I'm a bit tired, so can't really think straight, so won't connect anything today. :P
pwillardYou unnderstand that PWM is basically 5V or 0V, right?
pwillardSo if you are using it with a 3V device... yeah... its not the solution
Vike91What about 1000V?
TAsnpwillard, yes, I understand that, this is what lead me to ask the question in the first place...
TAsnSo essentially if an hypothetical device is marked for < 4v
TAsnThis is definitely not the solution, correct?
TAsnpwillard, I was just wondering because when connecting a voltage meter, I get let's say 2.75, so I really don't know if that translates to "safe" or not.
pwillardcorrect... PWM creates a perception... based on off time and on time... and the meter is creating a baseline perception from that... but its merely flipping 5V on and off very fast
TAsnpwillard, thanks, that's what I suspected. :(
OneM_IndustriesHey, is there a way to disable the arduino IDE opening the last program that was edited upon being opened?
pwillardIts not a preferences option.
cehtehusing another editor :D
OneM_IndustriesAny other way to stop it from doing that? I would prefer it just open a new sketch each time.
cehtehor isnt the arduino IDE open source .. fix it by yourself
OneM_IndustriesI'm not that good at programming.
pwillardjust select NEW each time and close the other instance
DworfHow it can be so hard to find tutorial for esp8266 that runs php file from server and pushes some values into it
Dworftrying to get wemos d1 mini to send some data to mysql throught php
Lizards|Workphp usually runs on the server not on the client
Dworfwell yes, but aint the right way to do it that in the server is that php file, where esp posts some data
Dworfesp -> receiver.php(on server) -> mysql
Lizards|Workhttp post/get to the server
Lizards|Workthat's the relevant part
Dworfatm receiver.php->mysql working
Dworfyes, i need to use somehow post to put some data to php file right?
Dworfthat eventually runs it to mysql
Inari-Depends on how you coded the php file
Inari-Start with making a http request from the esp
JackFruhDworf, there is an excellent guide to doing what you're trying to do.
JackFruhlet me find the link for you
Dworfthat would be really helpfull JackFruh
JackFruhthat is the link to the guide on amazon, you can also get the guide on the author's blog for free, let me find that link as well.
JackFruhDon't fill out that page (you'll leave a comment for the page)
JackFruhbut click on the link "subscribe to my newsletter" and get a free copy of my ESP8266 getting started guide.
Dworfi dont think that has to be that hard :D
JackFruhThe guide is great, shows how to configure the Arduino IDE to work with the NodeMCU ESP8266
JackFruhand then walks you through some samples
JackFruha few of which post or get data from a website, which is what it sounds like you're trying to do.
Dworfyup that it right
JackFruhThere are a lot of other sources out there, but I really liked this one for it's simplicity, it's short and to the point.
JackFruhAt first I ignored it since I wasn't interested in a weather project, but the stuff he uses for that carry over to many other project types.
JackFruh(and I found it was actually kind of interesting logging temperature from multiple places in my home)
Dworfyup that is something im trying to do also
Dworfi have atm raspberry pi + arduino weatherstation outside of my house
Dworfnow id like to greate some battery packed measurements inside the house
Dworfbut totally new to esp things so it takes some time :D
JackFruhI figured I can create a sensor for about $6 each, so I have a bunch of parts on order from China.
JackFruhI've seen a wemos board with a slot for a battery, those were I think about $10, plus the batteries appear to be around $5, I've thought about using those, but I am still new to this and don't know how to do the power management stuff.
JackFruhbut long term the thought is that maybe a board like that could run for a month between charges if I just wake up and take a measurement every 10 minutes or so.
Dworfi think u need to put it sleep
Apocxstick two 18650s on the back of it and put it to sleep between measurements. that'll last a good long while heh (assuming it takes 3.3v)
JackFruhto put it to sleep with the ardino IDE, is it just the sleep(ms) command?
JackFruhAlso Dworf what temp sensors did you use for your weather station? I have a DHT 11 and it's awful.
Apocxfor my esp there was like a deepsleep command or something
DworfJackFruh: i had dht22, it okay, but then i changed the temp measurement for bmp280, i think its more accurate
JackFruhI've been eyeing the DS18B20's they are cheap, and apparently you can change the resolution from 9 to 12 bits on them, allowing for greater accuracy.
Dworfyup, probably even more realible
JackFruhWhen I first eyed the specs I thought the DHC11's were +/- 2C, so I just thought that meant it would be off by up to that amount, but it turns out it's an incremental thing - so the readings come back in multiples of 2C
ApocxI love the DS18B20
Apocxuse it pretty much exclusively
JackFruhI'm in the US so that translates to 3.6 degree steps.
JackFruhApocx, good to know!
JackFruhhave you changed the default resolution on them?
Apocxno, haven't needed to for what I do
ApocxI basically just need to know if the water is freezing or if a board is getting to toasty
Apocxbut having a bunch on a single line and being able to read temps based on the id of the sensor is awesome
JackFruhTrue, I've not gotten mine in yet, so I have yet to try that - how much wire do they tolerate between them - do they have to be close together for that?
Apocxone of my probes is about 4-5 feet from the board
Apocxthe one that sits in the water tank
Apocx(it is a waterproofed version mind you0
cehtehds18b20 are by defaut on the higest res
JackFruhcehteh, is that true? I always see them advertised as +/- 0.5C, but I think the highest res is something like +/- 0.06 or something like that.
cehtehdont mix up the 'resolution' and 'accuracy'
cehtehi have to read the datasheet but i am pretty sure it has the highest res by default
cehtehaccuracy is ±0.5°C withhin a limited range, outside of that range even more and often they are a bit off, you notice that when you use 2 in parallel
cehtehyou may mitigate that, some software calibration when you really need
cehtehand to92 has some considerable heat capacity already, measuring air temperature is relative slow
EmilAnyone used the OTA functionality?
EmilAnyone know how to not have to use the retarded interface
EmilI'd much rather download and verify myself and then pass this buffer/file to a function that can then do the update
JackFruhI've not tried that
root-xWhat wrong in this small code?
root-xI can send to GSM shield but i can't receive in the same frecuency 155200
root-xIs an arduino uno normal.
Emilroot-x: your standard arduino cannot really do 115200 software serial
Emiluse 9600
dogbert2use 9600 baud and see if that works...115,200 is not standard unless you have a very good UART/USART which the arduino does not
root-xEmil i tested 9600 both and same. i can send commands to GSM shield but only receive simbols
root-xThe code is ok?
Emildogbert2: eh?
Emildogbert2: 115200 is like suuuuper standard
Emilafter 9600 the most standard you can get
Emilthe issue is that it's a shit rate for the hardware
dogbert2well, when I messed with embedded stuff, RS-232 speeds didn't GO that high...back in the 90's we topped out at around 38/56K
JackFruhRootx you're trying to communicate between the uno and a shield at 115200, not between the uno and your pc, correct?
dogbert2at least reliablty
dogbert2here is some example code -
dogbert2with a GSM shield
root-xThis another configuration works ok pc<--115200-->USB com port<--115200-->GSM
Emilroot-x: matey
Emilroot-x: 115200 software is sadly not gonna happen using the standard arduino libs
root-xpoor wifi
root-x[21:20:17] <Emil> root-x: 115200 software is sadly not gonna happen using the standard arduino libs
root-x[21:21:00] * Disconnected..
root-xThe GSM module can read commands at 115200
root-xSended via PC
dogbert2but probably can't write them at that speed (LOL)
root-xI can make a call or send a sms
Emilroot-x: matey
root-xbut can't read the ouput via arduino monitor serial
blathijsEmil: Actually SoftwareSerial can run 115200, I did a big cleanup and some optimization a few years ago to make that work.
Emilblathijs: I did say "using the standard arduino libs"
Emilblathijs: I know you can make it work
EmilOr did you push those changes upstream also?
blathijsEmil: That cleanup got merged upstream
EmilI bet it consumes all the processor time though :D
blathijsA lot, yes :-)
blathijsBut in some cases it works better at high speeds than low speeds, since at low speeds it disables for a longer period (one full byte time)
jrwrfaster interrupts
jrwrI had a idea to use a Mega for HatNAS, but putting a web interface on a Mega is kind of hard
dogbert2heh...the arduino needs a update to a quad core processor running at say 1.6Ghz and 1GB of onboard ram
jrwrThis is hatnas right now
root-xEmil i tested 9600 in both serial and myserial with same results
root-xi can sent to the GSM but only receive incoherent simbols
Argylelabcoatyou could try using the ESP-32 for HatNAS
Argylelabcoat@jrwr, the ESP32 has at least a couple of cores, wifi, and an arduino stack
r0b-315Mhz RF can be used license free right?
deshipur0b-: depends
r0b-considering buying an RF remote control relay thing to use in my truck..
deshipur0b-: jurisdiction, local regulations, power, area
deshipuyou really should consult the laws of your country
r0b-its non licensed.
r0b- looking at something like this
modleshey all
modlesodd one, I have a GMS-g9 gps and when i hook up the enable pin to an IO pin on arduino, when i set enable pin to high (to enable gps) the arduino browns out
modleswhat am i doing wrong?
cehtehmodles: how do you power the arduino, what current does that gps draw, did you double/triple check all connections?
cehtehdoes it brown out when you manually drive the enable pin high (over a 1k resistor?)
modlesif i connect the enable pin to vcc all is well
modlespowering the arduino via vin from a lipo