Monday, 6 April 2020

ODOTS: planning the next steps...

After a few months of reflection and contemplation it is time to admit that the next step in the ODOTS project needs doing.

The hit list (or wish list) for the new design:

  1. 2 month battery life.
  2. USB results printing.
  3. Shrink the size of the enclosure, improve the mounting of the electronics inside.
Meeting these targets requires a many changes in different aspects of the design. 1. will require software changes and possibly hardware changes to support lower power consumption. 2. Will require an upgrade of the software and communication interfaces on the ODOTS boxes. 3. Will require a more custom design of enclosure than the current one, and a way to manufacture it. Also 2. makes 3. significantly harder when also considering the weather-proofing of the boxes as the connectors will represent a necessary break in the enclosure.

Battery life can be extended with software by introducing 'sleep mode' behaviour that allows the ODOTS device to use its RFID field less frequently if it has not been used recently. Given that the RFID field uses the vast majority of the power consumed by the device this will be able to eke out a few more days of endurance from the device. It should be noted that the devices were left on after the test in November and still responded to cards after a day and a half of being on! Excitingly modern RFID readers are gradually introducing capacitive sensing abilities. This would be ideal, allowing a permanent sleep state. Otherwise there are hardware changes that can be made to reduce power consumption, slowing down the Arduino clock-speed (or changing the micro-controller entirely) will be a good start. Ideally the entire electronic design will be looked over to search for potential efficiency gains, though this will take a while.

I have discussed the apparent need for 3d printing in redesigning the enclosures, primarily because operating one allows rapid, repeatable, bespoke manufacture. This would allow me to design an enclosure with the perfect mounting system and interior volumes for the ODOTS hardware, then produce a complete set in short order. Then repeat the process whenever the design changes (or I realise I forgot something...). Of course there is a cost involved with constructing and running the 3d printer - this will be offset by the fact that I can use it for other things, like telescopes.


Saturday, 28 December 2019

3D printer: Projects never die, they just hibernate

This does not count as an ODOTS post. Though ODOTS posts will just have heralded it and will follow on from it.

The 3d printer LIVES


One of the things that became very clear at the end of University was that I was unlikely to gain access to as good computer aided manufacture devices for a very long time. Naturally this resulted in the Engineer's equivalent of the process of grief: procrastination, fear for future projects, rapid acquaintance gathering in later university intakes, planning for losing capability and finally  - coming up with a hacky workaround.

I am pleased to reveal that the hacky workaround in question rates very low on the hack-index. Actually it rates embarrassingly low. The solution of course was to plan to build my own 3D printer, CNC router e.t.c. - to this point only the 3d printer has had any work done with it, mostly as many of its components were made using the machines at University in my final few months.

The justification for this was that I was only using scrap wood (in the laser cutter) and a minimal amount of filament on 3d printers that were not being used (because everyone was studying for exams...). The result was stuff of legend. I had chosen the Smartrapcore design because I liked the idea of the RepRap Core-xy and the design ends up looking a lot like the Ultimakers from Uni. The smart rap core jscad produces a STL of the expected completed printer, this made making the frame design particularly straightforward.
The blue is the STL - so far everything has fitted perfectly on the frame side.
The big stumbling block was naturally gathering components and the cost of doing so. This is my excuse for the 6-12 month delay in actually starting construction from when I first started the 3d printer concept with a bunch other students.

A view of the core-xy carriages 

Some filing work has been needed to get the timing belts working - but the entire structure is now together, and all carriages are moving smoothly. The only thing left to do is wire it up, load up firmware, check everything is working, calibrate the movement, calibrate hot-end temperature and filament flow-rate ... just most of the build process really!

Saturday, 30 November 2019

ODOTS: The Hardest test of all

 ... Real People...

So today the ODOTS proof of concept units headed off to the sunny Forest of Dean* to be demonstrated to live orienteers, mainly so that I could get some feedback from potential users on what I had missed as a designer. The answer was mostly box size - people did not fancy the idea of carrying around a whole load of the rather large enclosures.

Live tests are a traditional stumbling block of any project - nothing brings out the bugs more than people watching. This test was unfortunately no different - one of the Arduino chips emitted some blue smoke yesterday so the download unit also became a reset unit, and my laptops battery died in the cold so results were not displayed for most of the demonstration.

However most people (as far as I could tell), were receptive and understood the goal of providing an option for timing system users that cannot justify the expense of current timing systems.

So, what are the next goals? The next stage of work will be made a bit slower by the fact that I have a job now, but there are a couple of concrete goals to go after:

  • Move to SMD components so that the cost and power consumption can be further lowered.
  • Make a couple of operation changes to increase battery life - so that users can be less concerned about having to charge/change batteries.
  • Design a custom enclosure to eliminate all the unused space and make the controls more suitable for mass transportation (this is a perfect excuse to go and build a 3d printer)
