2014. február 28., péntek

DIP form factor ARM - This is sick

Here comes the ARM. To be able to use it in breadbord we need a DIP form factor version.Unfortunately this is not tom much exists.To be honest. Only two type exists:
  • NXP LPC810
  • NXP LPC1114 (one derivative)
The first is a DIP-8 chip, so it is not enough for the majority of applications. The second one is much better.
Nowadays it is a usual thing, that the bigger (in our case 28) pin ICs are hit the market in narrow (300mil) package. This is not the case regarding  the LPC1114. This IC is located in a 600mil package.
There are people who didn't like it.
And there are people, who does something against it:

My opinion: It is sick.

MCU Change - ARM

Because nobody answered to my question, I should do it. So the solution comes here.
First of all, who is manufacturing ARM Cortex based MCU's?
The known ones:
  • Texas Instruments
  • Freescale (aka Motorola)
  • ST Microelectronics (SGS-Thomson)
  • NXP (aka Philips)
  • Atmel
  • Toshiba
So the winner is.... no, no, none of above. I've development kits for four of the above six.
So the answer:
You never heard about it? Sure? And on the name Winbond? You didn't get it either? But you can find components from them in your PC.
And the price?
The type in the example is NUC120LC1BN. And the price is 430Ft+VAT!!! (around $1.50)

2014. február 26., szerda

MCU - The Change

I'm thinking about plenty of new projects and new version of old ones. I feel that the MSP430 not suits anymore.
The aspects lead me to the MSP430 originally are getting irrelevant:
DIP package - I've learned handling, soldering SMD components. I've the knowledge and the source for manufacturing professional PCBs
Unbeatable priced development platform. The TI MSP430 Lanuchpad is still the cheapest one on the market, even it is not $5 anymore. On the other hand the competing manufacturers also speeding up. There is almost no MCU on the market what has no cheap development platform.
The first article what I read on the "Hobbielektronika" portal. It has no relevance now according to the knowledge and experience I've now.
I see if I start anything new (new project) with MSP430 I always facing significant difficulties.
From the hardware side:
Low pin count, missing peripherals. It leads me to use additional components what increase the cost of the project. On the other hand if I use other devices than the value line, the cost of the device and the required development platform will be high.
From software side:
Somebody may smarter than me and found easy solution, but for me the handling of the peripherals (especially the I2C bus) was a nightmare. There is no correct, working driver, and the code in the TI master library was partially usable after a thorough rewriting. I think, I'd like to spend my time to work out my ideas rather than this type of problems.
Because of the reasons above, I'm looking for the solution for a while. I think, I found it.
Pick a project example. Something like the controller of the UV lightbox (but not that). What I need for it?
  • 4 digit 7-Segment LED display (it is 12 GPIO with normal multiplexing)
  • A few button input (let say 4)
  • Buzzer
  • 1 output (to switching the load)
  • 1 input (trigger)
  • Serial communication (over USB)
  • RTC (yes, it will have a clock inside)
  • One, but more likely two timers
  • External 32.768kHz XTAL
  • BSL
A good part of this is not in the MSP430G series. The others (series) are pricy, typically requires state of the art development platforms (the classic Launchpad is not really suits). In addition like it or not, the MSP430 is a proprietary technology. From my point of view I would rather choose an ARM MCU. I did it already.
We can presume that a 32 bit MCU has higher price point than an MSP430 (or even an AVR or PIC).
This is not definitely true. Based on the requirements above I put together a comparison table:

There is two things what I will not tell now. The price and the exact type. You can guess (here in the comments).

2014. február 24., hétfő

Project idea - VU Meter

I'm somehow fiend of the LED bar (or VFD) based VU meters. If it contains more elements it is better. Sometime in my youth (What? I'm still jung!!!) I wanted to build one, I bought a fist of LEDs for it, but it remained a dream. At that time the audio equipments had something like that. For today it is out of stile.
I know exactly that the "thing" has no usage value. But I want one. If I start to build something like that I want an MCU in it and not a bunch of analog circuity.
I think, pick 50pcs LEDs/side and in multiplexed mode connecting to the MCU. I pick the ADC of the MCU and after some rework display the ADC output on the LEDs.
I also need some analog front-end for this.
I guessed that not myself the only fool who want one as a separate equipment or part of something. If I create this, I'll sell it also.
The type of the MCU is not decided yet (or maybe, just I wont tell it to you).
The LEDs are an other question. On the PCB I'd like to have place for three different kind of LEDs:
1. Bargraph. The Kingbright manufactures sutch thing:

