Tuesday 3 November 2015

Talking Scary Pumpkin


It is Halloween, or at least it was when I made this pumpkin,  and I had to make something scary otherwise.
The pumpkin needed to have sound, flashing lights and sensor to trigger when people were walking past, and everything powered with 9V.

Code is available here


I ordered a simple MP3 serial player to connect to the Arduino, one small amplifier to pump the sound, two speakers, PIR sensor and a lot of leds.

MP3 Serial player
PIR sensor

But remember, dont buy always cheap stuff otherwise you will end up to fine tune your installation without any clue, read more about below.

Why you need to spend that pound more
I tried to make the whole project as cheap as possible due to the pieces that I wasnt going to re-use anymore. But this came with a price to pay, having sensor which dont have any labels on the PCB and you have no clue what each pin do and how to tune it.

After few investigation and comparing the good PIR sensor to this cheap one, I find out what are the pins to connect and the two potentiometers.

From the picture above you can see no labels are on the board and I pointed each one pin where should be connected to get it working.

The potentiometers was a bit tricky as different boards on the internet were showing different functionality. 
This board has the first potentiometer which set the sensitivity of the sensor, turning to the left it will make less sensible and to the right more sensible.
The second is setting the timing but it is very sensible as the position on the picture would be 65 seconds of wait and twisted all the way to the left is 2 seconds, so I would assume that all the way to the right might be 260 seconds. 

I hope these information might help someone having the same issue as I had in this installation.

You can see from the picture below that is a total mess! Sorry, I didnt have time to clean it up as it was a one day project and it needed to work the day after.

I have used some stick to help to position some leds in the eyes, position the PIR in the nose, place the speakers on the back, some leds inside to make a nice light reflection and the arduino.

The MP3 player was connected over Serial and then amplifier on the output and then to the speakers, make sure you use 5V, otherwise the module might reset and make a horrible noise.

I had 4 strip of leds which had 4 light on each one, I have connected them to 4 pwm pins to make sure I can play with flashing and fading.

I found an old case for the battery which will provide 9V to the arduino and the PIR sensor connected to one of the digital pins.

How it works
Probably you already understood what I have done if you read the lines above, but my idea was to scary people by walking pass to a glowing pumpkin and make them think that it was alive.

The Arduino has two modes, one that glow all the lights with a different timing, and one flashing and triggering the sound. The PIR sensor was the device that was triggering the different mode and some delay to make sure the pumpkin wouldnt go crazy.


A video posted by Christian Bianchini (@christian.bianchini) on

A video posted by Christian Bianchini (@christian.bianchini) on

Saturday 24 October 2015

MP3 Player Serial

The mp3 player serial is a cheap solution to add sound to your project, otherwise you could get a shield from Sparkfun or Adafruit which would cost more.

Shop online

I couldn't find much information about this device or the vendor didn't give me a datasheet or sample arduino, so after I google for a while, I found all of it.

Datasheet and Sample Arduino


The wiring is pretty simple, connect the serial communication to the Arduino and 5V is required.
In my project I add a 3W amplifier just in case the sound wouldn't be too loud but otherwise you can avoid it.


The datasheet confirm that there are these commands available for this module:

  • Next song
  • Previous song
  • Play with index
  • Volume up
  • Volume down
  • Set volume
  • Single cycle play
  • Select device
  • Sleep mode
  • Wake up
  • Reset
  • Play
  • Pause
  • Play with folder and file name
  • Stop play
  • Cycle play with folder name
  • Set single cycle play
  • Set DAC
  • Play with volume

Tuesday 5 May 2015

3D Printed Chain Guard

I changed my Crank of my bike recently and it didn't have a chain guard to protect my jeans to get smashed and dirty.
The options were to buy one online that means 10-12 GBP or to get a 3D model online and print it with my "already paid" filament.
I went on Google and found one model that looked good and big enough for main Crank but when I tried on my bike, it was too small.  What I have done is to measure the right diameter and increase the size to match my 12 cm disk.


I have shared the model, even if it is not the correct ratio, but people could improve it and print it.



Final result with 4 M4 screws

Friday 13 February 2015

Leds Jacket

In my little part of Switzerland, there is a huge celebration for the carnival that can last for over a month, and one of the way to enjoy this event is to dress up, party and enjoy the night.
My project fits into the "dress up" step, where I made my own costume leds jacket that react with the sound and has different modes.