For a public demonstration I managed to get remarkably few photos. Hopefully this will change with the next post.

*Don't let that fool you, it was still covered in the traditional half meter of mud.




Wednesday, 9 October 2019

ODOTS: boxen

The ODOTS are in their boxes, and the proof of concept is officially ready for demonstration! The PCBs are all soldered and connected up, batteries are all primed and all the units have now been put in enclosures.

Enclosures and everything.
This completes this phase of the ODOTS project, but it shall continue! It has been way too interesting not too. The progression in the design has been very satisfying, not least because it has gone the full way from breadboard and loose wires to enclosed box and PCB. 

So long ago
The documentation is also done for the moment, it will be added to once I gain experience in actually using the ODOTS, but for now it contains as much as there is to know (literally).

Friday, 27 September 2019

PCBs: Pile on the Ice Cubes

The PCBs arrived in the post today, turns out the slow boat from China has probably been upgraded to a Hydrofoil. With the PCBs here the final construction of all the ODOTS units (I have parts for)  is now under way, with a quick order to Mouser (sorry RS, they had nicer enclosures) to grab the final bits and pieces. The boards that have now been put together (Two in a couple of hours) both work well.

The PCBs have come out really rather well, and current testing indicates that I only made one massive mistake, so all is looking good. (Not least because the error is just a missed connection, easily fixed with a sneaky extra wire!). I am amazed how clean the manufacture of them is, and attaching components has been easy enough that I have vowed to never again use Protoboard on anything that I need more than one of, never again.

So nice, so clean, so ... green.
The improvement over the strip board in visual quality is incredible, as is the reduction in board foot print (1.5 cm less length!). Additionally because there are no wires to solder in (apart from the one to fix the missed connection), and a very limited number of mounting points (all of which are labelled), putting the board together is straightforward. While the stripboard took a day to put together and was tricky to debug (as well as having lots of error prone wires), the PCB goes together in an hour and is neat enough that debugging is less daunting.

PCB > Stripboard. Smaller, neater, certainly more professional.
In the image above the PCB has had its RFID unit added, and the wires have been made to loop over the not-yet-present battery. The two boards put together today have really brought the end of this stage of the project into view. Of course, I managed to plug one of the board into an Arduino board (acting as a serial bridge) backwards and now the Arduino board (my only suitable one) has stopped talking - but that is a problem for another day!

Increasingly precise perfection approximations...

Led's mounted on the reverse side so that they will stick through the enclosure.

Friday, 13 September 2019

PCBs: an increase in coolness

Haha! I followed through on my PCB threat - and now have a bunch of them waiting to be made somewhere in China. Fantastically using them actually brings the cost of the project down as with the introductory discount they came to less than £1 per item (including shipping). Given that this is less than the soldered mess on the strip-board it is a bit of a no-brainer to use the PCBs.

Given I had already put together the schematic to design the strip-board layout it was relatively straightforward to design the PCB. The massive advantage of PCBs is how close different signals can be routed. This and complete routing flexibility on both sides of the (two layer) board mean that the layout uses 25% less area with a large area with only flat components (for the battery to fit onto). Additionally the LEDs and pinouts are all now in far better locations which is a real help.

KiCad Rendering, gets even better when you actually provide
full 3d models for your components!

The Worms - this step was so straightforward, I don't know why I
have not done it before.
The things this design still misses is attachment points (not a problem if you just use hot glue...) and an on board Serial to USB converter. Given how straightforward the design and order process has been I may opt to move to surface mount components rather swiftly. This will reduce the required PCB area drastically (everything will be smaller), leaving space for drill holes and extra hardware, and the cost reduction (everything should be cheaper) will mean I have budget room for extra hardware. I may even have to start considering integrating in the RFID stuff and actually thinking about power consumption.

NOOOOOOOOOOOO - too polished, too complete, I NEED THE HOT GLUE AND 0-OHM SOLDER BLOB RESISTORS. Darn you engineering maturity, you can't get me that easily!!

This is actually quite a nice step for me. Previously I have always relied on Monsieur Miroshnikov to throw the PCBs together and order them (generally while I dove deep, deep into a pile of code), it is going to be a bit of a change to only have myself to blame when the power rails short out!

Next up in the immediate future is to sort out the enclosures for the proof of concept hardware. The new PCB design should permit easier packing into a box (see my comment about batteries). Everything will probably end up being be glued to the lid of a standard enclosure (with flanges for attaching to controls) just because that keep everything accessible. Of course the best bit will be drilling holes into the weatherproof box to let the LEDs peek out!

Thursday, 12 September 2019

Pushing Past Power Problems (perhaps)

