Make: "It's New to You" Bit

I’d love to try etching at home and using smd components to make my color sensor as small as a bit.

1 Like

Ya I’ve cut a few boards that were designed in eagle, they are really something but very difficult to solder. The latest board I made is a FabISP

I made this “Resistor Color Wheel” with cardstock, crayons, pencil, compass, protractor, hole punch, a paperclip, a bead, and a staple.

It’s fun and helpful. :smile: :rainbow:

5 Likes

Hi there. I will join as soon as I get my HDK.
:smile:

3 Likes

Sweet, need more people. :smiley:

Okey dokey, folks. I put together a video showing how to assemble a long led module on a breadboard with the following parts:

741 op amp chip, 1K Resistor, 1M Resistor, jumper wires, breadboard, 5mm high brightness white LED (Radio Shack part # 276-0017), proto Module

2 Likes

Anybody want to make another bit (vicariously or yourself or with the group)?

@anmol1771, @Kadin907, @ludvikherrera, @alexpikkert, @matthiasmwolf, @joey, @ClanScorpia

What bit do want to make or explore?

Do you have any tips or tools you want to share for bit-makers?

2 Likes

Hey Jude,

It’s funny you should ask this question as I’m working on something that I think is pretty cool and making progress. It’s not quite ready for showtime yet but when it is (fairly soon I think) I would love to talk to you about a bit possibility as it relates to my project. Are YOU interested in creating another bit? Or to ask another way, are you chomping at the bit to make another bit? (sorry…)

1 Like

Yes, @joey I always want to make another bit (blame @ayah_littleBits :slight_smile: ) , and I’d be happy to learn more about your idea when you’re ready. :racehorse: :bitstar:

1 Like

Ok. Give me another week to complete some stuff on my end and then I’ll show you what I’ve been working on. It would be fun to explore this with you and see if its something that you would like to work on with me. Working on prototypes now :smile:

Thanks @JackANDJude for the invitation to the forums and for the idea to share my bit that’s up for voting in the BitLab. If anyone is interested in a water detection module check out the WaterBit in the Bitlab.

Here’s a Project showing how you can use the WaterBit to Detect water and automatically trigger the FanBit to dry itself.

2 Likes

@JackANDJude
Hi, thanks for the invitation to think about new bits !
I am currently working on a funny project where the pressure sensor plays a major role.
I will publish this project as soon as it is fully operational.
I designed it step by step and I found out that the pressure sensor was not accurate enough in my project. I wanted to use it as a weight sensor, connected to the Arduino.
The output voltage varies a lot when placing the same objects on its surface, it looks to me it depends on the time of day and the weather…
Do you maybe have some suggestions how to make this pressure sensor more accurate?
I tried the following already:

. Putting a liitle metal ring on the sensor so it bends a little more
. On the Arduino it gives an output from 0 to 1023, I divided the outcome by 10 before using it further in the program
. I put a “preweight” on the sensor before actually using it

So maybe I need a real stable weight sensor with a linear output from grams to volt…
I really hope you can help me on this subject…

1 Like

I haven’t tried using the pressure sensor for fine tuning. I saw a lesson plan that involved placing coins on it. Maybe you’ll find it helpful: http://littlebits.cc/browse-lessons/money-scales

Here is also the Pressure Sensor Tips & Tricks.

Another bit that exists (I have never tried it, though) is the bend sensor. It might be more to your liking. Here is the Bend Sensor Tips & Tricks.

2 Likes

@JackANDJude
Thanks !
I will redesign my pressure sensor setup as shown in the money-scales lesson. I think this will really help to make the outcome more stable…

1 Like

I created on oscillator with a 555 circuit and a 9v battery

And a servo with an Arduino to control it

2 Likes

Thanks for sharing your circuits, @Kadin907 :smile: Would you like to make the oscillator work as a bit? If you post a drawing of the circuit, we can start from there.

1 Like

I hope some folks are still participating in the #InventAnything hardware page, I started late, but thank you to @vanessa and @chloeatplay for still inviting me to participate. So anyway, here goes with the hardware assignment as I understand it. I thought a lot about what would be my favorite bit, but almost right away decided to pick what I thought might be the most challenging bit to recreate, the new number+ bit. I was not really excited about the number bits right away, but realized quickly that it is the essential “tuning bit” for cloud control and threshold setup, among many other input to output setups. I wanted a challenge for this first assignment, and I got it. I really had to think outside the “bit”.
I imposed a few requirements of my own, first being that I would recreate the bit with parts I had on hand. Second, I did not want to “cheat” and look at any published schematics available. I was able to put the hardware together relatively quickly, it consists of an ATmel ATTiny84, two 74HC595 shift registers running two seven segment displays(allows for three outputs only from tiny84), and I used a 10K pot to for a voltage divider instead of a four position switch(don’t have one of those floating around, do you?). The function of the switch/divider can be dealt with easily in the code. Any other parts you see in the in progress pics below were used for tuning before connecting to any 'Bits. I will post more on

the coding required and problems there soon. The pictures show the breadboard prototype in the volts mode, and counting up and down.

3 Likes

#InventAything, “It’s New to You” Hardware, Part 2.
Here is the basic progression of writing the code for this module. First step was to define the characters for the shift registers, basically taking the binary numbers and converting them to hexadecimal, to prove I could count thru the display.
//This is the hex value of each number stored in an array by index num
byte digitOne[10]= {0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x98};
byte digitTwo[10]= {0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x98};

Encountered my first obstacle, how to convert a decimal number to ten’s and one’s(divide by ten, return the modulo).
case 0:
value = analogRead(bitInput);
variable = map(value, 0, 1023, 0, 99); // map bit input to % values
pwm = map(value, 0, 1023, 0, 255); // provide output values for bit output
result1 = variable / 10; // divide by ten for the first digit
result2 = variable % 10; // use the modulo to provide the remainder(the second digit)
a = result1;
b = result2;

As stated, wanted to use only parts on hand, using a 10K pot, map values to four modes.
Mode = analogRead(modeSwitch);
Range = map(Mode, 0, 1023, 0, 3);

The rest of the code is easy to piece together, map values for percentage, volts, and up from “0”, down to “99”
switch (Range) {

case 0:
  value = analogRead(bitInput);
  variable = map(value, 0, 1023, 0, 99);  // map bit input to % values
  pwm = map(value, 0, 1023, 0, 255);  // provide output values for bit output
  result1 = variable / 10;  // divide by ten for the first digit
  result2 = variable % 10;  // use the modulo to provide the remainder(the second digit)
  a = result1;
  b = result2;


    digitalWrite(LATCH, LOW);
    shiftOut(DATA, CLK, MSBFIRST, ~digitTwo[b]); // shiftout digitTwo
    shiftOut(DATA, CLK, MSBFIRST, ~digitOne[a]); // shiftout digitOne
    digitalWrite(LATCH, HIGH);
    delay(10);
    analogWrite(Output, pwm);  // set output to mapped value
    break;
    
case 1: 
  value = analogRead(bitInput);
  variable = map(value, 0, 1023, 0, 50); // map values to voltage readout
  pwm = map(value, 0, 1023, 0, 255);  // provide output values for bit output
  result1 = variable / 10;
  result2 = variable % 10;
  a = result1;
  b = result2;
  
    digitalWrite(DP, HIGH);  // decimal point for volts reading
    digitalWrite(LATCH, LOW);
    shiftOut(DATA, CLK, MSBFIRST, ~digitTwo[b]); // shiftout digitTwo
    shiftOut(DATA, CLK, MSBFIRST, ~digitOne[a]); // shiftout digitOne
    digitalWrite(LATCH, HIGH);
    delay(10);
    digitalWrite(DP, LOW);
    analogWrite(Output, pwm);  // set output to mapped value
    break;
    
case 2:
  buttonState = digitalRead(bitInput);
  if (buttonState != lastButtonState) {
if (buttonState == HIGH) {
  buttonPushCounter++;
} 
  }
  lastButtonState = buttonState;
  
      variable = constrain(buttonPushCounter, 0, 99); // map values to count up
      pwm = map(variable, 0, 99, 0, 255);
      result1 = variable / 10;
      result2 = variable % 10;
      a = result1;
      b = result2;
      
      resetState = analogRead(reset);
       if(resetState >= 511)  // if reset detected, reset values to zero
        {
         a = 0;
         b = 0;
         
          digitalWrite(LATCH, LOW);
          shiftOut(DATA, CLK, MSBFIRST, ~digitTwo[b]); // shiftout digitTwo
          shiftOut(DATA, CLK, MSBFIRST, ~digitOne[a]); // shiftout digitOne
          digitalWrite(LATCH, HIGH);
          delay(10);
          buttonPushCounter = 00;  // when reset, set global variables to "00"
          break;
        } 
        
          digitalWrite(LATCH, LOW);
          shiftOut(DATA, CLK, MSBFIRST, ~digitTwo[b]); // shiftout digitTwo
          shiftOut(DATA, CLK, MSBFIRST, ~digitOne[a]); // shiftout digitOne
          digitalWrite(LATCH, HIGH);
          delay(10);
          analogWrite(Output, pwm);  // set output to mapped value
    break;
    
case 3:
  buttonState = digitalRead(bitInput);
  if (buttonState != lastButtonState) {
if (buttonState == HIGH) {
  buttonPushCounter--;
} 
  }
  lastButtonState = buttonState;
  
      variable = constrain(buttonPushCounter, 0, 99);  // map values to count down
      pwm = map(variable, 0, 99, 0, 255);
      result1 = variable / 10;
      result2 = variable % 10;
      a = result1;
      b = result2;
      
      resetState = analogRead(reset);
       if(resetState >= 511)  // if reset detected, set values to "99"
        {
         a = 9;
         b = 9;
          digitalWrite(LATCH, LOW);
          shiftOut(DATA, CLK, MSBFIRST, ~digitTwo[b]); // shiftout digitTwo
          shiftOut(DATA, CLK, MSBFIRST, ~digitOne[a]); // shiftout digitOne
          digitalWrite(LATCH, HIGH);
          delay(10);
          buttonPushCounter = 99;  // when reset, set global variable to"99"
          break;
        }           
          digitalWrite(LATCH, LOW);
          shiftOut(DATA, CLK, MSBFIRST, ~digitTwo[b]); // shiftout digitTwo
          shiftOut(DATA, CLK, MSBFIRST, ~digitOne[a]); // shiftout digitOne
          digitalWrite(LATCH, HIGH);
          delay(10);
          analogWrite(Output, pwm);  // set output to mapped value
    break;   
}

Encountered second obstacle, in modes three and four, when counting up and down, pwm values continue to roll over. Fixed by mapping the constrained values only.
variable = constrain(buttonPushCounter, 0, 99); // map values to count up
pwm = map(variable, 0, 99, 0, 255);

Only problem that remains is the output filter, cannot seem to match values exactly, many variations tried, but main problem is when hooked to littleBits dimmer and number bits, inputs of 4.4 V to 4.5 V end up registering as solid 5 V.
More work to be done on a low-pass/high-pass filter to even out pwm from ATTiny, currently have a hybrid of the the two that is “close”, but no cigar.

Sorry for the messed up display on the coding, didn’t know exactly how to paste in. Tried to upload .ino, unsuccessful.

Hopefully this gets anyone the .ino

Looking good, @StuckInSynth! I appreciate that you are building this without referring to the littleBits schematic. :slight_smile: You could probably combine the functionality of the Number+ with the Threshold in one bit.

1 Like