Category: Arduino

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

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

 

Current limiting circuit YouTube

snapshot

Finally got around to making a demonstration video of my current limiting and short circuit protection circuit.

Using a LED as a dummy load might not have been the best idea but at least it visualizes the concept in a simple way.

The circuit is intended as an extra protection layer between a power supply and the circuit that uses it. Instead of blowing fuses or magic smoke in case of overcurrent or short circuit, this concept circuit could be tuned to protect the power supply quite well and cheaply.

Though in case of bigger normal loads, the transistor cant be a flimsy BC547. With any luck it might manage a few hundred mA but at 500 mA it’d probably burn up pretty quick.

AliExpress unboxing #1

“Bigger” package arrived today from China. A whole bunch of good stuff. But a lot of it also needs header soldering before it can be put to use. The two ESP-12F modules will be especially tricky to solder any kind of headers on to, seeing as the connection points are not spaced the standard breadbord friendly distance.

View the unboxing video on Youtube here: https://youtu.be/q4k5O6LL3a8

Its also my first unboxing video, so dont expect too much.

unboxing1

Little mailbag, January 23rd

mailbag-2017-01-23

A small package arrived from far far awar with some new playthings for me.

  • A small 128×32 pixel OLED display, I2C interface.
  • 433MHz transmitter and receiver (two separate modules)
  • Four 7-segment 4-digit LED thingamajingys
  • Header pins…

Got the OLED working pretty quick.

Power saving Arduino

Inspired by Kevin Darrahs video on Low Power Arduino! Deep Sleep Tutorial, I set out to see if I could apply some power saving to the basic blink program.

After the usual trial and error, I did get results. Normal current usage of lit/unlit Arduino nano running blink is 14/12mA. Replacing delay() with my own function going to sleep in power-down mode reduced the current to 6.6/4.6mA.

The power LED is always lit, consuming 2mA. Kevin was running his tests on a breadboard Atmega328P, obviously the Nano has a bunch more circuitry so thats where a bunch of current goes to.

And also, both the Arduino Nano and Arduino UNO will happily run off a 4 volt battery. Just connect + to the 5V rail (not VIN) and – to GND. I was using a battery from a mobile phone (nominal 3.7V but fully charged to 4V).

Source can be found here: PowerBlink.ino

Wind sensor

From a post on /r/Arduino I had some ideas about how to make a simple wind sensor.

hallwindcombo

Tested one of the Hall sensors I have with a neodymium magnet I took out of an old CD-ROM. The particular Hall sensor in the breakout board is a 49E501BG. At first I tried another Hall sensor but the output from that one was almost digital, useless.

When I tested it I attached the magnet to the tip of a screwdriver and moved it around in all kinds of ways around the sensor. It gave nice clear readings from 300 with the magnet at its closest to 600 with no magnet or even 800 if the reverse side of the magnet was close.

Pingpong ball would give the wind more to drag on. A dampener (more rubber bands) would be good so that the magnet doesnt move too far away even in a full storm.