Sunday, October 25, 2015

Generosity Campaign Update - Day 3

Day 3:

Ok - I have now hit the 3rd day in the Generosity campaign.
This will be my last update of the campaign, unless something exciting happens.

It has been both a very interesting and lonely experience.

The bit that caught me off-guard and surprised me somewhat was the fact that there are opportunistic companies/people out there looking to make money from those not making money... does that make sense?

Let me give you an example.... after day1, there were $0 donations.
But my campaign did not go un-noticed.... I got a message telling me that my campaign could get a boost !!

How ?

Well, all I have to do is pay someone some money, and they will either generate some traffic, or market my campaign for me on various social media sites.... it will cost me $50 per tweet !!!!

No thanks !!!

Then I got another message, which told me that I could pay someone to donate a lesser amount to my campaign.... what the ???

The idea is that once people see that someone has already donated, they are more likely to donate. Like a restaurant... once you see other people enjoying a restaurant, you are more likely to choose that one, over the one that has no one in it.

I just couldn't do something like that... I find that deceptive.
If people want to donate, they will, and if they don't want to donate, well that is ok too.....

My blog has been active for a few years now - and my goal is simple.


Make Arduino tutorials 
- so that others don't have to go through the arduous process that I go through. 
Make them easy to read, easy to understand, and freely available,
for everyone to enjoy.




My money jar is here for anyone looking to find it.
Minimum donation = $1 USD

Am sorry - it defaults to $50, 
But you can change it to $1
The donation to Generosity.com is not compulsory - you can change that to $0


Friday, October 23, 2015

Generosity Campaign Update - Day 2

Well what a day it has been !! 


24 hours since the personal campaign to acquire 
a Digital Storage Oscilloscope was launched... 
and it looks like everything is on track. 



Ok, maybe a bit slower than anticipated, but I think the idea to "spend money to support a content creator" is still sinking in... or maybe it is just sinking......Haha !!


Here are the stats so far...







After 24 hours, there were 43 people who paid a visit to see what this campaign was about, and I am pretty sure they ran out the virtual door to get their check books.... I eagerly await their return :)

Ok - so in total, after counting all the bills and all the change,



I have received a total contribution of 
$0 USD.



My total earnings for my entire site for that day when you include advertisements was:  $0.02



So from my calculations, the number of days until I will be able to afford an Oscilloscope, not accounting for inflation,  and also assuming the price of the Oscilloscope will remain the same is:






That time-frame is a bit hard to comprehend, so re-adjusting the calculation to years, I get this:








Ok - this is a bit slow... but the campaign is just warming up :)


I still believe that somewhere in the world 
someone will appreciate my work enough to 
donate one dollar (or more).... 



But what if no-one does???
That is ok...


I will still provide Arduino tutorials for FREE. 



I will just have to keep working harder to improve the quality of my tutorials, and have confidence in myself.
In fact I was very hesitant to put this campaign up. I did not know how well it would be received.


However, I wanted to go through the experience, to understand how the Generosity.com system worked.
And now if people feel inclined to provide a tip for my work, they are FREE to do so.

And you know what that tip will be spent on... yes - you guessed it..

a


I am not sure if anyone will read this page... or will even get down to this line on this page... but if you do... feel free to say hello in the comments - or recommend a good DSO to buy....Bear in mind though, it has to be a good brand/product -

the company still needs to be there in 63 years ... Haha !!

Hope you have a great day !!



Thursday, October 22, 2015

Generosity campaign - Day 1

How do you ask for support from the community without asking for money ?
I have no idea...........

But if you are feeling generous today, feel free to visit my generosity campaign 

... my long term quest to get a Digital Storage Oscilloscope :)

Indigogo has just launched their new site - Generosity.com for personal fundraising purposes.
There is no platform fee, however all processing charges will be deducted before any funds are paid out.

This new platform allows content creators like myself to do what they do best .... ie. create content.
And allows content consumers to support content creators and help them to become more "creative".


        Did I mention I had a long term quest to get a Digital Storage Oscilloscope ?


A while back, I started a Patreon page... but I didn't like the idea that people had to pledge per tutorial or per duration of time.... I mean, what if you did not like the tutorial or did not like the content in that month? Why should people have to pay for that? I guess one good thing about Patreon, is that it does encourage content creators to push out content on a more regular basis... 

Generosity.com on the other hand allows you to make a ONE TIME payment and walk away. And if you happen to like more content, you are free to walk up to that money jar as many times as YOU want... 

I know my campaign will go viral... and everyone will want to chip in to help me get an Oscilloscope :) .... Ok maybe not everyone...and I did say a  "long term"  quest didn't I   ??

Hey, you could be the first one.... the person who donated first !!!
Everyone loves that person... the person who donated first !
And YOU could be that person!

But don't get too crazy... just do it quickly... you don't want to be the second person.
The second person is still loved, just not as much :)

Thank you for your generosity.




 
 
 
 
 

Monday, October 12, 2015

Arduino LED Light Box

Description

