Sunday, December 9, 2018

Day-O: A customizable macOS clock replacement

At work we use week number milestones. Finding which week we are in is always a pain... Until I found Day-O (https://shauninman.com/archive/2016/10/20/day_o_2_mac_menu_bar_clock).

This little piece of software can replace the standard macOS clock and is fully customizable. To install it simply run:

    brew cask install day-o

Then simply start it to get:


You can then click on this new clock and select "Preferences". This is where it gets interesting:
Day-O has multiple placeholders that can be added, all very well documented here: https://shauninman.com/day-o/datetime.html

In my case I simply want to add the week number so I used the following format:
This gives the following clock display:


Next you can remove the standard macOS clock from the control panel.

If you want to move the Day-O clock right in the tool bar simply click on it holding the 'Command' key and slide it in the position you want. For me the final result is:


Hope you find it as useful as I did.


Thursday, November 29, 2018

Helping a STEM student Arduino homework

A few weeks ago I responded on LinkedIn to someone who was looking for someone Arduino savvy. Turned out to be someone looking for help for her daughter that had trouble with a STEM course assignment.

Now I don’t usually do these kind of help. Most of the time it’s lazy students looking for someone to do their homework for them for free of 10$... I have been burned before.

But this time it was different. First it was the parent asking and after a few exchange I could feel that they were willing to put in the effort.

The task at hand was pretty easy. The student needed to reproduce an Instructable project based on an Arduino Uno, a 16x4 LCD and an analog joystick. The Instructable project was this one: https://www.instructables.com/id/Arduino-Looong-Snake-Game-With-LCD-16x4/

I first discovered that they and bought the wrong LCD and did not have the joystick part. I help them source it and during the time they waited for the parts I went on to build it myself. The hardware assembly was pretty straightforward and I had all the parts. Here is the Fritzing diagram:



Next I went on on compiling and uploading the code provided in the Instructable article. It did not work. The code was supposed to wait for you to select a level, but it would instead go straight to the game. Joystick did not work to control the snake… Then when I had that “Oh great, what did I get myself into” moment.

After a 30-40m adding debug print to the serial console and analyzing the code I figured out that the bugs in the code and just fixed it quickly. At least now the code was doing what it was basically designed to do. There are still some bugs in it where the snake jumps sideways, but the plan was never to fix it, just to get it working.

I did adjust the code writing style to match what I use so that it can be somewhat more readable. I did not add any comments or change the code structure.

You can download the fixed source code here: https://gitlab.com/IndianaTux/arduino-snake-game

Now the parent and her daughter got the parts but the male header is not soldered on the LCD and they have yet to find someone to do it. I’ll update this post with issues they went through as I help them out.


Friday, November 16, 2018

Adding shadow to images from the command-line (macos/linux)

When doing documentation, adding a shadow to images or screen grab makes the document come aline and helps break text from images.

For example the following image:


Is pretty "normal" and does not stand-out. However with a single command you can turn it into this:


You will need the ImageMagick package installed: https://www.imagemagick.org/script/download.php

On macOS if you have brew installed it's as simple as running: brew install imagemagick

Then to add a shadow as shown above you simply have to run:

my_image="pi.png" ; cp ${my_image} ${my_image}_original ; convert ${my_image} \( -clone 0 -background gray -shadow 80x3+10+10 \) \( -clone 0 -background gray -shadow 80x3-5-5 \) -reverse -background none -layers merge +repage ${my_image}

Just change my_image="pi.png" to reflact the filename of the image to shich you want to add the shadow to. The above command will create a file with _original which is your original unmodified image.

Wednesday, November 14, 2018

Montreal Advanced Design and Manufacturing Expo 2018

So I attended the the Montreal Advanced Design and Manufacturing Expo at Palais des congrès today.


Was not expecting much, attended out of curiosity. It was really aimed more at the factory automation and packaging business but managed to get to know a couple of sensors manufacturers as well as a Fab (PCB assembly) house that accepts prototype level quantities.

But what I was most disappointed about was the Palais des congrès wifi... On the expo floor I could not connect to the free wifi network from my iPhone of MacBook. It would simply not give me any IP address... The only wifi network that was working was a paid one, so I used one of my 5h of free Fido internet and tethered...

On the floor outside the expo area I managed to connect to the free wifi and get the portal page, but could not get pass it:




So I went over to one of the VanHoutte but it's wifi was locked and I was sitting down with my laptop so did not feel like going to the counter to ask for the password and leave my stuff unattended.

Luckily there was a TimHorton just in front and I was able to connect from there, but my PPTP (yeah I know) would not work...

Wednesday, October 3, 2018

Embedding hardware parts in 3D prints

Yesterday I did my first attempt at embedding a nut in a print...

The idea was to have the nut (8-32 hex nut) be captive in the print so it would not move. I used to simply make the 3D printed hole a bit smaller than the screw and then "force thread the screw in the final print. Works well for small screws like 2mm, but for larger diameter screws the print tends to crack and break.

So here was the design... It's a insertable part in a Nanuk type of rugged case (this particular case is german made and I don't have the manufacturer for electronics.


As you can see there is a hex pattern for the nut.

After slicing the design with Slic3r. I looked at the Gcode output and found which was the last layer printed of that hex pattern. Just before it started to do the part with the top round hole.

Just there I simply inserted an @pause statement in the Gcode file.

An @pause statement simply tells the printer to pause and wait for a resume command. 

When the printer paused, I inserted the 8-32 nut. Now be careful and fast ! Careful because your fingers are close to the hot-end (I used a pair of tweezers) and fast cause you don't want to leave the hot-end not moving for too long.

I use OctoPrint (running on a Raspberry Pi 1, slow WebUI, but it works great!), so once I was done, to resume I simply had to click on the "Resume" button.

And it worked ! The result was very good:




Works very well. I need to experiment on moving the head away and maybe retracting the filament so it does not ooze out when inserting the hardware.

I'll probably try the same method to perform a filament change (change color) at some point.

Friday, September 14, 2018

Getting out of the VoIP business

That's it it''s done...

This week I sent the following e-mail to remaining my VoIP/Asterisk customers:



It's been a fun, what almost 15 years doing VoIP/Asterisk, but I had enough.

Sunday, May 20, 2018

Présentation des projet des étudiants en génie électrique du Cégep Lionel-Groulx

Comme a presque tout les années depuis que j'ai graduer en Technologies des Systèmes Ordinées au Cégep Lionel-Groulx, j'assiste a la présentation des projets finaux.

C'est une présentation libre ou chaque équipe a un espace pour présenter son projet, en faire la démonstration et répondre au questions. C'est aussi une belle occasion pour les entreprises de recruter.

A l'arriver ont vous remet une feuille sur lequel ont vous demande de notez vos 3 meilleurs projets.

Cet année les projet était encore de très bonne qualité, seul une équipe ne pouvait démontrer son projet car il avait sauter la veille (et oui ça arrive). Il y avait beaucoup d'innovation, seul 1 projet a ma connaissance était une reprise des années passer.

Voici donc une petite description des projets présenter:



L'equilibre


L’idée de ce projet est une plateforme qui peut bouger sur les 3 axes afin de garder une bille d'acier le plus possible au centre de la plateforme. Les estudiantins ont utiliser des bobines afin d'induire un flux magnétique pour contrôler la plateforme. Ont a ainsi l'impression qu'elle flotte.

Belle réalisation.

Robot Suiveur

Un petit robot style "Roomba" avec plusieurs capteur ultrasonic ainsi qu'une camera. A l'aide d'un interface web ont peut choisir la couleur que le robot va essayer de suivre. Les capteur ultrasonic lui permet de ne las entrer en collision avec les autre objets. Il y a aussi un mode ou le robot va lui-meme retrouver et revenir a sa station de charge.

Belle utilisation de capteur ultrasonic et de OpenVC pour la reconaissance des couleurs.

GloveX


Ici ont a un bras robot contrôler a l'aide d'un gant équiper de bande résistive flexible et d'un accéléromètre/gyroscope. A l'aide du gant ont peut contrôler la position du bras et de la pince. Les gars ont designer leur propre "drive" pour les stepper ce qui est habituellement la partie la plus complexe de ce type de projet.

Belle utilisation d'une interface man-machine non-conventionnel.

Imprimante 3D

Ce projet n’était pas vraiment l'imprimante mais plutôt sa carte d'interface. L’étudiant a décider de designer une carte pour imprimante 3D (ou CNC) compatible avec le firmware Marlin, mais qui est complètement modulaire. Il s'agit en fait d'un gros shield Arduino Mega sur lequel one place des contrôleur de stepper SPI (que l’étudiant a aussi designer). Le design semble brillant et les moteurs contrôler par ces contrôleur était très très silencieux.

Segway


Ah le fameux Segway. Repris années après années. Les étudiants ont redesigner la drive et ajouter une application Android ainsi que de nouvelle fonctions de sécurité. Je pense que c'est la première fois que je voit quelqu'un embarquer sur le Segway pendant les présentation...

Bar Automatiser


Un autre classique qu'ont revoit presque a chaque années. Ont choisit un drink sur une application mobile (ont peut faire nos propre recette). Ont dépose un ver et le système bouge le ver sous les bonne bouteille et le monte pour activer le déversement d'une dose de liquide.

Malheureusement pour l’étudiant le moteur qui sert a faire monter le ver était non-fonctionnel pendant la présentation.

Le Nuage

J'avoue que j'ai pas trop compris l’idée derrière ce projet, peut-être a cause que je ne suis pas un amateur de musique... En bros un speaker bluetooth recouvert de coton en boules et des leds qui flash au rythme de la musique. L’étudiant voulait que le "nuage" valse de haut en bas au son de la musique a l'aide électro-aimant mais ça n'as pas fonctionner.

MercuryBot


Un robot avec une plateforme a courroie qui peut se promener dans un entrepôt pour ramasser les pièces d'une commande qui lui a été transmise. La réalisation manquait un peut de finesse. Je pense que les gars ont passer trop de temps sur le logiciel d'inventaire et pas assez sur la partie mécanique pour aller chercher les pièces dans l’entrepôt.

Hydro Serre


La culture hydroponique nécessite un très grand contrôle de l’environnement (eau, nutriments, lumière,...). Ici l’étudiant a brancher a un RaspberryPi des senseurs de température, humidité, Ph et les pompes pour faire circuler l'eau. Une interface web permet d'avoir l'historique des senseurs et de l'arrosage.

Doigts d'Acier


Je pense que si il a un projet dans cette présentation qui pourrait être commercialiser il s'agit de Doigts d'Acier. L’étudiant, amateur d'escalade, a conçu un système qui permet de programmer des cycle d'entrainement chronométrer sur les différente prises. Des senseurs de charges (load-cell) peuvent aussi enregistrer la force que l’athlète a mis sur chaque prise.

Serrure Sure

Ici ont a un système de serrure via NFC/RFID. Ce qui fait que le projet sortait un peut de l'ordinaire est que l’étudiant a ajouter une camera et a configurer OpenVC pour la reconnaissance faciale. Plus un défit logiciel que matériel, mais une belle démonstration de l’application de cette technologie.

Pedale de son

Bon, je ne suis pas un amateur de musique, alors mon intérêt était assez limiter. En gros une pédale de son qui permet de déphaser (ajouter un délai) certaine trame.

Auto Bluetooth

Pourquoi utiliser une télécommande quand ont peut utiliser son téléphone intelligent pour contrôler une petite auto. Les étudiants ont remplacer le circuit d'une petite voiture téléguidé et l'ont remplacer par un Arduino et un module bluetooth. A l'aide d'une application mobile ils peuvent ainsi contrôler la petite voiture via l’accelerometre et gyroscope du téléphone intelligent.

Domotique 

Domotique est un grand nom pour ce projet, je dirait que ce projet était plutôt un thermostat contrôlable a distance ainsi que le contrôle d'une lumière a distance. Manquait un peut de finesse dans l’exécution, mais c’était fonctionnel. Bravo.


Saturday, March 17, 2018

Montreal Arduino/Maker boutique

This morning I was looking for a few parts for some projects and was going to head to KGE, but searching on Google I found Future & Energies which was about at the same driving distance.

Their web site is not transactional so you can't seem to buy a lot of their stock online. Since it was 9h50am and they were only opening at 10h00am I fired an e-mail asking if they had what I needed in stock. The answer came in at 10h40am which is a decent response time.

So I headed to Ville Lasalle hoping not to catch too much traffic on the Mercier bridge.

I was happily surprise at the shop I found. Small boutique filled with stock. Arduinos (clones mostly), Pi, components, 3D printer stuff, solar kits, name it.

Price were decent and I did not have to pay any shipping.

Give them a try if you need parts and electronics stuff:

          Future & Energies
          Tel:
              514 508 2144
          Email:
              futureenergies@outlook.com
          Opening hours:
              Lundi-vendredi : 10H à 18 h.
              Samedi : 10h  à 16h.
          Adresse:
              5419 rue de Verdun H4H 1K6
              Montréal ,Qc , Canada

Thursday, March 15, 2018

Servo motor adapters

Yesterday a friend on twitter (@Cleo_Qc) asked me if I had references to servo motor shaft/teeth dimensions. I did not have but a few google search and I found some valuable links and documents:

First this post which outlines the "standard" names used by Hitec servos: https://www.servocity.com/servo-spline-info

This lead me to this post on Robotshop.com which gives details on some attachment standard: https://www.robotshop.com/blog/en/hobby-robot-industry-standards-hubs-patterns-18681

If you have more reference on the subject, feel free to post them in comments below.

Current and past projects portfolio













Day-O: A customizable macOS clock replacement

At work we use week number milestones. Finding which week we are in is always a pain... Until I found Day-O ( https://shauninman.com/archive...