Author: electrolonda

Sorting integrated circuits

Today I received an order of compartmentalized plastic boxes for sorting things into. And so I sorted what I have so far. Some compartments are empty because the chips are still in my shopping cart at Digikey. And some are in the mail on the way here from China (Aliexpress).

Small compartments but can pack up to 20 chips into one if its just packed well. If thats not enough then the dividers can be removed to expand compartments sideways. The horizontal dividers are fixed. Vertical dividers on the compartment right at the lock mechanism is also fixed. But all in all, a cheap, neat, easy solution for sorting integrated circuits.

logics

Link to the Aliexpress item. Shipping took 19 days from China to Sweden by China post registered air mail.

BreadLED, again

My second attempt upped the neatness factor a little bit. I also changed the resistor to 2kΩ to dim the led a bit and maybe save a bit of power.

Top one is first attempt, bottom one is second attempt.

nr2_breadled1nr2_breadled2

Chinese chip connection…

“Psst. Hey dude. Over here…”

A chinese man in the shadows beckons me to come over. When I do, he opens his coat to show me the lining covered with little bags full of INTEGRATED LOGIC CIRCUITS.

The mans name is Ali. Ali Express. And while he claims his goods are the best, straight from the factory, it can sometimes be something entirely different. But, most of the time it gets the job done.

Ali has been my supplier for a while now. Sometimes his wares are scruffy but it’s usually not an outright disappointment.

Today he dropped another small bag at our secret drop box. It was filled with… well, see for yourself. Plastic cases or foam was not included ofcourse. Alis wares usually comes wrapped in horrible kitchen plastic foil. Cringeworthy stuff having near static sensitive devices. But hey, it’s cheap.

All of this for 11 dollars, 13 cents. Shipping included. But Ali made a mistake this time, I only ordered and paid for 2x ATTINY85s, but I received 5x.

My uncle also dropped by today and left a few (three) PIC16C84-04/P chips as well. So now I’m all set up with MCUs for a while. No more excuses, it’s time to get around to doing something useful…

chipgood1

Breadboard prepped LED´s

Always with the breadboard tinkering you want to throw in an LED here and there to give visual cues about whats happening but always there is that pesky need for a current limiting resistor.

Well, here is my take on a solution for that “problem”.

First you cut one leg off the LED, solder the appropriate resistor on there, then solder the two legs onto a header pin pair; thus…

ledresist

And then, to add stability and to prevent the legs from being shorted together, enter the hot snot magic dispenser…

ledsnotted

Ofcourse this doesnt look very neat, which is why the final step is to squeeze on some heatshrink tube…

ledtubed

Ideally a speck of paint should be applied on one of the header pins to highlight the polarity of the LED but I dont have paint laying around right now, so its good enough for now.

And please dont complain about how ugly the soldering and snotting is. Im doing the best I can with only one functional hand (yes Im disabled). If you like the idea it’d be cool to hear and see if you made your own.

Aliexpress woes

Up until now I havent had any problems with my orders so I thought Aliexpress was way cool. But now Ive had a couple of orders just not arriving and seller claiming “oh please! we shipped it!”

Its time for me to learn how to shop safely. For starters, picking the free shipping packages is probably not a good idea. Free shipping doesnt come with tracking so the seller can simply say they shipped it and then I guess you are screwed.

And then taking as much screenshots and notes as possible to present as evidence in case of a dispute.

Or maybe I should just stop using Aliexpress unless there is no other option. But still, its very hard to beat their prices for some things…

Update February 22nd,

Yesterday I complained and worried, today both over-due packages arrived. Have I just been lucky or are electronics sellers on Aliexpress more honest than the others. To date, Ive received everything I ordered. Only two have been late.

Time to learn

Now the time has come for me to dig up an old corpse and give it new life. The corpse in question is twsinit from Bizarre Sources, a project where I once crammed the whole init program in Linux into 1 page of memory.

You see, any program that runs has memory allocated to it for things like code, data, stack, environment, etc. The normal size for init in Linux is about 1-1.5MB in memory. But the init process really only needs to do one job; it inherits all orphan processes and thus has to take care of its “children” terminating. Otherwise they turn into zombie processes.

To do that job you really dont need 1MB of code. So I wrote a program from scratch called twsinit that can do the job of starting the system and buring zombie processes. The last official release did the job in two pages of memory, 1 page code and 1 page stack. But another version after that did away with the stack page as well.

So right now Im digging around in my old code, relearning how it works, and then I need to move on to learning ARM assembly and calling conventions in ARM Linux. Shouldnt be too difficult.

Optimizing the LedControl library

vlcsnap-2017-02-05-23h54m51s351.png

After hooking up eight LED matrices in series, I could see that the LedControl library wasnt up to the task. After digging through the source code I realized what a peice of junk it was.

I had to do better myself. And did. I even ended up writing my new routine in assembler. Better optimized than even the code gcc managed to produce.

Source code in the form of an Atmel Studio project,
is available here: http://joonicks.eu/arduino/LedControl.zip