Question Designing undergraduate course - what's the most robust microcontroller?

Apr 26, 2019
3
0
10
0
I'm redesigning an undergraduate introductory circuits course. In the course students design and build an analog front end amplifier, pass it through an ADC, and process the data with their computers. Initially we used the raspberry Pi 3B, which had pretty easy integration as we can give them an image which they can download and put onto their sd card and basically plug and play. The device was also pretty robust. Unfortunately, it did not have a shield on the wifi unit, which resulted in a ton of noise on their boards. We moved to the 3b+, which shields the wifi noise, however we discovered that the 3b+ bricks whenever any combination of GND, 5V, or 3.3V pins are shorted, which will happen frequently because they're students. On the 3b these shorts would shut down the device, but would not permanently damage it.

What's a cheap, robust microcontroller that we could use? I'm thinking specifically of the Arduino Uno or Micro. These have the ADC built in, which removes some complexity and cost of the project. Does anyone know what happens if the students short the power supply pins on these devices? How easy are they to brick? Do they have any significant noise sources? How well does arduino work with python (which is the language most of the course materials exist in)? Almost all of the students will power the devices with a USB port, which should have some measure of protection built in.

EDIT: also, any thoughts on the RPI zero w?

Thanks in advance
 
Last edited:
I'm no expert, but I'll mention that in one of my courses we used a PIC microcontroller (think it was the pic16f877a) and from what I remember it was pretty robust. Pretty sure I shorted some of the pins multiple times and it kept on ticking.

Couldn't you just stipulate that the students must use an external ADC rather than the built in one(s) if you want to keep that aspect of the project?
 
May 18, 2019
17
2
15
0
I'm using Arduino Nano's outdoors in what I thought would be waterproof boxes. Turns out, not so, plus the humidity frightful. I am experienced and careful and I still screw up power and ground. I have not bricked one, though I did cause one ADC port on one Nano to permanently fail. Ten nanos, 1-1/2 years. That said, I having taught similar classes; students are more brutal.

I have sucessfully and usefully used SDcard adapters, Bluetooth, nRF24 radio, LM35 & DHT temperature sensors, etc. I have not used Arduino with WiFi because it appears to me that Arduino file handling takes up a lot of code space.

Here's the good thing, from time to time you can get [knock-off] nano's on Aliexpress for a buck. (Shipping, though, is usually 20 to 60 days!) Still, at a $2.50/each, you don't have much to lose.

You can also get USB chargers ridiculously cheap, too; they have anemic, horribly regulated 5v, but are perfect for the nano. My configuration uses an nRF24 radio and these haven't been bothered by noise. I'm sure WiFi adapters can be found on Aliexpress, too.

I would caution you, again, that these are probably knock-offs (license not paid) and you may get some that are not manufactured well. I recently saw that official Nano's are ten bucks.

There is a program called GoBetwino that runs on Windows and allows the Arduino to write to a file. I wrote a python version; while it works for me, it is not particularly robust (needs work). I have tested it on Windows, Linux and RPi3B+ over USB and Bluetooth (the Bluetooth really needs work on Linux/Rpi; doesn't like it when the Arduino reboots)

Plus, Acceptably robust, cheap, easy to program, versatile.
Minus, limited code space, no file handling, requires a host.

Note: if you are going to teach Watch Dog Timers on the Nano, you'll have to reflash the boot loader from Nano to Uno. (maybe they fixed this bug in the new ones.)
 
Apr 26, 2019
3
0
10
0
I've looked into the python for arduino, and it appears to be not worth the effort.

I've been working on timings of the ADC, and I've noticed that the default AnalogRead() on the arduinos is terribly slow. I've been timing it in at 500 us, and can be pretty variable. For two analog channels this is a max of 1 kHz sampling rate, not accounting for time for data processing. This is probably too slow for the project. I've found some SAMD21 modified SparkFun boards which can be modified to read faster, about 60 us, significantly better. It looks like these boards will allow the project to be greatly simplified (at least regarding the microcontroller, which is ideal since the point is the analog circuit design). Likely these boards will not be more robust that the Pis, but at the very least they are cheaper to replace and easier to setup than the 3b+.
 
May 18, 2019
17
2
15
0
I agree with your assessment. Learning and running both Python and C++ would be a bit much, as the structure of the languages are so different. This would significantly diminish the effectiveness of teaching analog circuits.

You could make the 3b+ easier to set up by creating an image of your SD card and just copying the image to the new or corrupted 3b+'s SD card.

Best of luck with your effort.

OSD
 
May 18, 2019
17
2
15
0
I am unaware of a Python, or even a compiled Python, that runs on the Arduino itself. I use the Arduino IDE to: develop C++ code, compile the code for the target: and then download it. My host to do the file handling for the Arduino is a RPi3B+ running Python. I have yet to decide if the system control will be on the Arduino or the RPi3B+, but I think the latter will be the better choice.

My application is measured in seconds and minutes. I am developing a system to control water pumps to keep seep water from under my house and redistribute it to places where it is useful. I live in a desert and the seep is a blessing for which I am thankful, but a curse to which I must attend.

The data are water levels and times between "full: and "empty" of cisterns. I use the data to control the pumps and evaluate the health of the system. And from this I can develop a maintenance schedule. Once this system is working to my satisfaction, I will use the water to create a micro farm (aka "liberty garden")

Because of the harsh environment, wires, even those protected by conduit, should be minimized to reduce failures. At the moment, I'm trying to get the system to be wireless. When there is a failure, I replace a module instead of replacing many meters of underground wire.
 

ASK THE COMMUNITY

TRENDING THREADS