Mturk Jobs

Mturk Jobs
Mturk Jobs


Wednesday, November 29, 2017

16FUSB - Software USB for Module For old PIC 16F628

Some years ago I came across a web site ( no longer exists ) and saved it on my PC so that I can implement the posted project later.

The project was called 16FUSB . Software implementation of USB interface with old cheap Microcontrollers like 16F626.

I really thought of this idea for my favorite 16F84A Microcontroller but couldn't find any real-life implementation for it.

The PIC16F626 is more powerful than PIC16F84A but still is more available and cheaper that Microcontrollers contain built-in USB hardware modules ( such as PIC18F4550 and PIC18F4455).

The project came to be very popular and now is on

The circuit is very simple.

The software on the PIC

Check out my book about Embedded Systems for beginners on Amazon Kindle 

Tuesday, November 28, 2017

LED as a light sensor using Arduino

Yes, this might not have a practical application so far.

But you can use this amazing concept to spark that geek inside you or just to impress your nerd friends.

I found that concept of using the LED as a light sensor.

The LED has nearly the same hardware structure as the light sensor.

This means that it has the ability to detect light exposure. 

I found that LED can be used as a Light sensing element.

Of course, I cannot assure it can be used in practical application.

But I liked the concept when I knew it.

I've tested the concept both on Arduino and on Pinguino and it just worked well for me.

I followed that setup from instructables

//Copy the following sketch in your Arduino software and upload it to the Arduino board. (be sure to select the right board and com-port in the Arduino software)

int led = 13;                                        // the pin where you will put the LED
int sensorpin = A3;                           // the analog pin where you put your sensorLED
int resetteller = 0;                              // the rest are counters and variables to calculate with
int sens = 0;
int teller = 0;
int basis = 1024;
int test = 1024;
int test2 = 1024;
int test3 = 1024;

// this are the values to play with to get better (or worse) results
int marge = 5;                         // the space between a positive and negative reading
int vertraging = 1;                  // the speed of the readings; a lower number is a higher speed
int samples = 70;                   // the amount of samples to compare to make one reading
int resetsamples = 30;          // how many cycles to run the light on before you don't trust the value anymore

void setup() {
  pinMode(led, OUTPUT);
  Serial.begin(9600);                                   // no real part of the program, just for debugging
  for(teller =0; teller < samples; teller++) {// remember the lowest value out of many readings
   sens = analogRead(sensorpin);
   if (sens < basis){basis = sens;}
   delay(vertraging);                                     // the sensor needs a delay here to catch its breath

void loop() {                                          
for(teller =0; teller < samples; teller++) {// remember the lowest value out of many readings
   sens = analogRead(sensorpin);
   delay(vertraging);                                   // the sensor needs a delay here to catch its breath
   if (sens < test){
   test3 = sens;                                            // remember the 3 lowest readings
   test2 = test3;
   test = test2;}
  if (test < basis-marge && test2 < basis-marge && test3 < basis-marge){//all 3 low readings mus be < the basis reading
    digitalWrite(led, HIGH);
    resetteller++;                                         // count how long the LED stays on
      digitalWrite(led, LOW);
      basis = test;                                         // if the lowest test reading is higher than the basis, basis will be reset
      resetteller = 0;
    if (resetteller > resetsamples){basis = test;}//if LED stays on to long, we don't trust it and reset basis
    Serial.print(basis);Serial.print("  ");Serial.print(test);Serial.print("  ");Serial.println(sens);//just for debugging
    test = 1024;

Friday, November 24, 2017

Wind Turbines Made Easy. From passion to reality

This post is not exactly about embedded systems.

Although it’s more about making. Making as a hobby and a global trend. 

My passion for making started with me so early. But I didn’t find a way to monetize this passion until only recently. 

Making for me means the ability to think about something and trying to bring it from idea to a real thing in the real world. 

It may be an electronic circuit, software program, a piece of art or even a wind turbine.

In this case I’ll show how I managed to make my ideas real. And that’s the best part of it. 

You may feel like daydreaming about making something and it just cannot get out of you mind. You don’t feel satisfied until you actually make that thing. 

This is exactly what happened with me when I’ve been dreaming of building a wind turbine

I didn’t think of making something big or living off the grid. I couldn’t imagine myself building a 5kw wind turbine that can run some of my household appliance. 

Only I wanted to make a small wind turbine that could light an LED or recharge my cellphone

Just when I saw it on and found all those people successfully building their own systems what gave me enough encouragement and motivation to do it. 

It only turned into reality when I first built my first one. It works. It could light that small LED. 

I found myself obsessed with that source of power and couldn’t help except reading about it. And I just had a new passion. 

You know when you succeed in something and you want to get more out of it. That’s what happened when my first wind turbine worked with me. I then wanted to make more and more. 

I found some documentation online. I got myself some material from Amazon and used a lot of scrap parts. 

I recycled many things to make my wind turbines to come. The experience was so encouraging. As I made more small wind turbines I learned something new form each one.

I thought that it is what kids and students would need to begin thinking of designing their own systems

If you are like me, you may not want to live off the grid or make your own Megawatt wind turbine but sure you want to use this breeze of air to make some power out of it. 

It all worked well for me and I made my own wind power phone charger. 

Today, I’m sharing with you what I made and put it all in one book.

Backyard Wind Turbines: Harness Wind Power with Simple and Fun Projects

It’s available on Amazon and it has made a huge success from the first day of its launch. 

I hope you like it.

Thank you for reading.