Windows 7 has a a limitation (That can be removed in the code of the individual driver) that you can’t set a fake mac id starting with 00 on a wireless usb So I did what any normal person would do, pulled apart the adapter, removed the eeprom found and edited the hardware MAC ID
Use a spudger to open the case, its not glued or anything.
I tried a few ways of programming the spi on board, but it just wouldn’t do it,, too much interference.
The chip is glued down, some acetone will take care of that, desolder the chip and pop it into a eeprom reader its an ATMEGA AT61 series SPI EEPROM so easy enough. Once you have the hex file, grep for the mac address in hex. Edit it to what you want it to be and reflash it back to the chip, there is no checksum etc.
You can send eeprom commands back to the chip via the driver, but I didn’t look into it too deeply;. Its pretty quick to remove it and change it, obviously this is more useful for cloning vs just changing.
The Proxim / Orinoco is just a Taiwanese usb adapter, I haven’t seen it for sale under the different brands though, but its considerably cheaper.
Its the first part, so 00-90-a9-a2-1a-33 isn’t cloneable it has to be 02-90-a9-a2-1a-33 06-90-a9-a2-1a-33 etc. Useful for when an ISP uses your MAC to identify your NIC for home internet connections etc.
Today my KL25Z dev board arrived from Newark, I had it on pre-order as soon as i saw it, mainly because its cheap at $12.95 +tax and because its ARM M0+ that can go upto 48Mhz.
Comes in a nice box you solder the headers in if you want too, otherwise you get nothing with it ( but that’s not a bad thing ) the box has a colour print diagram of the connections to the board on the underside and its a nicely packaged.
Oddly, or not, the first thing I noticed was an unpopulated spot for an IC U5, a quick scan of the schematics and its for an AT45DB161D which is a 5V tolerant 3.3V SPI flash memory chip. Which is great because I just happen to have a stack of 16’, 32’s and 64’s at NullSpace. I’ll update the blog when I add it and see if it works, it is a fairly costly IC so that might be why its not included versus a build mistake.
Underneath there is a space for a CR2032 PTH battery holder.
It is a very nicely laid out board, going for the black mask with gold finish. Though placement of the RST button could be better, the placement of the pads underneath mean when you press the reset the board flips up, less so when the USB cables are plugged in, a minor annoyance. The captouch could also have done with something underneath as well, its just slightly off balance, again very minor and easily fixed.
Capacitive touch “slider,” MMA8451Q accelerometer, tri-colour LED
Easy access to MCU I/O
Sophisticated OpenSDA debug interface
Mass storage device flash programming interface (default) – no tool installation required to evaluate demo apps
P&E Multilink interface provides run-control debugging and compatibility with IDE tools
Open-source data logging application provides an example for customer, partner and enthusiast development on the OpenSDA circuit
I dunno how I feel about the P&E stuff, Freescale must own stock in them or something, I have a bunch of P&E BDM’s, cyclones, cpu32/cpu16 etc. which i use for my reverse engineering work but they’re expensive and the software is about 1990’s level of basic, everything is an add on cost, the flash tool is one cost, programmer/debugger, capacity on the cyclone max etc. Also they don’t have a lot of protection, I’ve blown up my cyclone max with a bad PSU, for such an expensive tool its poorly protected.
Talking about questionable software, my old friend CodeWarrior rears its head again, anyone who has been in game development for a long time, especially console, probably has a special place for CodeWarrior, along with the Sony CD burners for PSONE. Freescale/Motorola bought them out a long time ago and so of course it keeps coming back to haunt me, and haunt me it does. Still I’m sure its gotten better?… I’m not sure why TI/Freescale etc wants to roll their own dev tools, maybe for QC or lock–in but GCC is OK enough to use it and ARM were smart and paid someone to make the ARM support better in GCC. Beyond that CodeSourcery seem to do a good job of keeping it all together. Maybe I do want to download another 1.5G Eclipse installer (not CW thankfully). I think its a mistake going down this route, but there you go.
Its an CDC driver that should auto install on Windows, there are drivers for it available if not. After that its drag and drop binary or Motorola S record files, they note that the dev tools work primarily on Windows but CDC obviously works on the other platforms.
Yes. This board is a really nice and versatile one! I already have published several articles around the Freedom KL25Z board on my blog, along with tutorials and software projects: http://mcuoneclipse.wordpress.com/tag/kl25z-freedom-board/
I ordered a SolderCore from Mouser yesterday, it arrived this morning. Its a pretty nice little device. Oddly I’d had some interaction with one of the creators at Rowley Associates, Paul, on an email list talking about C compilers/assembler etc and it turns out we’re both Lotus people as well as having ECU related experiences, it is a small world.
Haven’t done much with yet, since i’m not at NullSpace and all my stuff is there.
Built in Ethernet support with an on-board RJ45 connector.
USB OTG support with an on board microAB connector.
On board microSD holder.
Support for additional Flash and FRAM devices.
CAN, I2S, 2xI2C, UART, PWM, ADC, SPI and QEI supported
On board standard 10 way SWD JTAG header. (Only fitted to the Commando variant)
Power can be supplied via USB or the barrel jack (6V – 9V DC).
So decent enough specs.
Nice things are , no drivers, so no one whining about CDC driver support in Windows 7. All the help, examples firmware are net enabled. All you need is telnet to edit.
compared to a Pandaboard ES, and one of our NSL ADK boards. Soldercore in the middle.
If you want the headers, you can solder them on. I like the idea Sparkfun has with single row headers and to offset every other one so its easier to solder, but these aren’t difficult, just hold and tack the first one very lightly with solder, make sure its straight and do the others. That first tack is important so its aligned and then you can re-align easily.
I plugged it in, pinged as per the label on the back, then i use Putty to login in to it. (change from ssh to telnet) also it uses ^H for backspace so edit that too. I then posted to the forums with a hello world, but then realised it was a program that did it. So i went off to find it, since it isn’t in the examples but in the help section instead.
Had to edit a bit first. Mine didn’t like the command $NL so i used $LF instead. Then came along figuring out how to set NET.SMTPSERVER (which is fairly futile for me at this point so all my SMTP servers require a login) but trying anyway. I of course battled ahead and did NET.SMTPSERVER = “smtp.mail.com” NET.SMTPSERVER = “10.0.0.1” etc neither worked. It says ‘Digital I/O’ as the type. My SMTP server will work even less with an IP address since it wants to use the FQDN to find it. But regardless..
Luckily BASIC being immediate, i just did
PRINT NET.SMTPSERVER
Which yielded
[0, 0, 0, 0]
Aha!, So
NET.SMTPSERVER = [192,168,1,1]
Easy enough. But i don’t have an open relay… So i got as far as ?SMTP server down in 60:
10 SUBJECT = "Hello from SolderCore!" 20 FROM = NET.NAME + “charlie@xxx.com” ‘ fill in your own e-mail address 30 TOO = "soldercore@googlegroups.com" 40 BODY = "Hello from " + NET.NAME + "." + $LF 50 BODY = BODY + "My device address is 192.168.1.159 ." + $LF 60 MAIL TOO, FROM, SUBJECT, BODY 70 PRINT "e-mail away!" 80 END
It didn’t like the IP$(NET.ADDR) either so i replaced it with text.
> list ↵
10 SUBJECT = "Hello from SolderCore!"
20 FROM = NET.NAME + "@local" ' fill in your own e-mail address
30 TOO = "soldercore@googlegroups.com"
40 BODY = "Hello from " + NET.NAME + "." + $NL
50 BODY = BODY + "My device address is " + IP$(NET.IPADDR) + "." + $NL
60 MAIL TOO, FROM, SUBJECT, BODY
70 PRINT "e-mail away!"
80 END
> run ↵
e-mail away!
>
I concluded the problems/missing command might be an old firmware so I tried to do a firmware update with firmware run, but i realised it needed a FAT16 SD card (a good one not a cheap fakey one) All i had was a 16B MicroSD so its too big, but normally you’d do. 2G is what you need.
FORMAT n: /FS:FAT
where n: is the drive letter. After a year or two , it’ll be formatted
You should see something like :-
“Insert new disk for drive J:
and press ENTER when ready…
The type of the file system is FAT32.
The new file system is FAT.
Verifying 15267M (this is a problem)
You can also use this https://www.sdcard.org/downloads/formatter_3/ Which supposedly does a better job of the FAT format. I can’t try it at the moment, since format is still running.
The soldercore.com website does go into this in detail, if the GUI doesn’t show FAT as an option, the card is too big..
It has a few nice features, being able to update firmware over the internet is great, and you can type
example
and it’ll list all the examples available, over the net. Typing
example “welcome”
will load the welcome.bas, so that is pretty neat, most of the examples look like they need one of the add on boards though. It is case sensitive on the example filenames.
Typing
firmware
Seems equivalent to firmware catalog and it stops me typing catalogue(j/k)
A lot of people might gripe about BASIC but what BASIC looks like versus what goes on in the background are completely different things, look at BlitzBasic etc, they’re very quick. Having to do line numbers is a bit of a throwback for sure.
Here are a lot of builtin commands that do useful math, dot products, matrices etc. sin/cos, etc. Very useful. At worst case you can pop on a JTAG and write everything in C/ASM to your hearts content.
I have had one reset so far, but its probably the usb port i have isn’t giving me enough juice, it has external power port too. If i find a small enough SD card, i can try to update the firmware. My firmware is also at 0.9.5 which is older than they list at the website, so I’m sure some of the stuff has been fixed already. I’ll update the blog when i find an SD card.
I did all this with it so far, and no drivers installed and no software installed i can run it from android or nokia phone as long as it has telnet.
The usual BASIC commands like EDIT, RENUMBER work, its just like being back on the BBC or Archimedes.
Haven’t done much else with it yet, but I’m really interested in at as we use the Stellaris chips for other projects. I also really like Paul from the small interactions I’ve had with them, and Rowley Associates , I don’t know Iain or K&I but they did a nice layout job, so I’m looking forward to where they go with it. Anyone who’s a Lotus nut is ok with me !
Update
I realised my Skyrocket had a 2GB card in it, so I swapped that out, formatted it as FAT16 and made the top level SYS folder, plugged it into the soldercore and typed
firmware run
After a few seconds its at 0.9.12 now. I retried the original syntax of the Mail example and it accepted it fine, i still can’t relay the email but it does accept the commands that were missing. Easiest firmware update ever.
We’ve been trying to sort out a laser cutter for a while now, last year we bought a 40W tube and a PSU and burned holes into things. While hugely entertaining, it lacked some precision
That was as far as it went, so i had enough and just decided to order one, after a few stops and starts we bought an LC900N directly from wklaser in China, they’re the same ones FS laser and hurricane etc sell but they do some mods to the software/boards, but nothing that is worth the price increase that i can see. It cost us under $4,000 USD for a 90W laser with a 600x900mm cutting area, with a motorised Z table from china to us.
We’re on the third floor and our elevator is ( A ) too small ( B ) out of order, so we had to levitate it in.. Having hindsight we could have taken it apart, but had been previously assured we couldn’t do that. Anyway…..
We did what anyone would do and removed the window, hired a crane and lifted it in through the window.
Taking it out to inspect the contents etc.
Building a landing table
Scientific weight test, the window is gone and 3rd floor, proceed to start jumping. Some people were confused about what don’t go past the blue line meant.
Yes this is a good idea.
Test lift
We put out cones, people removed them and parked anyway, I told a few people they may not want to park there, most people got annoyed and asked why not? So i explained, most of them changed location. But only most….
ok we’ve gotten it to here, what now ? Time for a meeting.
The tricky part, removing the first strap, everyone pitched in to help.
The Rapunzel method started off well but we discovered a problem in the hair length dept.
And its in!
Books are useful. Dropping it the last meter was harder than getting it from China.
Put the window back, respackle it and no one is the wiser.
Ok so the laser is purchased, shipped from china, craned in through a window. What next?
First install the tube
The laser needs a vent, preferably hilarious. (needs video)
Obviously take it apart and improve it.
The height setting tool needed improvement, so made that and labelled it as such
Test cuts. Lots of test cuts.
Align mirrors, the manual came in useful here. (bits of paper)
Now change mind, remove the mirrors, turns out they’re dirty! So we swapped them out for ii-iv’s, increasing the power 20%. Interestingly there is a technique to make CO2 laser mirrors from hard drive platters hard disk platter co2 laser mirror
Frostbite hand.
The new lens vs old one.
Ply Wood 5.2mm 8speed 90power OLD LENS ply wood 5.2mm 15speed 40power NEW LENS
The T4 28” fluorescent bulb burned out after a day or so so we replaced it with some halogens, especially since they’re hard to source locally, test fitted with duct tape. The whole machine gets covered in grease for shipping so lots of cleaning first.
Next well they said we can’t cut steel. So quick trip to home depot for some O2.
The glo-stick is vital
well it is cut but…. not really useable, however great progress
vertical video!
Here we cut some 1” acrylic
Next!
The GUI is full of odd chinese-english conversions, but they use a UTF8 .ini file so you can edit it all you want. Instead of Datum, it is now Home . Just edit language.ini or use Resource Editor on the .exe for permanent changes the software does nt self check, even though it uses a senselock dongle.
Next is hack the software, we figured out the control software, reversed most of the API it actually rasterises vectors in the PC side and sends them over as points!! I’m shocked and amazed since the machine has a ‘DSP’ based controller board. It generates a TXT file and compiles it ,then uploads it the API has move, p-move, arc and circle functions but the software never uses them..
e.g.
CLASS_DECLSPEC int APICALL M05_m_fast_line2(int chx,long disx,int chy,long disy); CLASS_DECLSPEC int APICALL M05_m_set_vector_profile(double ls,double hs,double ac); CLASS_DECLSPEC int APICALL M05_m_set_vector_profile2(double start_ls, double hs, double end_ls, double ac, double dc); CLASS_DECLSPEC int APICALL M05_m_curve_vertex(); CLASS_DECLSPEC int APICALL M05_m_curve_begin(); CLASS_DECLSPEC int APICALL M05_m_curve_end(); CLASS_DECLSPEC int APICALL M05_m_set_period(double period); CLASS_DECLSPEC int APICALL M05_m_set_power(int LowPower,int HighPower); CLASS_DECLSPEC int APICALL M05_m_set_laser_mode(int mode);
The are all set ramp speeds, laser on, move here, move here move here, move here. Not set point, radius calculate in controller.
Oddly the first command we figured out (unintentionally) was fire the laser at full power indefinitely.
Is it off, no, is it off now , no ? how about now ,, no ? OK what’s the tube temp? still not off ? Easy to fix though, its just a toggle on/off. You also can’t easily jog the laser head around with the laser on, it’ll work but you can’t turn it off easily!
Knock out a quick GUI in Visual Studio.
I updated the header file for the DLL on our SVN. I’ll document it as i go along
Example of the txt file, which it compiles on the PC side.
SUB001 CMD101,0 SET002,20000 SET014,1,0,2,2 CMD109,1 CMD102,416,20833,97222 CMD104,6944 CMD401,416,880,41666,900 CMD402,900 CMD409,416,880,3000,41666,900,5000 //set ramp speeds and power CMD408,900,5000 CMD050,2,1 CMD002,63556,42631 CMD050,1,1 //laser on CMD103,416,41666,69444 CMD001,63556,42631 // move CMD050,1,0 //laser off i’m surprised it rasterises the vectors though, i was expecting to see a command for a circle that defined a center,radius etc. speed change. 100 to 300 CMD401,416,880,13888,900 CMD409,416,880,3000,13888,900,5000 CMD103,416,13888,69444 CMD401,416,880,41666,900 CMD409,416,880,3000,41666,900,5000 CMD103,416,41666,69444 power change 9 to 99 ( *100) CMD401,416,880,13888,900 CMD402,900 CMD409,416,880,3000,13888,900,5000 CMD408,900,5000 CMD401,416,880,13888,9900 CMD402,9900 CMD409,416,880,3000,13888,9900,5000 CMD408,9900,5000 horizontal line moved in y CMD002,62466,45271 CMD001,62466,45271 CMD001,69328,45271 CMD002,69328,45271 SUB603,416,20833,97222,69328,45271 CMD001,69328,45271 CMD001,69328,45271 CMD001,62466,45271 CMD001,62466,45271 CMD001,69328,45271 CMD001,69605,44993 CMD001,69605,45548 CMD001,62188,45548 CMD001,62188,44993 CMD001,69605,44993 CMD002,62466,45175 CMD001,62466,45175 CMD001,69328,45175 CMD002,69328,45175 SUB603,416,20833,97222,69328,45175 CMD001,69328,45175 CMD001,69328,45175 CMD001,62466,45175 CMD001,62466,45175 CMD001,69328,45175 CMD001,69605,44898 CMD001,69605,45453 CMD001,62188,45453 CMD001,62188,44898 CMD001,69605,44898 horizontal line moved in x CMD001,69328,45271 CMD002,69328,45271 SUB603,416,20833,97222,69328,45271 CMD001,69328,45271 CMD001,69328,45271 CMD001,69328,45271 CMD001,69605,44993 CMD001,69605,45548 CMD001,69605,44993 CMD001,69492,45271 CMD002,69492,45271 SUB603,416,20833,97222,69492,45271 CMD001,69492,45271 CMD001,69492,45271 CMD001,69492,45271 CMD001,69770,44993 CMD001,69770,45548 CMD001,69770,44993
So this ends our first week with the cutter, we have to decide if we’re replacing the controller, Leetro apparently want us to buy $25,000 of stuff to get the SDK documentation, but we’re so far into reversing it, that won’t matter. The controller might be ok. It has some strangeness we want it to speak GCODE so maybe another GRBL based controller like we did for Pickobear.
We’re also building a new frame for it, and updating it to 170W laser tube (maybe)
Great post & congrats on getting yourselves a laser!!! I bought a laser 18 months ago from WKLaser and had a wonderful experience dealing with them. Oh, and I had to remove a window to get my laser inside, too
I’m curious (and surprised about your modest successes cutting steel. I had heard that (due to the reflectivity of the molten steel?) attempting it can damage the laser or the head/nozel/lens and that metal-cutting CO2 lasers have an additional polarizing filter system to control the reflections. Have you noticed any problems since cutting steel? Or any plans to improve the cuts in the future?
The mirrors and the last part of the laser ( the focus stage ) are consumable basically, the very last stage will get eaten simply away with the heat etc, so we are looking to change them out to a copper ends and increasing the lasers power. We will probably only keep cutting the same thin steel but its useful for us. The 170W tube should get us where we want to be.
Awesome! Keep us up to date on the controller reversing – I’ve got one with an MPC6535 controller and the lasercut software can be quite limiting and badly behaved on occasion.
Congrats guys, wish I was still in LA to see this and help reverse that controller app, sounds like fun. I volunteer for the first NSL laser tattoo, just spray my arm with flat black spraypaint. (semi-serious here) Remind that distinguished rapist enzo to send me the nsl stickers! (he promised)
This year for our electronic badges we wanted something that people could maybe get some more interaction out of than is usual. So I figured lets make the badges into RC cars. The idea being the badge itself was the chassis for the car.
First off I thought buy some wheels, motors, gears from some hobby/robot store and use those to build up the cars, well that didn’t go well unless our budget was $100’s per car, its crazy how much people charge for the little wheels and motors kits.
We looked at the usual Tamiya kits which aren’t terribly priced, strangely even though Tamiya is about 10 miles from us, it was cheaper to buy them from abroad and ship back, but still very costly. Also I wanted tanks, but sadly no.
These are about $18 ish, it varies. It does have more parts though but the gearbox though a sheer master of Japanese ingenuity and design, won’t work for us.
Next was the usual hobby and robotic online stores, waaaaaaaaaaay more expensive, motors alone were crazy priced, especially the geared ones. So plan C, China.. Remember we need motors, mounting hardware, hearing, wheels, axels, steering mechanism, remote control parts.
I live on the edge of the Toy District in Downtown Los Angeles, so I wandered around and looked through the various stores for suitable donors.
We pulled apart a bunch of these figuring we could just take all the motors and wheels off and re-use them, and we could at a massive saving the FX Race car I picked up for $3.50
We didn’t manage to source the SMD version which some cars had, some of which are a knock off of the Silan. For a very simple short range RF setup with 5 functions its not bad at all. The (RX-2B/TX-2B) chips themselves has nothing to do with the RF stage, it just encodes or decodes the pulse train into an on/off for each of the 5 outputs.
So I started working on a prototype car I used the electronics out of the car, and the wheels and motors, the top part of the PCB we reverse engineered the remote control and added it to the badge pcb, it was designed to snap off so you could drive the car part around and it’d still identify you as a conference attendee.
Paper aeroplane with wheels. Back to the drawing board.
Note to self, check wear on router bit first…..
But now we’re getting to the basic shape, the rear and front are both measured up to fit.
Here it is compared to our cheapest car and the most expensive (at the toy market and its still only $12!!) Geared motor and motorised steering. Yes they’re cheap motors and they’ll wear out but the kits are $3.50 – $4.50 ish and you get two motors.
Its drivable at this point, the front wheels get stuck the maximum turning angles.
Back to eagle, to refine it a ‘tad’. Add three batteries, remote and the car. We’re using CR123a’s
Cut it out. Basically Model T to well a Model T really..
This is how Ferrari started BTW
Add some more bits, to hold the rear drive motor we had to go around the wheels rather than sleek, this isn’t great but not really an easy way to hold the rear on.
this one only has one battery, and so its running at 3V, a bit less since its an old battery. Adding two batteries its a lot faster. Of course all the video we shot of the nicer cars and other driving, seem to have disappeared..
The tuneable inductor was going to be the tricky part, krs and mmca sat and tried out different settings, a resistor is used to set speed of the encode/decode time allowing multiple cars on the same frequency. See page 6 of the data sheet
The nicer cars have a 27.145Mhz carrier frequency crystal, the cheapest cars didn’t use crystals at all.. The FCC has been informed obviously. However they are surprisingly accurate.
The crystals were ‘hard’ to get , read unpossible in the USA. eBay as usual came through, one seller agreed to DHL them to me and I got them in a few days from again China, which is great, of course all the others I bought that had ‘30 day’ delivery times also turned up the next week. So I have quite a lot of 24.145Mhz crystals for you know all those things that I use 24.145Mhz for, don’t be surprised to see us selling them on eBay
We built a test harness for the chips to see how it works, it mixes a a frequency with a pulse train, sends that out, strips out just the pulses and the chip decodes it into a single pin on the ic, left, right up down etc.
Everything was going pretty well, it wasn’t going to break the bank for us and we had a pretty good car running around. It was zippy and as easy to control as the normal ones.
So I think ok better buy all the cars, head back to the same store, with one of the cars, the business card and quote from the first few we bought. The guy swears he’s never sold them, even though I have pictures of us in the store buying them. So that’s a problem the next cheapest car is $5.50 I haggle him down to $4.50 and knowing I have some of this newer type at NSL, I head back to take it apart and see how it goes together so we can mod the PCB chassis.
I take apart all of the other cars, not one of them is suitable for mounting as easily (of course) I find the distributor, they’ve either gone under or changed names, I find the new supplier in the same address but they don’t carry that line…
So what do we do, time is getting short.. OK I think, we’ll just give people a finished car and a remote, but that’s not much on the badge. So of course what do we add to it, yes everyone’s favourite “open source/hardware” begins with an A ends with ‘sounds terrible to the average Italian’.
We can still use the parts from the slightly more expensive cars as bases for PCB cars and robots but we’d need some more standoffs and bits to mount the motors, much easier when you’re building a few of them at the space, but the idea is to get people up and running as quickly as possible at the conference so they can hack on them and enjoy the rest of conference.
I redesign the badge and have them sent out for quick turn PCB at Pentalogix.
A few minutes later and here it is. We stripped off everything not needed and made it able to run off 3V or less and 5V USB with magical jumpers. I forgot one of the power traces, so a quick wire jumper after the old, why isn’t it booting up! We’re using the slowduino boot loader (page is down) so it can run at 3V albeit at a slower clock rate of up to 8Mhz. We left the pads for the xtals too though so it can function as a full speed device.
So now instead of it being car, it’s a remote control that has the inputs wired to the ATMega CPU so that it can be controlled via USB, autonomous, strapped to the car, add sensors , switches etc. We left in the blink LED well because LEDs and the duino..
The top part you can cut off and the two parts still work, like everyone thinks worms can do. Though if you cut it off badly, neither will work…
New donor car, sadly not as awesome. I did try!
mmca and krs further tune and identify the parts we need. Spec Ana time, looking great.
Tuning the antenna lengths, by (A) doing the maths, (B) guessing and cutting lengths. The peak is the 27.145Mhz the blips are the encoded data for the remote
Also you can see our spindle for the mini CNC PCB we’re building, its been sitting there since late last year…never enough time…
This actually worked for the proxmark, just a spool of wire. I think our best antenna was around a metre
It drives..
OK so now that’s working back to the store and pick up cars and hoping the guy still sells cars, that lady is the one who originally sold me the other cars, and she remembers but its all too late now.
This left side is pretty much all helicopters and cars. As I wait for krs to come pick me up they try to sell me helicopters and all sorts of other things, those ones are IR LED based for the remote control, but that’s another story.
Cheap $4.50 crap you say? Well consider this
Those ‘drift’ cars come with one on/off led headlights, tail lights, motors, spare wheels, rechargeable batteries, aa batteries, remote and some other stuff, I picked them up for $8 for staff and other volunteers. the other boxes have the $4.50 cars. Also they drift awesome since they have shiny plastic wheels, lots of fun and great donor parts.For $8 ! Granted we’re limited on what we can do with it as a robotic base, but for lots of cheap steerable bots its great.
For that price its really well made too. its got a can style electrolytic cap!, actual connectors and lots of screws holding things together.
Our pile of donor cars gets bigger along the way.. The engrish on these is great btw. It is all FAST YOU GO and SPEED BECOMING etc
And our neat pile of cars gets reduced
krs making the test boards.
With a prep sheets to help people build them at the conference.
I redesign the badge and send it in to Pentalogix’s off shore PCB fab. We got them today (Wednesday), the conference is on Saturday.
Looks ok right? Granted I admit I didn’t spent as much time on the graphics this time…. The QRCode works great but I did waver on changing the URL to a bit.ly or something so we could have changed the link during the conference.. Ahh well. I also have a QR code for NSL with the URL as a graphic inside it but I didn’t want to push my luck on how well it read. I spent a more time drawing the L1 logo, rather than stick with the BMP to eagle conversion, I did that the over drew it with rectangles and a circle, since its more of an even finish and easier to scale. the www box was meant to be place holder.. We used the standard 2×3 ICSP header instead of usual 6×1 which was a hassle since all our 2×3 to 2×3 cables had been converted into 2×3 to 1×6 adapters.. But easier for others. Which reminds me to go place an order for 2×3 IDC crimped headers..
But wait what??? The PCB is twice as thick!! its .125 vs .0602ish. I check the email order and sure enough I ordered .125 , I talked to Pentalogix and sure enough I did order that, the quick turns were .060s . I thought ‘oops’ so after some investigating I found a slight bug in the element14 to Pentalogix Eagle PCB quote web page, which Pentalogix are now aware of, it doesn’t properly transfer the thickness of the board and changes it to .125” you can change it here, but to be honest ‘finish thickness’ I didn’t notice as being 0.125” as the thickness of the PCB, plus defaults, It’s my fault though, I should have spotted it.
Anyways no biggie, it can probably stop bullets now. Its solid…
Blink ! krs built this while I was writing this post. One nice thing about the thick board is that the pins don’t protrude out the other side, so for a badge that’s great! since no pins to mess up fabric
We also get to break out Pickobear for the speaker add on, it’s a shield that plugs in and it’s a remix of the last years badge, but designed as a quick build with a few days turnaround.
Neat!
Getting crazy! (still have to write the code for it!) its 11:17PM Wednesday….. Plenty of time.. It has a TI TPS61040 boost convertor on it too. Also we have to test it… yes hackerspace….
Batteries and holders arrived today as well, AA’s and CR123as and the battery holders .. super cheap too! from http://www.batteryspace.com luckily paypal screwed something up, I’d ordered them from elsewhere and batteryspace had them cheaper, so I was able to reorder.
We’re giving away some prizes to people who do the best car/badge hack at layerone , they’re not awesome prizes but hopefully someone likes them, they’ll still have a RC car and a ATMega based controller board.
There’s a lot more I’m going to add to this post, especially technical details. All our projects are open source and are available in our SVN in 032.la including all the screw-ups right from the start.. I’m exhausted after this project, and we haven’t even got to the conference yet ! We’ve also got out PCB CNC we’re designing too.
It’s a shame we didn’t get the PCB car thing, I wish we had but it was just time and uncertainty and these are much more hackable with the CPU added.
Packing all the stuff for layerOne, as usual we’ll have an awesome HHV with scopes, Metcal irons , hot air guns and hot plates, and we’ll be teaching as well as building kits. Hope to see some of you there.
If we’re using shoelaces as lanyards, the lanyard supplier let us down and they didn’t turn up on Friday morning…. the parts from Digikey are supposed to be in on Thursday PM.. Talk about cutting it tight, this is why Joe Grand did an awesome job at Defcon a much larger conference.
Also our 90W laser cutter we imported from China decided to clear port on Wednesday as well, so that is fabulous it would have been really useful to have it earlier and now it gets to sit in a box in a warehouse til after layerOne.
cheers, charliex
next years badge ?
Fuses (when I get to the conference, and think OMG what are the fuses, even though we’re preprograming)
Yes it’s my ECU test harness. The OBD II connectors are Y’d and split into different ECU harnesses with various capture and sniffing tools, which i use when i’m reverse engineering an ECU.
You can see some of my scan tools in the pictures too ( orange box which a lot of OEM’s use, tesla, ford, gm etc) , maybe a mongoose, and my own standalone CAN tool too.
What are the approximate dimensions of the car? I’m looking at bringing some king of model tank kit to build around the car, and want to make sure I bring something the correct size.
I’ll add some clarifications after reading comments on various forums.
It doesn’t need a 70Mhz ARM CPU, all it does is shift bits into a shift register, that’d be a total waste.
There aren’t 16 CPU’s. the slices are designed to be either slave or master, just one ATMega328P chip, they’re chained together, each slice could be independent but it only needs one master.
charlieplexing wouldn’t have been better, it’d have increased the complexity of the board layout and the LED’s wouldn’t anywhere near as bright, the CPU would also need to be faster and its harder to do cool looking patterns, we’ve done a lot of charlieplexed projects. charlieplexing is awesome within its field.
——————
We wanted to kickstart one of other projects at NullSpaceLabs but its a much more narrow field project and we’re going back and forth on what is best, working prototype or solidly laid out plans, partial prototype and partial laid out machine and software, with previous similar builds.
But while we ponder all of that, the blinky ball came from nowhere, its been a popular build at the space, and generated a lot of attention, but its an expensive one off build, so why not kickstart it to reduce costs. (one off’s in parts cost alone would be more than the the total cost of the kickstarter version)
The idea came from a build we saw on Hackaday. The PCB’s have a dedication to the original ball maker, Nikolai, his is different to ours and ours is a scratch build . If there is one thing we really like at NullSpace its blinky LED’s.
Earlier prototype of a slice. (this was earlier but no pictures!)
Notes
It is split into 16 slices, each slice can operate as a slave or master, you just build one differently its powered by an ATMega328 so easy to use on avr studio/arduino etc. The master slice can be independent,
The bluetooth module is connected to rx/tx of the blinky so it can be remote controlled from anything with bluetooth SPP, unfortunately that means none jailbroken iPhones are out of the picture, you might be able to do something with xcode and your own phone, but i’m unaware of such a thing. Android is no problem, or meego/symbian/windows mobile etc. Windows/OSX/Linux are all fine too.
I made a simple app that pushes 8 bits (it scales it to 12 bits internally since that is the resolution the LED drivers can handle) via bluetooth and then when its received a push command or the buffer is filled the ball displays that frame of data. That makes it really easy to make patterns and so on.
The sample code on the ball just draws a few patterns, some of it uses modified octobrite code. You can do each led/slice individually by shifting a slice at a time, or the whole ball at once.
The accelerometer is the MMA TI 3-Axis we’ve used before, its SPI and easy to use.
A microphone is also available on an ADC to do sync with music etc ( also can be done remotely)
The ISP is broken out using out 6 straight pin format that we use on all our boards, it ‘ll work with just about any ISP, on Arduino you can bootload over the bluetooth with the right setup.
The battery is a really neat LiFePo4 unit that is much better than the Lithium Ion we’re used to seeing, it gives it a really great runtime of upto 10 hours, depending on brightness of the LEDs.
We’ve published all the information on the ball on our SVN as usual, the kickstarter is simply to get parts costs down and for us to figure out kickstarter. We’ve got five prototypes that are being slightly modified for easier build for the kickstart DIY version.
The ball works with TLC LED drivers that ‘shift’ the state of the LEDs down the ball, it’s a bit like a framebuffer in a computer you load up the pattern you want and refresh it to the chips and it’ll appear, there are 4096 levels of brightness.
Pictures and videos
Its hard to take still pictures of it, the LEDs look like they’re out, but its just the pattern
This is one of those Chinese CNC machines on eBay that’s got all those qualities where you think, maybe its good enough for the price. Of course they never are but that never stops us. $700 all in. CNC 3020 will lead you to them, but really don’t.
They generally are sold as shipped in the USA and actually drop shipped from China. Takes about 7 days usually.
Very well packed, but as usual has that weird smell that everything we’ve bought has from China. So dispose of the bubble wrap as quickly as possible.
Cursory glances the power supply has what sounds like a loose screw rattling around, the machine looks cheaper than the photographs, but then again who expects to get a hamburger from McDonalds that even barely resembles the pictures on the advertising. You know what you’re signing up for when eBaying, Las Vegas rules here. To be fair to the Chinese companies though their advertising pictures are about 9000 times more accurate than the McDonalds ones though. It also looks smaller than it did on eBay, this is why size reference pictures need an apple.
Apparently it uses something called a ‘Parallel Port’ (I keed, I keed), well that won’t last for long.
Our LPKF is a lot nicer, (not as nice the AccurateCNC), but it is going under the chop too.
So it been a while since my last update, my lil’ dog of 16 years had to be put down and I wasn’t feeling it, then family visited from so we stalled abit.
So quick updates for the tl;dr people :-
Head rotation works, but have to add an encoder wheel since we ‘forgot’ about the tool home position inside the head tool pickup…
Y axis is all upgraded, new stepper motor drivers are in 1/2 step is on.
Switched to GRBL and StepDir, instead of, uhh, not stepdir.. Though using the
OpenPNP base firmware revision, i didn’t realise it was different til after porting it.
GUI is almost done, it can place one full board from feeders and trays
Replaced hoses as the old ones burst, which only happens when you say right lets video this.
Trapezoidal for the servos courtesy of Grbl.
Still having some issues with the vacuum sensor, might be bad or low pressure or something else, turned it off for the moment.
Pickobear uncut.
So we’re able to pick up and place with the new Grbl firmware and the updated GUI, its all GCODE now. I’ve moved more of the functions into the GCODE vs individual move, drop , vacuum, since the communication is just serial rx/tx and serial is a PITA for this sort of thing, since its all ACK/re-ACK. With an M command its just e.g. M21 pickup part, M22 putdown part and the machine reports yes/no. FTDI’s are decent chips but they will break down comms after long datastreams, I’ve had a lot of problem with them and high speed streaming, as well as overlapped IO support is meh, events don’t work that well so multithreaded serial comms based on events is in theory great, but the practise doesn’t always work well. so its all software handshakery.
We’ve done a lot of changes since the last update.
Grbl
Grbl’s great, its easy to use and easy to add on too, we were already using the AtMega2560 anyway so lots of space, even with all the stuff I’ve added to it, we’re at maybe 17%of the flash space. I had looked at it when we first started out, but it needed StepDIR and were using – + , our original drivers didn’t support StepDIR. Even luckier I’d put all the stepper controls on the same ports.
Changes for the 2560 are minor, just an interrupt rename and i don’t the sleep mode is working as it ought too, i assumed it was and then wondered how to handle the panel switches but turned out when i added the head movement ACK that it was, I was going to use timer3 to handle switches but then i noticed the main loop was executing constantly, some of the AVR’s have different sleep rules.
One thing i did do though is since the mega ICSP is under the shield and its on the machine, which is 3 metres away from desktop. I left the Arduino serial boot loader on the chip, this way i can just script AVR Dude to load the firmware built in AVR Studio 4 to the mega over serial. so its a lot easier, the downside is that if you press a key too soon the boot loader seems to kick in, i haven’t checked this to be the reason for sure, but it seems like its that. Not a huge deal.
Running a test of the GUI
Pick and placing, it takes a lot to just do this seemingly simple thing.
Head rotation
Head motor, luckily we used a double ended shaft motor in case we needed an encoder, which it turns out we do. Look closely at the top of that shaft, see some thread? yeah we didn’t…. We CAD’d up a mount and fitted the motor.
The motor is 1,000 steps for a full 360 degree rotation, should be able to place the craziest of our boards, we like some gangsta lean in our part placements.
As a side note the magnetic sensor on top of the head, really don’t like the way they’re made or mounted, that wire takes a beating and it’ll fail again so we have to fix that too. You can see all our temporary fixes for the hoses that keep cracking, they’ve lasted 20 years though. The red line is the new one we’re using, which is way more high tech than what was available in those days, it should last longer than the tech is needed.
The rotation head needed a larger power supply, so that is now installed. Its the 24V power supply previously mentioned from all electronics.
Since we made the shield with the extended pins its easy to add things on to it. And now we’re on StepDir its just one wire to control the head ( Though we make a semi-fatal error at this step in choosing which direction the motor runs )
Setting up a test
After the rotation head was added to the software, i test placed two parts, they’re off, at this point i think its the solder paste or tape missing, so we add some. As you can see though the parts are rotated as they should be. We were uStreaming with the second camera so its all hanging off in space at the moment.
Krs adds some paste to the test pads. She’s the one who wants this thing finished the most as she builds most of our boards
I’m remotely moving the head with the camera view. First home, then moving to the PCB to register the location of the part, then going through the steps of the part placement.
So the mistake in the choice of direction for the head rotation is that the head can unscrew itself and drop down the tool, the sensor doesn’t know the head is down and the tool is now below the PCB holder and auto changer, so the head will gleefully zip around and bang it into whatever it can find, which bends the head, which is not good at all. So we’ll reverse the direction of the motor and use lots of Loctite. This is why the test videos show the parts poorly placed.
Pity these lessons learnt cost us a head each time.. But we move on..
A trial run through all the parts ( using 1206 resistors since they’re like .00004 each) as you can see they placed perfectly.
Ok, maybe not what you’d call perfect but they did place in the right spots, the head down motion was a little too strong and there’s no paste to hold the parts in place so they’ll wander around every time a part is placed. Still the software is working.
The vacuum sensor needs to be set quite accurately or it’ll do things like this :-
The tool is sitting perfectly on the vacuum test pad, the head brought it down to see if was there, blocks the air coming through the tool, but since it wasn’t picked up correctly ( head wrong orientation ) it just left it there.
The head moves to the pad, goes down, the air comes on, there is a settle time, then the machine reads the vacuum sensor, if its not blocked there is no tool, if it is, then there is a tool. That is how it decides if the tool needs to be picked up or put back.
Finally we place a board with paste and all !
So last night(this morning) we finally managed to run a real board. For some reason i decided to go through each of the components and rotate them 90 deg rather than change the rotation in the feeder…. derp… As we did this the vacuum test failed, so you can see me going in change the code ( incorrectly!) and re running, it the bit you might not see is the machine doing a loop of picking up a part… i fix that and we move on.. First run we do a step by step. I noticed a few bugs as we go along so there are some pauses as we fix those.
Stencil pasted a board, you can read about this in our Arduino Mega build blog entry. Its a CNC’d brass sheet.
I taped the board down to stop it moving around, probably not needed.
Some of our feeders need some love and i wasn’t super careful about where i was picking up the parts from so it was a little sloppy, however it was 2AM and i ended up having to leave and come back after one of the alarms at work went off
MMCA used one of his awesome swiss files to ‘fix’ one of the feeders that was catching
Here are some more GUI videos, they’re probably only interesting to those of thats like watching these things over and over..
Annotated some of the steps in the GUI.
One of the feeder pickups i didn’t setup properly, so it was placing them off!
Onto the hotplate, i wanted to see just how bad we could place parts and if they’d fix on the plate, all but one pulled onto the pads, the other worked but was right on the edge of a pad, it’d work fine. All we have to do is take more care when tell it where to pickup
Krs also has a bunch of videos of the machine placing that first board.
Anyway that is mostly it, we’re down to the tuning and bug fix stage so its been pretty fun.
But if you’ve got minerals help out the OpenPNP guys they’re doing good work, our stuff is available to everyone, but its reasonably specific to the Juki though it is GCODE.
Small update: Last night, I started adding the second USB port of the ADK to Grbl as well, its almost finished. I based it on the usb.cpp from ADK but i converted it to C since the c++ generated a larger firmware and there is only one USB port, I want to keep the firmware tight.
BTW If you’re reading this and are on the yahoo zevatech list the moderator who’s apparently building a commercial retrofit for this machine is blocking our posts sharing this open source project. He said he wants credit for a CPU suggestion neither his or our project uses, a fix that wasn’t broken, and a camera solution we didn’t ask for advice on, or use.
Hello. See your work on the Juki 360. My 360 just stopped working because of scratched 5 1/4 floppy. No backup. Can I buy a a copy of a good system disc from you? thks, Phil
After weeks of trying to get an old pc ( which has a 5 inch floppy drive) going, we’ve come up short. Unable to download your file. Any possibility of making a floppy at your end and sending it to us?
So we’re on stage III of the rebuild at Null Space Labs (http://032.la) . What we’re aiming for is :-
Rotation servo in the head
Consistent speeds
Addition of more checks
Adding more checks was straightforward, added code to determine if the machine picked up a part, with the small compressor we were using it’d start to loose vacuum so if it failed to pick up a part, the delay became longer. This allowed the the compressor to catch up a little, as well as alert the user that something was amiss. Next it checks to see if the part fell off during transport to the board. The machine has a vacuum sensor that knows if the top is being blocked. This lets the machine controller (Arduino) know a part is probably there.
The machine won’t move if the head is down, and the limit switches were put on interrupts. tool changers are tested and put down if they’re up for some reason.
The interrupt based limit switches are nice, anytime a change of the signal is recognised, either in limit or coming out of limit the routine is called and it reads the status of the pin again, and sets the out of home condition, so that machine controller knows the machine should be rehomed before continuing. The code is simple and looks like this in the setup()
attachInterrupt takes the pin number , the function to call and type of signal to look for, HIGH, LOW, and CHANGE, i use CHANGE so that the xLimit1 variable is always set properly, and rather than rely on software tracking I read the state back in.
I’ll probably change the digital read to actually just read the PORTx value directly, you want to minimise time spent in an ISR (interrupt service routine ) as much as possible. 5 is the pin that the XL1 limit switch is connected to on the shield, and homed/xLimit1 are volatile global variables that have the condition, they are set as volatile since they can be changed at unexpected times, either by the hardware directly or the ISR. volatile lets the compiler know not to cache the value or other trickery. This is often the case with things like memory mapped hardware clocks where you read a specific memory location to read a clock, so you’d do something like (clockVal would be set to the specific memory location by the linker or other directive)
const volatile unsigned long clockVal;
We’re not using const for the homed/xLimit1, since we are writing to it via software, a hardware clock changes outside of our code.
Ooops
Someone knocked one of the feeders slightly off (probably me) as it was being worked on, I didn’t notice and moved the head.
It caught the feeder pin ( bottom left) and bent badly enough that it wouldn’t go back down. So i pulled it apart and used a vice with cut outs and gently squeezed it back into shape, then mmca used his micro lathe to make it straight again. Luckily these are easy to make from scratch.
Servo Pulses
The servo pulse speeds are more of a pain, the Arduino has some fairly inconsistent timing and some of the functions you’d expect to be fast, aren’t, the delayMicroseconds has a lot of skew, digitalWrite takes a long long time. Once you know about them, they’re easy to deal with i replaced them with bitSet/bitClear and the __builtin_avr_delay_cycles feature in avr-gcc. We captured the output of the servos from the Juki PC with a scope and my logic analyser. That allowed us to see the ramp up and down times to get the head moving at a decent clip. There is still some ripple in the software PWM though, so we’ve converted most of it over to just AVR asm/C and setting the ports individually,the Arduino does what it is meant to do really well and that is be easy to use, but what’s uncommon about it is that it easily lets you drop in code that bypasses or override the built in libraries, in my experience that’s rare in other simplified dev kit software, its typically all or nothing.
Changing the digitalWrite is straightforward. Determine which port the pin you want to set is on and then use bitClear or bitSet instead.
digitalWrite(YCCW,HIGH) becomes #define YCCW_HIGH bitSet(PORTF,3); YCCW is defined as A3, which on the mega is on PORTF, bit 3. digitalWrite LOW is bitClear(PORTF,3) going even further the PORTF can be manipulated directly with PORTF |= (1<<3) to set it, then you can combine them together with PORTF |= (1<<3)|(1<<2) etc to clear PORTF &= ~( (1<<3) | (1<<2 ) ) also there is a _BV() macro that does the (1<<n) shift. so
PORTF |= _BV( 3 )
Using |= and &= should output the closest ASM instructions that you can could in C.
Once we started to investigate the timing from the Arduino that is when I noticed the problems, even with interrupts disabled we were seeing inconsistent results. So I wrote some test code and hooked up the output to the LA and set about trying to make a micro second accurate delay. specs showed a 2uS rise , 5uS pulse and 2uS fall for the initial step pulse, the stepper IO controller is HIGH delay LOW delay HIGH . for the first delay about 8uS works well.
We captured the data with the logic analyser and pulled the data into Excel which is great for this sort of thing.
A quick couple of macros and copy/paste and we’ve got differences in Column F , you can see the length of the pulse in F3 and F4 has the off time length, which gives us our full duty cycle for that pulse.
In H its just the lengths of the off times since the on time is constant. Column I has the differences.
One of the next things excel can do is trend lines, I did this by hand and then arko showed it to me, I’d seen the equation solver before but not this.
First create a line chart with the off times (the part of the duty cycle that’s after the pulse)
Click on the data points in the line to select the line. then use the trendline option
Set the options like so :-
Which gives you this trend line (in black ) and the algorithm for it. I opted to use a table lookup since it has to be super fast for the Arduino.
Time Travel
Skipping back a little after the last blog post we did an 0603 repeatability test, used the layerOnespeaker badge as a base, I exported the centroids from eagle for one side and ran test code. As well as just have the machine draw lines of 0603’s. with a logo-esq list of commands.
The left side has a little wobble, partly pickup, partly the slightly bent head ( we’re lucky that a generous person sent us a new head and feeders you rock Steven ! ) the right side is a similar test but its placing the 0603s on top of each other, that actually worked pretty well a few of them fell over. But given the bent head, no centering or machine vision its working better than we can hand place them. This picture is the version that just places the parts in lines. I also think our stop is a little aggressive in this test, and this is before we really got into the ramping.
The ramping is simply having the PWM have a longer off time, pulsing the servo, decreasing the off time, pulse it again and do that for N pulses until the motors are moving fast enough to get to the top speed, that’s what the Excel sheet is for. I’ll go into it in more detail in another post.
Someone from Russian TV decided to film it, Central TV i believe. Unfortunately all the airlines are now tight so i can’t remotely shoot air or disconnect hoses at him anymore.
Adding a camera
This is a Cognex 4100 machine vision camera, machine vision cameras are generally low noise, stable image sources. This one can determine angles, and so on and then send them out via Ethernet or serial. The 4100 has been dropped by Cognex it seems and the software needed to run it is an old version, which has a lot of compatibility errors with Windows 7, its been something I’ve seen before where the menu’s lockup for a long time. But we figured our way around it by using Windows XP inside 7 with its builtin Virtual PC and got it to see the rotation. Think RoboRealm built into a camera.
Controller unit
Inside the camera, TI DSP and a Xilinx FPGA, very nice.
Camera head
We’re also using some webcams , a couple of them are microscopes, one is from think geek and it’s a wireless HView camera, the other was an eBay special pen microscope usb2. Oddly finding a 12mm drill bit to make a hole for the camera wasn’t so easy.
Adding the camera needs two pins for the servo CW/CCW, three pins for the camera, TX/RX and trigger. The shield has three pins left!, Though I did cheat and use two of the pins as a via since I didn’t’ really want to deal with the LPKF via rivets even though its only a few of them. We do really only need RX though. The trigger just tells the camera to only operate while, or after the trigger is set. The final board will not use the cheats of course, but before I remill a new one we have to
Software testing
This is our test bed software Pickobear it allows us to test OpenCV (though we have a Cognex camera), the eagle script output CSV is imported into Pickobear and then the machine knows how to place it.
One of the problems with test software is you often leave it in a state where it was testing something specific, and you forgot to remove it , case in point, I had one extra YCW pulse that caused a problem when we were doing a tool change test. After 4 changes it’d refuse to put down the changer, we checked air pressure, offsets, tool head distance and all that, eventually did test code that moved home, then to 0,0, 1000,1000, back to 0,0 and saw it was one Y off each time. A quick check of the firmware and the extra pulse was spotted. But it did allow us to get the numbers needed to exactly place the adjustment for the pickup head.
Next we’re testing out different cameras, I milled out a quick holder from PCB material and the epic blue painters tape. This is a nice’ish USB 2.0 camera that’s setup as a microscope, it came with a nice metal holder and was about $80 from eBay. M4 nuts and bolts seem to be rare around us, never mind the M2.5’s we were looking for locally last week. So zip tie to the rescue temporarily, it does allow a little yaw though but it is ok for testing the software until the bracket arrives.
To make this I measured the hole sizes, the distance apart and picked a distance for the camera, then guessed the size. I then added two drill holes with the hole command, set the size to 4mm for the larger 12mm hole I used the milling layer, draw a circle with the circle command, and set the width (right click circle and choose properties or type change width ) to a very small number, if you use 0.0 as the width eagle will fill in the whole circle and doesn’t cut anything, a width of 0.0 works for milling wires, but not circles. Then milled it out on our AccurateCNC 560H.
Now we fit the new holder, has a nice set screw to hold the camera in place.
Next is adding camera movement and offsetting the board. I did this by adding a mouse click even to the custom control, it then determines the center of the image and a difference calculation, then depending on the direction it needs to go it moves that amount, I still have to calibrate what the relationship of the camera image is to actual axis steps, but its close enough to use right now.
I’m using videoInput with OpenCV and OpenGL to display the data from the cameras, the crosshairs and circles are drawn into the OpenCV image using their primitives.
The rotation head is the next thing we’ll get fully operational. We decided to upgrade the 24V power supply since the little servo can draw more amps than it could safely handle. All electronics has suitable 24V 6.5A deals.
A custom CNC’d bracket was designed by mmca and laid out in solidworks by arko, the motor, pulley etc are all added. This allows us to switch from the simple 90o rotation to full a 360o’s so we can place the part turn 360’s and moonwalk away from it. There is some play in the rotation shaft because of the set screw, so that is being remade so there is no backlash., even though its a tiny amount and the software can correct it. The machine is able to do more than 90o in steps of 90o by simply changing which side the feeder is mounted too, but we want 45o’s for those gangsta leans.
The top bracket/reed switch isn’t mounted or screwed down, that is why its tilted.
New standoffs added and rest of head mounted.
So here is a short video showing the setting of the PCB offset, I home the machine, pick the part I want to use a registration. Then move to the location where it really is and press the OFFSET button., then I move around to other components just to check its working, again the blue lines are OpenCV doing stuff.
Pickobear!
Motor Drive Upgrade
The Y motor driver and motor aren’t that great, so we changed it out for this controller
First removing all the old wiring and converting it to the style connectors, it’s a shame to do this as the wiring is just so nice compared to modern equipment. Its not often you see this level of attention anymore.
New controller in place of the old one, it fits pretty well its longer than the old one but luckily there was lots of room, we just have to extend the AC lines a little.
Removing the plastic conduit covers and rerouting the wiring.
Almost there, I’m heading out early tonight and we apparently don’t have crimpers at NSL so rather than botch it, I’ll pick up some tomorrow or bring mine in from home
A new motor was fitted too.
Dirty fans!
Close up of the belts and cogs etc.
New vexta motor
Machine powered up and homed ok ! sweet..
I’m not sure how detailed or long to make each of these posts, since from reading the comments and emails, its obvious a lot of people skim or don’t read the text and look at the pictures, but I want to make sure we give enough details ( plus the wiki/svn ) so that people can recreate it. We are at the point we can pick and place our boards, surpassing the original software in some ways, a few things are left to be done to make it 100% of the original features sets, mostly to do with feeders. But we’re waaay beyond what it could do in some ways.
So here we are with part two of the build. We’ve figured out most of it, started the build of the arm board and so on, then on Friday night late I have one of those, hmmm, moments and say wait we have a lot of ADK mega arduino boards lying around (because we made a tonne of them for defcon 19). So a quick count of the IO pins needed vs the mega and we find it can be done.
We test fire the MOSFETs with our ADK arduino, using one of the ATC( tool changer) pneumatic switches. That works just fine, the modern MOSFETs are amazing even though we need no where near the level of current this thing can handle.
We wired up a quick test.
Breakout board for the TUMT6 MOSFET
Just as ping is the ubiquitous test on the internet, blink.pde is on the arduino.
Success, yes the tool did go flying off but that’s ok! We simply connected up pin 13 of the mega to the electro switches in the top left, the board is bypassed since it does a BCD decode and select.
Blink does it’s thing.
So time to build up the new interface card, a quick search through some of the old machines we find the right floppy pin cable for the board, and the old 50 pin scsi type.. thanks petty!..
So next step is to CNC up a header quick board, its an extremely simple board. Bust out eagle and start making the board, the Juki has one oddness that the connectors run 1-2-3-4-5-6… etc vs 1.3.5.7.9.. so I had to build a custom part in eagle..
So I start off modifying our ARM board by sticking an arduino mega shield in the middle with the idea of wiring it upto all the mosfets etc.
But then I think, wait a second why do that? Lets just leave the IO board and make a shield that plugs into the Juki’s existing IO connectors. So another project in eagle and its even simpler this time.
Yeah that’s slightly less complicated. So basically we’re just mapping each of the IO’s to the arduino, I’m not much of an arduino person myself I prefer ARM for embedded, but we had lots of parts lying around and it was super simple form factor which is the point of the arduino and we sold out of all our arm based arduinos at defcon. So I ended up using the tx/rx as an that has to be rerouted later, but luckily I mapped it to the down switch for the teaching panel, which we no longer need. However that’s not how we do things at NSL so it’ll be remade and milled.
Now add the headers, this is a real chore they’re simple to obtain, but so cheap but a bitch to solder onto a board that’s not plated…
Also someone missed some pads..
Whoohoo perfect, (well sort of)
Now for a test fit onto the machines IO board.
Check continuity etc. Make sure that GND is mapped…
Getting ready to fire it up
Plugged into into the ADK arduino
Lets test fire one of the air lines…. Power up the compressor, write a quick bit of arduino code and !
One of the lines we ‘repaired’ pops off and attacks KRS and mmca, But it works ! We haven’t replaced all the airlines yet and they’re hard to get locally it seems. We test the switches here too, things are looking good.
We skipped a little ahead above, the test code required some simple though into it.
First set all the pins to input Next set the individual output pins to output
Which wasn’t enough to make anything read.. So a quick poke around and some head scratching and the answers simple, we have to make the pins for input set to HIGH first, so a quick change and off it goes.
All the defaults for out pins are set HIGH too.
So now it’s a case of mapping all the IOs in arduino and writing bits of code.
we decide to decode the ATC (toolchanger) first, it uses a select + 3 lines of BCD. 4 lines are assigned to the ardunio and then we figure out which bit controls which tool changer.
Obviously the smart thing to do is make it do this :-
We have to determine the length of the pulses, its moving very slowly in the video because we’re at the +ms speed, eventually we move to microseconds.
Adding the limit switches, and this is why i spent $600 on a compressor for airbrushing btw
Now we’ve done a better job of finding a good speed for the motors, so a quick walk test. This is just doing a limit, change direction test.
On the motor front now all we have to do is convert pulses to mm and then we can do a gotoxy() function! Which is pretty much all we need
The X and Y home sensors still aren’t working yet, so while i’m writing this blog and uploading all of our videos to flickr ( since google+ doesn’t seem to have an easy way of embedding videos) I’m working out why the XY home doesn’t work. I’m adjusting the walk function to print out the XHM and YHM sensors after each pulse to see if it only does home when the rotary encoder hit and the home sensor are both on. And we just did a quick test and that indeed is the answer woo!!
So now to write a quick home function, i’ll have the machine do a bottom left limit find,, move back a little bit up to the right and then slowly move back til it finds home..
be right back!!
and now krs is filming me,,, awkard…
Ok so the home function is now working, the machine goes to top right/back quickly, then left,front quickly, steps back to the right 100 pulses, and back 100 pulses so its definitely not at home, then slowly scans left to find x home, then slowly scans hither to find y home.
Next steps are to convert the pulses to actual distances so we can do x,y instead of pulses. I also want to do some repeatability tests, in other words go to home, go to position, go to home, go back to position and see if its always the same place. So lets home it, center it, switch on the spot light mark it, and repeat, or use a sharpie
The spot light had a broken wire in the middle, it’d been poorly repaired once before so we stripped it off and resoldered it.
We used a ruler to calculate the pulses to mm, using 100 and 500 pulses to see the distance travelled in each X and Y ( the same amount )
Seeing how far it goes.
I added the home switch, teach switch as the spot light toggle and the cursor pads to move the head. the down button is mapped to RX on the arduino mega so I cheated and used FAST button, we’ll remill a new board tonight with a different layout
We’re pretty close to getting the full functionality of what we had before with the factory software. Just tool changer positions etc, which is all just finding the spots.
The speed of the machine has been pedestrian so far, so looking at the original specs the pulses are ramped (since physics) and it moves much faster. So next lets try to match that.
Scope/LabView looks like this for the original.
The X and Y’s have different stepper controllers, so it has different max speeds. The idea is now to add ramps to the move functions, i threw together a quick ramp into the limit finder test code, of course this means it has a nasty bump as it stops for the limiter. Once we’ve got a good speed going, the new gotoxy() function will do a /~~~~~\ ramp, slow to fast to slow.
Various speed tests
Goes wrong! We can play a mean mario with this
Yeah! we’ve got a decent speed now. Its hitting the limiter rather than slowing down as it should. The arduino starts off ramping up but since its looking for the limiter it bangs to a stop, we’re going to calculate the number of pulses needed to get to just before the limits. That way the machine knows how far it can go, even though during most of its working life it’ll never go to the limits.
[Null Space Labs] like most hackerspaces is very srs bizness indeed.
So next I wrote a piece of test code that moves each of the axis slowly, limit to limit for a few passes the Y result was this :-
Found Y+ limit = 4202 Found Y- limit = 10597 Found Y+ limit = 10597 Found Y+ limit = 0 (oddity!) Found Y- limit = 10597 Found Y+ limit = 10597 Found Y- limit = 10597 Found Y+ limit = 10597
At faster speeds in the X axis, it deviates but interestingly settles after a few :-
Found x left limit = 7433 Found X right limit = 7447 Found x left limit = 7276 Found X right limit = 7446 Found x left limit = 7266 Found X right limit = 7446 Found x left limit = 7266 Found X right limit = 7446 Found x left limit = 7266 Found X right limit = 7446 Found x left limit = 7266 Found X right limit = 7446 Found x left limit = 7266 Found X right limit = 7446
Running the X at a slower speed gives us this :-
Found X right limit = 7432 Found x left limit = 7432 Found X right limit = 7432 Found x left limit = 7432 Found X right limit = 7432 Found x left limit = 7432 Found X right limit = 7432
Which is great, since as it should be its very consistent.
Our ruler based figurin’ from before gave us the following info :-
500 pulses = 25mm 100 pulses = 5mm
So using that info from above we get
431 pulses X axis (left to right limit to limit) = 370mm 10597 pulses for the Y axis(limit to limit ) = 529.85mm
This is good since it means our speed is workable, and we can now write a function that can start off slow, speed up and slow down, as the machine knows how many pulses it can do before hitting a limit, but we first have to calculate the distance from home to limit for each X and Y axis. Though most of the time the machine will not be attempting to get to the limit.
The machines minimum step size is .05mm or 1.9mil’s but we are going to improve to .025mm or0.984251969 mil! Which is 0.000984251969 inches.
So now we have converted it to double the resolution of the original equipment we get
Found x left limit = 14867 Found X right limit = 14864 Found x left limit = 14863 Found X right limit = 14863
Found Y- limit = 21174 Found Y+ limit = 21173 Found Y- limit = 21172 Found Y+ limit = 21172 Found Y- limit = 21172 Found Y+ limit = 21172 Found Y- limit = 21173
It’s now 1000 steps per 25mm or 1 step is 0.025mm!
Awwh yeah!!! Our machine is now able to do smaller parts and greater resolution than the original!
So far for this post, it is about 11:00PM west coast time and its been a busy few days, we’ve put about 6 nights work into this and progress has been pretty good. We’ve saved ourselves a lot of money, since a machine that’s not got as good specs would cost us nearly 20K. The machines minimum step size was .05mm or 1.9mil’s but we have improved it to .025mm or0.984251969 mil! Which is 0.000984251969 inches..
To recap
Built arduino shield Wrote arduino code All pneumatics working Repaired reed switch Fixed all the broken mechanicals in the head. All input switches working on the panel (except down as it was wired to RX oops) Limit switches working Home sensor working, home written Figured out how to ramp up and down the speeds to get the the machine moving quickly Automatic Tool Changer all works Head down, head up Vacuum on and off Teach light repaired and working, controllable Rotation and centering arms working Reed sensor on head up Verified our code and board homes the machine to the exact place the original did. Calculated travel pulse speed and size of board, machine can gotoxy without a problem Doubled the resolution!
We’ve still got to replace all the hoses as they’re really in bad shape but that’s easy. The next step is software to do the pick and placing, that’s easy too. I’ve already written a gui and added opencv.
charliex, varun, bob, and 1 other are discussing. Toggle Comments
worked on some of the first Juki over 25 years ago, they are solid beasts.
Just one thing to watch is the inertia of the cables where they enter the P&P head, if the cables swing back & forth, eventually they wear or break the internal conner strands, with the external covers still intact
It can take months to track the problem down, because it results in random overshoots/undershoots of the mechanics.
Guys heard you are doing the interface board from scratch is it open source if it is please help the guys at http://openpnp.org/wiki/index.php/Main_Page it would be helpfull. Great work guys waiting for the beast to get
ready.
Andrew Bailey 4:23 am on December 24, 2012 Permalink |
Dumb question, why did you want a 00 MAC address?
charliex 4:33 am on December 24, 2012 Permalink |
Its the first part, so 00-90-a9-a2-1a-33 isn’t cloneable it has to be 02-90-a9-a2-1a-33 06-90-a9-a2-1a-33 etc. Useful for when an ISP uses your MAC to identify your NIC for home internet connections etc.