Thursday 29 August 2013

Decisions, Decisions

Time has come for me to Fish or cut bait.  I have been wanting to write up the BHD control set-up and allow others to use it too.  But i have decided to delay it, and give it another few events testing, add the safety relays and make sure it is totally safe.  But also add the DBC, Magic Panel, Data Panel (for those that want it, im not fitting one in mine), and also make a start on the Touch Screen controller for in the droid and get Mk2 PS2 Pad complete and maybe using custom PCBs for the shields and pad. :)  It will be much easier to support something that is pre-made rather than users making their own shields.  Most of my set up issues (and James') were wiring related, and this would eliminate a lot of that.  I may be able to get the new Twist Paw arms in and working, maybe add an X axis for the HPs, and maybe a few other gadgets before it goes live too. :)

So now refocused, i am tracking my Magic Panel as it is shipped from the US, hope to finish the DBC this weekend, shouldn't be long till i have the Data Panel and that will be an easy job to add and code up.   I will start all 4 relays this weekend (2 for the feet and 2 for the DC converters that power the servos).  So in a few weeks time i will be ready to start on my touch screen.  But should have an all singing all dancing R2 for the upcoming events. :)

The plan for the touch screen is to have a touch LCD screen (ideally 5") fitted in portrait behind the big door on the front, so instead of having the Data Panel, i will have my touch screen.  Id like to be able to do almost anything i can do on the pad via the screen, this may mean a menu system, but should be fun to do.  I need this screen to send the scripts to the master via I2C, currently the Uno i use as the master is using all 20 pins, so I2C is the only option left. :)  So i hope that the Screen will talk to the master using 2 way, and the master will talk to the end units, need to get the screen and start playing. :)  This one should be a really nice addition and make the BHD system not just a very functional system, but a cool one too. :)

I need a free graphics app to create the images i will use on the LCD, does anyone have any recommendations?

Saturday 24 August 2013

Dome Bump Controller - Part 2

So i got the code working, but soon discovered lots of tweaks to make it more usable. this is a list of what i added and changed.
1.  Removed flash after button change to make lights more responsive and not turn off.
2.  Added PSI Confirm Flash pattern to more easily see when activated.
3.  Refined all the Get Out commands to reset more easily if wrong code added.  Any bad combo, or too short or long will error it out.  These only apply depending on conditions to allow it to be played without activating.
4.  Added PSI Get Out Flash to see when it crashes out (it looks like an X on the PSI, may tweak this when diffused to more easily see the shape).
5.  Added de-bouncing to the 2nd confirm to make it easier to trigger.
6.  Added a boot up combo to see if it reboots more easily.
7.  Added the combo entered in the end confirmation flash. :)
8.  Changed all the delays to take out flashes during get out and make it more sensitive but still usable, it now times out in 1s, so it has to be done as a combo, and all the flashes are much shorter to make it quicker to use, but still recognizable.

So the steps to use it successfully are:

1.   Hold both until flashing starts (1.5s).
2.   Release buttons during flash.
3.   Button A or Button B until Flash (0.5s).
4.   Release button during Flash.
5.   Repeat 3 and 4 for the Same button, only one button should be use and from 1 to 3 times.
6.   Hold both buttons until flash starts (1s, then combos are sent on signal lines).
7.   Release buttons during flash.
8.   Flash pattern will confirm the code received.

Resulting in 6 combos, A, 2A, 3A, B, 2B, 3B, or 1-6. :)  These output on 3 signal lines to the master.

The BHD I2C stuff is in, i just need to do the spreadsheet of the scripts that use the rear PSI, then do the timings and the scripts themselves, but all easy to do, just a case of getting on with it.  Once that is all done and in tune with the main setup, i then need to add the reading of the signal lines to the master, then i will be able to upload the code to the DBC and see it working in the dome.  :)

Im really pleased with it, from where it started this morning (i had thought it was almost done) it has come a long way, it is really usable but you need to know what to do, so its spot on.  I havent had any bad signals, and i love that it confirms what it read. :)

Here's a vis of it so far:

Monday 19 August 2013

Dome Bump Controller - Part 1

The DBC arrived the other day.  It is a pretty piece.  I followed the PDF and soldered it up.  Then went to look at fitting it.  The dome has 2 bigger holes so that the buttons sit under the outer layer, this was perfect for the DBC, and didnt need any work at all.  But i had no way to add screws, and didnt want to add the the steampunk look by bolting through both layers.  But the fit on the dome is so nice.  So much so that i just cleaned the dome and the housing and used superglue powerflex to stick it in place.  Its not perfectly square, but the buttons seem to work fine, so good enough, and it's not coming out without a fight, and if it does i can straighten it next time. :)

So with it fitted i needed to decide how to use it.  The default code controls the rear PSI and outputs different signal lines depending on the combo used.  But i need the rear PSI able to be triggered to run the same as the front PSI during things like the Cantina and Leia message, so it needed to be able to receive I2C commands.  So after a lot of bad ideas i went for a simple setup that will work with my current setup, but that wont be required, so can be left out.  This is the plan:

