Sunday, February 28, 2016

rev 4 soldered up and working!


Yay.  :)

Today I mostly soldered up a batch of six PCBs, but completed one to verify that everything was functional.  This one is going to a beta tester / evaluator.  The rest are mostly going to be reserved for educators that can give me feedback regarding lessons and suggestions for documentation.

Looks like I can start working with the PCB assembly house to ensure that they can produce these boards without any issues regarding my parts and layout.

Tuesday, February 23, 2016

K40 laser -- affordable, but kinda scary

There has been so much activity on G+ regarding the K40 "eBay" laser that I had to get on board.  The seller was in the US and should get it to me in less than a week.  Well, you know what?  It came in today, and here is the official unboxing.  I don't have too much to say at the moment, so here are pictures.





CE = Chinese Export
FDA = Fools Da Authorities


Busted vent duct, which I was planning on replacing anyway, plus a duct fan.  At least the duct ends sort of protect the optics.


I think I will be using some OpenBuilds extrusions to build a frame for this.  Something with protective windows, ventilation, and a place to hold the water tank for cooling off the laser.  Needs casters so I can roll it outside to run the cuts.

I hope to have some free time at work eventually, so I can get this thing running!


Monday, February 15, 2016

Charting Starbucks gift card discounts using Google Charts

Sunday, February 14, 2016

Data scraping to save money

Recently, I heard about a new company called Raise.  On the surface, they are in the business of buying used gift cards and then reselling to their customers at a discount.  I am really only interested in their service because I (unfortunately) occasionally go to Starbucks early in the morning to get breakfast.  Their turkey bacon breakfast sandwich with egg whites makes me feel like I'm going with a healthier option (instead of McDonald's), and the price is acceptable.  Raise makes the price even better, and their mobile app makes purchasing these gift cards a snap!

However, when is the right time to buy a discounted gift card?  "Buy low" is certainly the right mindset, but I have seen the discounts fluctuate from anywhere between 8% and 19% recently.  I thought it would at least be cool to be able to track gift card discounts over time so I'd be in the position to make a more informed decision when I need to get another card.

I couldn't find a Raise API online, so I opted to scrape their pages for data.  To simplify the approach, I limited the data of interest to the best discount available for a gift card, i.e. the first one on the page.  Thankfully, Raise displays all GC information without a user login, so I wouldn't have to deal with this extra level of complexity that I'm not experienced enough to handle right now.

My regex skills are rudimentary, but easily came up with a pattern that was good enough to scrape the data I wanted from the HTML source.  Now I just needed a way to post the data on a webpage.  Since I'm not a web developer, I had to come up with a really kludgy implementation that I think will work:



The app is complete and will download the Raise webpage for the Starbucks GC every hour.  It then runs my regex and scrapes the GC data from the page.  If the discount is different than the previous query (my app will query once an hour), then it will push the new value to data.sparkfun.com.

You can check out the raw data here.  There's some garbage in there from testing, so just ignore that.

https://data.sparkfun.com/streams/2J5Knq47y5cNbOrq3lj2

Next, I will be addressing the visualization part of this project.  When (if) I figure it out, I'll blog.  Hopefully, I have the ability to host Google Charts in a blog.

Are you interested in data for a different gift card?  Post a comment, and I might just add it to my query!

Wednesday, February 10, 2016

CH340G tester board is in

I'm not leaving anything to chance when sourcing ICs from China.  I can't afford to have boards assembled and then be bricks because of a dead serial converter chip.  I ended up making another simple board for testing the CH340G.


Thursday, February 4, 2016

r3 of the PICAXE board arrived!


Here it is, the latest rev of my low cost PICAXE board for kids!  Same size, but more pins than before!  When I make these in large quantities, the cost of putting components on the bottom side of the PCB is negligible, so I decided to do just that and cram in a larger PICAXE.

I was very excited to get this board soldered, so I assembled one at work, only to find that it didn't work.  When I plugged it in, the power LED came on, but I didn't get my friendly Windows chime that it makes when USB devices are recognized.  Thinking that maybe I did a bad job, I soldered up another one. That one also didn't work!  No way, I couldn't have made a mistake on the schematic, could I?  I mean, it was just a PICAXE change, a different LDO, and I added a jumper for external power.

I brought the boards home with me, hoping that I would find time tonight to diagnose the problem.  Luckily, I did find the time.  And there were a lot of problems.

The first thing I did was take a bare board and check the connections.  I found that there was a trace in my layout that shouldn't have been there.  I think that in the process of routing and rerouting, I forgot to delete an extra trace and ended up with some components shorted to ground.  Next, there was a trace missing between the CH340G and one of the 22pF capacitors.

Once I made these changes, the COM port was recognized!  Yay!  Ok, now to test my simple program from the 14M2 on the 20M2.


But it wouldn't program.  The first thing I checked was the Serial In line, and sure enough I found a problem there.  One cut and add later, I got it all working.  Phew.



I'm not sure that video uploaded properly.  You can also see it on Google+.