Author Topic: Pimp My Handbag?  (Read 2155 times)

0 Members and 1 Guest are viewing this topic.

Offline yorkshire_drew

  • Newbie
  • Posts: 4
  • Country: gb
Pimp My Handbag?
« on: February 04, 2018, 11:20:56 am »
Hey folks, it's my girlfriend's birthday in a couple of weeks and I've found this awesome robot handbag that she's previously seen and loved. However, I feel like this bag needs a little "upgrading" and am looking for some suggestions for this little project. The bag structure is a pretty solid box, with the feet and arms being additional boxes glued on to the body that are partitioned off, so I feel like it's a prime opportunity to get some electronics in there. I think it'd be pretty easy to put some small switches or knobs on the backs of the arms, and it would be fairly easy to replace the eyes with LEDs, and there's plenty of room in the feet for a battery or two with space to space.

My initial thought was to replace the eyes with LEDs, have a power switch and a knob to control flashing of the eyes (using a 555). But I feel like I'm not being imaginative enough and am fishing for ideas. Are there any kids' toys that have interesting electronics that I could poach and install in this bag? Something with lights and sound?

I don't want the electronics running permanently, so want something that is powered with a switch and only draws power when turned on (so the battery/ies last and so it doesn't accidentally go off in the cinema or something). And I'd like it to work immediately on being turned on, so I think I'm ruling out anything programmable like a Pi or Arduino, since their boot times are far from instant. 

I've attached a straight-on front picture with this post (showing rough dimensions), but I've put up a load more at https://imgur.com/a/ePomB

Anyway, give me a shout if you've got any ideas!
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2025
  • Country: nl
Re: Pimp My Handbag?
« Reply #1 on: February 04, 2018, 12:11:48 pm »
My initial thought was to replace the eyes with LEDs, have a power switch and a knob to control flashing of the eyes (using a 555).
Agreed. Can't possibly go wrong with some glowing red eyes.

In the led theme you could use a few RGB leds, use microcontroller with temp sensor, have the color indicate ambient temperature. Use an accelerometer, and when a fast circular motion is detected have the bag go "weeeeeeey!!!". When the bag detects it just has been unceremoniously dumped to the floor it could utter "Oi!". Or you could have it go full Marvin the Paranoid Android. When your geotagged-by-mobile-phone-proxy girlfriend gets too far away from the bag, have it go "Don't leave meeee! *pout* Everybody leaves me.  :'(" in full Marvin melancholy drama style. (but maybe best not ;) )
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4654
  • Country: au
  • Question Everything... Except This Statement
Re: Pimp My Handbag?
« Reply #2 on: February 04, 2018, 12:15:58 pm »
how can you mess with perfection :)

maybe a little mp3 chip and make one of the ears a button
"Terminate!" for fun :p
"Your male companion offered you his cardiovascular muscle, wont he need that?"
"I cannot dream of electric sheep, Nintendo copyrighted those"

Or just dump a number of glados from portal quotes in, makes the sample pool much larger, maybe leave out the ones about being fat :p
« Last Edit: February 04, 2018, 12:19:13 pm by Rerouter »
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Pimp My Handbag?
« Reply #3 on: February 04, 2018, 12:18:58 pm »
And I'd like it to work immediately on being turned on, so I think I'm ruling out anything programmable like a Pi or Arduino, since their boot times are far from instant.

That's true about the Pi, but an arduino's boot time is <0.1s, so should be fine for anything programmable that needs doing.

The mouth looks like it would work well replaced by a line of tiny LEDs - that could either scroll side to side (knightrider style), or interface with an accelerometer to act as a digital 'spirit level', indicating if the bag is leaning to one side?
 

Offline chris_leyson

  • Super Contributor
  • ***
  • Posts: 1508
  • Country: wales
Re: Pimp My Handbag?
« Reply #4 on: February 04, 2018, 12:31:14 pm »
You could "bling" it up with lots of small white LEDs. Use a 3 axis accelerometer to detect movement and change the LED pattern as the bag moves, you could get a cool twinkle or sparkle effect that way. Not sure of the best way of driving the LEDs and the twinkle algorithm would be kind of interesting.
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Pimp My Handbag?
« Reply #5 on: February 04, 2018, 01:19:22 pm »
Incorporate a persistence of vision display, so she can fling out messages by swinging the bag on the carrying strap!
He’s like a trained ape. Without the training.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2025
  • Country: nl
Re: Pimp My Handbag?
« Reply #6 on: February 04, 2018, 01:48:48 pm »
Incorporate a persistence of vision display, so she can fling out messages by swinging the bag on the carrying strap!
Best plan yet!  ;D
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Pimp My Handbag?
« Reply #7 on: February 04, 2018, 02:12:07 pm »
Best plan yet!  ;D

THX  ^-^

Also: Good quality LED lighting of the interior is mandatory I think. The light should be switched by opening/closing the bag and have a nice fade to full brightness instead of bulky on/off action.

Let me know if you need a simple Arduino sketch for fading PWM driven LEDs.
He’s like a trained ape. Without the training.
 
The following users thanked this post: yorkshire_drew