I2C triggers using the same as the teeces, run the rear PSI options, e.g. flash one colour
Rear PSI will flash in the default way while inactive, so std sweep unless set by the user in code or by pad.
Buttons will flash the rear PSI when pressed, so A is one colour, B is the other and Both is all LEDs on
The code will look out for the following:
If both held for 1.5s then flash the Rear PSI in a pattern, then either press A for .5s up to 3 times, or B up to 3 times.  The corresponding colour will flash for each press registered.
Then press both again for 1.5s  (any alternate combos or held far too long etc will reset combo seek)
Rear PSI will flash a fattern
Using 3 output lines signal out the chosen on the 6 options  e.g. for 1 use B001 for 6 use B110
The signal will go high on all three lines to signal a new command is due, then it will set the output lines for long enough to be read.

This gives the option for change and growth, by adding more lines and combos if needed.

So far i have the following planned for the options:
1 x A = Random Sounds On/Off
2 x A = Random Delay Long/Short
3 x A = High Low Volume
1 x B = Random Dome Motion On/Off
2 x B = Feet Drives On/Off
3 x B = 2-3-2 ?  Maybe add extra combo for this one to make sure

So i made a start this weekend, but working with 2 buttons was more of a pain than i expected. :) I didnt work hard on it, just popped in and out, maybe why it wasn't happening.  But i got there.  I have coded all the button combo stuff and PSI default running stuff in, added the I2C base, i just need to add in the Teeces script alternatives and get the timing right on those. :)  Im pleased with it so far, it should be easy to use but not easy to accidentally trigger. :) Just needs testing to death now. :)

I have a test setup with 2 buttons, and a rear PSI, then 3 LEDs setup as the output pins and will test the code on that Uno.  Then i will need to update the master to read those pins, assuming i have enough spare. :)  Then get all the timings right for the teeces scripts and then once all that is done i will upload to the DBC.  All this fuss for 2 buttons and 6 options, i must be mad.  But that DBC is too tarty to leave out. :)

Thursday 1 August 2013

CE2 - Essen Germany

CE2 

What a great weekend, where to begin?  Lots of cool moments, but i will remember the event because of the other builders and their droids.  A wonderful bunch of people.  I felt very relaxed and in good company at all times. :)  And the droids were great, lots of cool stuff on the way. :)  At least 5 2-3-2 systems on the go, all using slightly different methods.  And lots of plans to advance things, it has worn me out.  But after a recharge I will just have to keep pushing on too. :)  Good luck everyone, i look forward to reading your progress. :)  The other thing is the kids, they do love R2, in the droid play pen on the stand they would lean in and stroke him, it was like being a zoo animal, but they loved the droids, i spent quite a bit of time driving in there.

Thanks to Arnd and Bernd and all the German guys, they did a superb hosting job.  The stand was great and lots of variation for the public to see.

But also thanks to the UK guys, all superstars, a great week, with great friends.  Some fine work all week long.  So many fun moments and about 3 million Star Wars references along the way.

R2:  A few lessons from this weekend.  The 30Ah 5v packs i bought seem to last less time than the 12Ah ones i have, so may need to try some others.  The packs also were only lodged in and so on 3 occasions i hit a bump while driving and the battery hit the power switch, not good, he just retains the last signal.  One builder's leg at low speed (sorry Michel) once while dancing in a spin.  And once while reversing.  All luckily with no damage or major trouble.  So i then taped the batteries to the main battery and it was fine for the rest of the event.  I have a plan to totally avoid this issue, will do that next.

R2's drive was a problem this weekend.  It started on the Thursday, in the press conference the drive started rubbing and he was ripping through power.  But with a bit of WD40 we struggled on.  Then disaster, R2 stopped driving on 1 side.  So i got the legs off and found that the keyway stock was missing from the drive cog on one foot.  So long story short, by locking one of the grub screws into the keyway i managed to lock it, and it lasted the event.  But while off i saw how badly the wheels were rubbing, so went hunting for 4 screws and a drill.  Felix had the drill, Bernd had the drill bits, and Heiko had the screws, i popped a pilot through the wheel hub into the derlin hub to lock it, worked perfectly.  Big thanks guys.  Couldnt have carried on like that :)

After that the battery lasted really well, so by the end of the event i was starting to trust him again.  Little bugger.  He has been pretty good recently, but every issue makes for a safer droid.  So id rather find an issue i can solve with no damage than have a good event and still have a hidden issue.

So i didnt drive him about as much as usual, but still had fun with him, the pen was a great idea. :) 

Here are a few photos i borrowed:


Me getting interviewed by Warwick Davis ;)

Flip, happy abut something.

Russian TV girl, she was dancing with R2 and shook his hand. :)

Slave Leia :D

R2 leading a troop of 6 dancing Canteena girls. :D  Good work R2.


4 UKs with the Lego R2

Anthony Daniels and the Droids. :)

The press conference waiting area droid line up. :)

Steve Sansweet with UK builders patches. :) And the UK group. :D

Clone Wars designers filming my droid. :D

Kenny Backer, UK R2 Senator, proud moment for the UK guys. :)

I have so far found 40+ vids of the EU Droids at CE2, and will continue to like all the vids i find on my YouTube channel: http://www.youtube.com/user/I8U2Astromech/

Dont forget to subscribe while you are there. :)  I will keep liking all the vids i find. :)