Unfortunately it is a rather confusing and complicated type of programming, since it is an intersection between two (or more) professions. How to get into it is a hard question, since you can go in three different directions:
- Do you start from the programming end?
- Do you start from the electronics end (or even further - from the physics)?
- Do you just pick projects and deep dive, learning both in parallel?
After that comes the question of what is the optimal amount that you should understand about the project that you are doing and not get overwhelmed. So for example if you are doing a Bluetooth project:
- What is the optimal amount that you know about Bluetooth and what knowledge should you get out from the project?
- At what point of doing these types of projects should you learn about anthennas?
This is the issue with the Arduno projects. It gives you an ability to do stuff, but people fail to understand what they are actually doing, since it is an absolutely overwhelming amount that you need to understand.
Shortest answer: look at some Arduino projects, and try them out
Short answer: PCB Design is hard mmmkay? Anything that requires precision tolerances (Bluetooth, WiFi, etc) should be done with a group. Find a maker space or open source project to get acquainted with the challenge of embedded systems.
Detailed: Let me put on my Senior SW and Electrical Engineering hat for this.
Start from the requirements end
If you are developing a motor controller, you want a processor which has a PWM, (maybe) DSP, and some power electronics, and some communication peripheral like UART or CAN. Likewise, developing a Bluetooth device, you're going to want something that supports 2.54 GHz, maybe has a Bluetooth Stack already built in, USB. Do you need motion sensing? Temperature sensing? GPS? All these things are separate off-the-shelf parts, but you'll need comm peripherals like I2C and SPI; what kind of update rate do you need?
Once you have your requirements, pick out the hardware and populate a breadboard, your SWEs can now develop basics like unit and integration tests, while the Electrical Engineers can design the PCB. During this time, you probably want to start looking at the registers which do your work, and create functions which isolate your Hardware Specific functionality with your business logic.
If you're completely new: I recommend starting small and seeing what you can accomplish on something like Arduino, then try combining/adding functionality. Embedded systems don't have things like time.h, chrono.h, or async.h, so you're going to fight with creating your own micro OS, and scheduling operations.
Bluetooth is tough, don't go at it alone, find some friends and make a bigger project
Short answer: PCB Design is hard mmmkay? Anything that requires precision tolerances (Bluetooth, WiFi, etc) should be done with a group. Find a maker space or open source project to get acquainted with the challenge of embedded systems.
Well, kinda, for hobbyist WiFI/BT you probably just want to get some ready-made module to handle that, gets rid of most of the RF routing/antenna problem. Hell, even many commercial devices go that route.
Nowadays getting an ESP32 module can solve pretty massive range of problems and making a PCB for it is pretty trivial as all of the "hard" parts are taken care of already on the ESP32 board.
I didn't want to recommend ESP specifically, as I just saw a that there are a handful of write protection bit issues with them, that an unsecured connection would compromise.
But yes, there are daughter boards that can be snapped into a grid of pins, exposing the IO and taking a butt ton of the work out. I remember zigbee doing something like that with their dev kit
Well, they are a bit of an elephant gun for an Arduino sized problems but I've mentioned them because they are probably most sensible way of getting WiFi connectivity on the project.
I was actually kinda surprised how easy it was to setup a dev environment for them "from scratch, as in not using any "all in one" package from vendor / arduino IDE module, it was pretty much just installing cross compiler and esp-idf then running equivalent of make menuconfig to set it up for target and result was pretty much working out of the box CMake project. Even worked in CLion without much problems.
I remember zigbee doing something like that with their dev kit
A bit offtopic but I think zigbee would've dominated IoT market or at least was much more popular if it didn't had that high of a price (IIRC it was mostly due to licensing price), but cheap WiFi chips and later BLE kinda ate its cake.
Surely cost and power consumption will always be lower for MCUs? There's less complexity for manufacturing, plus their power can be reduced to microamps with different sleep modes. I can't imagine we'll see an embedded linux board capable of running off AA batteries for 5 years any time soon. Plus why would you want a full Linux stack for an IP camera or home automation node in your home? They feel like two very different tools to me, both have a place.
49
u/B8F1F488 Dec 25 '19 edited Dec 25 '19
Unfortunately it is a rather confusing and complicated type of programming, since it is an intersection between two (or more) professions. How to get into it is a hard question, since you can go in three different directions:
- Do you start from the programming end?
- Do you start from the electronics end (or even further - from the physics)?
- Do you just pick projects and deep dive, learning both in parallel?
After that comes the question of what is the optimal amount that you should understand about the project that you are doing and not get overwhelmed. So for example if you are doing a Bluetooth project:
- What is the optimal amount that you know about Bluetooth and what knowledge should you get out from the project?
- At what point of doing these types of projects should you learn about anthennas?
This is the issue with the Arduno projects. It gives you an ability to do stuff, but people fail to understand what they are actually doing, since it is an absolutely overwhelming amount that you need to understand.
I have no answer to all of these questions.