528 points · by asimuvPR · 10y ago · 170 comments
Github repo (Its MIT licensed): https://github.com/kanflo/aaduino
--
What I really liked about this approach is that it makes packaging the "Arduino" inside a common battery holder very easy. Maybe one or two holes are needed to connect sensors and you have a pretty nifty enclosed "Arduino". What we now need is someone to build a battery enclosure with exposed poins. Anyone from Adafruit, Tindie, etc. here? :)
With the low price of something like the Pi Zero which is running a full version of linux, or something like the Esp8266 which can run many different languages, you're basically paying shipping costs. What benefit does arduino have in this future, other than a large existing network, which I understand can't be overlooked as a strength.
That's the difference between having to change a couple AA batteries every day or two (Pi Zero) and running for a year off of a coin cell (Arduino).
Here's an article on power consumption of an Arduino Pro Mini: http://www.home-automation-community.com/arduino-low-power-h...
Here's one on Pi Zero power consumption: http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi...
You'd have to deal with different architectures and a lot of headaches, but it's the idea behind ARM's big.LITTLE, where you pair high-perf high-power and low-perf low-power cores. So your tablet's SoC might have a ~200mW A53 for mostly-idle use with a ~1W A72 for more active "high-performance" work loads. And the only additional hardware is the additional cores and the interconnect, the SoC is shared between "low-perf" and "high-perf" cores, which probably wouldn't be the case for an arduino/arm mix.
The Arduino is underpowered for anything more than a supervisory role, and even those applications are tending towards Cortex-M series.
Maybe that can be worked around? eg if updating only a small area. Or as a second display for docs.
see also: https://arduinohistory.github.io/#when-did-arduino-begin-and...
Not just the timing is critical, also the failure causes (and modes) are far bigger in number when running an OS.
E.g. if you properly code in C or ASM for a microcontroller and avoid things like recursion, it's very hard to crash due to OOM errors.
- DRAM refresh
- cache hits/misses
The AM335x has a pair of "PRU" units on the die, that are roughly little microcontrollers that have access to the main ARM's memory.
So, you can write to main memory from Linux, jitter and all, and then let the PRU stream it out to anything that needs high speed, predictable data.
This guy put a BB black inside an old MAC SE, and is driving the CRT with the PRU...very cool: http://www.nycresistor.com/2014/02/02/30th-anniversary-mac/
Very cool project, thanks for linking!
Not saying running on the bare metal is worthless, but an Arduino is a really low end board.
Microcontrollers like the Arduino/Atmel are perfect for situations where you need to guarantee that some signal will be asserted exactly 250 (no more, no less) nanoseconds after some other external event, _no_matter_what_.
Since there's usually no OS running on something like an Arduino, you're basically forced to write very deterministic event driven programs. Also, since most (maybe all) instructions on those Atmel microcontrollers execute in a single clock cycle, you can easily dissect your C functions and know exactly how long they will take to execute.
I wouldn't trust Linux for such an application even with a "real time" scheduler.
Linux as a RTOS certainly has it's place, but it's best left for systems that can actually benefit from the added complexity.
For most typical microcontroller projects, the extra features of a full Linux kernel would just get in the way.
Note: There's nothing stopping someone from using a RPI in such a way as well (bare metal), but they are really geared for more complex applications, so there isn't as much support in that area. Also, the hardware is probably a little more complex. Therefore, my statements assume we're comparing an Arduino to an RPI running Linux.
Just because it's slow doesn't mean you can't predict what's going to happen, they're two separate issues.
Does an architecture (ARM / AVR / x86) limit the possibility of writing real-time code if the code is the OS, and just runs on the bare metal?
Your program would run in ring 0, be the only "process" and have full access to RAM. You decide whether you want to handle interrupts or not. (I assume there's a way to select what interrupts you want to handle.)
[1] For e.g., this tutorial explains how to write a basic x86 kernel: http://www.jamesmolloy.co.uk/tutorial_html/
The Pi Zero is the next thing over from vaporware. I know some people who have a few, but all of the official vendors linked from https://www.raspberrypi.org/products/pi-zero/ are either out of stock, or have "limit one per household."
I'd been having trouble figuring out where to source the BCM 2835 SoC that powers the Zero, and there's (allegedly) a reason for that: https://olimex.wordpress.com/2014/08/28/who-fears-from-the-c...
I really like that bigger better tiny hobby computers are being developed, but the things you mentioned - running Linux & many different languages - don't appeal to me the same way Arduino does. Adding modern day benefits like tons of memory or 3D display means I'll be just programming, like I would at my day job developing console games. With the Arduino, on the other hand, I'm always hacking.
Yes it has sleep modes, but they are not as deep as the arduinos, and require work to make them effective.
Altough as a prototyping platform, i can understand how javascript would be more appealing. And for production, even by startup, the Arduino is far from ideal, mbed is much better.
And things like the Beaglebone Black have better real time capabilities but as someone who has worked with BBB for over a year now, it is so horrible to develop for I almost cried.
Embedded Linux is pretty bad for hacking, but it's pretty good for industrial controllers and other "solved" problems. Microcontrollers are still the way to go.
Charging Non-cobalt-blended Li-ion
While the traditional lithium-ion has a nominal cell voltage of 3.60V, Li-phosphate (LiFePO) makes an exception with a nominal cell voltage of 3.20V and charging to 3.65V. Relatively new is the Li-titanate (LTO) with a nominal cell voltage of 2.40V and charging to 2.85V. (See BU-205: Types of Lithium-ion.)
Chargers for these non-cobalt-based Li-ions are not compatible with regular 3.60-volt Li-ion. Provision must be made to identify the systems and provide the correct voltage charging. A 3.60-volt lithium battery in a charger designed for Li-phosphate would not receive sufficient charge; a Li-phosphate in a regular charger would cause overcharge.
I've looked in to little tumble generators (I don't know the actual term, something that could generate power off of movement) but again, my knowledge is lacking in that department.
Would make for neat little animal tracking devices, if they could generate power from movement, store in a battery, and then 'pulse' out on a regular interval (whatever interval is allowed by the generation from the shake/tumble generator).
A lot depends on how often you actually need to gather GPS data, and how often you need to report it. A GPS can use a relatively large amount of power while first getting a fix, but then updating that fix later, if it hasn't moved too far, will use a lot less power.
The datasheet for a GPS module should tell you the power consumption during various operations, and how long those operations can take, so you can figure out the power needs for a given updating schedule.
You could probably do some clever things, like include an acceleration sensor and only update the GPS when you infer from the acceleration sensor that you've moved.
Similar considerations apply to reporting data. Frequent reporting will use more power than saving up the data and sending it one bigger batch, because there is overhead in setting up a connection to whatever you are reporting to.
There are commercially available GPS trackers that run for two weeks on two AA alkaline batteries or three weeks on AA lithium batteries. I don't think the ones I saw reported wirelessly...they were the kind you have to retrieve to get the tracking log, but this suggests that an AA GPS tracker with wireless reporting with enough runtime to be quite useful is feasible for a lot of applications.
Everything seems to have disappeared. What happened?
This would be a great way to prototype a simple wearable project that doesn't use wireless radios.
See for more info on this: http://www.digitalsmarties.net/products/JeeNode
I recently bought teensys (or teensies?) to get smaller (a little to wide for AA slots though): https://www.pjrc.com/teensy/teensyLC.html Given the cost you might want to try to sand of one side of connectors to make it fit :)
So you can swap out one part to interchange between BLE or Wifi.
I appreciate what arduino has done, but at some point it's too much.
There's nothing "basic" about the hardware itself: you can at any time switch to C and compile with gcc, just like for any Atmel chip.
Great guide here on how to do that. https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
If you want even more control, you can just use the avr C libraries with any atmega328, Arduino included.
It's sort of similar to how Python runs on top of C. To the processor, it's all the same. It had no idea that you wrote your application in C or Python. They both end up as machine instructions.
Production-ready examples that are so much more capable than Arduino:
TI MSP430/43X
Cypress PSoC 4/5/whatever (these guys are pretty schmick)
Atmel ATMegas, the chips behind Arduino.
PICs
http://www.seeedstudio.com/blog/2013/07/05/smallest-arduino-...
Am I missing something, or is this just your average TC article?
The author is just marveling at this novel / nonobvious form factor, and referencing this bit as elegant / cool / new:
> The + and – markings on the PCB indicates (this is important, read carefully) the positive and negative poles of the battery we are pretending the AAduino is. [...] Also note! If you want to power the AAduino from a bench power supply, connect the power supply’s black negative lead to the + marking and the red positive lead to the – marking.
Typically your electronics have polarity labelings based on which end of the battery they'd connect to - e.g. you'd have a red wire going from the positive terminal of the battery to the positive terminal of the device being powered, which this paragraph is warning is not correct for the AAduino because it's labeled as a battery would be instead.
https://en.wikipedia.org/wiki/Arduino#Trademark_dispute
I guess this serves as a cautionary tale, illustrating the power of a well-known brand and what happens when you lose control of it.
It happens to be the largest development community in the world for 8 bit microcontrollers.
It only makes sense that people who want to give their projects maximum visibility would use arduino, and not genuino. The top comments in threads about genuino would just be people talking about the name dispute, not the actual project.
[1] http://picolisp.com/wiki/?PilOS
[2] http://www.futurlec.com/ET-STM32_Stamp.shtml
[3] https://github.com/simplemachines-italy/hempl
[4] https://www.parallax.com/microcontrollers/propeller-1-open-sourceI wonder how all the cheap-ass Android device makers get BT(LE) running... or wait, often they don't and the user is screwed...
Just like any networking stack, there's a decent learning curve, but its not like it requires any fundamental tool foreign to firmware development. On the other hand, your average arduino tinkerer has been handed so much abstraction of low level details, learning BLE, at least on the device side, would be a tall task.
Specific implementations of stacks and sdks will obviously vary in quality and documentation. On the device side, Nordic does a very good job with tools and documentation for their parts. There are several companies that make modules with nordic parts and provide libraries and example projects.
I've also used noble, which is a node js module that allows you discover and connect to devices. On a Mac, all you need is Xcode.
The documentation is a bit on the weak side, but it's small, easy to use, and low-power (~1.3mA @ 3V connected, ~0.2mA advertising)!
I recently used one to make a BLE smartwatch that uses my iPhone as a network connection (http://workhardanywhere.com/smartwhatch)
It is based on a single-chip wireless microcontroller that has both support for both BLE and IEEE 802.15.4 (6lowpan/ZigBee). It is supported by the Contiki OS (http://www.contiki-os.org/). The learning curve is probably quite a bit steeper than that of an Ardiuno, but the board and the chip can be readily included in commercial products. There are reference designs with design files, BOMs, schematics available from TI.
Since it has both BLE and 6lowpan support, you can do some pretty nice things with it, such as providing both quick discovery via smartphones and secure remote access: http://www.thingsquare.com/blog/articles/proximity-control/
http://www.cypress.com/documentation/development-kitsboards/...
FCC Certified, how neat! It's got a tiny CPLD on it with programmable analog routing logic as well (DACs, ADCs, op amps).
I was trying to use one of these to drive my Nixie Tube Clock and using the CPLD to do the multiplexing in hardware but I accidentally touched 12V on one of the pins and it blew up :(
I read that with a Boston accent
Kinda wish I was better at stuff like this, maybe I should begin playing around with my Arduino again.
Edit: well that didn't work. URL changed back from http://johan.kanflo.com/the-aaduino/.
(We detached this subthread from https://news.ycombinator.com/item?id=11538219 and marked it well off-topic.)
> Error establishing a database connection
I'm never sure quite what to do in this situation. It depends on what the author would want.
Maybe a web archive link? You are always on top of things dang!