This is the best thread idmf has ever had…imo.
Yeah, I’m going to have to debug it for sure, and I still don’t know the value of these photoresistors yet so that’s the best place to start. I’m pretty stupid about the hardware end (I think I’ve only been doing that part for about a year now, IIRC?) so it may or may not make sense. I just have the circuit backed up with a 1K (which may or may not be doing more harm than good) and still trying not to fry things :D.
Yeah, I kind of feel the same way so far. I want to keep going in some direction, but that path usually presents itself when the time comes. It’s really hard at my point in the journey to know where it actually leads, but I could see it being a lifelong learning experience, whether it really accomplishes or amounts to anything. But I’m not the type to get easily frustrated or overwhelmed with options (something tells me you might be the same way), so that’s where the liquid coffee motivation comes into play.
Sometimes just dipping into something a little bit sparks interest in multiple areas though, so if I can just get the job done with cheap-ass parts I’m usually happy enough with that. Even if it takes like 5 times to upload a sketch, and things are constantly going wrong. Maybe that’s part of the fun? I’m still wondering about that one.
Some would say I’ve been using the ‘what did you create today’ thread as an unauthorized dumping ground for this stuff even before my last ragequit (so, possibly years now?), but I kind of just wanted to do this as a courtesy to people posting real, quality music without having to scroll past my bullshit all the time. And of course, I’m always secretly hoping this will encourage others to get started (or start post their creations), too!
I never know how many people there are on the boards (here, or in any other community) who are into the ‘outsider’ stuff until I poke around, either. It always seems like a stupid idea to start a thread (in my head) because it’s so close, yet far away from the usual fare. Obviously most of this still has to do with creating music, but it’s hard to gauge just how nerdy most people want to go with it
Honestly, the only things I’ve kept around long term are some little piezo amps, a couple of modular modules and some pedals. I tear stuff apart and scavenge parts constantly, so I think I’m more of a tinkerer than a producer. I guess I get more of a kick out of knowing how it works than actually using it. It scratches that curiosity brain-itch more than anything.
I think working with substandard parts and setup is a useful part of the learning curve. I could look up a list of $500 worth of tools and parts and projects that might make life easier and be lots of fun, but how do I know that I even want them or how they work? I also wouldn’t appreciate the fact that some of it’s useful because I was never in a position to not have it. And when I decide all this shit is stupid and I just want to make music, I’ve got half a grand worth of parts and gear sitting around. “Buy what you need after you’ve actually figured out that you need it” has been my credo.
Case in point, go splurge on a legit Sparkfun Arduino when you can, preferably one like a Pro Micro or Leonardo that has built in USB/serial/HID capability (anything with a 32U4 chip). It’ll tell you 1. is not having to run extra software worth it to you and 2. does it fix your sketch upload problem. Now that you’ve slogged through both those things, buying the upgrade will tell you whether you’re fine like you are or you’re never going back to that shit because the grass is greener when you spend a bit more. Or just get an offbrand Pro Micro that gets you the HID solved, and if the sketches work/don’t work, you’ve narrowed the problem.
Another example is I know a lot of audio hobbyists thirst on an oscilloscope to look at their waveforms. Ends up that 90% of troubleshooting can (and should) be done with a multimeter and the scope is both a waste and a hinderance. It has it’s place, but running out and buying a $500 Rigel when you’re just getting started is buying a pretty paper weight - you should buy it when you’ve exhausted every other possibility and absolutely know you need it, because that’s when it becomes legit useful.
Anyway, that’s my take on it. Every time I fix a dumb problem or work around an issue or confirm that a thing really doesn’t work, I’ve learned something I can hopefully take forward. I’m all for spending money or time resolving reoccurring headaches that keep me from doing the part I enjoy, but I feel like a big part of the learning curve is identifying those things in the first place.
For the photoresistors, if you have a multimeter just attach one end to each lead and read the ohms with it in the dark and again with a bright light on it. Maybe one more time in general room light to give yourself a midline. It doesn’t have to be super accurate, just enough to ascertain the ballpark figures (1k, 10k, whatever).
If you don’t have a multimeter, I’d definitely recommend getting one. That’s a cheap piece of gear that keeps on giving.
I can vouch for needless oscilloscope lust being a thing. Sometimes I wonder how well the USB versions compare, since they’re usually a lot cheaper. But I’m also the type to use simulators (where applicable and able) when things aren’t working right, which can sometimes have their own built-in scopes. One that I have around even allows you to import Arduino libraries and use them however you please with emulated hardware, and I think that’s more my speed for debugging (if not even moreso learning), provided the emulation / simulation is accurate enough.
I’ve actually never heard of the Pro Micro, but it looks like they’re cheap which is awesome! I’m really curious about that now, because I almost think I get less trouble with my Mega ever since installing legit drivers, and I should probably fish around for things like that more frequently. I’ve been known to deem something completely useless until someone recommends grabbing official drivers, and then it works like a charm . But some of these boards that I have (especially the Leonardo) are definite barely-working trash and should probably just be thrown away one day.
I’m definitely going to test both of those photoresistors just to get an idea. What’s weird is that the original range (obviously mapped later for MIDI use) was something between 450 - 850, which was way out of the 0-1023 range I usually get from other sensors and potentiometers. This probably doesn’t mean a whole lot in a vacuum, but I thought it was a bit strange nonetheless!
Yeah, scopes are a whole thing. They’re great for a real-time look at what’s happening under the hood at a specific point in the circuit (visual version of an audio probe). The real use case is when you’re building a stand alone thing and need to see how it compares to the expected signal (ie actual vs simulated). They’re for when you care about what the signal is, not whether it’s there or how big it is (which is like 99% of troubleshooting).
USB scopes are passible but not great until you step up a few notches. The general consensus is you want 5x whatever signal you’re trying to measure, so ~20kHz * 5 = 100khz for audio, which literally any scope will do, even analog ones from the '50s. The cheap ones will give you 10Mhz which is plenty for most audio, but the input voltage is usually small and they have a lot of processing lag and slow sample rate. The most common USB one around is the Hantek 6022BL for like $90, but it maxes out at 5.5V input. God forbid you’d want to do anything with a 9V circuit (like a guitar pedal). If you’re only ever going to look at little 5-10V circuits a slightly more expensive USB is probably fine, but if you ever step up to anything more powerful you’d need a bench scope (even the entry level ones can read mains voltage or tube plates without breaking a sweat). A decent USB scope is probably $150, and I’d guess you could get a used bench scope for $200-250 on eBay.
I think those Pro Micros are a real sweet spot if you don’t mind soldering your own headers. They’re small and cheap enough to box up, have USB/Serial so you can skip all the Hairless crap, and have plenty of I/O. You’re not going to emulate a huge synth with one, but for things like control interfaces they’re great.
I think it may potentially tell you something. A standard pot is off (0V) when it’s all the way one way, so the code is expecting 0V = digital 0. My limited experience with photoresistors is they don’t close completely like a wiper pot, so unless you’re setting your reference voltage higher, pulling down the signal, or adjusting the low end digital variable to expect something over 0V, you’re not actually going to get 0 in the software. Similarly, there’s some sort of variable for the top end voltage to equal 1023 (ie 5V = 1023).
If you’re getting something in the range of 450-850 in software, my guess is the signal coming out of the resistor is like 2V-4V instead of 0V-5V. Something like that. I’m assuming whatever code is set up for 0V-5V or similar. You should be able to tweak those numbers in the code to give it better range based on what it’s actually doing.
This is a great spot to get a multimeter out. Set to volts, black on ground, red before the photoresistor and take a reading. That’s the voltage coming in. Then test after the photoresistor, voltage out (at a specific light level). In fact, that’s an easy way to actually measure the photoresistor, just apply a little Ohms Law (V = IR) to get values at different light levels. But it should at least give you the ballpark range of what the Mega is seeing and allow you to adjust the voltage/digital range accordingly.