Pages

Thursday, August 11, 2016

ESP-01 Programmer for ESP8266

I have been working on a new wifi enabled version of the pumpkin project and as part of that effort I am using ESP8266 modules. The issue I was having is that programming them via breadboard was kinda bulky and when I ordered a PCB for a programmer it turned out to have an error in the design. The solution was to create my own. I wanted something that was minimal in parts and would just get the job done. The final product is a simple PCB with 4 components attached. To program you hold down the program button and tap the reset button and BAM! it is ready to be programmed. I left out a 3.3v regulator like lots of the other designs out there since I always use FTDI friends that have a 3.3v setting. it has made programming way simpler. I hope you find it as helpful as I did also ordering it via OSH Park 3 boards only cost $3.10.

For the build you will need:

Just solder the parts on the PCB and you are good to go.

 Here is what I was using to program a mess of wires and a pain to hook up a new esp-01 on.





























Here is the bare PCB and the PCB with buttons and FTDI header installed.

Thursday, November 5, 2015

Talking Pumpkins 2015

This is an update to the talking pumpkins rig I made back in 2013. The new project uses an arduino and an MP3 module instead of a PI for audio playack. I also made a 3D enclosure for the electronics. For the candles it is a repeat of the old build and I tried to keep the pins the same in the move from an arduino Uno to a Pro Mini. For audio I went with the DF Player Mini. I choose this sound board due to price and that unlike several other options in the same price range this module was not as picky about SD cards and supports larger than 2GB cards. A Video of it can be found on my youtube channel at https://www.youtube.com/watch?v=nb4y2U_qz3o

The Hardware:
1 - PIR sensor -  http://www.adafruit.com/products/189
1 - 15ft phone wire
6 - LED flicker candles
5 - red flicker LEDs -
http://shop.evilmadscientist.com/productsmenu/partsmenu/576
10 - 220Ω resistors - from that compartment in my tool box
5 - random proto boards the ones I used for this are no longer in production sadly
1 - small mint tin proto - https://www.adafruit.com/products/1214
1 - Micro usb breakout - http://www.adafruit.com/products/1833
1 - Arduino Pro Mini - https://www.sparkfun.com/products/11113
1 - smallish speaker - had one around
1 - DF Player Mini - http://www.dfrobot.com/index.php?route=product/product&product_id=1121#.VigOOvmrSUk
1 - 4GB Micro SD card
1 - 2600 MAh power bank

The Build:
This is all the same as my old project. I took apart some flicker LED tea lights and drilled a few holes as well as made room for the boards for the 2 LEDs.




















The PIR sensor is just a standard pir from adafruit. I connected the jst cables to some phone line and run that back to the arduino. To get it mounted I cut a pass through for the connector where I wanted the sensor and used toothpicks through the mounting holes to hold it in place.

Now for the assembly. Each candle will need one yellow and one red flicker led and some 220Ω resistors. The diagram will look something like what is seen in the diagram. You have a resistor to vcc a resistor to ground the diodes connected in series and the pin connection for the arduino between the LEDs. The way this circuit works is when the pin is high no voltage can pass through the yellow diode since the diode is being reverse biased. When the pin goes low the red diode will be reverse biased.
For this project I decided to use phone line since it would keep my wires nicely bound and give me the 3 leads I needed. To keep things clean I just cut back the fourth wire. For the arduino side I built a harness for the lights. The main board has a ground and 5v bus and connector pins for providing ground and 5v to the harness as well as a pin for the PIR sensor input.



The Pro Mini does the selection of the audio and the DF Player Mini does the heavy lifting. I apologize that the fritzing diagram is missing a part but the player mini was not anywhere I could find. To help I have included pictures as well as the fritzing diagram.


above is the back of the enclosure you can see the micro USB connector and the df player mounted to the mini tin proto-board.

Here you see the completed circuit all that is missing is the front of the case. 

Here is the fritzing diagram to help show how things were connected a bit better than the pictures above.






The Code:
The code was like the old pumpkins when the PIR is triggered it picks a random script to play thorough and after it completes it waits 3 minutes before re-trigger. THe change was moving the logic that played back the audio out of the python script I had written for the Pi and into the arduino script using the DF player library. Information on getting the required librasry and all audio files are in the github repo. 



