Ask HN: Looking for difficult/intermediate projects involving microcontrollers?
I am trying to learn more about embedded systems and low level programming. I have been looking for projects, but simple concepts and tasks such as connecting small peripherals, sensors, etc. or learning the basics of various data transfer protocols is not cutting it. I want a project or a concept to explore that will leave me saying wow that was fucking hard at the end. Not tedious...Hard. Everything I find seems to either be geared towards absolute novices or longterm experts yet I'm quite intermediate.
30 comments
[ 4.4 ms ] story [ 75.0 ms ] threadfourier transform/synthesis
LCD television set
software programmable oscilloscope; logic analyser/injector
JTAG hardware
microcontroller programming hardware
https://www.youtube.com/watch?v=LY7P-BV1OxM [youtube]
https://www.teachmemicro.com/arduino-like-ide-for-pics/
https://pic-microcontroller.com/how-to-build-your-own-usb-pi...
https://pic-microcontroller.com/simple-3-resistor-pic-progra...
https://en.wikipedia.org/wiki/PIC_microcontrollers
I'm currently working on a project to do soil analysis in realtime via a LoraWan network (kinda like https://youtu.be/iN6j1AbUbYo). Also looking at doing hydroponics, but that isn't very microcontroller heavy.
ha, coincidentally I just started on a similar project this weekend. One thing I've found interesting is the accessibility and accuracy found in such small modern sensors. Hydroponics may not be "microcontroller heavy", but can definitely be applied.
I'm curious, what route are you taking for sensors? Off the shelf moisture? NPK? DIY? I love the idea of logging everything that's possible to log :>
I went with temperature + moisture sensors [0]. I was seriously considering NPK, but I didn't like most of the sensor options I saw. I can't find the original white paper I was reading, but this is a good one on the subject too [1]. Basically it seems like all the NPK sensors you can easily find are three-pronged and based on electrical-conductivity. These sensors don't have a super long lifespan, and can be pretty inaccurate (when soil moisture changes for example). There may be some good options out there, but I haven't found it yet. I might be overestimating how inaccuract the electrical-conductivity sensors are too, need to do more research.
I also want to log temperature and sun exposure; as well as place a rainfall sensor somewhere. I'm really looking forward to a Grafana dashboard of my garden
As for your "black box that makes lettuce," I'd highly recommend you look into hydroponics (specifically NFT). That's what I'm most interested in, I keep looking at this blog post[2] as inspiration.
[0]: https://www.tindie.com/products/miceuz/modbus-rs485-soil-moi... [1]: https://sci-hub.se/https://www.sciencedirect.com/science/art... [2]: https://kylegabriel.com/projects/2020/06/automated-hydroponi...
And yeah, now that I know the term "NFT hydroponics" that is exactly what I was imagining, just didn't know what it was called. "i want plants that are plugged into the matrix. living in a fake reality, the organic component of a larger machine that nourishes me.".
As for NPK, I (obviously) don't know what I'm talking about, but I'd really want to do something optical. For one, I think you're right, it strikes me as bad to use electrical conductivity to measure both hydration, and relative concentrations of ions, and two, optical just seems ... cooler... to me. In theory, you can "just" use 3 tuned LEDs and a photodiode...
Wow, that last link is... now my standard to strive towards for project writeups.
[1]https://www.reddit.com/r/arduino/comments/g9293k/for_the_pas...
[2]https://imgur.com/gallery/6JIvoRq
Take a system and try and eliminate as much power draw as possible, and then make it resilient to power failure (both program state and safe result).
A lot of modern wifi projects can be completely turned on their heads under these conditions. Turn a 1 mo. battery into 10years.
I've done a moderate amount of firmware programming, and while some of it seems "easy" or "obvious" in retrospect, taking a new chip, implementing a crude task sharing "operating system", writing drivers for peripherals, then writing a host facing interface (like USB, or bluetooth) and then writing the host driver for it, and making it all happy... Eh, actually that might be more tedious than hard.
The last thing I worked on that evoked "wow that was fucking hard", required minimizing the power draw without sacrificing features, so you have to deal with creating state machines to track all the various standby and power states of your peripherals and radios and mcu, and transitioning between them in the right way (and with the right timing!)
Doing cool sound/music stuff used to be hard, but it's eas(ier) now that your microcontroller is frequently 32bit.
Make a live update mechanism for your project that is provably un-brickable. That was difficult 10 years ago. Might still be difficult.
Also minimizing power draw, an excellent idea I think...not only a legitimate challenge, but also supplies a beneficial purpose.
The reason I suggested BLE and USB was because, for both of those transports, I really felt myself "level up" as an engineer after reading the whole >1000 page spec, and use that knowledge to implement my own device.
Knowing how things like that work "behind the scenes" feels gratifying. Tho it may impact your normal life, sometimes seeing how the sausage is made turns you into a vegetarian. ;)
Who knows, I might just discover my love for sausage making.
What kind of project do you mean, anyway? Embedded is partly about software and partly about hardware. I'm a programmer who dabbles in hardware. For many of the embedded ideas I think about, the software challenges are not too bad, but the hardware issues are above my pay grade. Do you want to build interesting hardware, or only write code? Do you want to only develop programming chops, or also domain skills that will require a fair amount of study, such as DSP algorithms? Do you only want to program microprocessors, or also FPGA's?
It would be nice if you could say more about your interests and goals. That would make it easier to suggest projects.
I'm not that big on the concept of trying to learn a topic by doing a project anyway. Better to have the low level pieces together first, and put them together into a project afterwards.
I posed the question with a low-level of specificity on purpose...I want as many opinions and ideas as possible in regards to the parameters which I chose intently...
Also I whole-heartedly disagree with an assertion that learning a topic must be top-down or bottom-up. My experience shows me I learn best when trying to apply concepts I may not fully understand, as the aspects where my knowledge is lacking are quickly highlighted.
Anyway your question is so vague as it stands, that I can't make concrete suggestions. How about this: what are some embedded things you have already done, and what parts interested you? Or, why do you want to program embedded in the first place?
Embedded programming is often just a resource-constrained version of programming bigger computers. Unless you're sort of forced into that by end-goal requirements, you might as well program bigger computers so you can solve bigger problems, have more convenient dev tools, etc. If you're pursuing embedded without having an end goal that needs it, it sounds to me like you're just drifting.
(Added:) Hmm ok, here is one idea that I think is cool: get some popular commercial quadcopter and replace the controller code with something that you release as FOSS. That would give more freedom to lots of quadcopter users. There is something like that on an old Adacore page, but I don't think it fits existing popular hardware.
Another: watch some "Stuff Made Here" videos on youtube for inspiration. That guy builds stuff with a lot of code inside.
Also not mentioned: what is your budget? For a pure software project you are allowed to say "zero" since all you need is time and keystrokes. But for embedded, if you do anything interesting, you will end up accreting a workbench full of oscilloscopes, SMT rework tools, and so on. That takes $$$ not just for the gear itself, but for the living space that it will occupy if you are in a high rent location. One reason I don't do this stuff is I don't have the space for it.
https://m.youtube.com/c/LucasVRTech/
If you have access to a vr headset I think this would be a difficult but possible project that would result in a really cool device.
The project is also currently small enough that there is plenty of room / need for contribution.
The very idea seems like Sci-Fi to me and i am quite mystified why this is not more widespread.
Would love to know the Experts take on this !
ST sure as hell won't do it.
ST sure as hell won't do it. You'd be a hero.
Build it. You may find that learning with concrete goals in a real problem is more effective that with something you're disinterested in.
The trick with this skillset is it's a combination of many related skills. The specifics will depend on the project. Some examples:
You'll probably need some combo of all of these, unless you're in/starting a company that has a division of duties. Good luck!