Wednesday, 20 January 2021

Playing with the Raspberry Pi Pico!

I've been incredibly lucky to get to play with the new Raspberry Pi Pico in pre release and, in short, it's rather brilliant! First up, this new board contains custom Raspberry Pi silicon, the RP2040 chip, which will also be sold as a standalone product for people to develop products/systems/boards with.

The Pico is set to retail at  less than a £5er and you'll want to check out this page for the full spec and the pin in/out of the Pico but the highlights are;

  • Dual-core ARM Cortex M0+ processor, with clock running up to 133 MHz
  • 264 KB of SRAM and 2MB of flash onboard
  • 26 multi function GPIO
  • 2x SPI, 2 x I2C, 2 x UART, 3 x 12bit ADC, 16 PWM channels
  • 8 x PIO Programmable state machines


  • It  has USB Host and Device, compatible back to 1.1 and it's programmable via drag and drop using mass storage mode. If that last line didn't make sense, put simply, you create some code, attach the Pico via USB (whilst holding down a button)  it appears as a drive and you drag your script file to the Pico and it is automatically installed! Simple!


    Language wise there is a C/C++ and  a port of Micro Python and I've played a little with both, working through some of the examples in both C/C++ and also Micro Python. All my tinkering has been done using my Raspberry Pi400 and it's worked excellently as a pairing! 

    I started following the Getting Started PDF for C/C++ and installed the SDK/ toolchains. The guide walks you through installing everything you need from the terminal and steps through how to make and build the examples. Many will opt to edit and create code in something like Visual Studio (again bundled into the Rasbian image) but for my simple tinkering I opened some of the examples using nano, tweaked and then rebuilt them in the terminal. You honestly don't need to be a terminal guru to get to this point, simply follow the documentation. The resulting tweaked examples, when built, create a .UF2 file which you can drag and drop to the Pico which flashes incredibly quickly. 

    Perhaps more accessible for some is the Micro Python or "Pico Python"route, the first task here is to drag and drop the Pico Python firmware onto the device, for convenience a pre built binary is available on the Pico Getting Started page. Also in the getting started with Micro Python on Pico documentation there is a guide for you if you are keen and want want to build your own binary. Flashing the micro python firmware to the Pico is another simple drag and drop operation and you can, of course, swap between C/C++ and Micro Python by re-flashing.

    Following the micro python getting started guide it walks you through interacting with the REPL using minicom within the terminal which is fun to tinker with. There's a decent walk through of all the examples in the micro python repository in the documentation. This includes examples that use most of the Pico's features, PWM, UART, SPI, PIO , but there's also examples for things like interrupts, and additional common sensors, Neopixels and LED's. 

    Towards the end of the Micro Python guide there is a section on setting up an IDE, Thonny, to provide a nice environment for working with the Pico. Thonny is a nice simple IDE that's again bundled in the Raspbian OS, it's pretty straightforward to set up and get going and you can work directly with the REPL via a shell window or you can save and deploy scripts temporarily or with persistence to the Pico.

    So! My thoughts, it's great, a low price, really fast and well spec'd micro controller that at launch already has a heap of resources and examples, I'm sure that at the price point it will attract a mass of users and a strong community which will create and share lots of wonderful projects. I can't wait to see it grow!


    Thursday, 14 January 2021

    Repairing for Thriftyness! Zoom H4n tiny repair!




    I'm always repairing stuff and find it a really rewarding thing to do for all kinds of reasons. I've been thinking about how repairs have different things that drive the desire to repair. Many times I repair because I need to use a tool that I've managed to break and can't wait for a replacement, sometimes I'm repairing something I've made, a crashed rocket or ripped parachute. Sometimes repairs are emotional and nostalgic, repairing an item I have an attachment too that is irreplaceable. Sometimes I feel repairs are important in terms of heritage, particularly older tools/ lathe etc. Anyway... today I was thinking, sometimes I repair because I am thrifty!

    I particularly wanted one of these zoom H4n audio recorders as I wanted to explore a particular feature they have that's slightly different to others. They are an older model now that were about £250 originally but now can be picked up in good condition for about £100. However you can often find them cheaper listed with a bit of wear and a few faults. This one was listed with a few cosmetic scrapes, an intermittent fault on a button, and the SD card slot cover missing.... it was therefore much cheaper! 

    On arrival a quick blow through the case with some canned air has cured the button press issue and it's always worth searching ebay for people selling scrap/spares/repair versions of your item. I managed to find an entire right hand side chassis component for £3.20 complete with the SD card slot. A quick swap and it's not quite as good as new, but it's 100% functional and ready to go! For the repairers out there these are pretty easy to work on, no glues and standard screws!


    Monday, 4 January 2021

    Round up of my stuff on Thingiverse

     

    I realised I've never really blogged about my stuff on thingiverse. I tend to use thingiverse for smaller items with larger projects going on my gitlab but there's a growing random sprawl of little designs over on my thingiverse page so I thought I'd post about a few. 

    First up is the latest project which is a small box for ER11 collets I use with my CNC router. Designed in FreeCAD the conic holes for the collets match the collet dimensions so that there's no rattling around. The lid is just a slip on cover as I don't tend to carry the collets around but I do want them to be protected from swarf and chips off the machine. 

    Next up is a set of Mini Lathe Pinion gears this pair of gears sit above the tumblers on the mini lathe and select the direction and drive for the gearbox. I stripped one of my gears and whilst I could find lots of designs for the tumbler/change gear wheels I couldn't find a design to print these so there they are!

    A while ago I wrote an article for Hackspace Magazine Issue 36 on "Functional 3d printing" where I looked at printing various useful little designs, I put most of the stuff from that article on my thingiverse including a small screwdriver handle to hold 4mm bits, some nice printable V blocks with clamps and various other small clamps and jigs and workholders. 

    One project people seemed to like from a while ago on my thingiverse is a tiny vacuum former, I made it on my CNC router but the drawings could easily be laser cut as well, it's super cute but works well for small items in thin plastic using a small house vac. 

    Finally there are a few other lasercut designs up on there. My first ever thingiverse project was this lasercut rocketry ruler which helps draw straight lines on tubes and also has a reminder about centre of pressure versus centre of gravity relationships on it! There's also a complex design for a lightweight indexing table and even a design for mounting fins on a flat pack workshop demonstration rocket!

    Friday, 18 December 2020

    Raspberry Pi Desktop For UMPC Repair!




    I love UMPC, the idea of being able to carry a complete system in a pocket or small bag has always appealed and I've had a raft of machines, from my old  HP Jornada 720 through to a (sadly died) One Mix Yoga. One that I had never owned is a Sony Vaio P Series. When one came up on ebay with no HDD and a wonky network card I couldn't resist. 

    This is a P11z and is widely regarded as a bit of an overpriced dud in it's day! The 2GB ram and the 1.3MHz single core processor left a lot to be desired especially when running WinBlow$ Vista (aaargh) off a 4200rpm HDD. However, running a lighter distro and an SSD I wondered if it could be a useful note taker. 

    So a 1.8" Zif 40 pin SSD was ordered and fitted and the network card issues where solved by simply re-seating it and re connecting the antenna cables! After my explorations a while back getting Linux to run on  Linx 1010b I was expecting a battle and also having read a lot of people struggling with drivers I was considering my options. Then a brainwave, I wondered how well the Raspberry Pi desktop would work, a quick test with a live USB was stunning, everything works! 

    Whilst it's still not the quickest machine in the world its actually super fun to have the RPI OS on a super portable machine, I installed the image with all the optional software and whilst primarily this machine tends to hang around with notes for a project open in Libreoffice Writer, its fun to play with Mu and Wolfram and other stuff included in the RPI Desktop. 


    Thursday, 3 December 2020

    FreeCAD mini series in Hackspace Magazine. Issue 37.

     


    I've just updated the blogpost where I keep track of all my articles for Hackspace magazine (Here if you are interested) and whilst I have the cover feature this month on Robots I wanted to just post about the other piece I have in this month. It's the first part of a mini series about learning the wonderful FreeCAD software and is aimed at both beginners in CAD and beginners in FreeCAD. 

    I haven't written much about why FreeCAD as opposed to other, perhaps more well known, CAD platforms. For me part of it is that I love the opensource movement and agree with its ideals in all sorts of ways. That aside, FreeCAD also has a few other benefits. Whilst it's complex, that complexity is also astonishing in terms of what it brings. I've played with FreeCAD for a couple of years and I still feel quite like a newb when I see the amazing things people in the FreeCAD community can design. Later in the mini series we'll have little overview of add on workbenches and some of the more esoteric sets of tools FreeCAD has. From designing and analysing hand gliders to simulating boats to FEA/FEM and more. It really is a feature rich piece of software capable of designing anything. 

    More practically I like that FreeCAD isn't cloud based, this means that I can carry it with me regardless of connectivity wherever I go. Important in none ubiquitous WiFi N Wales but also important after this week where lots of the internet globally has been hit by outages. Finally, I'm loving how FreeCAD, due to it's opensource status, fits in with other software. There are some really interesting things going on in terms of FreeCAD and KiCAD, and the fact that FreeCAD can handle OpenSCAD scripts directly is a bonus. There are also some nice workflows between Inkscape and FreeCAD. These are things that are hard to find with less free, more proprietary CAD packages. Love it! Check out issue 37 of Hackspace Magazine here. 

    Monday, 30 November 2020

    TS100 Cable Mod, Super Silicon



    This little modification sits firmly in the "I should have done this months ago" file. I love my TS100 soldering iron and have blogged about it before. I normally power it from one of a couple of spare laptop power supplies that are kicking around and it's fine ...ish.. The laptop power supply cables aren't that flexible and this particular one had an angled plug which makes handling the TS100 a bit weird. 

    When I bought my TS100 it came with an extra cable which is a really nice soft and flexible silicon cable with a barrel connector at one end and an XT60 connector at the other, this is a great cable that allows you to run the TS100 of a LiPo battery. It was only today that the synapse fired! Cutting off the barrel socket on the power supply and soldering an XT60 connector to it means that I can use the very nice silicon cable as the last bit of cable both at my desk and in the field. 

    Tuesday, 10 November 2020

    Pi 400 My Thoughts


    I mean I'm already set up to invoice Raspberry pi as a freelancer so I don't know why they don't hire me to model all the new products.. :) Yes, I have a Pi400 and in case you have been under a rock it's the latest raspberry pi offering where they have shoehorned an adapted version of the PI4 4GB into a keyboard and made a complete computer package out of the box. 

    I've had mine for a few days and had time to have a little play. I'm late to the game so there are lots of reviews and tear downs out there so this is just my little collection of thoughts and findings. 

    First of all, I went for the Pi400 package only, not the option with a mouse and SD card as I have those in abundance, similarly so with a micro HDMI adaptors. For setup I've used the full Rasbian image with the optional software. 

    Hardware wise it feels very nice in hand. It's pretty solid feeling and is very compact. Definitely suitable to chuck in a bag and carry about and I wonder if we'll see people incorporating it into cyber deck type builds. The keyboard is a nice size and the travel on the keys is pleasant and its pretty nice to type on. I LOVE that there is a power key on F10! It's great to be able to shutdown and then, whenever you want, press the raspberry key and long press F10 to boot! So pleasant after much plugging and unplugging of pi over the years. 

    There's been a lot of discussion about the fact that raspberry pi kept the micro HDMI connectors similar to the ones on the Pi4. There are a fair few people who don't approve and wondered why in this build they didn't opt for full size ones. Essentially rpi design crew reckon that micro HDMI is the most future proof and will have the longest support. I am less concerned about the micro HDMI as I've found them pretty robust in use. The one thing I wish they had done is to space them out from each other. If you use the chunky none cable type micro HDMI to full size adaptor it's impossible to use two of these side by side in the micro HDMI sockets. So a little tip is to go for the cable style adaptors. 



    In use, it's pretty capable. The slightly updated processor IC has been overclocked to 1.8 GHz but theres a heap of thermal gubbins inside so its totally cool and stable. It zips along quite readily and runs the usual games and programming stuff bundled in the raspbian image. I've also tinkered with inkscape and KiCAD on it and it handles these really well. Similarly web browsing and video streaming all works fine. For general office, light browsing and stuff there is very little it can't do. 


    One other thing I was interested in was that the custom board featured a different WiFi antenna with a PCB routed antenna rather than the PI4 antenna. Whilst I've stopped short of measuring gain etc I definitely have noticed that I get a better connection to my WiFi from my lair! 

    Final thoughts are, I think it's great. It's brilliant for me in that often I have to try odd things on a RPI for work/writing and I've wanted a more permanent set up for a while. I like that it can be chucked into a bag for trips. I think that if you have someone curious to get into programming or tinkering with project this is an excellent out of the box accessible setup for not much coin. I'm planning to tinker with getting it up and running as a controller for my CNC router and perhaps my Vinyl Cutter as well as a general tinkering machine,