How to install Groovy on a Banana Pi or Raspberry Pi

The Raspberry or Banana Pi have already pre-installed Python. If you like to stay with Groovy on these nice little devices, here are the instructions to install Groovy. GVM makes the whole process very easy and convenient. Open a terminal window and use these commands: curl -s get.gvmtool.net > installGroovy.sh chmod u+x installGroovy.sh installGroovy.sh source […]

https://jolorenz.wordpress.com/2015/03/22/how-to-install-groovy-on-a-banana-pi-or-raspberry-pi/

 

Automated Plant Watering System Uses Car Parts

[Shane] recently built an automated plant watering system for his home. We’ve seen several similar projects before, but none of them worked quite like this one. Shane’s system is not hooked into the house plumbing and it doesn’t use any off-the-shelf electronic valves. Instead, [Shane’s] build revolves around a device that looks like it was intended […]

http://hackaday.com/2015/02/20/automated-plant-watering-system-uses-car-parts/

 

Analog pH Meter with PIC16F684 and arduino

Need to measure water quality and other parameters?  DF Robot’s Analog pH Meter Kit is  specially designed for simple interface and has convenient and practical connector and a bunch of features. Get pH measurements at ± 0.1pH (25 ℃). For most hobbyist this great accuracy range and it’s low cost makes this a great tool for biorobotics and other projects! It has an LED which works as the Power Indicator, a BNC connector and PH2.0 sensor interface. To use it, just connect the pH sensor with BND connector, and plug the PH2.0 interface into the analog input port of any micro-controller.

The Wiki page  has a sample code for using this kit with arduino,  along with schematic, specifications, features ,precautions and setup Instructions. The arduino Interfacing is simple and the schematic and code is available on the wiki page.

PH_meter_connection1_(1)

Interfacing with a pic is also straight forward, Shawon Shahryiar shared his project where he used a PIC16F684. Below is the demonstration video and code.

/*
Coder: Shawon Shahryiar
https://www.facebook.com/groups/ArduinoBangla/
https://www.facebook.com/groups/microarena/
https://www.facebook.com/MicroArena
 */


#include <16F684.h>

#device *= 16
#device ADC = 10

#fuses NOWDT, INTRC_IO, PROTECT, PUT, CPD
#fuses NOBROWNOUT, NOMCLR, NOIESO, FCMEN

#use delay (internal = 4MHz)


#include "lcd.c"


#define const_A 0.00171016
#define LED	pin_C3


const unsigned char symbol[16] ={
    0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00,
    0x00, 0x00, 0x0E, 0x0E, 0x0E, 0x00, 0x00, 0x00
};


void setup();
void lcd_symbol();
unsigned long adc_avg();
void show_bar(unsigned char value);

void main() {
    unsigned char samples_A = 0x00;
    unsigned char samples_B = 0x00;
    unsigned long temp = 0x0000;
    unsigned long avg = 0x0000;
    unsigned long buffer[10];
    float pH_value = 0.0;

    memset(buffer, 0x00, sizeof (buffer));

    setup();

    while (TRUE) {
        for (samples_A = 0; samples_A < 10; samples_A++) {
            buffer[samples_A] = adc_avg();
            delay_ms(9);
        }

        for (samples_A = 0; samples_A < 9; samples_A++) {
            for (samples_B = (1 + samples_A); samples_B < 10; samples_B++) {
                if (buffer[samples_A] > buffer[samples_B]) {
                    temp = buffer[samples_A];
                    buffer[samples_A] = buffer[samples_B];
                    buffer[samples_B] = temp;
                }
            }
        }

        avg = 0;

        for (samples_A = 3; samples_A < = 6; samples_A++) {
            avg += buffer[samples_A];
        }

        avg >>= 2;

        pH_value = (avg * const_A);

        lcd_gotoxy(1, 1);
        printf(lcd_putc, "pH Value: %2.2g ", pH_value);
        show_bar(((unsigned char) pH_value));
    };
}

void setup() {
    disable_interrupts(GLOBAL);
    setup_WDT(WDT_off);
    setup_oscillator(OSC_4MHz);
    setup_comparator(NC_NC_NC_NC);
    setup_ADC(ADC_clock_div_8);
    setup_ADC_ports(sAN0);
    set_ADC_channel(0);
    setup_CCP1(CCP_off);
    setup_timer_0(T0_internal);
    setup_timer_1(T1_disabled);
    setup_timer_2(T2_disabled, 255, 1);
    set_timer0(0x00);
    set_timer1(0x0000);
    set_timer2(0x00);
    lcd_init();
    lcd_symbol();
    delay_ms(4000);
}

void lcd_symbol() {
    unsigned char s = 0;

    lcd_send_byte(0, 0x40);

    for (s = 0x00; s < = 0x0F; s++) {
        lcd_send_byte(1, symbol[s]);
    }

    lcd_send_byte(0, 0x80);
}

unsigned long adc_avg() {
    unsigned char samples = 4;
    unsigned long avg = 0;

    while (samples > 0) {
        read_adc(adc_start_only);
        while (!adc_done());
        avg += read_adc(adc_read_only);
        samples--;
    }
    avg /= 4.0;

    return avg;
}