- 1x old jacket
- 1x arduino
- 1x spectrum sparkfun or MSGEQ7
- 1x microphone
- 1x Lipo battery
- 1x 9v battery
- 1x lot of meters of leds ( addressable are better )
- few step down 5v ( if you run a lower voltage leds compared to the battery )

You have to be creative, I decided a bit randomly how to place my strip of leds and based on that you have to think what kind of animation you can display.

Best way to stick your leds on the jacket is to saw them a bit every 20-40 cm then put a piece of fabric on the top to avoid people grabbing the strip or get stuck somewhere.

If you are lucky enough, you will have a jacket with more than one layer of fabric, so you can run cables inside the jacket without touching them when wearing the jacket, and remember to find one with some big pocket inside to store battery and arduino.

The microphone is the tricky one to place, it took me a while to stick in the right position but with some sewing and hot glue everything stayed in position.

Remember, try to find the best position to fit everything and close to inside pocket to avoid to pull any cables that will stop the fun.

The battery is up to you, in my case I decided to use a 5v addressable leds that will consume 3.2 A and one lipo 4S 4000 mah to power them. The battery life is about 6-8 hours but it can be extend by lowering the brightness via code.

In addiction, I had to use 3 step down 5V, be sure to use a switching converter to avoid any lose on the conversation. I bought few of them from HobbyKing and they are UBEC converter.

Dont forget to have two batteries, one for the Arduino ( can be a 9v battery ) and one to power the LEDs, this because you might want to have all the possible current to the LEDs and avoid any "power down" or "frying arduino" due to the higher current.
It might sounds silly but it's just less work to do and much more safe.

I got a fuse in my jacket between the battery and my leds strips, just in case there are any shorts, I wont burn =).

I am not a great guy in terms of design and animations, so I had to watch some youtube videos to get some inspiration. I have implemented 4 modes on my jacket and 6 mode for the brightness&control.
The 4 modes shuffle every 60 seconds and they do react with sound or when I change to manual, they read random values to replaced the microphone. 

I have implemented the green button to switch between 6 modes: Microphone, Microphone 50% brightens, Microphone 20% brightness, Manual, Manual 50% brightness and Manual 20% brightness.

To have a quick access to the operation of the arduino, I soldered a switch to turn it on and off.



Wednesday 7 January 2015

Watering system

I bought a plant, a Christmas tree ( actually two of them ), because I felt like I had to decorate my desk at work, but I was failing to water it regularly and I came up with a plan.
I decided to check on ebay for a very small and cheap pump, a soil sensor, a small arduino and few
other bits.

Wiring of transistor may change based on your model 

Pump system
The pump system was pretty straight forward, one pump, a tube and wrap it around the plant.
I decide to make holes in the tube and close the end of it, in this way the water would come out uniform and gently instead of flooding. the terrain.

In addition, I designed 4 pins to hold the tube down to the soil and point the water against the middle instead of having some random ray of water coming out of the pot.

Soil sensor
The soil sensor was the easy bit, just stick the "fork shape" into the soil and read the analog input from the chip, nothing very difficult, a part from the missing datasheet.
My chinese sensor was giving me 1024 when the soil was dry and almost zero when everything was wet.

** Note ** The soil PCB broke down after 1 week, so better if you stick two wires in the soil

I wrote down some code to make sure to trigger the pump only in a specific value, adding a delay ( in case the sensor will fail ) and a max pump time ( in case the sensor will be slow to read the current change of the soil conductivity.

Box and Tank
I had to keep everything clean and nice to look, so I designed two boxes: one to put all my electronics in and the second to keep 0.6L of water.
Very simple basic, nothing too complicated, I wanted to use a simple bottle as tank, but was very unattractive.

Source code
You can find one copy of my source code and 3d models on my github:  *** Soon ***


Tuesday 6 January 2015

Bosch kettle - Reduce beep noise

I got a Bosch Styline Kettle and I am happy with that, it does the job and pretty quick. There is one small thing that is annoying me, it is the horrible beep noisy that it makes when I start and when it finishes the job.
Unfortunately, using a normal screwdriver to unscrew the 4 screws below the platform wasn't possible, I had to buy a special tool to access the inside of it.

The tool bit to unscrew these special ones was "Spanner (snake eye): 4, 6, 8, 10", I reckon I used the number 6 but better to get a set as I did. You can find one on Ebay for about 8 pounds.

Find the buzzer
This is what it looks like inside the base of the Bosch Kettle, simple PCBs, and you can spot the annoying buzzer on the right side.

Fix it!
Applying a bit of tape on  the top of the buzzer will reduce the noise and still notify when it has done the job.