The full repo can be found at: https://github.com/igetio/TalkingPumpkins

Tuesday, February 3, 2015

Update and News for 2015!

I know I have not given an update in some time but more is on the way. For the holidays I picked up a printrbot from adafruit. I have started playing with that and am working on a project that merges electronics 3d printing and gaming. I am starting work on a light up commander tag like the ones in guild wars 2.  I will try to provide more active updates this year and I have already started planning for a revamp of the Halloween pumpkin display for 2015.

I have also started a new channel on YouTube for videos of my projects and 3d prints. Feel free to check that out here. https://www.youtube.com/channel/UC9OJCGHSJsvoSl5N-WNwOEA

 I just started working on the PiGRRL raspberry pi gameboy https://learn.adafruit.com/pigrrl-raspberry-pi-gameboy, I have uploaded the print out of the case top and you can see it here: http://youtu.be/Al2zXFoV23E

It looks like 2015 is going to be a good year for IGetIO so keep checking for updates.

Thursday, May 8, 2014

Arduino Powered 5 Minute Color Timer

My daughter has been having issues keeping on task when getting ready in the mornings so I decided to make a timer for her. Instead of displaying the time it uses a light that fades from green to red over the five minutes. When the time runs out it buzzes for 10 seconds and goes into power save mode.

There were several revisions this went through using normal LEDs and interrupts I even tried it on a trinket but that is another story. The final version uses a single neopixel and a mini pro which I got from sparkfun on arduino day.  The way that this was built will allow me to easily reprogram it and it allows the option of adding a neopixel ring in the future.

The Parts:
1 x Arduino pro mini 3.3v
1 x Mini Speaker
1 x Perma Proto Board
1 x 2 AA Battery Holder
1 x Panel Mount Switch
1 x Neopixel
1 x Window Top Tin
Some Rice Paper
Assorted Lengths of Wire

The Buildout:
 For this project the hardware is fairly simple. The Arduino uses pin 6 for the Neopixel and pin 7 for the speaker. The switch on the side is wired between the battery pack and the Arduino raw input. All parts are held in place using double sided foam tape.







The Code:
also available on git-hub here


The Results:
The final project is this simple box with a glowing light inside. It starts green and moves from orange to red and when time runs out it flashes red and beeps.






Friday, October 18, 2013

The Pumpkin Project: Part Two

Today we have the build pictures and code. There will be a final post covering the final set up on Halloween so keep an eye out for that. It will include video of the final setup.

The Hardware:
1 - PIR sensor -  http://www.adafruit.com/products/189
1 - 15ft phone wire -from Wal-mart
6 - LED flicker candles - from Target
5 - red flicker LEDs -
http://shop.evilmadscientist.com/productsmenu/partsmenu/576
10 - 220Ω resistors - from that compartment in my tool box
6 - Some random proto boards - https://www.sparkfun.com/products/8885 and https://www.sparkfun.com/products/8847
1 - Arduino Uno
1 - Raspberry Pi
1 - Powered Speakers - had some laying around
1 - Wireless card - had 3 laying around

The Build:
The first step was taking apart some cheap flicker led candles and clearing out space inside. After the led is removed the post holding the led can be removed from inside and the plastic guide for the power switch can be removed too. You will also want to remove the contacts from the battery housing and look free CR2032s. The last prep step is to drill a hole for the second led and the wire.




















The PIR sensor is just a standard pir from adafruit. I connected the jst cables to some phone line and run that back to the arduino. To get it mounted I cut a pass through for the connector where I wanted the sensor and used toothpicks through the mounting holes to hold it in place.

Now for the assembly. Each candle will need one yellow and one red flicker led and some 220Ω resistors. The diagram will look something like what is seen in the diagram. You have a resistor to vcc a resistor to ground the diodes connected in series and the pin connection for the arduino between the LEDs. The way this circuit works is when the pin is high no voltage can pass through the yellow diode since the diode is being reverse biased. When the pin goes low the red diode will be reverse biased.