Offline kalel

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: 00
Re: Pimp My Handbag?
« Reply #8 on: February 04, 2018, 02:30:07 pm »
It should also be considered how many LED/s need to be powered and controlled, to see if some kind of multiplexing is needed and what the smallest/simplest solution is for that so it can be integrated.

Arduino should definitely be capable enough to do the job.
 

Offline yorkshire_drew

  • Newbie
  • Posts: 4
  • Country: gb
Re: Pimp My Handbag?
« Reply #9 on: February 08, 2018, 05:16:19 pm »
Thank you all for the great ideas. Time to actually sit down and get this thing planned out. If it works out, I'll post photos/videos. If not, you'll never hear from me again!  ;)
 

Offline yorkshire_drew

  • Newbie
  • Posts: 4
  • Country: gb
Re: Pimp My Handbag?
« Reply #10 on: February 08, 2018, 05:25:04 pm »
That's true about the Pi, but an arduino's boot time is <0.1s, so should be fine for anything programmable that needs doing.

I've never used an Arduino, but had a Google before posting to see if it was an option or not. Good job you corrected me, since that opens up loads of possibilities!
 

Offline yorkshire_drew

  • Newbie
  • Posts: 4
  • Country: gb
Re: Pimp My Handbag?
« Reply #11 on: February 08, 2018, 08:26:03 pm »
Let me know if you need a simple Arduino sketch for fading PWM driven LEDs.

Yeah, if you've got one you're willing to share, please do! There looks like there's vast amounts of Arduino stuff online, but having a sketch to start from sounds like a huge benefit!
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Pimp My Handbag?
« Reply #12 on: February 09, 2018, 12:37:29 am »
Here is a simple sketch that controls a PWM output pin via a push button. The button cycles through four brightness levels, but if you want simple on/off functionality you can just get rid of the switch cases and only use the tiny fade subroutine. It is nothing fancy and there are much more elegant ways to do this, but should be easy to understand what is going on for starters :)

You can power small LEDs directly from PWM pins but this should be strictly limited to 10-20mA - more current and you risk blowing that pin on the mcu.
For switching larger loads you need to use a bipolar junction transistor or MOSFET and a current limiting resistor connecting the PWM pin to the base of the BJT / gate of the MOSFET.

Code: [Select]
/*
   Multi-press button sketch to PWM drive a MOSFET for constant voltage LED strip dimming
   by: Frederik Brückner
   date: 2018-12-22
   license: MIT License - Feel free to use this code for any purpose.
   No restrictions. Just keep this license if you go on to use this code in your future endeavors! Reuse and share.
   Recommended MOSFET: IRL540
*/

volatile int count = 0; // Count button presses, initialize to zero
volatile int currentBrightness = 0; // Keep track of last brightness level, initialize to zero
volatile int setLevel = 0; // Set new target brightness, initialize to zero
const int BUTTON = 2; // Input button on pin 2
const int PWM = 5; // PWM pin to drive MOSFET on pin 5
const int full = 255; // Configure brightness levels
const int mid = 80;
const int low = 10;
const int fadeSpeed = 5; // Fade delay between brightness levels
volatile boolean state = false; // Should the MOSFET be powered?
unsigned long time; // Keep track of loop time
unsigned long lastFade; // Keep track of fading time

void setup() {
  pinMode(BUTTON, INPUT_PULLUP); // Enable "button" as input pin, internal pull up
  pinMode(PWM, OUTPUT); // Enable "PWM" as output pin
  attachInterrupt(digitalPinToInterrupt(BUTTON), buttonPressed, FALLING); // Call interrupt routine on falling edge
  lastFade = 0; // Initialize to zero
  analogWrite(PWM, setLevel); // Set PWM output to zero

} //end setup

void loop() {
  time = millis(); // Loop timekeeping
  switch (count) { // Finite state machine to set brightness target levels
    case 0: // Off
      setLevel = 0;
      break;
    case 1: // Low on
      setLevel = low;
      break;
    case 2: // Medium on
      setLevel = mid;
      break;
    case 3: // Full on
      setLevel = full;
      break;
  }
  fade(setLevel, time);
} // end loop

void buttonPressed() {
  static unsigned long lastInterrupt = 0; // Time since last interrupt occurred
  unsigned long interruptTime = millis(); // Time when interrupt occurred
  // If interrupts come faster than 200ms, assume it's a bounce and ignore
  if (interruptTime - lastInterrupt > 200) { // Count three button presses and roll over
    if (count >= 0 && count <3) {
      lastInterrupt = interruptTime; // Reset debounce timer
      count++;
    }
    else if (count == 3) { // If count exceeds 3, roll over to zero
      lastInterrupt = interruptTime; // Reset debounce timer
      count = 0;
    }
  }
} // end buttonPressed

void fade(int Target, unsigned long thisTime) { // Fade currentLevel to new value
  if (thisTime - lastFade >= fadeSpeed) {
    if (currentBrightness + 1 <= Target) {
      currentBrightness += 1; // Increment currentBrightness
    }
    else if (currentBrightness > Target) {
        currentBrightness -= 1; // Decrement currentBrightness
    }
    analogWrite(PWM, currentBrightness); // Set new brightness level
    lastFade = thisTime; // Reset fade delay
  }
} // end fade
« Last Edit: February 09, 2018, 12:56:40 am by frozenfrogz »
He’s like a trained ape. Without the training.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf