tag:blogger.com,1999:blog-341278299684735762024-03-05T12:46:17.714-08:00eLuaBrainA technical blog built around an eLua based stand alone computer.Bogdan Marinescuhttp://www.blogger.com/profile/18363389681156042026noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-34127829968473576.post-51529620456692875462012-01-30T06:13:00.000-08:002012-01-30T06:14:25.176-08:00eLuaBrain repository now availableThe public eLuaBrain repository is now online:<br />
<br />
<a href="https://github.com/bogdanm/eLuaBrain" target="_blank">https://github.com/bogdanm/eLuaBrain</a><br />
<br />
Kind of messy (this is my work tree and wasn't really meant for other eyes :) ) but it should be fine for now.Bogdan Marinescuhttp://www.blogger.com/profile/18363389681156042026noreply@blogger.com0tag:blogger.com,1999:blog-34127829968473576.post-4481261910013357272012-01-21T10:15:00.000-08:002012-01-21T10:15:47.458-08:00eLuaBrain @ FOSDEM 2012eLuaBrain is going to be presented at FOSDEM 2012:<br />
<br />
<a href="http://fosdem.org/2012/schedule/event/eluabrain_educational_computer" style="background-color: white; color: #406480; font-family: arial, sans-serif; font-size: 13px;" target="_blank">http://fosdem.org/2012/<wbr></wbr>schedule/event/eluabrain_<wbr></wbr>educational_computer</a><br />
<br />
If I can secure the right equipment, I'll make a live demo. In any case, if you're around Brusells on the 5th of February ... you know what you have to do :)Bogdan Marinescuhttp://www.blogger.com/profile/18363389681156042026noreply@blogger.com0tag:blogger.com,1999:blog-34127829968473576.post-68659113732334210052011-11-26T07:17:00.000-08:002011-11-26T07:17:49.037-08:00A quick note regarding the hardwareAfter receiving a few questions about <b>eLuaBrain</b>, it is clear that I need to clarify something: <b>eLuaBrain </b>is just a prototype at the moment, it does not <b>NEED </b>a STM321E-EVAL board in order to function. A number of people wrote to me, complaining about the high price of the STM3210E-EVAL board (which is absolutely true). But the reality is that I used this board only because I already had it around and it has all the peripherals I needed (actually it has too many, I had to remove some resistors/capacitors to free some GPIO lines), plus a couple of very convenient header connectors for all the MCU pins. <b>eLuaBrain </b>needs only a small subset of the hardware on the STM3210E-EVAL:<br />
<br />
- the MCU<br />
- the external SRAM<br />
- the serial port<br />
- the SD/MMC card connector<br />
- the 3.3V voltage regulator<br />
<br />
(I hope I'm not forgetting something).<br />
<b>eLuaBrain </b>is not even restricted to a particular MCU or even a MCU family. While some of its code is specific to the STM32F103 MCU, porting it to another STM32 MCU or another Cortex-M3/M4 core from other manufacturers (like NXP or TI) or even another architecture altogether shouldn't be too difficult (although my personal preference is a Cortex-M3/M4 core). Actually, using a MCU that has an integrated Ethernet subsystem would make more sense, as it would reduce the overall system cost and power consumption. There are a lot of possibilities here. As always, I'm curious about your oppinion. What would be <b>your</b> MCU of choice for <b>eLuaBrain</b>?Bogdan Marinescuhttp://www.blogger.com/profile/18363389681156042026noreply@blogger.com6tag:blogger.com,1999:blog-34127829968473576.post-24781744595598162182011-11-24T04:42:00.000-08:002011-11-24T04:42:05.037-08:00Brainz, brainz ... braaaaaaaaainz!...but fear not, this is not another zombie story. <b>eLuaBrain </b>is a fully autonomous computer build around <a href="http://www.eluaproject.net/" target="_blank">eLua</a> on the software side and a <a href="http://www.st.com/internet/evalboard/product/204176.jsp" target="_blank">STM3210E-EVAL</a> (an excellent development board for a STM32 (Cortex-M3) CPU from <a href="http://www.st.com/" target="_blank">ST Microelectronics</a>). In short, it is a 32-bit computer with a PS/2 keyboard input and a VGA (text only for now) video output that can be used for interactive program development. Or, graphically speaking:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4AUGunWwu7dzKJhZGcKeqhh8qY-FavT9wW_cXDDxhbjhr3kgi6O_qr9Om13Be69Y-Tl1TdSPqaSGAXWdZEoYeu01CZ1fy_apwWiNTT2fpF0D_l58t3Khyphenhyphen7M5Cb3RNhhiOa0gmIXzmQ/s1600/mainlogo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4AUGunWwu7dzKJhZGcKeqhh8qY-FavT9wW_cXDDxhbjhr3kgi6O_qr9Om13Be69Y-Tl1TdSPqaSGAXWdZEoYeu01CZ1fy_apwWiNTT2fpF0D_l58t3Khyphenhyphen7M5Cb3RNhhiOa0gmIXzmQ/s400/mainlogo.png" width="400" /></a></div><br />
<b>eLuaBrain </b>is the little board with green and red LEDs on the right of the image. It connects to the black PS/2 keyboard and outputs VGA text to the monitor. The oscilloscope (gray box on the left side) is not part of <b>eLuaBrain</b>.<br />
<br />
I built it with two main purposes:<br />
<ol><li>to fulfill an old dream of mine (some insist to call it an "obsession" for some reason): designing and implementing a fully functional, reasonably featured computer based on a MCU (rather than a "classical" CPU system). The recent explosion of 32-bit MCUs made this finally possible.</li>
<li>to enter it in a EBV/ST Microelectonics design contest. I did that, but I didn't get any prize. On the bright side, the contest rules forced me to write quite a bit of documentation for the project, so whoever decides to take a closer look at <b>eLuaBrain</b> will probably have a good starting point. Some entries on this blog will be also based on the contest entry. You can download the full entry <a href="http://old.eluaproject.net/other/entry00138.zip" target="_blank">here</a> (file size is about 10M). </li>
</ol>(A quick note: if you open the entry files, you'll notice that the "official" name of entry is <b>STMBrain</b>, not <b>eLuaBrain</b>. This was just a publicity stunt (since one of the contest organizers was <b>ST Microelectronics</b>). <b>eLuaBrain</b> is not "tied" to a particular hardware, it can be implemented and run equally well on a large variety of MCUs and development boards. <b>eLuaBrain</b> is also a bit more descriptive (from a semantic standpoint), so I'm going to stick to that from now on.)<br />
<br />
Why did I choose to start a blog focusing mostly on this particular project? I happen to think it has a few strong points (then again, I'm obviously biased) that could make it interesting for some people. To quote from the entry's <i>abstract.doc</i> file: being a generic development platform, <b>eLuaBrain </b>can be used in lots of practical applications, but it was design around two main usage scenarions:<br />
<ol><li><div style="margin-bottom: 0in;"><b>educational computer</b>: <b>eLuaBrain</b> can be an excellent tool for students trying to learn about computer science and/or hardware design. Modern computer hardware is simply too hard to understand even for people with some computer knowledge, while most modern programming languages exhibit a growing trend of hiding as much about the hardware as possible. By contrast, <b>eLuaBrain </b>offers the full experience. Its hardware is quite easy to understand and it can be easily interfaced with other hardware (which might be a problem on a PC); at the same time, eLua offers APIs that can access the hardware at very low level. Learning about the software and hardware <i>in parallel</i> gives a student a much better idea about the software-hardware interactions, which in turn tends to develop better professionals. At the same time, learning about programming on a platform with relatively low resources forces the future programmers to consider resource allocation and optimization techniques which again leads to better programmers. All these make <b>eLuaBrain</b> a good tool for education in all markets.</div></li>
<li><div style="margin-bottom: 0in;"><b>automation controller</b>: <b>eLuaBrain</b> can act as a controller for a large number of automation tasks, ranging from home automation to industrial automation. Its main strenghts are the power of the STM32 CPU, the ability of being programmed on-the-fly, the built-in help system, the radio interface and the large number of peripherals available via its extension connector. It can replace a PC as an automation controller in the many cases where the full power of a PC isn't actually needed, but a better alternative is either not available or very expensive. Compared to a PC, it brings simplicity, reliability (a simpler system is almost always more reliable than a complex system), lower cost and lower power consumption. </div></li>
</ol>Phew, lots of text here. I bet everybody's waiting for some actual action by now, so here it comes. First you have a demo of interactive program development on <b>eLuaBrain</b>, featuring the integrated text editor, online help system and other goodies:<br />
<br />
<div align="center"><iframe allowfullscreen="" frameborder="0" height="308" mozallowfullscreen="" src="http://player.vimeo.com/video/28887627?title=0&byline=0&portrait=0" webkitallowfullscreen="" width="410"></iframe></div><br />
Following is a video of most of the demo programs I wrote for <b>eLuaBrain</b> as part of the contest entry (there are a few not included here, but still you should get a pretty good image about the capabilities of <b>eLuaBrain</b> after seeing this):<br />
<br />
<div align="center"><iframe allowfullscreen="" frameborder="0" height="300" mozallowfullscreen="" src="http://player.vimeo.com/video/28886601?title=0&byline=0&portrait=0" webkitallowfullscreen="" width="400"></iframe></div><br />
If this made you curious, you can find below a complete list of the <b>eLuaBrain</b> platform capabilities:<br />
<ul><li><div style="margin-bottom: 0in;"><b>built around the STM32F103ZET6 </b>MCU from ST, an extremely powerful Cortex-M3 MCU with an impressive list of on-chip communication interfaces and peripherals.</div></li>
<li><div style="margin-bottom: 0in;"><b>1MB of external RAM memory </b>allows large, complex programs to run on the <b>eLuaBrain</b>.</div></li>
<li><div style="margin-bottom: 0in;"><b>PS/2 connector </b>for any PS/2 compatible AT keyboard.</div></li>
<li><div style="margin-bottom: 0in;"><b>high speed VGA video interface</b>: 80x30 characters (original DOS CP437 charset), 16 colors, built around a Propeller microcontroller.</div></li>
<li><div style="margin-bottom: 0in;"><b>TCP/IP connectivity </b>using the ENC28J60 Ethernet to SPI bridge.</div></li>
<li><div style="margin-bottom: 0in;"><b>high speed, low power wireless interface </b>(based on the nRF24L01 chip) for easy wireless communication with remote equipment.</div></li>
<li><div style="margin-bottom: 0in;"><b>microSD storage </b>for storing <b>eLuaBrain</b> programs and data.</div></li>
<li><div style="margin-bottom: 0in;"><b>an extension connector </b>for external daughter boards that allows connections to GPIO pins, ADC, SPI, I2C, UART, CAN, timer compare outputs and others.</div></li>
<li><div style="margin-bottom: 0in;"><b>UART connector </b>with standard RS232 logic levels.</div></li>
<li><div style="margin-bottom: 0in;"><b>simple sound generation </b>on a small speaker using PWM signals.</div></li>
</ul>And yet another list of <b>eLuaBrain</b>'s awesome features (Taken directly from the contest entry's <i>abstract.doc</i> file):<br />
<ul><li><div style="margin-bottom: 0in;"><b>low cost</b>: the <b>eLuaBrain</b> prototype comes as a "shield" over a STM3210E-EVAL board, but it can be produced on a dedicated PCB at low costs in large quantities, making it a compelling option for emerging economies and educational facilities in general.</div></li>
<li><div style="margin-bottom: 0in;"><b>low power consumption</b>: the STM32 along with its peripherals and the <b>eLuaBrain</b> additional hardware consumes much less power than a desktop PC or even a laptop.</div></li>
<li><div style="margin-bottom: 0in;"><b>completely open source design: </b>both the hardware and the software are open sourced, released under the very permissive MIT license which allows unrestricted use in both commercial and non-commercial projects.</div></li>
<li><div style="margin-bottom: 0in;"><b>optimized for developing</b>: based on the eLua project (<span style="color: blue;"><u><a href="http://www.eluaproject.net/">http://www.eluaproject.net</a></u></span>) that makes the popular Lua language (<span style="color: blue;"><u><a href="http://www.lua.org/">http://www.lua.org</a></u></span>) suitable for running on MCUs, <b>eLuaBrain </b>is capable of running Lua <i>source</i> files directly on the STM32 CPU. Also, eLua is optimized for low memory devices, so it will make sure that the memory on the STM3210E-EVAL board is put to good use.</div></li>
<li><div style="margin-bottom: 0in;"><b>built-in editor</b> allows for very easy editing of source files.</div></li>
<li><div style="margin-bottom: 0in;"><b>built-in interactive help browser</b> makes programming a breeze. API help is available from the shell, from the editor or from the Lua interpreter. Whenever you forget the name, arguments or return result of a function that you need in your program, just ask the integrated help system. </div></li>
<li><div style="margin-bottom: 0in;"><b>instant boot</b>: forget about having to wait for an OS to load before being able to use your desktop. <b>eLuaBrain </b>boots in less than one second.</div></li>
<li><div style="margin-bottom: 0in;"><b>access to a large number of peripherals </b>directly from Lua: GPIOs, I2C, UART, SPI, timers, CAN and others.</div></li>
<li><div style="margin-bottom: 0in;"><b>optimized TCP/IP stack </b>lets network applications run on little memory.</div></li>
<li><div style="margin-bottom: 0in;"><b>easy to interface with other hardware </b>via the extension connector.</div></li>
<li><div style="margin-bottom: 0in;"><b>multiple file systems for easy storage</b>: FAT on SD/MMC card, ROM file system inside Flash, UDP-based network file system with automatic server detection.</div></li>
<li><div style="margin-bottom: 0in;"><b>runs with cheap hardware</b>: <b>eLuaBrain </b>needs a PS/2 keyboard and a standard VGA (640x480) monitor to run. These can be found at very low prices today. With a low cost VGA to PAL/NTSC adapter it can also use an old TV instead of a VGA monitor.</div></li>
<li><div style="margin-bottom: 0in;"><b>comes with an extensive set of demos </b>that covers a lot of topics (network connectivity, peripheral communication, algorithms, a Web server, radio controlled RGB lights and of course games) and can be a good starting point for future applications.</div></li>
<li><div style="margin-bottom: 0in;"><b>good community support </b>via the eLua communication channels (mailing list, IRC, wiki).</div></li>
</ul>Hopefully you'll find all this at least remotely interesting. If I get enough feedback, I'll continue posting and working on this. I'm very curious to find out what people think about this concept. Also, please keep in mind that <b>eLuaBrain</b> is far from being complete; it can be improved and extended in counteless ways.<br />
One more thing before I finish this first (long) post: the software and hardware are fully open source, no restrictions at all (not even commercial ones). The software is already licensed under MIT/BSD, I don't know what license to choose for the hardware (I'll take a closer look on that), but it will definitely be a very liberal one. If MIT is also appliable to hardware design, MIT it is.Bogdan Marinescuhttp://www.blogger.com/profile/18363389681156042026noreply@blogger.com15Bucharest, Romania44.437711000000007 26.09736699999996344.334004000000007 25.966206999999962 44.541418000000007 26.228526999999964