5 ms·
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.
- rolph 5y agoADC DAC conversion. fourier transform/synthesis LCD television set software programmable oscilloscope; logic analyser/injector JTAG hardware microcontroller programming hardware
- bush-bby 5y agoGreat places to look Thank you. However, what did you mean by microcontroller programming hardware?
- rolph 5y agomicrocontrollers such as microchip pic series are programmable and a hardware device is used to burn the chip with a program thus allowing one to generate a myriad of functions, example: https://www.youtube.com/watch?v=LY7P-BV1OxM https://www.youtube.com/watch?v=LY7P-BV1OxM [youtube] https://www.teachmemicro.com/arduino-like-ide-for-pics/ https://www.teachmemicro.com/arduino-like-ide-for-pics/ https://pic-microcontroller.com/how-to-build-your-own-usb-pic-programmer/ https://pic-microcontroller.com/how-to-build-your-own-usb-pi... https://pic-microcontroller.com/simple-3-resistor-pic-programmer/ https://pic-microcontroller.com/simple-3-resistor-pic-progra... https://en.wikipedia.org/wiki/PIC_microcontrollers https://en.wikipedia.org/wiki/PIC_microcontrollers
- bush-bby 5y agocool, thanks for taking to time to find links.
- theossuary 5y agoBen eater on YT has a lot of cool projects: https://eater.net https://eater.net I'm currently working on a project to do soil analysis in realtime via a LoraWan network (kinda like https://youtu.be/iN6j1AbUbYo https://youtu.be/iN6j1AbUbYo). Also looking at doing hydroponics, but that isn't very microcontroller heavy.
- bush-bby 5y agoagreed 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.
- loxias 5y agoCoincidentally, I also, also, started a project to do soil analysis remotely! :D Tho mine is just a few crude proofs of concept and a lot of dreaming. The eventual goal is an inexpensive automated black box box that provides me with fresh lettuce daily, with no human intervention. 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 :>
- theossuary 5y agoThat's cool! Honestly right now mine is too :) But I'm getting the parts together now to build the first box, the plan is for it to be outside in the garden so it needs to be pretty weather proof. 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-moisture-sensor-2/ https://www.tindie.com/products/miceuz/modbus-rs485-soil-moi... [1]: https://sci-hub.se/https://www.sciencedirect.com/science/article/abs/pii/S0168169909002087?via%3Dihub https://sci-hub.se/https://www.sciencedirect.com/science/art... [2]: https://kylegabriel.com/projects/2020/06/automated-hydroponic-system-build.html https://kylegabriel.com/projects/2020/06/automated-hydroponi...
- detaro 5y agoIf you have musical interest, a synthesizer is something that can start easy and scale quite far in complexity.
- bush-bby 5y agoI do indeed have a musical interest.
- elliekelly 5y agoI'm not sure if this is what you're looking for (and it might be bit too advanced but you seem to be up for a challenge) but I remember seeing this post[1] on r/arduino and thinking it looking pretty fucking hard. OP also posted a pretty detailed write-up.[2] [1]https://www.reddit.com/r/arduino/comments/g9293k/for_the_past_6_months_ive_been_working_on_this/ https://www.reddit.com/r/arduino/comments/g9293k/for_the_pas... [2]https://imgur.com/gallery/6JIvoRq https://imgur.com/gallery/6JIvoRq
- bush-bby 5y agolove the level of detail
- Normal_gaussian 5y agolow power and power resiliency. 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.
- bush-bby 5y agoWow. I REALLY like this.
- 2rsf 5y agoIf you want an extra challenge take a cellular module and try again. For example there is a GSM expansion for Raspberry Pi, try to build a "sensor" that can check something every N seconds/minutes/hours and report back to you with a battery lasting months or more (hint- send it to sleep and wake on a timer)
- loxias 5y agoHave you implemented your own USB devices yet? How about your own BLE based protocol? All with your own code (not using some off the shelf library which imposes its own abstractions on you)? 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.
- bush-bby 5y agoI do definitely like the idea of BLE...all with my own code. Also minimizing power draw, an excellent idea I think...not only a legitimate challenge, but also supplies a beneficial purpose.
- loxias 5y agoFigure out how to accurately transmit and reproduce jitter sensitive data over BLE as the transport, while keeping latency bounded. (ok, now I'm blatantly just rehashing problems I've solved before. But it was kinda hard!) 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. ;)
- bush-bby 5y ago
- throwaway81523 5y agoIf you're interested in embedded there must be things you want to build with it. So build something you want to build. 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.
- bush-bby 5y agoAll aspects that you mention...I find value in it all...It'd be a shame to be forced to choose only one medium. 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.
- throwaway81523 5y agoWell learning methods are a matter of personal style, so whatever works for you. But it's important to come away with thorough understanding at the end, rather than "I tried X and it worked, so X must be the right way to do it". 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.
- f0e4c2f7 5y agoI ran across this guy recently: https://m.youtube.com/c/LucasVRTech/ 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.
- bush-bby 5y agoI actually saw this as well, quite an interesting project.
- rramadass 5y agoRF Energy Harvesting systems which run perpetually! 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 !
- joezydeco 5y agoGet LWIP working properly on STM32. ST sure as hell won't do it.
- joezydeco 5y agoGet LWIP working properly on STM32. ST sure as hell won't do it. You'd be a hero.
- mrg2k8 5y agoExtract data from the 10 sensors available on the Texas Instruments CC2650STK SensorTag and then optimize power usage on its firmware. If you want more of a challenge, rewrite the firmware completely.
- the__alchemist 5y agoThink of a device that doesn't yet exist, but should. This might mean that something similar exists, but has deficiencies, or is too expensive. 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: Soldering Low-level language proficiency; generally C, C++, or Rust. Also includes interrupts, concurrency, DMA, atomics etc Embedded tooling (Pick your poison!) Part selection and BOM/cost management EDA software, including PCB layout, designing footprints, schematics etc Communications protocols Reading datasheets and manuals Familiarity with your MCUs peripherals of interest for the specific proj How you get the PCB ordered etc Mechanical skills, eg designing and building enclosures CAD software like Solidworks, Inventor, Fusion etc 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!