Making a semi-final product today allowed me to finally start taking semi-final power consumption measurements. These were done by inserting a small resistance into the positive power supply connection and then measuring the voltage over it (my multi-meter was not sensitive enough for direct current measurements).

These were terrifying, unmodified the board pulled almost 60mA  in its idle state, giving it just over a day of life on a single 18650 lithium ion cell. This is clearly far less than I had hoped and indicates that power consumption is now something I should be worried about. Off we go on a hacky adventure!

First off was removing the 5V regulator which (given it had been shorted out anyway) was just wasting power. That saved a full 5mA of consumption.

The next step was to stutter the RF field from the reader, adding periods where it is turned off, for instance when the microcontroller is doing non-RFID things. Additionally the addition of a sleep period to the polling cycle (with the RF field off) massively reduces the RF field duty cycle and in tests did not really change the user experience (and I was looking for it). That saves another 10mA and being more aggressive on the sleep saved a further 10mA. This pushes the time on single cell up to 3 days.

Clearly I have been optimistic that the cells will actually be able to discharge their full rated capacity, so maybe 1.5 days is more like it. This still allows the proof of concept to be programmed the day before any field trials and left on over night without having any danger of it running out of power!

The interesting thing about this development is that it indicates the next big development required of the ODOTS on its path to becoming ready for certification (certification being expensive and something I only really want to do once in the future)(And something that will be necessary to bring the ODOTS, or derived system, to the mass market). Frankly the current hardware architecture is not optimised for power consumption in any way at all, the use of Arduino in particular is a bit of a liability as it does not provide fine control over AtMega peripheral activation. This may be why I eventually shift over to a different architecture in the future. While I have made an effort to tame the ravenous beast that is the RF field the MRFC522 (or one of its alternatives) will provide methods for reducing its appetite further. I have commented in the past about the ability for the ST Micro chips to passively detect tags, this would be ideal as it would massively reduce the power consumption with potentially little (randomised) impact on competitor visit recording times.

I suppose my dreams of networking the ODOTS units with LoRa and implementing a 6WLoPAN network are going to be a long way off indeed!

Small steps are never as easy as you imagine.

The first stripboard prototype has now been put together and it was worth doing. It works, but has taught me a lot about how the proof of concept design is likely to go together.

Prototype, mk 2: "Ever closer to approximate perfection"

The strip board module, with the AtMega chip, clock, leds, buzzer,
voltage regulators and many many pinouts.

First observation from putting it together was that it took most of a day, and was incredibly fiddly. The build time may come down with repetition and the fiddlyness could be remedied with an extra bit of clever design, but for something I want to be straightforward to put together, it is not acceptable. Therefore I may have to make a diversion to PCB land, which will delay the full completion of the proof of concept system (as as adding cost) but will make the design much easier to build.

A good test for new hardware is to use it. Typically this test is used when you have not put in good testing points, test procedures, or you are bored and want excitement. Also typically new hardware will fail this test and you have to spend twice as long fixing it. Test procedures for the strip board layout included (in order, and initially with no power or DIP chips):

  1. Testing for Power-Ground shorts (good for not blowing up components when you plug it in).
  2. Test for signal-ground shorts (same).
  3. Test for Micro-controller to endpoint signal wire/trace continuity.
  4. Test to see if the voltage rails had the right voltage (with battery plugged in).
Then the following functionality tests were performed (once the DIP chips had been socketed, and the micro-controller programmed):
  1. [PRIOR to all other tests, the AtMega chip was used in the breadboard setup to read cards and demonstrate basic functionality, proving it worked)]
  2. Test to see if the clock worked (and the buzzer), performed by waiting a minute to see if the 'I-updated-from-the-RTC' blip activated.
  3. Test to see if the serial interface (through the now empty UNO board) still worked.
  4. Test to see if the RFID reader worked.
Absurdly the tests were all passed until the last one. The brilliance of not doing the 'plug and go' test was that I knew the RFID reader/wiring to the RFID reader was at fault. Plugging the RFID reader back into the breadboard setup showed it was still working, which meant the problem was in the wiring. Quick testing indicated one of the pins was shorted to ground, which it was due to some splashed solder. Fixing this meant the device worked normally, but such a fault indicates that even when you know the design well, test thoroughly and have plenty of soldering experience with these sorts of components it is still tricky to get a working board. If others are to be able to replicate the design it has to have a fair chance of working first time with no debugging, something this approach is evidently unlikely to achieve.


I lie when I say all tests were passed, the 5V regulator was actually counterproductive with the 5V supply - I had expected it to operate without any voltage drop but it appeared to just not work! Therefore it was just shorted out, and will be in any future designs that use the magic Poundland power supplies.