void show_bar(unsigned char value) {
    unsigned char x_pos = 0;

    for (x_pos = 1; x_pos < = 16; x_pos++) {
        lcd_gotoxy(x_pos, 2);
        lcd_putc(0);
    }

    lcd_gotoxy((value + 1), 2);
    lcd_putc(1);

    output_toggle(LED);
    delay_ms(100);
} 
 

Solar Charge Controller Improves Efficiency of Solar Panels

The simplest and easiest way to charge a battery with a solar panel is to connect the panel directly to the battery. Assuming the panel has a diode to prevent energy from flowing through it from the battery when there’s no sunlight. This is fairly common but not very efficient. [Debasish Dutta] has built a charge controller that addresses the inefficiencies of such a system though, and was able to implement maximum power point tracking using an Arduino.

Maximum power point tracking (MPPT) is a method that uses PWM and a special DC-DC converter to match the impedance of the solar panel to the battery. This means that more energy can be harvested from the panel than would otherwise be available. The circuit is placed in between the panel and the battery and regulates the output voltage of the panel so it matches the voltage on the battery more closely. [Debasish] reports that an efficiency gain of 30-40% can be made with this particular design.

This device has a few bells and whistles as well, including the ability to log data over WiFi, an LCD display to report the status of the panel, battery, and controller, and can charge USB devices. This would be a great addition to any solar installation, especially if you’ve built one into your truck.

via Hackaday

 

Measuring Heart Rate With A Piezo

Look around for heart rate sensors that interface easily to microcontrollers, and you’ll come up with a few projects that use LEDs and other microcontrollers to do the dirty work of filtering out pulses in a wash of light.

[Thomas] was working on a project that detects if water is flowing through a pipe with a few piezoelectric sensors. Out of curiosity, he taped the sensor to his finger, and to everyone’s surprise, the values his microcontroller were spitting out were an extremely noise-free version of his heart rate.

The piezo in question is a standard, off the shelf module, and adding this to a microcontroller is as easy as putting the piezo on an analog pin. From there, it’s just averaging measurements and extracting a heartbeat from the data.

Via hackaday.com

 

Firmware upgrade for SIM900 GSM/GPRS modem

In this post we will learn how to update the firmware.

Requirements

You can use AT Command “AT+GSV” to check the current version of the Firmware.

.Cautions

How to

Application note AN_SIM900_Update Tool_UGD_V1.01 from simcom explains the process.

Step1

Download Simcom – sim900 Customer flash loader V1.01; Unzip the Simcom – sim900 Customer flash loader V1.01.

Step2

Connect your SIM900 board to your PC;

Step3

Open the executable file “Simcom – sim900 Customer flash loader V1.01″, it will show  window like the one below

Up2.jpg

Step 3

Step4

Select the right COM port(in my case is COM12), and the default value of Speed is 460800(baudrate), and 460800 is OK from my experience.

Step5

Click the Browse to select the downloaded firmware(in my case is 1137B03SIM900M64_ST_MMS ). You can see  window like the one below

Up3.jpg

Step 5

Step6

Click the START button to download, you will see  window like the one below

Up4.jpg

Step 6

Step7

Now Switch Off and then Switch ON GPRS Board .

Up5.jpg

Step 7

Step8

When the tool is erasing the flash, you will see the window like the one below:(Step9 may last a few minutes)

If fail, you can try another Speed(baudrate),and do it all again.

Up6.jpg

Step 8

Step9

The whole download process needs about 4 minutes; After the download, you will see window like this

Up7.jpg

Step 9

When you see Download done, congratulations that you have upgrade the firmware successfully.

 

AVRWIZ automatic code generator for AVR microcontrollers

AVRWIZ is a code generator for the popular Atmel AVR microcontrollers, optimized for the AVR Studio IDE. Its a very nice automatic code generator for AVR microcontrollers developed by tcg in avrfreaks, which can generate code for most common tasks. It  support baud calculator, timer calculator, multitasking generator, interrupts, ports and more. But there are several thing to be done like TWI, USI. As Author states there is lots of testing to be done. Project is open for new ideas and suggestions.

Nice thing I like about it that program is capable to generate code instantly. It can be saved as single file or whole Avr Studio project with makefile which is ready to compile instantly.
avrwizavrwiz_code

I Like the older version although it has less features still its clean and fast, get it and give it a try. The latest online version has moved from http://greschenz.dyndns.org/indeh.php?title=AvrWiz and now can be found here.

AvrWiz V 22 (latest) 

OLDER VERSIONS:

AvrWiz_0_009

AvrWiz_0_008

AvrWiz_0_007

AvrWiz_0_005

AvrWiz_0_004

AvrWiz_0_003

AvrWiz_0_002

AvrWiz_0_001

 

SMASH / UNSMASH all parts or a grouped parts in Cadsoft EAGLE

At times you require to SMASH or UNSMASH a number of components at a time either for rearranging the names or re size their text. Sometime you might need to UNSMASH them. This is important for making the sikscreens legible and look nice.

Although this is possible through the use of ULPs , here is how it can be implemented by command line of eagle.

For smashing  all parts/components , use the following command

GROUP ALL; SMASH (>0 0);

For unsmashing  all parts/components , use the following command

GROUP ALL; SMASH (S> 0 0);

For smashing  already grouped parts/components , use the following command

SMASH (>0 0);

For unsmashing  already grouped parts/components , use the following command

SMASH (S> 0 0);

Cheers 🙂