How to Choose a Microcontroller
learn.adafruit.com
learn.adafruit.com
What would be really be helpful to me is a compendium of what has been found not to work. Every microcontroller has a horrendous, secret list of stuff that is just broken, and the only way usually to find out is to try to use it and fail. If you get somebody from the vendor to talk to you, they say they knew all about it already.
For example, ESP32 is supposed to be actually useless for low-power applications, because its sleep modes are messed up, somehow; maybe it doesn't wake up reliably, or does when it shouldn't? Also it draws more power than it should in a sleep mode.
Lots of the on-chip peripheral gadgets have very non-obvious failure modes. I guess you are supposed to expect trouble synchronizing things with different clocks: "Check this flag bit twice before you trust it." Special added non-standard instructions have gotchas like "turn off interrupts while this instruction runs", or "don't let these instructions write to memory; get the results in registers and copy them out".
It seems like a wiki would be a good way to compile lists like this, but engineers who program microcontrollers mostly don't seem to think that way. Too, many have signed NDAs or don't want the vendor mad at them.
https://i.postimg.cc/PqdsVszZ/IMG-20201105-172236.jpg
The top circuitry and chip are the Bluetooth circuitry. The PCB antenna is hidden away under the top CYGNUS solder mask. It's got three servo channels, two high current pyro channels that can be variables controlled to deliver a variable current using PWM, it's using a BMI088 as the IMU , a MS something or other chip (can't remember off the top of my head) as the altimeter. It's got 16Mb of flash which is that chip to the top left next to the microcontroller. It's got an SD card port for data storage, buzzer, neopixel LED and a buck converter for converting the LiPo 11V to 5V efficiently as well as a linear regulator for converting from 5V to 3.3V. lemme know if you've got any questions!
I'm working on a design using the BMX160 (10 DOF Sensor).
What bluetooth chip is that? Are you using a PCB trace antenna?
https://github.com/polishdude20/CygnusX1
The code is written in C++. You can use the Arduino IDE or platformio which is a VScode extension for working with microcontrollers. I use platformio since it's got syntax highlighting and other stuff. The Arduino IDE is really barebones. The board is really close in software to an adafruit feather m4 (same chip and bootloader as well as some config files that I modified).
For controlling the temporal properties, I'm not sure what you mean? The microcontroller runs functions and runs in a loop. You can get certain functions to run every time the loop is executed or have them run at intervals. So there's a setup function that runs once and only once at the beginning which I use to initialize all the sensors and other things. Then inside the loop function I've got various timers triggering at various intervals to run certain functions like checking sensors, converting data, saving data etc.
Processing orientation info starts with the raw gyro values. So I get rad/sec or deg/sec out. Then use a bunch of quaternion math to figure out the yaw, pitch and roll of the rocket in flight. Yes, floating point numbers are used :)
Why? Three reasons:
* Ecosystem
* Ecosystem
* Standardization
Having the same microcontroller (or small set of microcontrollers) in my house makes maintenance a lot easier and cheaper. Have an ecosystem around me means there's a ton of code to reuse.
I went from:
* Non-standard junk; to
* PIC, briefly; to
* Atmel (switching to standardized Arduino boards when those came out); now to
* Micro:bit
I'd recommend the same to others. Standardize. The past two decades were Atmel, and I recently switched to Micro:bit. More isn't merrier.
Even within a series, standardize. Pin compatibility, plug compatibility, etc. is all a big deal. The most painful projects are ones where I have a one-off oddball part where I can't find an IDE two decades later. The most pleasant ones are where I have a half-dozen standard Micro:bits at home, and if I fry something, or need a second of something, I can just make it.
Arduino also has a massive ecosystem of code, libraries, IDE's, etc.
Peripherals: Micro:bit has built-in wireless, so you can have the talk to each other. It has microphone, speaker, accelerometer, buttons, simple display, etc. You can do a lot of things without any shields or extra hardware, and for most projects, you just need one. If I'm building a robot, I get a board which can control motors and servos. With Arduino, I need a whole pile of things.
Lessons: Micro:bit also comes with very nice on-boarding for kids, and I do things with kids. Arduino is a half-dozen more steps of impedance.
Are there higher-end boards under the Arduino brand? Yes. Do they share much of anything with Arduino beyond the name? Not really. If the pinout changes, the processor changes, and the only things which stays the same is the brand logo....
> Your time is valuable, so something easier to program may save you time/money even if its a little more expensive.
* It has an ARM Cortex m4 processor (Nordic Semiconductor nRF52833), which is about as fast as my first Windows 95 computer.
* It has 512MB flash, which is better than my 5.25" floppy.
* It has 128kb of RAM, which is the same as my PC Jr.
* It has its own custom radio and Bluetooth, which is better than dialing into BBSes over my 2400 baud modem
... and so on. It's actually a rather capable device, in a kid-friendly form factor.
It's not quite up to the ESP32, but what you lose on capability, you gain on ecosystem. The ESP32 is more a device for people who don't need an Adafruit "How to Choose a Microntroller" manual. It seems like the sorts of people who need an intro guide are better suited to a device with more of a beginner-friendly ecosystem.
Even outside school context it looks amazing to quickly make some IoT or Wearable stuff. Embarking wireless, accelerometer and sound right out of the box is amazing. No more loosely attached cables to extension boards.
Thank you for making me dive into it!