Recommended Posts

If you don't mind Jeremy, that would be great.  :)

 

Share this post


Link to post
Share on other sites

OK, your name's on the last one!

I'll post all the details, schematic, PCB layout, parts list, firmware etc as open source, for anyone to use, anyway, as it'd be nice to see someone come up with something like this as a product, as I'm convinced there's a need for remote monitoring of treatment plant aeration systems.  The existing alarms are either intended for Koi carp aeration systems or are almost one-off type systems like the one that came with our BioPure. 

Technically I can't supply a totally finished unit, as it wouldn't have the required EU approvals (and getting it approved to the EMC Directive and LV Directive would cost thousands).  The way around this is for me to supply units partially dissembled.  What I'll do is leave the fitting of the parts into the cases as a DIY job, with no soldering etc needed, and then it can legitimately be called a kit, and so get around the requirement for approval.

Share this post


Link to post
Share on other sites
1 hour ago, JSHarris said:

The bigger backlit version is my preference, too, as I think it will be easier to read where I'm going to put it (on the utility room wall, where the thermostat receivers, ASHP command unit etc are located) and I like the idea of hard-wiring it to the supply, just for neatness.

Price is an odd thing for things like this, as when you're knocking stuff together you sort of get used to things being much cheaper than an equivalent commercial device, even if you can buy a commercial device that will do the job.  I think I added up the cost of the excess PV power diverter I made and it came to around £25, that's for a unit where the power sensing is done outside, at the incomer, with a radio link to both the power switch for the Sunamp PV and to a plug-in power display that receives the data and has a display showing whether the house in importing or exporting, and what the instantaneous power is.

I ten to think that spending more than £30 on any little gadget like this is getting to be too much!

The bit I always struggle with is getting the PIC programmed ..! Happy with the soldering and all the other bits and even the coding, it's the actual programming the chip that always stops me doing this sort of stuff !

Sons GCSE project had something like a 40 pin PIC in it - I could easily read his code and think they are such a great idea 

I'm sure there is a market in pre-coded chips and boards !

 

Share this post


Link to post
Share on other sites
2 hours ago, PeterW said:

The bit I always struggle with is getting the PIC programmed ..! Happy with the soldering and all the other bits and even the coding, it's the actual programming the chip that always stops me doing this sort of stuff !

Sons GCSE project had something like a 40 pin PIC in it - I could easily read his code and think they are such a great idea 

I'm sure there is a market in pre-coded chips and boards !

 

