Skip to main content


Showing posts from August, 2017

The One Pin Signal System, using an Arduino

The One (RRRduino) Pin Signal System! Part I NeoPixels: Yes, you read that right, you can control a whole signal system with up to 200 lights by using a single Arduino pin. And this was not my idea, all the credit and the patent goes to my friend Tom, but since I already had something using the same technology up and running using only a Nano, I do not feel too bad telling you about it. Short video first! There is a tiny 8 pin chip out there called a WS2811 which is a three channel LED driver, and you might find them on the interweb as NeoPixel LED Driver Chips. They need power and ground, typically 5 Vdc, and data to be put in the three registers inside the chip, one for each LEDs it can control. So, in most cases out there today, the LEDs connected are Red, Green and Blue (RGB for short) and by setting the three registers each with an 8 bit value (which in English means a value from 0 to 255, since 2 8 = 256, but since 0 is an acceptable value too, the maximum is 2 8 - 1

Not too important IR remote info...

Onn 4-Device Universal Remote manual... setting codes... Up Arrow TV Mode: Decoded NEC(1) : Value:20DF00FF Adrs:0 (32 bits) Raw samples(68): Gap:5484   Head: m8800  s4500  0:m550 s600     1:m500 s600            2:m500 s1700     3:m550 s550           4:m550 s600     5:m500 s600            6:m500 s600      7:m550 s550           8:m500 s1700    9:m550 s1700          10:m500 s600     11:m550 s1650          12:m550 s1700    13:m550 s1650         14:m550 s1650    15:m550 s1700          16:m500 s600     17:m500 s600          18:m500 s600     19:m550 s550          20:m550 s600     21:m500 s600          22:m500 s600     23:m500 s600          24:m550 s1650    25:m550 s1700         26:m550 s1650    27:m550 s1650          28:m550 s1700    29:m550 s1650         30:m550 s1650    31:m550 s1700          32:m550 Extent=67100 Mark  min:500     max:550 Space min:550     max:1700 CBL Mode: Decoded RC6(4) : Value:2758 Adrs:0 (20 bits)  Raw samples(36): Gap:43150   Head: m2600  s900  0:m350 s900 

Making things flash...yes LEDs!

So we have all seen the BLINK program, where we first configure the onboard LED to be an OUTPUT and then we turn the LED on, waste some time, turn the LED off and waste some time in the loop() function and then everything repeat again. So, that is really cool and 25 times faster using an Arduino, compared to 25 years ago where you had to erase the EPROM with a UV light first before you could upload the code that you tediously wrote in Assembler! And the 8051 did not have all the awesome built-in modules to simply do: Serial.begin( 300 ); // yes it was slow back then Serial.println( "Hello world" ); // and remember the extra work to do a String? // while \n and \r was needed too!!! Part I: So, back to the LED, the next question you ask is: "I have at least 17 more free pins , can they blink too?", and the answer is "Sure!". But in the current digitalWrite( 13, HIGH ); delay( 500 ); digitalWrite( 1

Turntables...using Stepper Motors!

Maybe a little out of my league since the TxNamib Railroad does not reach far enough south to connect to Luderitz, where the last, unconnected turntable is. But a good friend Chip Romig had turntable trouble and we decided implement two manual controls for the "get it closer quicker" and then "align it perfectly, going slower, smoothly" Arduino. Of course, people who has the turntable as the main focus point , want to have better control, including sensors to align the table, but certainly has spent the time setting it up and calibrating it. And quite a number of times doing it again, which is where Chip decided to let the operator do all the alignment work himself. So here it is, the crude two center-off-toggle switch solution to move a stepper motor faster with the first toggle and then slower with the second, so you can align them by eye-sight, like I've seen them do in Durango. /* 4 inputs, pulled high internally. Clockwise, counterclock- wi

Servos by Arduino...

Servos! How to move things around, crossing gates, cranes, switch points, pecking chickens and all other moving things. A servo is in simple terms a motor with a little feedback circuit to sense where it is, and when you tell it to go to x, the sensor will make sure that the motor keeps moving till you are there, and if it went too far, the sensor will ensure the motor moves back to the commanded position. What made a servo harder to use in the past? Well, the position you want to go to on a typical hobby or aircraft servo motor is not set by toggling a double pole double throw switch, or with a simple analog voltage, no, it decides where to move to, by measuring the width of a pulse that is sent to it on the control wire. If the pulse is 1.5 milliseconds long, the servo motor will move towards the middle of its range, in other words, if you have a servo that can rotate 180 degrees, a 1.5 ms wide pulse will send it to 90 degrees. Similarly, A 1 ms pulse will move the motor to 0

First post ... woohoo!

Coming soon, all these and more signals controlled by one single Arduino pin!