This is one option but the price is a high. Based on the color and intensity the prices are around $1-$1.5 for the 10 element bar. The full component cost will be above $15.
2. Separate reactangle shaped LEDs
This can be bought around $0.03 a piece.
The price is the same, but who want to handsolder them???

The idea is to create a PCB what is able to accommodate the all three types (or at least two).

ARM Course 8. - LAB 8

Yesterday evening I've finished the module 8. With this I'm standing at 47% (I need 70%). I still not feel the high level of this course. It take something like ten minutes to write and test the code, the construction of the circuit on the breadboard.
I've documented the result here:

32 Bit, 80 MHz and the LED blinking (my first PC had a 16 Bit 8 MHz CPU with a little more result). The biggest challenge during the construction was that I caught a bug. To be precise, not a bug but a "misprint".
I was looking for the the PE0 pin on the board. Finally I fond. Here:

Check the yellow marked designators! The two parts of the photo displays a part of the top and the bottom side of the Launchpad.

2014. február 20., csütörtök

Project idea - Lightbox

No, no, it is not my UV Lightbox. It is not alike.
I'm creating lot of things. The photos made about it are disappointing. I should put together a "lightbox" for photography. Something like this:
Naturally  I don't want a cardboard frame, but wood. It would be good if it is foldaway, to not consume to much space. The lighting is other matter. It can be something homemade LED based one.

Frequency Counter V2 13. - Populated

In the mean time all of the components (except the screws of the box) arrived.
I assembled one in its final format:

The following will come:
  • Finish the programing connector. I used the pinless, shifted hole programing connector on this design. It is not the first time, but the first occasion when I'll really using it
  • It has a power connector, but I was not able to find a plug to it on the first try at home, so I have to buy one and make a cable to it
  • If the whole stuff working then next will be the calibration
  • The software at 95% readiness level. I've to finish it

2014. február 19., szerda

UV Lightbox 15. - Woodwork continued

It is not finished yet, not assembled, but from this picture can be imagined how it will look like.

ARM Course 7. - Sidenote

Unfortunately I had no time to continue the course material, because my other running projects (Frequency Counter, UV Lightbox, etc.) required some time.
Today I get a letter from Texas Instruments what is related to the course. They announced of the "Cloud Connected" Tiva C Launchpad (what we using for the course). If somebody register, even can win this stuff:

2014. február 17., hétfő

ARM Course 6. - The continuation

Uppps. The previous post also had the same name.
So, according to the facebook page of the course, the continuation will be available within two hours: at 18:00 UTC. The 8-11. chapter.
When I finish at the dentist, I can start to work on it (or maybe I'll do other things, I've plenty of tasks waiting for me).

2014. február 12., szerda

Frequency Counter V2 12. - Status report

Roughly a week ago checked in the gentleman who originally inspired me to advance the development of the second version.
The finished prototype was lying around for roughly two month, but I not really done anything with it. The software was finished, leastwise it was capable for the things what the gentleman asked for.
I wanted to pack it and send it, but the calibration was missing. I was thinking, that I do the calibration and it can go. Here come the hit. I realized, that the software function required for the calibration is missing. It just vanished during the development process.
No, no, I haven't left any code, just I didn't think about the calibration and the operating mode what just counts and displays the pulses of the internal time base without conversion, was not there anymore. In that day no time left to work with it. On the next day evening I added the function. In addition I expanded the code with the fill factor measurement what I was planing just into the final version.
On Friday morning calibrated and posted it.
I found some (mostly cosmetic) software bugs, but on the prototype it will be kept this way.

Incredibly blur, but measuring fill factor:

Additional events:

  • I maid the rough cost calculation and selected the suppliers
  • The Chinese spring festival is now over. On Monday the SeeedStudio sent the PCBs. This coming with DHL, so hopefully it will arrive shortly
  • The "enclosure" finished. The acrylic plates are already at my workshop
  • On the weekend I ordered (hopefully) everything. The parts are coming from the Lomex (local supplier), the Farnell, the TME and some minor things from the eBay. Today I picked up the parts in  the Lomex. It is a rather big package. According the news the Farnell and the TME already sent my stuff. I'm waiting for the courier.
  • I had a little dilemma about the MCU. The actual software now ~1800 Byte. I had to decide to take a chance with the 2K MCU or choose one with 4K flash. The price difference somewhere around 10 cents so I ordered the 4K version.
  • I started to write some documentation. The first version must be finished tomorrow morning because it is waited for.