I used to write code for a range of microcontrollers in either machine code or assembly language, as they were the only real options at the time.  Programming then was blowing code directly into UV erasable EPROMs, with no way of doing any debugging prior to test, other than a static code walk through, which is still what we do today for a lot of safety critical firmware created using the majority of compilers of uncertain parentage (and that's most of them, unfortunately).  When I need something to execute very quickly I still tend to write it in assembly language, as it'll always be far more efficient, reliable and take up much less memory than writing it in something like C and compiling it (and I accept that C is worse than most languages for this task, as it just isn't efficient at generating microcontroller-type code).

Over the past few years I've switched to "cheating" and using the Picaxe option.  It's slow, because the interpreter is coded into the PIC when you buy it, but for 99% of hobby-type projects it is plenty fast enough.  The massive advantage is that it's dead easy to programme the chips in-circuit, the chips are barely any more expensive than bare PICs, the programming environment is free and the programming port is a simple serial port. 

The whole Picaxe project was designed for education, so there is a bit of a bias towards education related features, but that doesn't stop more complex projects using them at all.  The data loggers I have that measure stuff and record it to either SD card or uSD cards use them.  The "energy bucket" excess PV diverter I built uses their smallest device, an 8 pin, 2048 byte programme memory chip that costs just £1.80 including VAT.  The wireless treatment plant alarm uses a slightly bigger 14 pin version of the same chip, with the same programme memory but more I/O pins and costs £2.16 inc VAT.

It really is dead easy to build reasonably complex projects around these chips, with the peripherals almost always costing more than the chips.  As an example, here's the write up I did on the combined CO2, temperature, humidity and real time data logger I built a while ago, and which has been loaned out to a few members here:

http://www.picaxeforum.co.uk/showthread.php?23893-Air-quality-monitor-and-logger

The Picaxe system is very simple and works exceptionally well, but gets a lot of flack from the Arduino crowd, for a few reasons, the only valid one being that it's not open source, the small surcharge on the price of each cheap (just a few pence over the bare PIC price) pays for the interpreter pre-loaded to the chip.  The big advantage, apart from the ease of use and ease of programming and programme development and debugging is that there is no SOUP (Software Of Unknown Provenance) in the code.   As the Arduino has grown in popularity so has the spread of tens of thousands of libraries, very, very few of which are 100% reliable or even properly documented.  The Picaxe may be slow, but the standard of documentation and the fact that it has no reliance on completely unknown provenance code libraries to work, makes it  a winner for me.  Add in that the chips are dirt cheap (a fraction of the cost of the Arduino),  the programming environment is free and easier to use and understand than the Arduino IDE,  (and includes properly indexed manuals), and for simple projects where control is the main objective and there's no need for floating point math you can get things up and running very quickly, and for me it's a no brainer as to what to use for this sort of project.

On the other hand, when I was building a unit that needed to very quickly calculate position from the double integration of three accelerometers with axes determination from a three axes rate gyro, I used an Arduino, because there the over-riding need was for fast floating point math, not the control of peripherals. 

It's horses for courses, really.  If all I want to do is measure some data and store it, display it or transmit it via a wireless link, then the Picaxe wins hands down, on price, speed of development and ease of use.  If I want to perform fast floating point computation, the the Arduino wins hands down, as the significant additional cost is worth it to get the job done.

If you want to have a play without breaking the bank, then I suggest getting a starter pack like this: http://www.picaxestore.com/index.php/en_gb/picaxe/picaxe-starter-packs/axe004u.html

and some LEDs, switches etc to have a play around.  You can use the board to programme either the 14 pin Picaxe or the 8 pin one (just shove the 8 pin one towards one end of the socket).  I tend to build a simple onboard programming connector into any project board where it might be useful (for example, the outdoor end of the treatment plant alarm has no programming connector, as the code is brain-dead simple and wont need to be changed, the indoor end has a three pin programming connector because I envisaged the need to change display messages, alarm thresholds etc).

 

Share this post


Link to post
Share on other sites

Sorry for not getting back earlier, PC problems! I'm on my tablet at the moment. It looks excellent, and I too would like the larger backlit unit. I think the price is fine, if you added all your time spent on it then the cost would be a lot higher. Thank you for all your effort.

Share this post


Link to post
Share on other sites

OK, I've pretty much sorted everything out now, to get a neater looking internal unit and to comply with electrical safety regs.  The internal unit is the slightly more complex one to put together, so the only legal way I can supply it is with a plug in isolated DC supply.  This sidesteps the need for me to comply with the LV Directive and get it approved and CE marked, and by using an approved 433MHz LPD transceiver I sidestep the need for approval with the EMC Directive, as the power consumption of the display circuit is so tiny that there is no risk of any EMC emissions problem with other kit, and it shouldn't be susceptible to interference anyway (by design).  It's not a safety critical item so even if it there ever is a susceptibility issue (extremely unlikely) then it doesn't matter as it can't cause a hazard (don't you just love EU rules?).

I've sourced some neat and robust double insulated 5V plug in power supplies, with a UK plug and a valid CE mark, and also sourced a wall-mounted case that has a moulded in display window for a larger display.  The new display has large characters that are black on a very gently white back lit screen.  It can display a single line of 16 characters, so can have more meaningful messages than the smaller 8 character display on the prototype.

In my view, the outdoor unit is unsuitable for operation from a plug in power supply, as few, if any, will fit inside an IP protected socket with the lid closed and locked.  So, the outdoor unit will look almost identical to the one in the grey box on the previous page in this thread, but with a slight change to the circuit board to improve the layout and make it easier to build.  I've built one to the new layout and tested it and it works fine.

Because the outdoor unit has an integral power supply, it would be illegal for me to sell or give away, without approval against the LV Directive and the appropriate CE marking.  As this would cost thousands, it's clearly impractical for me to do.  So, to sidestep this what I'm planning to do is supply the outdoor unit as a partly assembled kit, so each of you becomes the "manufacturer" in effect.  This is fine, as it's perfectly OK (within the EU regs) for someone to build their own electrical kit.  I think I can get away with providing the outdoor unit as an assembled and tested circuit board, with the mains lead already attached (it'll be a length of black 3 core 0.75mm² HO5RN outdoor cable - please let me know if you want more than 2 metres of cable).  All that will be needed to assemble the unit will be for the cable(s) to be fed through the cable glands fitted to the grey IP65 box, the circuit board screwed down to the captive threaded holes in the box, the air pipe connection (and level switch connection, if needed) made, the lid fitted (after securing the unit vertically to something with screws through the mounting holes) and you will need to supply and fit a standard 13A plug with a 3A fuse, or wire the cable to a suitable switched and 3A fused outlet.

