Big Changes

I have now moved this website online. I did this for a few reasons. First I wanted to free up the Pi 4 for another project and I always had to spend time checking the site for attempted attacks (I could get dozens every day).  The security on it was very good and nothing ever got through but you can’t guard against every vulnerability. Another reason was that my DNS nameservers were not all in one place. My email mx records were with one company and redirected while the rest of my DNS records were with Ionos (1&1) so i wanted to consolidate everything. The site was migrated to Ionos where my emails are now also setup.

Website moved to a Raspberry Pi 4

I have just moved the website from a Pi zero to a Pi 4. Took most of a whole Sunday to do it.  The Pi zero was becoming slow and WordPress was complaining about an insecure version of PHP.  I will also look at running it off a SSD for reliability and speed.  I will add instructions for this in due course.

Update on balancing robot

It’s been while since I posted.  I have been distracted by other things. However time for an update: I had the robot balancing very well, left it for a few days then found it had issues, it probably had something to do with dodgy DuPont wiring.  I had every intention of troubleshooting it but it was forgotten about in the back of a cupboard for many months.

Having finally got back to it, I decide to get a proper PCB made to help with the reliability. The PCB would have headers to plug in two Arduino Pro Minis and contain the passive components and headers for the external modules and motor driver.  I also pulled out the unused ports from the main Arduino to a header to allow for future development.  I added extra ground and 5V headers for the same reason.  The schematic and PCB were designed using EasyEDA and the PCB is being made by JPLPCB.

This is the Schematic:

Here is the PCB:

The board has been made and is in transit.  It can take the best part of three weeks to come from China.  It cost me £1.62 for five boards and got free shipping on first order. Normally shipping would only cost £4.30! an absolute bargain as long as your not in to much of a hurry.  You can get it in a few days but it costs a lot more. When it arrives I will continue this journey and keep you updated.

Bluetooth control

Another thing I have been doing is learning to create android apps,  This turned to be fairly straight forward using an online application called thunkable.  I have created two apps to control the robot over Bluetooth, one for classic Bluetooth and one for Bluetooth Low Energy.  Both of these apps send a direction or stop variable back to the robot and receives and displays the current battery voltage with a battery low indicator displayed. 

Project been on hold for a bit.

Due to back pain I have not been doing very much to this project lately.  But what I have done is complete a knight rider scanner LED circuit running on 168 Arduino nano.  The code for this was cribbed from the internet. 

I also created a perfboard PCB to simplify connections so each of the boards can be simply plugged in.  This will make the whole thing a lot more modular.

Changes to robot design and further thoughts

 You may have noticed in the circuit below that I have added a Bluetooth module. I was also was wondering if the weak motors were due to lack of current from the AA batteries so I have ordered a 7.4V lithium Polymer battery and charger.  I could use the Nano to monitor the battery voltage and even send this value over Bluetooth as well as indicating low battery voltage with a LED.

Another thought I had was adding a Knight rider type 8 led display to make it look like the robot was scanning. This would require a second Nano and/or a shift register circuit.  But this is after everything else is working.

Robot coding

The code I’m using for the balancing robot is based on a sketch that is all over the internet in various guises.  I can’t find any mention of the original author.  The version I am working on was part of a project by Aalto University in Helsinki. It is the only one that tried to use the encoders on the dc motors for additional stability.  I say tried because their project ultimately failed to produce a stable robot.  I can but try,  at least it’s a starting point.  The Aalto University project can be found here.

Balancing robot circuit

I have completed a circuit layout for the balancing robot. Not sure if the motors I bought are going to be up to the job due to lack of torque and slack in the gearbox.  We will see.