Long straight lines of LED luminescence is nice, but sometimes you may want to light up something that has an unusual shape, or is not so linear. This is where the 12mm diffused flat digital RGB LED Pixels can come into play. This cool strand of 25 RGB LED pixels fit nicely into 12mm pre-drilled holes of any material you like.

This tutorial is dedicated to making a LED Light Box. I wanted the box to be equally as interesting during the day as it was at night. If you decide you make your own, feel free to be as creative as you want !! However, if you lack artistic acumen, you may need to source a minion or two.


 

Arduino Libraries and IDE

Before you start to hook up any components, upload the following sketch to the Arduino microcontroller. I am assuming that you already have the Arduino IDE installed on your computer. If not, the IDE can be downloaded from here.

The FastLED library is useful for simplifying the code for programming the RGB LED pixels. The latest "FastLED library" can be downloaded from here. I used FastLED library version 3.0.3 in this project.

If you have a different LED strip or your RGB LED pixels have a different chipset, make sure to change the relevant lines of code to accomodate your hardware. I would suggest you try out a few of the FastLED library examples before using the code below, so that you become more familiar with the library, and will be better equipped to make the necessary changes.

If you have a single strand of 25 RGB LED pixels with the WS8201 chipset, then you will not have to make any modification below.


 

ARDUINO CODE:

Arduino Code Description

The code above will generate a randomised raindrop pattern on the Arduino LED Light box, however I have written code for a few more LED animations. These animations were written specifically for this light-box setup. In other words, once you have hooked everything up, you will be able to upload these other LED animations to the Arduino board without any further modification to the hardware/wiring, and yet experience a totally different light effect. You can find the code for the other animation effects by clicking on the links below:

  1. Breathing effect
  2. Ripple effect
  3. Clock effect
  4. Rotation effect
  5. Sweep effect
  6. Spiral effect
  7. Lightning effect
  8. Paparazzi in the Rain effect

Hooking it up:

Power requirements

Each LED pixel can draw up to 60 milliamps at maximum brightness (white). ie. 20 mA for each colour (red, green and blue). Therefore you should not try to power the LED strand directly from the Arduino, because the strand will draw too much current and damage the microcontroller(and possibly your USB port too). The LED strand will therefore need to be powered by a separate power supply. The power supply must supply the correct voltage (5V DC) and must also be able to supply sufficient current (1.5A or greater per strand of 25 LEDs).

Excessive voltage will damage or destroy your LED pixel strand. The LEDs will only draw as much current as they need, however your power supply must provide at least 1.5A or greater for each strand. If you chain two strands together, you will need a 5V 3A power supply.

RGB LED pixel strand connection

There are 25 LED pixels per strand. Four of the wires at each end of the strand are terminated with a JST connector. The red wire is for power (VCC), blue wire for ground (GND), yellow wire is for Data, and green wire for Clock. A spare red wire (VCC) and a spare blue wire (GND) are attached to the ends of each strand for convenience, however, I did not use either. Please double check the colour of your wires... they may be different.

If you want to attach the LED strand to a breadboard, you can cut the JST connector off and use the LED pixel strand wires. Alternatively, if you would prefer to preserve the JST connector, you can simply insert jumper wires (or some male header pins) into the JST connector, and then plug them into the breadboard as required.

Each LED pixel is individually controllable using two pins on your Arduino. The strand is directional. i.e. There is an INPUT side and an OUTPUT side. The strand should be connected such that wires from the microcontroller are attached to the INPUT side of the first LED pixel. The arrows on each LED show the direction of data flow from INPUT to OUTPUT. The arrow on the first LED pixel should be pointing towards the second LED pixel, NOT towards the breadboard.

Other considerations

As a precaution, you should use a large capacitor across the + and - terminals of the power supply to prevent the initial onrush of current from damaging the RGB LED pixels. I used a 4700uF 16V Electrolytic capacitor for this purpose. According to Adafruit, a 1000uF 6.3V capacitor (or higher) will also do the trick. You may also want to consider a 330 ohm resistor between the Arduino Digital pin and the strand's DATA pin.

If you want to power the Arduino using the regulated 5V external power supply. Disconnect the USB cable from the Arduino, and then connect the positive terminal of the power supply to the 5V pin on the Arduino. Be warned however, that excess voltage at this pin could damage your Arduino, because the 5V regulator will be bypassed.
 
Providing the USB cable is NOT connected to the Arduino, it should now be safe to plug the power supply into the wall. This setup will allow you to power the RGB LED pixel strand and the Arduino using the same power supply.
 
WARNING: Never change any connections while the circuit is powered.

For more information about these RGB LED pixel strands, you may want to visit the Adafruit site. Adafruit was the source for most of these RGB LED pixel Strand precautions.


Fritzing diagram

The following diagram demonstrates how to connect the RGB LED pixel Strand to the Arduino and to the External 5V power supply.


This diagram was created using Fritzing


Connection Instructions

These instructions will help to guide you through the process of connecting your RGB LED pixel strand to the Arduino, and to the external power supply. The instructions assume that you will be powering the Arduino via a USB cable.



LightBox assembly

You will need to drill a 12mm hole into the craft timber box for each LED on the strand. It is worth taking the time to make accurate measurements before drilling the holes.
 