That's all for now. Continue...

2014. február 10., hétfő

Project idea - Compass

In the Adafruit blog I've seen a Compass what I liked:

In the meantime I've problems with this design. This for me (as most of the Arduino based projects) is an unfinished something. It is good for playing but unusable as a compass. I'd like to create something what I can give into my child's hand. What he/she can show his friends (dad made it). And I may manufacture in small batch.
And I don't want to use the LEDs form the NeoPixel ring.
The idea is the following:
Pick 120pcs 0603 LEDs (let say blue and red). Place them on a round PCB on the edge in two circles. From the blue all lit except one. From the red only one. The center of the PCB will contain the uC, maybe some matrix driver and the magnetometer chip. The back side of the PCB will get the batteries and the on-off switch. The whole thing goes into a round SOB enclosure.

Universal Digital Timer 4. - Proof of Concept

I started the development of the counter. First of all I should proof if I can create a display/button matrix which can handle the two display digit and the two pushbuttons.
I picked the double multiplex display a fist of diodes and pushbuttons and a launchpad.
Here is the result:

I've topped the original expectations 8 digi + 8 pushuttons instead of 2 + 2.

Universal Digital Timer 3. - Restart

This is a story about a project I started long time ago, and about the things a learned and made since. Over a half years ago I started to work on a two-digit display universal digital timer. This project landed quite fast in the bottom of the drawer, because I failed to bring together what I wanted to achieve: http://pakahuszar.blogspot.hu/2013/06/universal-digital-timer-2-project.html
A lot has happened since then :

  • I'm almost ready with the UV lightbox (mostly just some carpentry work missing). The software of this apart from the display and button driver is the same, what needed for this timer.
  • I found and implemented the dual multiplexing principle (http://pakahuszar.blogspot.com/2013/08/double-multiplex-3.html), which not only solves my problem what forced me to suspend the project, but it goes further. It allows me to throw away the digit driving transistors and resistors, decreasing the number of parts (and also the size)
  • Through the serial port not only the programming of the counter will be possible as planed, but also download the firmware (I was not even dare to think about it) - http://pakahuszar.blogspot.com/2014/02/project-idea-msp430-bsl.html
I started to work with it.
I connected the double multiplex test panel to a Launchpad, now with a pinout what corresponds to the counter functionality.I rewrote the code of the display accordingly.Connected the push buttons to the display's nonexistent 9th digit. 
Started to write the code for the push buttons (It is not finished jet). 
Modified the schematics (this is of course still unfinished, but will continue on with the project)For now, that's all.The cable jungle called Universal Digital Timer today:

And the drawing in early stage:


UV Lightbox 14. - Sections from the woodwork

I'm not really a friend of the handheld router (I had in my hands something like 10 years ago with not to much successs).
Based on this it is just ugly from inside:

From outside it looks quite nice:

The pencil drawing is still there and the holes for the buttons are missing.

The standing:
  • All parts of the frame already cut to its sizes
  • The hole for the display almost finished
  • The base plate finished
  • All of the light panels, the power supply, and the mains transformer screwed in.
  • Almost all of the cables in its place

(pictures comes later)

The things are missing:
  • The butttons of the display and the holes for it
  • Plugging of the frame
  • The holes for mains connector and the controller's plugs
  • The metal parts tightens the base plate for the frame
  • The acrylic bench
  • The tightening guides for the bench
  • The top cover and the hinges for it
  • Tightening the controller to the base plate
  • Sanding and varnishing
  • Writing the article :-)

2014. február 5., szerda

ARM Course 5. - The continuation

So I'm not happy. I was looking around on the course forum. The continuation will be released on 13th february.
I can do two things:
  • Wait (do other tings)
  • Start to work on the unofficial material

2014. február 4., kedd

ARM Course 4. - Comments to the Lab 7