The outside unit will have a hose barb fitting in the base, next to the cable glands, to take the air pressure sense pipe.  This fitting will be threaded into the case and will already have a short length of 2.5mm bore PU hose to connect internally to the pressure sensor on the PCB (it's a tight push fit).  On the outside, this hose barb takes a 4mm ID hose, again a push fit, so you will need to make sure that there is provision to connect this to your air feed to the treatment plant.  My unit has an unequal plastic tee fitted right next to the pump with 19mm through port and a 4mm ID (6mm OD) push fit barbed hose fitting on the side.  If anyone needs something making up I can quickly make up a tee to fit whatever air pipe size you need from acetal.

I'm hoping to get some time this weekend to finish the first one or two, so should have some photos.  I'm going to try and see what the range is like with an internal antenna on the indoor unit, really just because it will look a bit neater, so will wait to take photos until I'm sure of the appearance.

 

 

Share this post


Link to post
Share on other sites

Sounds like good progress - very much appreciated

Share this post


Link to post
Share on other sites

Sorry for the late reply, I've been out of the country for a few days. It sounds fine to me, no problem with minor assembly work. Hope the internal antenna is successful.

Share this post


Link to post
Share on other sites

@JSHarris Jeremy did you ever post a full schematic and parts list for these?  I assume it is working well. 

 

I have just realised after burying a 3 core cable that I should have buried a 5 core to carry back alarm signals from my unit.  Now looking for alternative options and think this would very much tick the box. I think I would be happy enough to build it and code it myself.

Share this post


Link to post
Share on other sites

I have all the components, cases, PCBs etc for five of these units, in addition to the one I built for myself, but I can't sell them, or even give them away, as both the transmitter/sensor end and the receiver are mains mains powered and use a (licence free ISM band) radio link, and this makes them fall foul of both the EMC Directive and the LV Directive, so the system can only be sold, or given away, if it has been tested to the required standards, and approved by an EU Notified Body so that it can be CE marked.  There's no official way around this, and the penalties for infringement are more than I'm willing to risk, I'm afraid.

Share this post


Link to post
Share on other sites
2 minutes ago, JSHarris said:

I have all the components, cases, PCBs etc for five of these units, in addition to the one I built for myself, but I can't sell them, or even give them away, as both the transmitter/sensor end and the receiver are mains mains powered and use a (licence free ISM band) radio link, and this makes them fall foul of both the EMC Directive and the LV Directive, so the system can only be sold, or given away, if it has been tested to the required standards, and approved by an EU Notified Body so that it can be CE marked.  There's no official way around this, and the penalties for infringement are more than I'm willing to risk, I'm afraid.

 

Lost as to why you can't sell the bits as a kit? It's how all the sellers of FM transmitters used to get over contravening I think the 1948 Wireless Telegraphy Act.

 

Used to love making two transistor bugs as a kid! 

Share this post


Link to post
Share on other sites
3 minutes ago, Onoff said:

 

Lost as to why you can't sell the bits as a kit? It's how all the sellers of FM transmitters used to get over contravening I think the 1948 Wireless Telegraphy Act.

 

Used to love making two transistor bugs as a kid! 

 

I looked into it, and, believe it or not a kit still needs approval as a product.  Robin Emley (the chap that came up with the spin-off from the OEM that uses the same energy bucket system for excess PV diversion) ran into the same problem, but in his case he's been working through getting approval so he can sell kits or ready-built units.

Share this post


Link to post
Share on other sites
1 hour ago, PeterStarck said:

@JSHarris Is it possible to publish a detailed set of plans without contravening any regulations?

 

 

Yes, and when I get the time I plan to do this, it just means sitting down and writing up everything I've done.  I think that I can also re-sell the parts, just as components, the question mark is over whether me re-selling programmed PICs with the code in to drive both ends is OK.  I think it probably is, as the only bit that really infringes the EU regs is the mains related stuff (there is a power supply built-in to the remote unit, inside the IP rated enclosure) and the radio modules, as although they are legal and use the ISM band, the regs require that the completed equipment must comply with the EMC Directive, which involves a high compliance test cost.

 

The reality is that these radio link modules are the same as those used in thousands of remote control devices, so the risk of them not being compliant with the EMC Directive is near-zero, plus there are already many millions of counterfeit CE marked devices on the market anyway, and no one seems to do anything about it.

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now