For this project I decided to use phone line since it would keep my wires nicely bound and give me the 3 leads I needed. To keep things clean I just cut back the fourth wire. For the arduino side I built a harness for the lights. The main board has a ground and 5v bus and connector pins for providing ground and 5v to the harness as well as a pin for the PIR sensor input.




The Code:
On the arduino side we have code that will pass a value over serial when the pir sensor is triggered. The value is random and will tell the pi what dialog chain to run through. It will also wait for a clear signal from the pi before starting a new chain. During a chain the uno will parse a 5 character string to determine which pumpkins should be talking. The code can be seen below and on github at: https://github.com/igetio/PumpkinsV1/blob/master/arduino/PumpkinV1/PumpkinV1.ino


For the pi the code will play a dialog chain based on what the arduino says. When it strarts a chain it will tell the uno what pumpkin to light and will play an audio file. When the audio is done it will tell the uno to light the next pumpkin in the chain. When the chain is complete it will then wait 20 seconds before sending an all clear to the arduino starting the process over. The code can be seen below and is on github at: https://github.com/igetio/PumpkinsV1/blob/master/python/talkingPumpkinsV1.py


I have also included the audio files for the project on the github repository. If you have questions about the audio files they are pitch tempo and level shifted to some degree or another. https://github.com/igetio/PumpkinsV1

Thursday, October 10, 2013

The Pumpkin Project: Part One

So, it has been some time since I posted. I have a big update coming. I have finally started work on my talking pumpkin project. Soon I am expect to receive the last few pieces and that will let me start the final build.

Overview:
The pumpkin project is something I dreamed up this time last year having seen the thousand's of other pumpkin projects I thought why not build my own. What I have is a PIR sensor (more on that choice later) an uno and a pi. When the PIR gets tripped the uno sends a signal to the pi and a playback of a script is started. When the playback is over the pi tells the uno to start watching the PIR again. Yep, that's right, it's another talkingnpumpkin project.

The How:
So I ended up using a pi for audio and for managing the playback of the conversations. One of the "exciting" pieces of this project was getting the pi and uno to talk via serial over USB. Getting them talking was simple enough. Realizing that python does not like serial readline to end in \r\n meant some work and time spent wondering why my if statements didn't work. On the other side of things was the uno which can output serial as ASCII but only reads in one char at a time and compares it natively as hex code. After getting the two devices actually talking and handing control to each other things went much faster.

On to the sensor, the reason I used a PIR sensor, aside from them being cheap and me having one on hand, was the space where I am setting up this year is inside a screened in porch and people will be coming up a bent staircase to get to the door. When testing the PIR and an ultrasonic sensor the ultrasonic sensor was not getting good readings through the screen and its field of vision was too narrow.

The Build Plan:
It always comes down to time and money. I was hoping to do some work with wireless but have not had the money to get that up and running. My original plan was for 3 pumpkins but we actually ended up with 5. The plan for this year is to use phone line to wire up each pumpkin. In the interest of keeping the build simple this year I went with 2 different color flicker LEDs one for idle (yellow) and one for speaking (red). In a coming post the build instructions and code. Note: that this time I choose not to have the LEDs flicker in sync with the sound this is to minimize the number of pins used for this solution, knowing that my long term plan is to use a mesh network at which point I can switch to a more advanced logic.

What's Next:
Next steps are to build this thing and get the scripts (audio) recorded. After that I will put up more detailed instructions on what I did and some video of it running. For now I have some pictures of the pumpkins.








Monday, July 1, 2013

I Got a Whole Lot of Pi Here

So to break from the normal post here I am just going to say there has been a brief break in my building as I am playing with 2 new raspberry pi's. I am really only playing with the one right now getting it set up as an XBMC box which is why I had to go get a second one. So I have been setting it up to supplement what I already have at home. I am using it for streaming and media sharing. I have been through a few flavors and am currently running xbian on the the media center box. I also have not had a chance to unpack all my stuff and really get working on any new projects yet. I am not sure what I am going to do with my second pi yet but I am thinking it can help with a few projects this fall. for the media center pc I bought a few parts from newegg and have been running that on my TV. I picked up a USB hub and a 1TB external HDD. I should be getting back into building in the next few months but for the summer I am expecting my project volume to be a bit low. I will try to get some of my other older projects posted soon.