I made 12 holes for the outside circle pattern (12cm diameter), 6 holes for the inside circle pattern (8cm diameter), and a hole in the centre. I also made two holes at the front of the box, two on the left side, and two on the right side. I made one last hole at the back of the box for the 2.1mm DC power line socket.
 
Therefore you should have a total of 26 holes in the box. 25 of the holes are for the RGB LED pixel LEDs and one for the external power supply socket.

The lid of the box is about 19.5cm x 14.5cm long, which makes for a very tight squeeze. Probably too tight, because you have to account for the inner dimensions of the box. The inside of the box is used to house the Arduino, breadboard, the chipset side of the LEDs and cables/components. The inner dimensions of the box are 18cm x 13cm. Therefore, the housing for the LED chipset PCB (1.8cm x 2.5cm) prevented the box from closing. I used a Dremel to carve out the space required to close the lid.

Each LED is approximately 8cm apart on the strand, however, if you are really keen, you could cut the wires and extend them to any distance you require. But keep in mind that each LED is mounted on a small PCB (with a WS2801 chipset).You will therefore need to leave a minimum of 2cm between each 12mm hole to accomodate the size of the PCB+LED. If you plan carefully, you can probably squeeze a couple of LEDs within a distance of 1cm... but I would recommend that you give yourself a bit more room, because the PCBs are not square, and there is a good chance that you will have to start all over again.

In hindsight, I could have made the circle patterns a bit smaller, however I don't know if I could have packed these LEDs any closer. The diameter of the inner circle pattern must be at least 2cm smaller than the outer circle pattern. So I think "a bigger box" would have been the best option.

Once all of the holes have been drilled, paint and decorate the box to suit your style.

When the paint is dry, insert the LEDs into the drilled holes in number order.
You can see the end result below.



Project Pictures

These pictures show the Light box after it has been drilled and painted. The LEDs have been inserted into their respective holes, and all wires + Arduino + breadboard are hidden within the box.





Concluding comments

Once you start writing LED animations for the RGB LED pixel Lightbox, it is very hard to stop. The colour combinations



If you like this page, please do me a favour and show your appreciation :

 
Visit my ArduinoBasics Google + page.
Follow me on Twitter by looking for ScottC @ArduinoBasics.
I can also be found on Pinterest and Instagram.
Have a look at my videos on my YouTube channel.



However, if you do not have a google profile...
Feel free to share this page with your friends in any way you see fit.



Tuesday, October 6, 2015

Uploaded Arduino blink example to a STM32 board - M3S STM32F103ZET6

M3S STM32F103ZET6


In my quest for higher speed, more pins,  more flash and more RAM for my SVTrackR and yet keeping the cost low, I started exploring other ARM 32-bit boards.

Before this, I'm already using  DigiX from Digistump, an Arduino  DUE compatible board but they are in Mega form factor, kinda big and most important factor for me, high price. The DigiX are 32bit ARM Cortex-M3 microcontroller running at 84Mhz.

DigiX Comparison Table

While shopping at taobao, the development boards from STM32 really stand out as they are low cost, lots of pins and similar form factors as Arduino Nano. My most important criteria is that I should not have to port my codes to another platform or learn another new development environment. As a hobbyists, the development software must also be free.

STM32 dev board
A search for STM32 will results in so many STM32 development boards from any shapes, colours and sizes with price range from RMB25.70 to thousands of RMB. Compared to the above chart for DigiX, the lowest price are 59 in US Dollars.

All these cheap and powerful boards are no good to me unless they runs on Arduino IDE as my SVTrackR codes uses a lot of open source libraries from GPS, OLED and SoftSerial.

Some background and history on STM32 on the Arduino platform. It was started very early by leaflabs producing the Maple and Maple Mini back in 2008. You can read all the details are the links provided below. Good thing it was an open source projects so all the work done by them can be taken up some others to continue the development. If this were a closed sourced project, all these would be gone.
http://www.leaflabs.com/device-details/


Arduino Forum :-
http://forum.arduino.cc/index.php?topic=265904.0 with 2625 messages.

New STM32duino home :-
http://www.stm32duino.com/

Roger Clarke from Melbourne did a great job to continue the developement.
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Credits-and-history

If you are a newbie and just want to make some STM32 board purchases without reading all the histories, click on  Guide: "I'm new here - which board should I buy?"


More pictures of the M3S STM32 development board I purchased. I've also purchased the 3.2" touchscreen TFT that can attached to this board. It also comes in a nice looking plastic box.

M3S with box



M3S with 3.2" TFT



M3S STM32F103ZET6 with 3.2" TFT




From the image the seller posted, this board have a lot of items on board like 2 USB port (mine comes with Micro-USB ), DB9 on MAX3232, JTAG, SWD, DS18B20 slots, mini buzzer, nRF24L01 slots, SPI flash on SD, SDIO, 2 LEDs, 4 buttons, BOOT0/BOOT1 jumpers,  EEPROM 24C02, OV7670 camera module and other that I could not translate the chinese.


Summary Links