Tuesday, 21 April 2015

The Arduino saga for the confused user, Clash Of IDE's and what not's

As confused as most users, i  will try break it down gently my perception of it all.

First, you should start by a nicely done history and time line presentation i found, by Matthew Williamson.

Arduino LLC was founded by Massimo Banzi, David Cuartielles, David Mellis, Tom Igoe and Gianluca Martino in 2009.
Considering Arduino idea started around 2005, a lot of these guys had been working togethers since.
The other party is Smart Projects, founded by Gianluca Martino in 2004, which has always been one of the major manufacturers of Arduino Boards.
A rift started ( you can check the full breakdown in the series of articles on Hackaday)  and Smart Projects changed their name to Arduino SRL in November of 2014. A new site was started ( arduino.org) and the Clash of IDE's started, confusing a lot of people in the process.
Warnings on some boards started to appear with version 1.6.1 that "Added warning for uncertified boards" ( apparently  some USB Vendor ID's from boards manufactured  by the "ORG" camp . And this is confusing for the average user.
arduino.cc's version 1.6.3 is the official version, but arduino.org released a few versions with higher numbers to confuse the matter ( 1.7.0 and so on). This version already supports their new Arduino Zero Pro already on sale, while the official team's shop still has it as "Coming soon".
It is sad to see greed, egos and what-not brought to the forefront of public attention, specially regarding a product that is supposed to epitomize the Open Source Community's strength.
Anyone out there surely feels that Arduino is the original idea, perpetuated by the hard work of what is now a massive team. But above all, Arduino is but the massive community that made it what it is today !
All in all... Facepalm !

* Id advise everyone to have a scroll down the hardware index page at arduino.cc and scroll down for some of original boards, etc

Friday, 17 April 2015



A nice article on a different perspective towards the user-friendly tool


Arduino Zero Pro and the Legal Dispute

It is sad that the "thing " that was supposed to be "open Source" causes so much greed and grief.

Check the original statement here http://hackaday.com/2015/03/28/arduino-srl-to-distributors-were-the-real-arduino/

You can now find Arduino also at http://arduino.org

Tuesday, 14 April 2015


A new version of the Arduino IDE (1.6.3) is available at the download page!
The Arduino IDE 1.6.3 is a bug fix release: after the already released 1.6.2 with new libraries and cores managers.http://blog.arduino.cc/2015/04/02/arduino-ide-1-6-3-released-and-available-for-download/

Friday, 5 September 2014

Example Saw waveform generator with R2R DAC ATmega328

Example Saw waveform generator with 8 bit R2R DAC pin 0-7
Timer1 Interrupt

#define WAVE_SAMPLES 256
volatile uint16_t a;
uint8_t sample = 0;
boolean c;
boolean togg;
int timer1_counter;

void setup()
  DDRD = 0xFF; //b11111111 d255

  // initialize timer1
  cli();           // disable all interrupts
  TCCR1A = 0;
  TCCR1B = 0;

  // Set timer1_counter to the correct value for our interrupt interval
  timer1_counter = 65443;   // preload timer 65536-16MHz/8/21504 Hz

  TCNT1 = timer1_counter;   // preload timer
  TCCR1B |= (1 << CS11);    // clk/8 prescaler
  TIMSK1 |= (1 << TOIE1);   // enable timer overflow interrupt
  sei();          // enable all interrupts

ISR(TIMER1_OVF_vect)        // interrupt service routine
  TCNT1 = timer1_counter;   // preload timer
  PORTD = sample;
  togg = !togg;

void loop()
  if (c != togg) {
    if (a >= WAVE_SAMPLES) {
      a =0;
    sample =a;
  } //
  c = togg;

Tuesday, 2 September 2014

Binary counter- 6 bit r2r DAC example for chipKit DP32 - PIC32MX250F128B

Dubworks 6 bit r2r DAC example u4 LSB's using board leds 
 to display ;for chipKit DP32 board - PIC32MX250F128B
unsigned int i=0;
void setup(){
  LATBCLR = 0x3F;  // BIN 111111 ; 0xF for 4 leds only
  TRISBCLR =0x3F;  // Ports RB0-RB5 as Output ; 0xF for 4 leds only
void loop(){
  LATBCLR = 0x3F; //  clear 0xF for 4 leds only
  LATB |= i ;
  int a;

  Serial.println(" I DEC ");
  Serial.println(" PORTD BIN ");

  /* if you want to use the 5 bits of port B 0-4 */
  //  if(i < = 32){
  //    i=0; 
  //  }

  if(i < = 64){

  delay(250); //


note : P0-05 == RB0-RB5 ports

Monday, 1 September 2014

Digital to analog converters wise Pt 1/2

For audio purposes, it is quite common to find R2R-ladder Digital to analog converters (DAC's).
With microcontrollers, it is often a good idea to use a 595 Shift Register instead of direct ports not only to save ports but also because the 595 does a good job .
595 shift register can both source current when on a HIGH state and sink current when LOW. This is essential to create a more linear response and achieve monotonicity of output.
uC's like the ATMega328/Arduino Uno .do a good job at using a whole 8 bit port, as they can sink current as well, but that is reduced with the 3.3 V generation of chips ( average 20 mA, as opposed to 40 mA (milliamps) of current with an Arduino Uno).
The simplest textbook example of a Resistor-ladder DAC is a R/2nR DAC, also known as Binary Weighted DAC. This architecture is the most limited as well, and not inherently monotonic. Also to note that fact that impedance changes with input.
The method uses a sequence of ratios R, 2R, 4R, 8R. 16R , etc (R/16, R/8, R/4, R/2 and R for 5 bits is the usual way to refer to it).
And the difficulty of matching the ratios with resistors is one of the main reasons why its used mainly for small count bit solutions .
In theory, it looks to keep its monotonicity, but in reality tends to be somewhat different.

R2R Resistor ladder method, solves some of these problems by using resistors of only two different values, and their ratio is 2:1. It can also be achieved with resistors of just one value ( as in the example of a 6 bit solution, below).

So the theoretical schematic would be as in the next example  ( check live interactive simulator circuit on link; Circuit starts representing decimal 35 / binary 100011- Use the switches, most significant bit is on the left)

A good point to understand how it all works as far as circuit goes, would be TTL Logic basics( where each pin is the equivalent of two transistors and can both sink and source current..

*during some tests, i was able to derive 24 values out of 3 bits, with a log-like response using a theoretical tristate circuit. While this worked on paper, im still to try its concept :) Maybe i just rediscovered someone else's wheel !

Let this be a taster, while i build a 16 bit DAC ( a bit oversized if we compare it with a 12 bit MCP4725, for example :)
 I now know the real meaning behind the expression " Resistor's graveyard" eh eh