The placement of components is also an issue. Due to the nature of the Strip board, placement of components (when optimising for reduced soldering) is not exactly free, and as a result (as you may have spotted in the photo of the board), the board is not set out particularly well. The LEDS are recessed, which is not ideal if they are to be visible. The Header pins are spread out all over the board, not ideal for happy wiring in the final enclosure. (Though to be fair I have not thought much about how the final enclosure will look yet). Moving these bits around requires more flexibility in routing than the strip board can give me, which does not bode well for it!

To sum up, stripboard: meh, PCB: possibly worth the extra expense...

Next step will be to think about the enclosure, then go off and order the enclosures, RFID units and PCBs. Then take a trip to documentation land while I wait for them to arrive!


Tuesday, 10 September 2019

Website fun.

Hmmmmmm...

ODOTS is intended as an accessible project (broken record time WHOOP WHOOP), which means that ideally the general public should be able to snoop around the design documents and software with little effort. I have spent today throwing together a Github Pages website to do exactly this:  https://ljones278.github.io/ODOTS-Release/

the website


Eventually it will sit on top of a repository that contains all the latest release versions of software and hardware designs and act as a guide on which files to use for which purpose. It can also be used as an update bulletin, which will be useful for showing off to potential users or just the orienteering community at large.

Eagle eyed readers will notice the new logo, this is actually just a re-work of the old one so that it can be used in-line rather than as a separate image. This is far more handy, I actually made it so that it would fit in my User Guide footers!

In line logo.
The other thing to happen today was that RS managed to turn around the order I put in yesterday in record time and I received all of the parts for the first Proof of Concept test build!

Real orders come in boxes.
 I was not really mentally prepared for the task of soldering up the board for the first time, so I will admit that the website may actually be a massive exercise in procrastination! The other step in delaying the inevitable was to sort all the components into component boxes. This is a pretty cool step as it means that I know when I am starting to run low on any single component, as well as being able to quickly spot which type of resistor is which. I am aware of the ESD risks, hence the AtMega chips are still in their bag, but for the rest of them it does not really pose a risk here.

So organised...
Finally, the last thing done yesterday was to pick up the proof of concept power supplies, which are the power banks isible in the photo above. These are pretty nifty, containing a LiIon cell, a charging point and an inbuilt voltage regulator, and all for a price that I could not buy the battery for. (What do you mean, "cut corners". I am sure the batteries and charges are made to the normal high quality standards of their source shop).((Poundland)).

Monday, 9 September 2019

The home straight (time to solder on...)

The last couple of weeks have been spent positioning the project for its final sprint (before the long, long cool down of debugging and documentation correction). This means that this afternoon I sent off a hefty order to the component people to request most of the bits I will need to put together the Proof of Concept!

The first thing to finish off was the interface software, the bit running on a big computer which will allow people to configure how the ODOTS operates, download competitor card data and so on. This is now all done and partially debugged (more on it in another post).

The second thing was to transpose the hardware design to a strip-board using an atmega328p. This is the bit that gets my inner Electronic Engineer very happy, bugs can be solved with extra wires and spotted with your nose, design turns into connect-the-dots and the seemingly random (but essential) components all work their way out of the woodwork. Another advantage is that I now know how much the proof of concept will cost to make. While component costs come to £20.51 (such precision, so exciting), which is more than my original goal, I am not to worried, I have not made an enormous effort to hunt out cheap components so it is likely in another revision many pounds could come off that total.

The design has been put together in KiCad (k-eye-cad or key-cad depending on which side of the flame-war you sit) a free PCB design tool that can also do strip board designs quite well - just by putting all the back-copper traces horizontal! In the layout below Red is being used for the provided strips, while Green is being used to represent all the wires that will need to be soldered on the top side.

The layout so far - now waiting to see which connections I missed.
In the Rubik's Cube project I used protoboard, a variation on strip board where each pin hole is not connected, whereas in strip board they are connected ... in strips.

Strip board (or Veroboard)

Proto-board (or Matrix Board)
This reduces the amount of soldering required, and number of funny bits of wire on both sides of the board. Both do the same job of acting as a permanent bread board with solder.

I am fairly happy with the design as it is, it is fairly compact (if unable to tessellate nicely in the standard strip board sizes) and appears to have a minimum of random wires running large distances around other components.

The next part of the project is where some of the final hardware products will come together which means things like the power consumption, physical size and usability will move from predictions to measured quantities (or qualities).

--------------------------------------------------------------------------------------------------------------------------
For those following on from my previous post, he documentation has progressed as expected, currently sitting at 40 pages of informational goodness - LaTeX really helps with long documents (no massive document redraw when you move a figure/table/sentence around!). Most of the software has now got full documentation with all of the interfaces specified. The only big things left to do are explain the hardware design (including the beautiful layout above) and some user guides. Hmmm - writing those down made me think that actually those could end up being quite large pieces of work.