The Lab 7 is not about the coding, but about understanding and modifying code written by others.
I read the original and found this:

  GPIO_PORTF_DATA_R |= 0x08;  delay(1);
  GPIO_PORTF_DATA_R &= ~0x08; delay(1);
  GPIO_PORTF_DATA_R |= 0x08;  delay(1);
  GPIO_PORTF_DATA_R &= ~0x08; delay(1);
  GPIO_PORTF_DATA_R |= 0x08;  delay(1);
  GPIO_PORTF_DATA_R &= ~0x08; delay(1);
  GPIO_PORTF_DATA_R |= 0x08; delay(4);
  GPIO_PORTF_DATA_R &= ~0x08;delay(4);
  GPIO_PORTF_DATA_R |= 0x08; delay(4);
  GPIO_PORTF_DATA_R &= ~0x08;delay(4);
  GPIO_PORTF_DATA_R |= 0x08; delay(4);
  GPIO_PORTF_DATA_R &= ~0x08;delay(4);
  GPIO_PORTF_DATA_R |= 0x08; delay(1);
  GPIO_PORTF_DATA_R &= ~0x08;delay(1);
  GPIO_PORTF_DATA_R |= 0x08; delay(1);
  GPIO_PORTF_DATA_R &= ~0x08;delay(1);
  GPIO_PORTF_DATA_R |= 0x08; delay(1);
  GPIO_PORTF_DATA_R &= ~0x08;delay(1);
  delay(10); // Delay for 5 secs in between flashes

Come on! Are you certain? Professionals write code like this? Tell me, this is a joke, not?
At least this. And this barely good enough:

    char i;
    char j;
    char delays[3] = {1,4,1};
            GPIO_PORTF_DATA_R |= 0x08;
            GPIO_PORTF_DATA_R &= ~0x08;

Do not panic. This is not the solution just the rewriting of the code above.
And this is the end of the 7th module. And what's next?
The 8th module is nowhere. To be precise "under development":

2014. február 3., hétfő

Project idea - MSP430 BSL

Did you know that in the TI MSP430 Value Line (G2xxx series), especially the ones which offer 512B RAM in addition to the JTAG and SBW contains a serial BSL (bootstrap loader) ?I didn't. I realized this a few weeks ago. Since then I've an idea that I use in my next project (I've also a project for it now , but it does not belong here).The serial BSL have conditions. The device must be switched to this mode. In order to do this, however, the usual three-wire (RX , TX, GND) serial port is not enough, because you must use the TEST and RESET pins to achieve it.In addition, the problem is that today's computers are no longer has serial ports, and if  it has, the level shifting would be an issue (an addition MAX3232 required as minimum).So what we need is a USB port. The BSL solutions can be found on the internet typically has MCU and use lot of code in it. I thought that I approach the question differently. I'm going to use some USB/UART converter chip, which is able to produce additional signals to these three-wire serial port. It would be obvious to use some FTDI chip, but I haven't found that any what available at low cost.As I'm looking around, found two candidates:
  • Silicon Labs CP2102/2104
  • Microchip MCP2200
Why would they be capable for the task? Because both USB composite devices which in addition to the serial port has a HID device with 4/8 bit GPIO. This can be good for handling the TEST and RESET lines.The first of this two chips are not looks suitable for home made stuff, because the QFN package is not really kitchen table compatible (home soldering). I did not throw it out because it can be purchased as a ready made module for reasonable price (at pololu http://www.pololu.com/product/1308 and of course on eBay as well). On the other hand the second, however, seems to be an absolutely good choice (https://shop.chipcad.hu/Welcome/Default.aspx?scenarioID=360&search=mcp2200&searchShowSaldo=false&type=0) the prices start at $1.4 net.Both have (hopefully usable) PC API so there's no need to bother with the direct USB programing.So the idea of the project is as follows:Create a (two) reference circuit design along with a C# downloader for the MCU programming.

ARM Course 3. - Videos

In the mean time it turned out that the course videos are not only available on the YouTube but also available in the Amazon S3 (my favorite in these days). Here is the full list (just the first 7 module there yet):

2014. február 2., vasárnap

ARM Course 2. - Over the 6th module

I've finished the 6th module, written the necessary code. This module at least gave some useful information and writing the code needed more time than five minutes (it just because I haven't checked some prerequisite in the material).
Now I don't know how to continue. Half of the 7th module already done and I intend to finish it tonight, but no more modules released yet.

Project ideas

Millions of things whirling in my head. I'm thinking about electronic and mechanical projects worth for five years. I'm just starting to develop many of these in parallel, therefore the execution goes slowly or even left unfinished.
I think it would be a good idea just to write down these and when I have something to add just write to it but not start to develop as projects until most of the currently running projects are not finished.
This give the opportunity for the readers to comment it and if somebody needs the product just tell it to me in comment or personal message, the project may get higher priority (I said "may". I can't promise anything right now).