Print Page | Close Window

Circuit diagram

Printed From: The Back Shed
Forum Name: Microcontroller and PC projects
Forum Discription: Programming, interfacing and using PicAxe, Duino, Maximites, PC's, etc.
URL: https://www.thebackshed.com/forum/forum_posts.asp?TID=8425
Printed Date: 20 June 2019 at 1:28am
Software Version: Web Wiz Forums 7.8 - http://www.webwizforums.com


Topic: Circuit diagram

Posted By: lew247
Subject: Circuit diagram
Date Posted: 07 March 2016 at 2:52pm

I'm "trying" to build a weather station, and over the weekend I put together a circuit for the outside unit composed of a 28 pin Micromite, Novalynx wind speed and direction unit, a BMP280 for Humidity and pressure, a DS18B20 for temperature (its more accurate then the BMP280) a GPS unit for time syncing and HC-12 433Mhz tx/rx unit to send the data indoors

I'm going to be powering it from a micro usb port connected to a 5V 5A battery with usb socket and solar charging built into it.

In the circuit I've put everything on headers including the console connector (for ease) so they can easily be replaced if need be, and the inputs from the direction, wind and rain sensor and reset are on screw terminals

Could someone look over the circuit and see if I've made any stupid "newbie" mistakes with either the wrong pins, power or ground to the wrong places, comsole or rf tx unit being connected the wrong way round.

I'd be very pleased if someone could look and let me know of any errors

I did the circuit using diptrace, but couldn't find the components I wanted for everything so it might look a bit weird.

I'm going to see if I can find someone online who "once the circuit is right" can turn it into a pcb layout, I'll probably use www.fiver.com
I know I could try and do it myself with diptrace, but I spent all weekend trying and always ended up with it looking rubbish and several components needing jumpers, as I have no idea how to do a 2 sided board, it was hard enough learning how to make it one sided

Thanks

uploads/lew247/2016-03-07_175356_Weather.zip - 2016-03-07_175356_Weather.zip


I uploaded the Diptrace file but here's a picture of it








Replies:

Posted By: palcal
Date Posted: 07 March 2016 at 9:03pm

I don't know about others but I gave up trying to convert a schematic into a PCB in DipTrace. I do away with the schematic and start with a blank PCB then I place the parts where I want them and route it by hand.
Paul.

-------------
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"



Posted By: panky
Date Posted: 07 March 2016 at 10:35pm

Hi Lew,

As far as I can see it looks like you have the SPI clock (MOSI) connected to the BMP280 (temp and humidity?) but the SPI IN (MISO) connected to the Novalynx (wind speed, rain)? If the BMP280 is pin and functionally compatible with the DS18B20 then it should go to a standard digital in pin and keep the SPI pin for use as SPI.

If the Novalynx uses SPI (as you have SPI MISO connected to it) then you also need the SPI Clk (MISO) connected to the Novalynx.

But you're right about diptrace schematics - they are a b!@#$ to understand!

Hope this helps,
Doug.




-------------
... all the Maximites, almost all of the MicromMites, all the MM Extremes, all the ArmMites, and loving it!



Posted By: bigmik
Date Posted: 07 March 2016 at 11:10pm

Hi Lew,

If you like, once you are happy with the accuracy of the circuit, give me a PM and we can discuss a PCB design..

I have a couple of ideas... But I would redo the schematic in Autotrax DEX as that us what I use.. I can follow the diagram above but I HATE the wires going through the components as in the diagram above so I would need a higher resolution copy of that diagram...

Are you hoping to do this as a commercial product or is it a small project for yourself? If commercial, then I will ask some form of payment (modest to small) or if you wish to make the whole thing public including the code I will do the board and make the artwork available for all to use..

Now I also would prefer to use a MINI USB connector rather than micro for several reasons, including I have them and use them in my other projects.. But this is no deal breaker, in fact I suspect the foot print may even be the same or near enough to be interchangeable..

Possible ideas include,

A new board complete for the job

Or

A plug in board for my MuP (you will find details in the link in my signature below) which already has console, ICSP, power supply and PiC support components so it only really needs to be an IO interface .


I am away for a few days so it might take me a few more days to settle back before I could do them..


Regards,

Mick


-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: matherp
Date Posted: 07 March 2016 at 11:23pm

If it is a one off use stripboard. You should be able to export the netlist to VeeCad and then the layout is easy and I find it quite relaxing



Posted By: HankR
Date Posted: 08 March 2016 at 2:20am

Quote:
A plug in board for my MuP (you will find details in the link in my signature below) which already has console, ICSP, power supply and PiC support components so it only really needs to be an IO interface .

Mick

Any way of doing such a board is fine, but I like the idea of having it be a plug-in.



Posted By: MicroBlocks
Date Posted: 08 March 2016 at 4:31am

I am pretty good with diptrace.
If you send me the BOM i can make sure the parts have the correct footprint for making a pcb.
Just as it is now most parts have footprints that not 100% correspond with what they are. So starting with that will make the process of creating a PCB much easier.
Choosing 'convert to PCB' in the 'File' Menu, the doing a auto placement, dragging the connectors to the perimeter of the board and doing autoroute i get this:



Once the correct footprints are done, and some manual routing this can be half the size and will look pretty decent. The one in the picture is 65x55mm.
That was done in under a minute. :)


edit:
I cleanup your schematics, so that it has no lines going over components.
I would however consider reviewing your schematic as currently it only supplies about 1A on the 3.3v line. It is also going to a RF module and a GPS module. Both of those can use much more power. And are you also sure everything is using 3.3v?
I'll post the schematics here after i am happy with it. :)

edit2:
Ok done the schematics:
uploads/MicroBlocks/2016-03-08_063322_Weather2.pdf - 2016-03-08_063322_Weather2.pdf
Diptrace schematic file:
uploads/MicroBlocks/2016-03-08_063650_Weather2.zip - 2016-03-08_063650_Weather2.zip

Please check the schematics, if everything is all right a PCB is easy to make.


-------------
Microblocks. Build with logic.



Posted By: HankR
Date Posted: 08 March 2016 at 7:00am

Quote:
I would however consider reviewing your schematic as currently it only supplies about 1A on the 3.3v line.

Actually I think 1A should be plenty because the HC-12 has a maximum draw of 100 mA and can be less if an output lower than +20 dBm is selected, and modern GPS ICs and antennas will draw well under 50 mA in continuous mode, even less in power saving mode.

17 mA and 5mA (power save) at 3.3 volts are easy to achieve for the GPS.




Posted By: MicroBlocks
Date Posted: 08 March 2016 at 8:45am

Here is a new PCB layout.
It is 50x44mm so it can be made cheaply by many of the online PCB manufacturers.


Diptrace PCB file:
uploads/MicroBlocks/2016-03-08_084500_Weather2_pcb.zip - 2016-03-08_084500_Weather2_pcb.zip

These files might help you get going. Once you know diptrace a bit, it can be used to make designs and pcb's pretty quickly.


-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 08 March 2016 at 10:24am

Wow I'm overwhelmed Thank you so much everyone for all your help, this is amazing

I have no plans whatsoever for commercializing it as most of the code on the project came with lots of help from several members here.
I'd never have done it without their help
I say "done" it's still a work in progress, most of the code for the outdoor unit is working, I am using a MM+ to test each section one bit at a time, and once it's all working put it together properly.

The plan is - outdoor unit consisting of:
Wind direction (I'm using a NovaLynk 200-ws-23 simply because I got a great deal on Ebay for a 2nd hand one)
Wind speed (Novalynx 200-ws-23 but the code will show how to adapt for any unit)
Tipping bucket rain gauge
GPS unit - any will work
BME280 temp, humidity and pressure module - only using the humidity and pressure
DS18B20 for temperature because it's more accurate than the BME280
HC-12 433Mhz rf tx/rx unit one mounted on the outdoor unit and an identical one on the indoor unit
A mini USB connector supplying the power
3.3v regulator
ICSP header
Console header

All the above will be mounted/connected to headers on the board so if any unit fails it can be replaced in seconds.
Even the pic chip will be socketed so it can be replaced.

The indoor unit at the moment I plan on using a MM+ with a 7 inch touchscreen but I am not even thinking about what it will show or how it will look until the outdoor unit is finished and working properly.
I'll use the 2nd 433Mhz unit connected to the computer to display the information till I start working/finish the indoor unit

bigmik I Didn't know about your MuP, if I had it would have made things a lot simpler working it all out
It's a great idea making it as a plug in board for your unit, however if that was the case I wouldn't need the pic chip and several components.

As I live in the UK it's not easy getting stuff from Australia so for the moment I think it's best to keep it as a seperate board
(HOWEVER once its working properly I have no objections to you making a seperate board available for your MuP if you want - it would be easy enough for you to incorporate)


MicroBlocks what can I say.. your a star.
What you have done in a very short time is nothing short of incredible.
Thank you so much. I'll send you a message after I've posted this.

As to the BME280 Yes its powered from the SPI port on the Micromite - I used this port because it was free - but any port can be used, it doesn't have to be this one.

The reason for powering it from the Micromite which a lot of people will hate is
- On long time test over a week it kept failing at irregular intervals when powered from either 5v or 3.3v
It would lose the connection for a period of time then start working again afterwards.
The way I fixed it was powering it from the port (it only uses about 5mA) and only enabling the port just before taking the reading and powering down the BME280 after each reading.

I tested this over a period of time and it works fine.
Some may have a better idea which I'm open to ideas.


MicroBlocks - I actually don't have a BOM simply because I couldn't find all the bits I needed on Diptrace so plan on making it with standard sized resistors/capacitors and so on
I'll message you with what the bits are afterwards

SMD components would make the board size a lot smaller, however my soldering skills with my eyes these days prohibit me from soldering smd components.
Shame as it would be so much neater probably even using 1208 sized components.

I'm not certain if using headers for the Wspeed, direction and rain connections is the best idea, or using those screw connectors like these





Hopefully I haven't forgotten anything

Lew











Posted By: MicroBlocks
Date Posted: 08 March 2016 at 10:48am

Yes those screw connectors look nice.
It all depends on how you connect them, what cable you use etc.
For diptrace it does not really matter much as in the schematic you can just change it to another connector and then 'update' the pcb.
Screw terminals are a bit bigger, so maybe need to move them around a bit to make it fit.

As for pcb's, it is best if you can keep it within a 5x5cm, or next step a 10x10cm.
Those sizes are super cheap to order and betas having to make your own.
Most offer 10 pieces for around 9-12 US$.


-------------
Microblocks. Build with logic.



Posted By: bigmik
Date Posted: 08 March 2016 at 11:22am

Hi Rob,

Most people in the UK get their boards from me in 5 business days... But if you are in a rush WhiteWizard resells my boards and is UK based...
Ini

Any way It looks like Jean has you all sorted out.. So that is all a moot point.

There are 2 'common' sizes of screw headers. 0.2" spacing and there are also 0.1" spacing, the 0.1" are actually quite good and fit in the same space as the standard pin headers...

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: MicroBlocks
Date Posted: 08 March 2016 at 11:43am

Well, to be honest i really think a mup will get things done quicker.
If you add the time to wait for the pcb to be manufactured, then populate it and test it. A few weeks go by quickly. With a mup you can start within a few days and build from a known pcb that has been proven to work.

Especially when it is a one-off that seems to be the most efficient way.
A special PCB will look more professional, but if you are the only one who looks inside the box...

-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 08 March 2016 at 1:01pm

I totally love your layout MicroBlocks, its amazing what you have done.
I've settled on screw terminals for the battery connection, its easier than using a usb port.

bigmik I've sent you a pm regarding your idea of making a plugin for the MUP, again it's a brilliant idea and so simple as well

What I think would be the best idea, is get both ideas working and then once all the code is sorted properly, IF anyone else wants to make one they have the option of building their own "all in one" board
Or
Using a MUP with a plugin board.

Hopefully that makes sense

Lew



Posted By: MicroBlocks
Date Posted: 08 March 2016 at 1:18pm

bigmik wrote:
There are 2 'common' sizes of screw headers. 0.2" spacing and there are also 0.1" spacing, the 0.1" are actually quite good and fit in the same space as the standard pin headers...


Do you have a link to the 0.1" ones. I can't find them...


-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 08 March 2016 at 4:05pm

I found some that are 1.3mm http://www.maplin.co.uk/p/3-way-16a-pcb-mounting-terminal-block-rising-clamp-5mm-rh77j - http://www.maplin.co.uk/p/3-way-16a-pcb-mounting-terminal-block-rising-clamp-5mm-rh77j



Posted By: WhiteWizzard
Date Posted: 08 March 2016 at 4:27pm

Hi Lewis,

If you were to go for an SMD version of a PCB; I will be more than happy to assemble it for you with SMD parts.

Take a look at the MuP PCB - I have a few left in stock (and they fit nicely into an envelope for 'cheap(ish)' postage!

You know where I am if you need to contact me for other options

WW

Forgot to mention: Those Maplin terminals are 'BIG' by the way

-------------
For everything Micromite visit https://micromite.org - micromite.org

Direct Email: mailto:whitewizzard@micromite.org - whitewizzard@micromite.org



Posted By: lew247
Date Posted: 08 March 2016 at 4:41pm

The console should be marked TTL or console



Posted By: disco4now
Date Posted: 08 March 2016 at 10:17pm

MicroBlocks wrote:

Do you have a link to the 0.1" ones. I can't find them...


http://au.rs-online.com/web/p/pcb-terminal-blocks/2204260/ - RS components link

They have 2,3 and 6 way at 0.1"

Regards
Gerry



Posted By: bigmik
Date Posted: 09 March 2016 at 7:42am

Hi Lew, All,

Of course eBay has heaps listed.. A simple search comes up with these...

http://www.ebay.com.au/sch/i.html?_odkw=screw+jack+2.54mm&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xs crew+2.54mm+terminal+block.TRS0&_nkw=screw+2.54mm+terminal+block&_sacat=0 - eBay Search

They are fine for sensor wires but if you need to connect any decent power supply with thicker wires then best go to 0.2" spacing.

Regards,

Mick.

Ps. I am back from holidays now and I will reply in more detail tomorrow.

Regards,

Mick


-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 09 March 2016 at 2:49pm

uploads/lew247/2016-03-09_145026_Weather2.pdf - 2016-03-09_145026_Weather2.pdf Can someone (or more than one person) check the circuiit diagram and see if I have made any stupid errors?

The main thing I need checked is the circuit around Q1
I decided to power the HC-12 433M Mhz transceiver module from a pin on the Micromite via a transistor
I did this because being battery operated it will cut down on the current consumption as it can be powered up just before it needs to send a data burst and then powered down afterwards

Is this a good idea or a bad idea?

Attached is the modified circuit diagram Thanks to microblocks for helping me get it much neater and tidier than I could ever do


Also - should I have the DS18B20 mounted ON the board, or have it as a header so it can be mounted elsewhere in the outdoor unit not near any possible heat source?


The picture's a bit small so it's attached as a pdf


uploads/lew247/2016-03-09_144709_Weather2.zip - 2016-03-09_144709_Weather2.zip



Posted By: lew247
Date Posted: 09 March 2016 at 4:53pm

Also

Can Someone please PLEASE check the TX and RX pins for the
console
COM1 to RF module pinouts
and
COM2 to GPS pinout on the circuit please

I need someone to check my diagram and make certain the tx and rx tracks are in the correct place

Please

Thank you

Lew








Posted By: lew247
Date Posted: 12 March 2016 at 1:37pm

Update:

I've decided on the final circuit for the outdoor unit:

Thanks to microblocks for making the circuit so neat and tidy, I could never have done that myself, I had wired crossing all over the place.

The outdoor unit will not comprise of:
Micromite
GPS unit - for setting the clock on the inside unit, and also in case the outdoor unit gets stolen it will transmit it's location.
BME280 Temp, Humidity and Pressure sensor
DS18B20 for Temp as it's more accurate than the BME280
HC-12 Serial tx/rx 433 Mhz transceiver module
Wind, Speed, and Direction sensors
Console header
ICSP header
Reset header
and 1A 3.3V regulator
Battery monitoring circuit, as the battery is a 5V solar charged battery, it will measure the voltage and send it to the indoor unit so I can keep an eye on the battery and make sure it's charging correctly and doesn't get too low.
Both the HC-12 and the battery monitor is powered via the micromite to cut down on current consumption, they will only be powered on when needed.

Circuit below and the Diptrace ciruit is attached as well if anyone wants to see it.

As to the code for the outdoor unit, I have all the various sensors working perfectly now, all I have to do is combine the various codes into one program and test it, which I can't do till I get a unit made up so I can power up all the modules at once.

I used a micromite+ while I was writing the code and checking it worked, but when you add all the modules the 3.3V regulator on the micromite+ isn't able to handle the current (don't ask me how I know..... yes I damaged mine!!!)
I believe its only a 250mA regulator and the unit when all modules are powered needs a little more than that but well under 1A




uploads/lew247/2016-03-12_133740_Weather5.zip - 2016-03-12_133740_Weather5.zip





Posted By: bigmik
Date Posted: 13 March 2016 at 2:25am

Hi Lew, MB, All,

I had done a plug in board to suit a MuP and only needed to add the text overlays.

But what has actually changed in your new schematic? And can you please upload a new hi-res version?

I am not sure whether it is best as a plug in or as a standalone as per MB's board..

There is a problem with MB's if you want to use the screw terminals as these are about 6mm deep so some would interfere with some other components (esp. the right hand connectors, they would hit the pic chip.) They are, however perfect for pin header pins.

For what it is worth and for the point of discussion I have attached the MuP-Weather 3D pics here. These are using 2.54mm pitch screw jacks for all except the Power IN which uses 5.08mm.

Regards,

Mick







-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: bigmik
Date Posted: 13 March 2016 at 2:34am

Hi Lew, MB, All,

Note the 3D jacks are close but not identical to the ones I actually have (the images I got for the 3D have plastic location pins mine do not) hence they look a little strange in the views.

MuP-Weather is 49.5mm x 49.5mm (can layout 4 to a panel for manufacture) and plugs into http://www.dontronics.com/micks-mite/files/index.php?dir=01+MuP%2F - MuP via the 3 female headers on the underside.

The board is offset to allow access to the ICSP and CONSOLE headers on MuP, although there is a console screw jack as well..

The board can be smaller if we wish to go down this path as ICSP header can be added to MuP-Weather and we dont need access to MuP's console..

Anyway, Personally I am leaning towards MB's all-in-one board with some adjustments to fit screw terminals

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: HankR
Date Posted: 13 March 2016 at 5:53am

lew247 wrote:
Also - should I have the DS18B20 mounted ON the board, or have it as a header so it can be mounted elsewhere in the outdoor unit not near any possible heat source?


For serious measurements, off board to go to a proper vented solar shield. Easy enough to connect a cable to the existing onboard pads, but how about parallel pads spaced for a two pin header so it's an option to do it either way?

Still time for that mod? These collaborative efforts move along so rapidly.



Posted By: lew247
Date Posted: 13 March 2016 at 10:29am

I cannot figure out how to get a high res picture of it online
The diptrace zip will show it best
The mods as far as I can remember from what you saw last are
battery monitoring, +and gnd of the monitoring circuit is supplied by the micromite to lower power consumption,
a diode in the power trace going to the voltage rectifier - I've been known to connect power the wrong way in the past so I assume others might
The HC-12 is powered by a transistor from the micromite again to lower consumption
I think that's about it.

I agree for a "one off" a seperate all in one board would be best
but if anyone has a MuP available a standoff board would be ideal for this.



Posted By: lew247
Date Posted: 13 March 2016 at 12:37pm

Figured it out :)
I picked the NSVR0320MW2T1G for the diode because it only has a 0.3VF and is ideal for this purpose.
Hi res picture



Posted By: lew247
Date Posted: 13 March 2016 at 5:22pm

Thinking about it the only thing that could improve it is the DS18B20 being mounted off the board, but thats easy enough as it is, although a 3 pin header would probably be a little neater.

The board as it was the last time Microblocks did it was 50 X 44 but it doesn't actually have to be that small if it's an all in one unit. a little bigger won't hurt at all

I did try routing it myself earlier but had to give up after 4 hours on it.




Posted By: MicroBlocks
Date Posted: 13 March 2016 at 5:38pm

Hi Lew,
The size can be a bit smaller or larger then 50x50mm.
Maybe a good reason for size is how to mount it. If you have a case that you want to use maybe look at how to mount the pcb so that screw holes can be placed correctly.

It seems the schematic is pretty good now and most modifications done.
Maybe some more testing of for instance the diode or switching transistor to make sure not a slight modification is needed. When making a PCB you get not many changes to get it right, so getting close to perfect is best.

Currently in the middle of move to another city (moving lots of boxes....)
I will come back to it on Monday.

Also try to find which screw terminal you want to use, so that i can use the right footprints and dimension for placement.


-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 13 March 2016 at 7:06pm

Simple answer is I've no idea
I have no experience with screw terminal sizes< I have asked WhiteWizzard for suggestions
or if anyone else wants to suggest one
It is very low voltage (5V) and very low current (less than 1A) so they can be pretty small

As to the design I have no means of testing the circuit as I have damaged the voltage regulator on my micromite+ and it was the only micromite I have.

I'm pretty certain the circuit will work as it it, if anyone can look at it and check I'd be more than grateful.

I spent all of today trying to replicate microblocks work but I'm really hopeless when it comes to Diptrace.
I cannot figure out how to make a new component for the NSVR0320MW2T1G diode
It's an SOD-323 sized component

The best I have managed to get is a board 90mm X 80mm but I need to move 2 traces sllghtly to the left but I have no idea how to get at the bottom of the board to move the traces
(it was done with the autorouter)

Made one FINAL change tonight
Added a header for a LUX/UV index sensor and the DA18B20 is on a header so the sensor can be placed where its needed.








Posted By: MicroBlocks
Date Posted: 14 March 2016 at 1:04pm

I was looking at the voltage divider that is connected to pin 15 of the PIC.
Here two 4k7 resistors are used. The voltage can be read by lowering pin 15 and waiting a short period to allow the capacitor to charge.

It is being use to detect if power is disconnected and switched over to battery.

Would it not be easier to use 1M resistors and instead of connecting it to pin 15 connect it to GND? Also drop the capacitor as it is not adding anything.
It would then consume a few microamps. Nothing to worry about i think.
Or do i miss something?




-------------
Microblocks. Build with logic.



Posted By: WhiteWizzard
Date Posted: 14 March 2016 at 1:48pm

@MicoBlocks

The PIC requires a certain input current to read analogue 'accurately'; and for this reason it is better to use 'lower' value resistors and only switch them in when required.

This method also prevents excess draw on certain battery chemistries that would otherwise result in shorter battery life.

In the early days of me designing ultra low power 'stuff' I did exactly what you said (470K/1M/4M7) and wondered why my circuits mis-behaved. The 'switching' technique does require a little more hardware (and a bit extra software) - but I find it works 100% reliably.

-------------
For everything Micromite visit https://micromite.org - micromite.org

Direct Email: mailto:whitewizzard@micromite.org - whitewizzard@micromite.org



Posted By: MicroBlocks
Date Posted: 14 March 2016 at 2:38pm

@WW, Thanks for the explanation.
I used the 1M resistor dividers with Atmel chips and that worked ok.
I would never have figured that out reading the PIC32 datasheets.


-------------
Microblocks. Build with logic.



Posted By: JohnS
Date Posted: 14 March 2016 at 2:59pm

Is the Atmel not in essence an RC network (thus a time constant) and successive approximation? I thought so and that the PIC is too. So, big R means you have to wait longer to get an accurate reading.

Am I missing something here? Please explain what :)

John



Posted By: WhiteWizzard
Date Posted: 14 March 2016 at 3:17pm

JohnS wrote:
Is the Atmel not in essence an RC network (thus a time constant) and successive approximation? I thought so and that the PIC is too. So, big R means you have to wait longer to get an accurate reading.

Am I missing something here? Please explain what :)

John


In the MicroChip datasheet; the 'recommended' Impedance of Analogue Voltage Source = 5K.

The way I have always looked at this is that this equates to requiring a 'minimum' current flow - and this corresponds with the results I saw (pre uM days!).

Not had enough to do with analogue on a uM; but I do remember this conversation coming up before on TBS.

-------------
For everything Micromite visit https://micromite.org - micromite.org

Direct Email: mailto:whitewizzard@micromite.org - whitewizzard@micromite.org



Posted By: matherp
Date Posted: 14 March 2016 at 3:18pm

The model of the ADC input is as below:




You will note there is a +/- 500nA leakage and the pin capacitance to take into account at all times. When the sampling time is started the input has to charge the 4.4pF capacitor.

The sampling time can be set in software but in the Micromite firmware is fixed at a "normal" level.

Page 275 of the http://ww1.microchip.com/downloads/en/DeviceDoc/60001168F.pdf - PIC32MX170 datasheet gives a recommended source impedance of 5K.





Posted By: JohnS
Date Posted: 14 March 2016 at 6:34pm

Thanks, guys!

5K does rather rule out 1M.

By implication the Atmel (whichever chip) must not have a similar figure.

John



Posted By: lew247
Date Posted: 14 March 2016 at 8:09pm

Battery backup circuit

I added this as a "just in case".
The kids round here stole my last weather station, I know it stayed locally but I had no way to track or find it.

My reasoning for the battery backup - runs off 2 X AA(R6) 1.5V cells
The 2nd diode blocks the battery from being charged by the 5v circuit, if the external battery - in my case a Solar charged 5V cell is disconnected from the circuit, then the voltage will drop, the Micromite will detect this lower voltage and get the Micromite to transmit it's location from the GPS receiver every say 30 seconds. (time can be adjusted)

This way - driving round or walking round the neighbourhood with a HC-12 connected to the com port on a laptop the location of the outdoor unit can be traced - ie drive or walk round until you get anything from the HC-12 433Mhz tr/rx, then once its found the terminal program will show the location of the unit - as the exact location will be transmitted allowing it to be recovered.

The circuit could also sound a mini sounder/siren using the same circuit if needed, which would probably stop anyone who was stealing the unit - they'd probably drop the unit with shock!

I know in 99% of the cases it's overkill and not needed but I wanted it in "just in case".

Oh I've also added a LUX sensor to the circuit diagram (not shown below)






Posted By: HankR
Date Posted: 14 March 2016 at 8:33pm

Quote:
By implication the Atmel (whichever chip) must not have a similar figure.
John


Actually Atmel 8 bit uPs have the same system; the on-chip circuit values may even be identical.

Haven't checked the Atmel 32 bit uP A/Ds, but I would guess those A/D inputs are similar with the same attendant limitations on driving current from the measured source.



Posted By: JohnS
Date Posted: 14 March 2016 at 9:07pm

Thanks.... now I really really do not understand how the !M resistors can have been OK with the Atmel!

John



Posted By: HankR
Date Posted: 14 March 2016 at 11:21pm

HankR wrote:
Haven't checked the Atmel 32 bit uP A/Ds, but I would guess those A/D inputs are similar with the same attendant limitations on driving current from the measured source.


Actually by not watching my wording super carefully, there was an oversimplification of the mechanism of getting accurate readings with these uC A/D inputs.

It's actually not so simple as a driving current limitation; but a current, source resistance, and charge time requirement.

As is the case with a lot of questions and answers here, the correct answers can be long and nuanced, so don't fit well into the mold of even a real long forum post.

The device or device family datasheets and app. notes go into the subject, but fortunately I found an even better and very comprehensive app. note on the subject. It's by STM, but deals with the subject in a very general way that applies to all microcontrollers on the market.

Here's the link to AN1636: http://www.st.com/web/en/resource/technical/document/application_note/CD00004444.pdf - Understanding and Minimizing ADC Conversion Errors




Posted By: panky
Date Posted: 15 March 2016 at 1:03am

Excellent article Hank - a great reference for anyone playing with ADC.
panky

-------------
... all the Maximites, almost all of the MicromMites, all the MM Extremes, all the ArmMites, and loving it!



Posted By: MicroBlocks
Date Posted: 15 March 2016 at 2:51am

Lewis,

The 'problem' i can see is that when the battery is used the 3v from the 2 AA batteries will be lowered to about 2.7v using this particular diode.
My suggestion would be to use 4 AA batteries and use connect it to the input side of the voltage regulator with a regular diode.

You would then supply 5.4 volts which is enough for the regulator to get a good 3.3v.
The 3.3v is probably necessary to keep the GPS and HC12 working. I imagine 2.7v will be to low, the PIC will still operate but the other parts?

Anyone suggestions for the battery backup? (It does not need to be charged!)

About the 1M working on an Atmel probably has to do with the fact that the voltage is stable over a long time. With a fast changing input it would probably not work, but for monitoring a power supply and sampling each second or so after it has been running for at least a minute would be ok. At least that was my experience.


-------------
Microblocks. Build with logic.



Posted By: MikeO
Date Posted: 15 March 2016 at 5:56am

I have used these boost regulators from 2 x AA batteries with great success, they also have a true shutdown input.
https://www.pololu.com/product/2561 - Reg

Mike

-------------
https://codenquilts.com.au/cms/ - Codenquilts



Posted By: JohnS
Date Posted: 15 March 2016 at 7:57am

HankR wrote:
[QUOTE=HankR]Here's the link to AN1636: http://www.st.com/web/en/resource/technical/document/application_note/CD00004444.pdf - Understanding and Minimizing ADC Conversion Errors
Thanks!

John



Posted By: lew247
Date Posted: 15 March 2016 at 8:10am

Microblocks, I hadn't actually thought about the minimum voltage for the gps and other units, I checked and as long as the battery is new they "should" work

However

Mike your idea is brilliant I never thought of a step up converter.

The only problem I can see with it is how can I use it so it's not actually drawing any current from the batteries UNLESS the main voltage gets disconnected?

I can't see any way of doing that where the micromite doesn't lose power.

Although if the autorun was turned on, would this matter? How quickly does the micromite turn back on fully after power is reapplied?

I looked at the SHDN on the boost regulator, I can't quite get my head round it, Is it saying that if you drive the SHDN pin low the regulator is turned off ie the batteries would not be used or drained?
IF this was the case then it could be used in conjunction with the battery monitoring circuit and work perfectly as needed



Posted By: bigmik
Date Posted: 15 March 2016 at 8:33am

Lew,

An idea, why not use the higher (out of spec) resistors for the ADC and doing your calc and measuring the real voltage with a meter and seeing what it looks like... If necessary you can always program an error adjustment into your code.

After all does it really matter if it reads 3.1v when it is 3.02v ?? How accurate is required?

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 15 March 2016 at 9:36am

100% accuracy isn't essential
It's there to simply check the battery is getting charged with the solar charger
IE if the voltage drops to 4.5 or 4 V then we have a problem - sound an alarm to the indoor unit(send notification over the serial txd/rxd port)



Posted By: MikeO
Date Posted: 15 March 2016 at 9:41am

Lew you can control the shutdown pin on the regulator from the uMite, turning it on when some critical main supply voltage point was reached and also signaling this situation to the main unit. To be honest baring a complete breakdown of the main supply, a warning of a drop off of the main battery voltage due to a low rate of solar charging perhaps should be signaled on the main unit as you said, so a critical point was not reached.
By the way I indicated a 3.3v module but you can get 5v ones also so it could supplement the main supply, however I assume if you were in a backup situation the object would just to keep the processor going and signal the failure so you could fix it, all the sensors that needed 5v would not be used.

Mike

-------------
https://codenquilts.com.au/cms/ - Codenquilts



Posted By: WhiteWizzard
Date Posted: 15 March 2016 at 10:52am

You can use a voltage detection chip (which has a high/low output if it drops below a pre-set value) to switch an enable input on the 'booster'. This way, even if 'main' power is lost, the 'startup' code of your program can check the state of this output. and run the necessary code i.e. no need to keep power 100% to the uM.

Many other ways to do it but this is the one I tend to use



-------------
For everything Micromite visit https://micromite.org - micromite.org

Direct Email: mailto:whitewizzard@micromite.org - whitewizzard@micromite.org



Posted By: lew247
Date Posted: 15 March 2016 at 1:07pm

I cannot figure out how to add the battery backup and stop it actually working with both the main power and battery connected.

I'd like both supplies to be connected to the micromite, the backup battery feeding power AFTER the voltage regulator so the voltage is only around 3V, stop the voltage from the main power charging the battery, which the diode would have done if I used it, BUT it wouldn't stop the battery draining

Ideally what I need is IF there was a pin on the micromite which is always low and only goes high if programmed to.
by always low I mean with no programming telling it this.

That way I could connect a dc converter to the battery, have it connected and the ground from it connected to this pin

Then if the main power is working the program would tell this pin to go high which would disconnect the backup battery circuit

If the main power dies (gets disconnected) this pin resets itself low and the backup battery circuit is back in line, the micromite reboots itself and the program knows to keep this pin low from the voltage sensing circuit

But I dont think any pin actually is always low even without being programmed?

I did find this circuit which seems ideal, it has enough power to keep the various modules running until the backup battery gets to around 2.2V ish http://www.pololu.com/product/791 - http://www.pololu.com/product/791





Posted By: MicroBlocks
Date Posted: 15 March 2016 at 2:52pm

WhiteWizzard wrote:
You can use a voltage detection chip (which has a high/low output if it drops below a pre-set value) to switch an enable input on the 'booster'. This way, even if 'main' power is lost, the 'startup' code of your program can check the state of this output. and run the necessary code i.e. no need to keep power 100% to the uM.

Many other ways to do it but this is the one I tend to use


The supervisory chips at doing this. They often have an open collector output and some have an internal pullup. So all you need to do is get the right supervisor chip (many trigger voltages available) and you have a power monitor.

I have to dig up a schematic as i made one that indicated 3.0, 3.3, 4.5 and 5v by using four different supervisory chips with their outputs connected to a led.


-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 15 March 2016 at 6:00pm

Sorted all the circuit for the boost converter and supervisory module out now, sent it to MicroBlocks, who hopefully can put it all onto the board.

Jean when you get time to look at the circuit there are several changes, including connecting pin 13 to +3.3V I had forgot to put that in before.

EDITED:
I was reminded by my girlfriend that it's only a weather station, it doesn't need a backup battery, it can just be mounted on the roof.

I had not thought of this. it's so simple, nobody is going to climb up on the roof to take it so it does not need complex circuitry for the backup battery circuit, or indeed a backup battery at all.

Jean I have sent you the corrected circuit with NO backup circuit it's called Weather 12.dch

Lewis



Posted By: lew247
Date Posted: 16 March 2016 at 9:42am

MicroBlocks Just a minor change - the collector for the transistor should be connected to the 4.7V net (hot end of R6) and not the 3,3V net as the voltage drop through the transistor would stop the HC-12 module working properly.

also can these be headers and not screw terminals so they can plug direct onto the board please?
ICSP
CONSOLE
HC-12 (rf module)
GPS

It would make the finished unit much neater

The BME280 and the LUX sensor both use the clock and data lines so they only need one input "screw"
I decided to power the LUX sensor from that extra pin you had on the rain header, so in reality I don't think the LUX sensor needs to be added to the board layout, it can use the existing SCL and SDA lines in the BME280 header and the extra pin in the rain header?




Posted By: MicroBlocks
Date Posted: 16 March 2016 at 4:20pm

Hi Lewis,

I am not back home yet, kids have to do a test for their new school. So i will be back on Friday/Saturday depending on how things go.
Moving to a new city (360kms away) is not easy. Have lots of delicate stuff that need more care transporting so it takes ages....

I have my laptop with me, but it is not loaded will all my software, so i can check some but adapting it is for other tools/screens.

Also have no internet yet, so i use the ones that are available in restaurants or other places. :)





-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 16 March 2016 at 7:44pm

There is no hurry whatsoever, you take your time, sorting your life out and moving is way more important.
I'm just so very grateful for all the help your giving with this project.

I'm away for this coming weekend and won't have internet with me.
and like I said - there really is no rush at all.



Posted By: lew247
Date Posted: 18 March 2016 at 6:59am

MicroBlocks
Last change,. and this is only so the battery lasts longer
Powered the gps module with a 2n3904 connected to pin 23, and 5V
This is not essential, only if you have enough room on the board to put it.

Or if it's easier use surface mount versions of the 2N3904

like I said before - no hurry at all



Posted By: lew247
Date Posted: 22 March 2016 at 9:10am

uploads/lew247/2016-03-22_104353_DipTrace_Schematic_-_Weather_14.pdf - 2016-03-22_104353_DipTrace_Schematic_-_Weather_14.pdf Last version of the circuit (hopefully)

it now includes a LUX sensor as well as 2 X DS18B20's one for temp in the sun and one for temp in the shade
The gps is powered from a transistor connected to the Micromite as is the HC-12 Module - I did this so it greatly reduces the power consumption as they are only powered on when needed.
Didn't include the battery backup circuit as it's not a critical device that needs it, it's only a weather station outdoor unit!

Diptrace circuit is in the zip file
uploads/lew247/2016-03-22_091420_Weather_15.zip - 2016-03-22_091420_Weather_15.zip

Lew

left hand side



Right hand side






Posted By: lew247
Date Posted: 22 March 2016 at 2:22pm

EDIT:

I decided to change D1 to STPS1L30 it's smaller, has a low forward voltage drop 0.3V and it's a standard "SMB" package size
NOT updated it on the circuits above



Posted By: MicroBlocks
Date Posted: 22 March 2016 at 3:11pm

Hi Lew247,

Got back home, still lots to do as not everything fitted in the truck!
Have some large stuff like a lasercutter, lathe and mill to move and they did not quit fit.

I am still wondering about the connections you used for the BME280 and TSL2561.
Are you using a breakout board for those?
If so which ones? Any other modules you are using?
Pictures/datasheet/partnumbers of those available.

I am getting close to the final board, so it is time for a good check.



-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 22 March 2016 at 4:18pm

I just had a very long play with Diptrace and although I couldn't replicate your neatness (or use screw terminals as I don't have the Diptrace parts) I did manage to do a "kinda ok board"

I have everything as headers the way I did it, but ideally to make connection easier/simpler everything should be screw terminals apart from the GPS module which I think will be neater plugged in direct via a header.

If everything else is screw terminals it lets people place the sensors anywhere they like in whatever case they are going to use.





Posted By: MicroBlocks
Date Posted: 22 March 2016 at 4:52pm

Lewis,

I see you got some more practice.
It gets more easy after a while. I am already using it over two years so i am familiar with what can be done.
One of the things i never use is depend on the auto router.
I sometimes use it to see if placement is good, and for some simple designs it gets close. I then decide to use the auto routers result as a starting point or if it is really a mess i start from scratch and route everything by hand.
Most of the time at the end every trace is hand placed/moved as auto routing is still not good enough.

This is what i got so far:



All the screw terminals are facing to the outside of the board making connections easy. They can also be headers as the pitch is the same 0.1".
Not sure if the silkscreen for the screw terminals are right, the little dots might go on the inside, but that does only matter when the screw terminals have plastic notches that go into small holes in the pcb. I did not do that as the screw terminals i have in stock are flat on the bottom.

-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 22 March 2016 at 5:33pm

That is really impressive

A couple of notes:

I changed the diode (D1) to a STPS1L30U
It's cheaper and smaller - it uses an smb footprint

DS18B20
could pin 2 labelled Sun
could Pin 3 labelled Shade

and Rain pin 2 labelled Speed

GPS needs power to go via transister/resistor/5V (or 4.7v) and pin 23
although I can use Pin 7 if you want as thats already on the board?

See image below (this is to conserve power)




Posted By: lew247
Date Posted: 22 March 2016 at 5:34pm

IF there is no room for the transistor for the gps power then it's ok, leave it as it is, it only uses around 5mW so as long as the battery does get charged every day it should be fine.



Posted By: MicroBlocks
Date Posted: 22 March 2016 at 5:49pm

Is the GPS 5v or 3.3v?


-------------
Microblocks. Build with logic.



Posted By: HankR
Date Posted: 22 March 2016 at 6:23pm

MB,

On the right side of the uC there are resistors R9, R8, R4, and another surface mount part I can't make out.

These are a little close to the uC, especially if a socket is employed.

Could there be just a smidge more room opened up, perhaps by simply sliding the uC a few hundredths of an inch to the left?

HR



Posted By: lew247
Date Posted: 22 March 2016 at 6:41pm

I'm using a gps module which can use anything from 5v to 2.6v
I guess it would probably use a little less power using 3.3v instead of 5v
Hank it's the capacitor for the Micromite that you can't identify



Posted By: HankR
Date Posted: 23 March 2016 at 12:54am

I hope I can persuade Lew to make a slight change in what has become two power saving switches driving the GPS and the HC-12. We've been PMing about it.

As now drawn, NPN transistors (Q1, Q2) are hooked up as "emitter followers" so it's not possible for them to deliver more voltage to these emitter driven loads than the base voltage, because these circuits have 100% voltage feedback where the output follows the input with an AC voltage gain of 1.

That's where the name *emitter follower* comes from.

For DC levels it's actually even worse, because the B-E junction voltage drop subtracts from the output, so it's going to be something like 3.3-.6 = 2.7 out (depending a little on load current and other factors).

The solution is very easy: change to a PNP (2N3906 is the exact complementary part, but almost anything works) and switch emitter and collector leads. I've sent Lew the circuit. Even if the board stays as is, a twist of the two transistor leads will work.

Hank



Posted By: lew247
Date Posted: 23 March 2016 at 8:53am

Hank's suggestion is a good one
All it really needs is the silk screen for the board to show the the 2N3906 pinout instead of the previous one (pnp instead of npn)
(pins reversed)






Posted By: bigmik
Date Posted: 23 March 2016 at 9:02am

Hi Lew,

You have the emitter and collector reversed. In your schematic... (If my transistor logic has not left me far behind)


Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 23 March 2016 at 2:08pm

Sorry you're right
corrected below (hopefully)

I wish there was a way to delete posts that need deleting like the circuit above!!!!!






Posted By: MicroBlocks
Date Posted: 23 March 2016 at 4:34pm

When the output pin of the uMite is in a high-z state or configured as in input, what would then be the effect on this transistor?
The base of the transistor is then basically floating.
Or in other words is the transistor 'on' when the uMite starts up or 'off'?

I normally use a pullup or pull down resistor to make sure the state during startup is known. Would that not be better?


-------------
Microblocks. Build with logic.



Posted By: HankR
Date Posted: 23 March 2016 at 5:40pm

MicroBlocks wrote:
When the output pin of the uMite is in a high-z state or configured as in input, what would then be the effect on this transistor?
The base of the transistor is then basically floating.


The transistors will not be conducting so the peripheral devices being controlled will not be running.

Quote:
Or in other words is the transistor 'on' when the uMite starts up or 'off'?

Based on the above statement, you'll be able to answer that question definitively, but I'd guess the startup condition of the uMite is with I/O pins floating. That in turn means the peripherals will not be running (usually a good thing).

Quote:
I normally use a pullup or pull down resistor to make sure the state during startup is known. Would that not be better?


No, I don't think so. It's an unnecessary part. If it makes you feel better you could do it.

With a floating state, the startup situation is perfect with the circuit just as it is now.



Posted By: lew247
Date Posted: 23 March 2016 at 8:34pm

Last and definitely last minor mod
MicroBlocks I've been thinking about that one pin on your board that isn't used and decided a UV index sensor would be ideal
it uses the same i2c pins as used in the other 2 sensors plus pin 7 that you already had routed in your board

PDF of the circuit attached and also the diptrace circuit





uploads/lew247/2016-03-23_203315_DipTrace_Schematic_-_Weather_16.pdf - 2016-03-23_203315_DipTrace_Schematic_-_Weather_16.pdf
uploads/lew247/2016-03-23_203355_Weather_16.zip - 2016-03-23_203355_Weather_16.zip



Posted By: lew247
Date Posted: 23 March 2016 at 9:44pm

Got the board a nice 50mm X 50mm now
I really need to find 3D images for Diptrace of headers and most of the other components
Anyone got a decent set of files for Diptrace they dont mind sharing? components, connectors, screw terminals and so on?







Posted By: bigmik
Date Posted: 23 March 2016 at 10:25pm

Hi Lew, All,

I have been looking at your transistor circuit again and I dont think it will work as you expect it to.

The basic premise is to conduct across the emitter/base to turn the transistor ON.. This means applying a LOW to the BASE will conduct across the emitter/Collector... OK that works..

BUT

The maximum voltage you can apply to the base driven as shown is 3v3 which would still mean that as this is more than 0.6v less than the emitter's 5V level that the transistor is still ON.. Personally I think a better solution would be to use some Opto-Isolators to do the job..

Open to feedback.. There are many cobwebs in my brain where I stored my transistor logic theory..

Kind Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: bigmik
Date Posted: 23 March 2016 at 10:30pm

GDay Lew,

lew247 wrote:
Got the board a nice 50mm X 50mm now


Looks OK, but some constructive criticism....

Firstly you would not be able to use screw terminal blocks the way you have them layed out, you are limited to male/female headers (not that that is a realy problem if that is what you want)

Secondly I would increase the track thickness for all of the power rails, (5V, 3v3, GND)

I generally use 0.01" for signal tracks and 0.025" for power tracks (or 0.20" if space is tight)

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: bigmik
Date Posted: 23 March 2016 at 10:57pm

GDay Lew, All,

You mentioned you wanted some form of battery backup.. I think the simplest method is to use a XIOAMI powerbank like this one.

http://www.banggood.com/Original-XIAOMI-5V-2A-10400mAh-Power-Bank-For-Smartphone-p-923637.html - XIOAMI 1040mAhr

The genuine powerbank has a nice feature that clones and other cheapo units don't have in that it can charge itself and supply power to your product at the same time so you could insert one of these in line with your 5V power source and if the 5V source dies (power failure) the battery bank will take over automatically and when power is restored it will recharge itself whilst still supplying power to your board..

I use one of these on a board I made, with the assistance of Peter Carnegie with some smart coding, to create a terminal emulator for my work that emulates a terminal running on 2 x RS485 4 wire lines and it will keep the micro mite running for a few days before needing a recharge..

I think you could do away with switching GPS etc on and off and rely on the power bank to keep it running...

If you might have power outages of longer than a couple of days you can probably monitor the 5V input to the power bank and go low-power until power is restored, that way you could probably stay up for months.

This particular unit is 10400mAhr and will deliver 2A max so that should power, lets assume 200mA max draw (prob no where near that) will keep you going at full power for 50hrs. They have smaller 5200mA and larger 20800mA units.

Just a caveat, there are a lot of fake units out there so I suggest you buy from a reputable company, see the video clips on the link above.

Regards,

Mick




-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: HankR
Date Posted: 24 March 2016 at 2:39am

bigmik wrote:
Hi Lew, All,
I have been looking at your transistor circuit again and I don't think it will work as you expect it to.


Mick,

You are correct with the present state of the circuit. So good catch there.

As originally conceived by Lew, the feed to the peripherals was 3.3 volts, just like the uC.

In that instance, no problem in the standard configuration shown in the schematic (except going back to 3.3 volts on the emitter) which is used all the time.

uC output pin low = switched loads supplied with 3.3 volts (across load terminals) and current.
uC output pin high = switched loads have no current.

and, just to be thorough,
uC pin floating = switched loads have no current.

To stay with 5 volts going to the switched loads, a circuit mod using only one more transistor and resistor will do it nicely. Details in a later post.

Of course, with an optoisolator you can do almost anything, even controlling an AC load.

Hank




Posted By: HankR
Date Posted: 24 March 2016 at 4:08am

Quote:
To stay with 5 volts going to the switched loads, a circuit mod using only one more transistor and resistor will do it nicely. Details in a later post.


Might take a few days to get around to doing a decent drawing, so for now a description in words.

One can arrange an inverting NPN stage with collector resistor (Common emitter) feeding into the existing PNP section just as it is now. This shifts the "reference" of the uC pin to ground (conventional) and allows for separate and different value voltages feeding the uC and the switched loads.

Because of the inversion with the NPN stage,

now a uC high provides current to a switched load.
A uC low turns off load current.



Posted By: lew247
Date Posted: 24 March 2016 at 6:08am

ok I've gone back to the original npn transistors
I know this will work, even with a bit of a voltage drop if fed from the 4.7 or 5v rail there will be plenty of voltage to power the modules as each one works from anything between 2.6-5.5V

When the pin goes high the transistor conducts and will let the voltage through to the module, simple transistor switch!





Posted By: bigmik
Date Posted: 24 March 2016 at 10:28am

Hi Lew, All,

lew247 wrote:
ok I've gone back to the original npn transistors
I know this will work,


I think you are mistaken there as well...

You are trying to get say 4.5V to your GPS module... Assuming you could get 4.5v there the voltage at the base cannot go above 3v3 so the transistor would be turned OFF hence you couldn't get 4.5V to the GPS...

Basically the concept is wrong..

Going back to the PNP transistor circuit.. If you put a 10k bias resistor from Base to emitter you would get the following.

Set the mite pin an OUTPUT and set it LOW and the transistor will turn on allowing power to the GPS module.

Set the mite pin to an INPUT allows the 10k resistor to pull the base to 5V turning the transistor OFF..

Now that is OK if you use a 5V tolerant mite pin.. but if not you will need a schotkey protection diode (anode to the mite pin and cathode to 3v3)

Regards,

Mick



-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: bigmik
Date Posted: 24 March 2016 at 11:12am

GDay Lew, All,

Probably the easiest way is to use an opto isolator as in this circuit



They are fairly cheap and will only draw power when ON (the LED side is set for about 10mA.)

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: MicroBlocks
Date Posted: 24 March 2016 at 11:29am

How much current can a opto isolator typically switch.


Would having a transitor that is switching to ground not be a solution?



-------------
Microblocks. Build with logic.



Posted By: bigmik
Date Posted: 24 March 2016 at 11:43am

Hi Jean,

I thought of that but you `might' get some sort of powering the GPS (or other module) through the TX/RX lines... as the 5V will need to be connected permanently to the module... Probably not a good idea.. I am interested in feed back from others.

How much current does the GPS module actually draw?

Personally I think keep it continuously powered up and use a XIOAMI power bank that is topped up via a mains source...but I understand mains may not be available in all situations.

Regards,

Mick



-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 24 March 2016 at 11:50am

Look at the diagram below

The module itself brings the transistor to ground






Posted By: MicroBlocks
Date Posted: 24 March 2016 at 11:52am

Yes the TX/RX lines would need to be 'unconnected' when the GPS is not powered, maybe to be save also add a resistor in the TX/RX lines, maybe 100 ohm is enough.

In the uMite it could be done by setting those pins to OFF with the SETPIN command.

I think it can work if you do the sequence right.
To activate the GPS, setup the comport, activate the power.
To deactivate, close the comport,deactivate power.

The pins would then automatically be configured by the OPEN and CLOSE commands, preventing some leaking currents from the TX/RX lines.

From the MMBasic manual:

When a serial port is opened the pins used by the port will& nbsp;be automatically set to input or output as required and the  SETPIN and PIN commands will be disabled for the pins.  When  ;the port is closed (using the CLOSE command) all pins used by&nb sp;the serial port will be set to a not-configured state and the& nbsp;SETPIN command can then be used to reconfigure them.


Thinking about it a bit more.... if switching to ground that also means the GPS module has to be isolated, mounting screws might be grounded and give a path for the current.... hmmm. Looks like the opto is the easiest option.





-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 24 March 2016 at 1:48pm

How about this as a solution>?

and obviously the same with the gps module transistor





Posted By: lew247
Date Posted: 24 March 2016 at 1:51pm

I know the HC-12 module works with the Micromite when powered direct by 5v, I've tested it and the gps modules for several days

All I need to do is turn the 5v power on and off with the micromite pin



Posted By: lew247
Date Posted: 24 March 2016 at 1:59pm

The other options is this






Posted By: bigmik
Date Posted: 24 March 2016 at 2:01pm

Lew,

If you look at your diagram (the one in 5V line) you can see that the Maximum voltage (with respect to GND) that can appear at the BASE is 3v3. Giving a best case of 0.6V drop across the b-e junction would mean the maximum output voltage that could appear is 3.3-0.6 or 2.7V.. But in practice I think you will find that the GPS module would not power up.

The 2nd diagram with the transistor in the GND line is technically feasible but, as MB has stated, you would have to isolate the GND of the module from anything else and you have the problem of `bleed through the TX and RX lines when the transistor is OFF.. It `may' work OK, well it would probably work as a GPS solution but will it still draw more current than you wish to draw when it is OFF??

If you have a module why not try it and do some current measurements?

Do you know the max current draw of the GPS? Even the OPTO (4N35) I drew may not work as it (the datasheet is a bit confusing to me) seems to have a max `operating' current of 50mA but you would need to feed the LED side with about the same which the uMite will not do (max about 15mA)...

Back to the drawing board me-thinks.. best the dual transistor drive circuit Hank suggested.. or a miniature relay or solid state relay..

Mick


-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 24 March 2016 at 2:07pm

I would try it if I had some transistors here along with a working micromite, I don't have either unfortunately



Posted By: lew247
Date Posted: 24 March 2016 at 2:23pm


Due to problems with the switching of the transistor I've had to modify the circuit

I'm informed this should work perfectly now






Posted By: MicroBlocks
Date Posted: 24 March 2016 at 5:03pm

What about using this:
http://ww1.microchip.com/downloads/en/devicedoc/21422d.pdf - http://ww1.microchip.com/downloads/en/devicedoc/21422d.pdf

It has two channels, so only one DIP-8 chip is needed.

You would need the inverting TC4426.
Pull the input up to 5v and use a 5v tolerant uMite pin to put a LOW on the input of the TC4426.


-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 24 March 2016 at 5:09pm

It's a driver for a fet so I'd need to add 2 fet's as well

I'm pretty certain it will work fine as it is now

BTW MicroBlocks (or anyone) How do I change the setting on Diptrace so I can see the traces on the bottom of the board (or the top again afterwards) ?



Posted By: MicroBlocks
Date Posted: 24 March 2016 at 5:37pm

No the FETS are part of the chip. It is a complete circuit to get from a logic level to an output 'switch' that can have more current.
Only one resistor per channel needed.

I think this would be how to use them.

I don't have the part so i can not test. They look interesting so i have ordered a few.

As for the layers in DipTrace:

Press 1 for top, 2 for bottom.
Or use the little listbox in the toolbar to choose the layer.
If you not see that listbox, press F6 to enable/disabled the route toolbar.
You can also check which toolbars are visible under the menu View->Toolbars


-------------
Microblocks. Build with logic.



Posted By: lew247
Date Posted: 24 March 2016 at 7:26pm

Thanks for that Jean, I never noticed that toolbar or maybe I had it hidden.

That part does look interesting but for not I'll stick with transistors







uploads/lew247/2016-03-24_192723_DipTrace_Schematic_-_Weather_17.pdf - 2016-03-24_192723_DipTrace_Schematic_-_Weather_17.pdf



Posted By: lew247
Date Posted: 24 March 2016 at 7:43pm

MicroBlocks is the part you used on your board, the screw terminals part of the standard Diptrace package?
I've been looking but cant find it



Posted By: bigmik
Date Posted: 24 March 2016 at 10:45pm

Hi Lew,

I hate being the http://www.phrases.org.uk/meanings/harbinger-of-doom.html - Harbinger of DOOM

But..... I really do not understand that circuit at all, the way I see it the Emitter-Base junction will work as a diode and effectively be permanently supplying power to the LED/load.. Unless someone can show me the error behind my thinking and explain how that circuit works...

I have a simple Idea I will post in a future message..

I am not entirely dismissing that circuit as I honestly cannot understand how it would work and my transistor theory is rusty at best.

Regards,

Mick

lew247 wrote:

Due to problems with the switching of the transistor I've had to modify the circuit

I'm informed this should work perfectly now





-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: bigmik
Date Posted: 24 March 2016 at 11:00pm

Hi MB, Lew, All,

MicroBlocks wrote:
No the FETS are part of the chip. It is a complete circuit to get from a logic level to an output 'switch' that can have more current.
Only one resistor per channel needed.


Now that little beast does indeed look like it would do the job quite well, the input (high level) only needs to be 2.4v I am not sure about the pullups but in anycase the pullups could go to 3v3 instead of 5v and thus be driven from a normal (non 5V tolerant) digital IO pin.

I will have to get some myself,, they certainly are cheap enough... I was going to pose a 3v miniature relay but that chip loks a much better idea to me..

Why do you say you need the non-inverting one? If you chose the inverting one you just change the level you set to your uMite pin..

Good pickup..

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: centrex
Date Posted: 24 March 2016 at 11:34pm

If it was me I would try a transistor on the ground pin much like you would if it was a relay.
There may be valid objections to do doing that which I am not aware of.


Good luck have fun.

-------------
Cliff



Posted By: bigmik
Date Posted: 25 March 2016 at 12:58am

Hi Cliff,

As mentioned previously.. It should work reasonably OK BUT you would need to make sure the device is isolated from the GND and there is a possibility that current could flow from 5V through the TX/RX lines into the uMite... That second option I feel is the problem, if it was just used to turn a light on then all would/should be OK but there are other signals involved..

I am NOT certain that there would be current flow through those lines but I suspect there would be and the whole purpose of this is to save power..

I think the device MicroBlocks found looks like a good solution.

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: bigmik
Date Posted: 25 March 2016 at 1:00am

Hi Cliff,

As mentioned previously.. It should work reasonably OK BUT you would need to make sure the device is isolated from the GND and there is a possibility that current could flow from 5V through the TX/RX lines into the uMite... That second option I feel is the problem, if it was just used to turn a light on then all would/should be OK but there are other signals involved..

I am NOT certain that there would be current flow through those lines but I suspect there would be and the whole purpose of this is to save power..

I think the device MicroBlocks found looks like a good solution.

I feel that Lew is starting to hate me as all I ever do is criticise his options... I am trying to be constructive and achieve his desired goals with a minimum of fuss..

I know I lost a lot of hair trying to get the backlight going for my Backpack170 board(s). I learned a lot in that process.

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: MicroBlocks
Date Posted: 25 March 2016 at 3:11am

bigmik wrote:
Hi MB, Lew, All,
Now that little beast does indeed look like it would do the job quite well, the input (high level) only needs to be 2.4v I am not sure about the pullups but in anycase the pullups could go to 3v3 instead of 5v and thus be driven from a normal (non 5V tolerant) digital IO pin.

You are right. 2.4v is enough. Just went through the datasheet again.
That makes it even easier.



bigmik wrote:

I will have to get some myself,, they certainly are cheap enough... I was going to pose a 3v miniature relay but that chip loks a much better idea to me..

Why do you say you need the non-inverting one? If you chose the inverting one you just change the level you set to your uMite pin..

I did say an 'inverting one'.

The reason for an inverting one is that when power is applied the uMite pins are in a HIGH-Z state.The pullup will make sure the 'switch' is OFF. Once the program in the uMite takes control you would need the put a LOW on the pin to activate the 'switch'. I think it is because i prefer to control thing by using a sink to ground. It switches 'cleaner' as the ground plane has less impedance and other disturbing influences.

You cold use a non inverting one but then you need a pulldown and set the pin high.

Something else that is interesting is which level on the input is chosen as the default state as that also influences the amount of current that is used by the chip.
Microchip datasheet wrote:

Low Supply Current:
- With Logic 1 Input 4 mA
- With Logic 0 Input 400 A

Considering that it might be best to use an non-inverting one and use a pulldown resistor.

Another reason i personally like this chip is that it is available in a DIP package for easy prototyping AND a DFN for space saving on a PCB.


-------------
Microblocks. Build with logic.



Posted By: bigmik
Date Posted: 25 March 2016 at 3:49am

Hi Jean, All,

MicroBlocks wrote:
I did say an 'inverting one'.
You cold use a non inverting one but then you need a pulldown and set the pin high.


OOps sorry, too many things spinning in my head at the same time... Yes with the pull down/pullup resistor the value of which will need to be thought about as this will have an inherent current draw in itself.

MicroBlocks wrote:
Something else that is interesting is which level on the input is chosen as the default state as that also influences the amount of current that is used by the chip.
Microchip datasheet wrote:

Low Supply Current:
- With Logic 1 Input 4 mA
- With Logic 0 Input 400 uA

Considering that it might be best to use an non-inverting one and use a pulldown resistor.

Another reason i personally like this chip is that it is available in a DIP package for easy prototyping AND a DFN for space saving on a PCB.


Yes I read all that when I read the data sheet, probably best to have a LOW the normal (most of the time) state and a high the time you wish the unit to be powered.

Thinking a bit more on this the pull up/down resistor should only be needed in times of program initialisation so the brief time that would take shouldn't impact anything, the worst it would do is apply power to the GPS (or other) for a short ms or 2 until the program gained control of those pins..

I still think, especially considering Lew wants two such outputs power cycle controlled, that this is the answer but it is Lew's design it is up to him I suppose.

Regards,

Mick





-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: MicroBlocks
Date Posted: 25 March 2016 at 4:09am

I like known states at all time, and default to OFF.
This time it is a GPS, but it could also be a valve or something else that could do damage or undesired things when powered even for a slight moment. A resistor is a cheap insurance against that.
I will do a little test with them when they arrive and if they work as expected then it is a simple part to add to the toolbox as lots of times you need to switch things on/off.
I especially like the 2.4v threshold for a high level. That makes interfacing with 3.3v and 5v parts easy.




-------------
Microblocks. Build with logic.



Posted By: bigmik
Date Posted: 25 March 2016 at 4:20am

Hi Jean,

Yes! Understood.. I feel the same.. I think that a pull down probably wont draw any current in either case.. so I am thinking the Non-Inverting TC4427 is the way to go for me. OK with a weak(ish) pull down resistor.
I will be getting some DIP chips to play with but I am just going through the SMD package sizes to work out which suit me best going forward with other applications.

Regards,

Mick


-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 25 March 2016 at 8:38am

With the Micromite pin High the transistor will not conduct, the diode is off there is no current drawn the module is not powered

When the pin goes low the transistor conducts, the led lights, the HC-12 (or GPS) module gets power and works fine






bigmik wrote:
Hi Lew,

I hate being the http://www.phrases.org.uk/meanings/harbinger-of-doom.html - Harbinger of DOOM

But..... I really do not understand that circuit at all, the way I see it the Emitter-Base junction will work as a diode and effectively be permanently supplying power to the LED/load.. Unless someone can show me the error behind my thinking and explain how that circuit works...

I have a simple Idea I will post in a future message..

I am not entirely dismissing that circuit as I honestly cannot understand how it would work and my transistor theory is rusty at best.

Regards,

Mick

lew247 wrote:

Due to problems with the switching of the transistor I've had to modify the circuit

I'm informed this should work perfectly now






Posted By: centrex
Date Posted: 25 March 2016 at 10:16am

Getting back to parasitic power there were a number posts on this subject awhile back when the skinnymite and other mites would stay alive even when the power was disconnected.
This happened when a usb to TTL device remained connected, the fix was to insert a schottky diode in the tx line from the USB to the RX on the micro.
I know I did this on my skinnymite which fixed the problem.
I believe it was TassyJim who came up with the fix.

Might allow you to switch the ground!

-------------
Cliff



Posted By: panky
Date Posted: 26 March 2016 at 3:25am

@Mic

The way I read the circuit above is that with the MM pin either high or high impedance, the PNP transistor will have it's base held to the emitter voltage by the resistor thus biasing it off (negligible current). When the MM pin goes low, the PNP transistor is biased on and the collector voltage will rise up to near Vcc (less the collector-emitter voltage) providing power for the device. LED should also light. Should work I think.

Cheers,
Doug.

Edit: The 10K base emitter resistor seems a bit high only allowing .5mA to turn on the LED - will depend on LED if this is enough.

-------------
... all the Maximites, almost all of the MicromMites, all the MM Extremes, all the ArmMites, and loving it!



Posted By: bigmik
Date Posted: 26 March 2016 at 3:34am

Hi Panky, Lew, All,

Of course it will be dead easy to test it..

I think I might get some time to experiment in the next couple of days so I intend to test the theory.. I am happy to proven wrong, especially when still at the `paper' stage..

Not having a GPS I am going to use a MuP to try to power control another MuP and I will be able to do some measurements of the ON voltage and OFF voltage and any current draw...

Regards and Happy Easter to all.

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: HankR
Date Posted: 26 March 2016 at 4:45am

lew247 wrote:
With the Micromite pin High the transistor will not conduct, the diode is off there is no current drawn the module is not powered


Not quite correct. The 3.3 v from the uC is not enough to stop conduction.
If the PNP is fed from 3.3 volts as well, 3.3 volts out of the uC WILL stop conduction.

Fortunately, there is another way to stop conduction while retaining the 3.3 volt/5 volt split supply voltage setup. That's using not a high out of of the uC, but a floating pin (pin input mode).

So uC active low to switch load on, input mode (floating) to switch load off.

This has all been hashed out before in previous messages and this is the same basic circuit I proposed to Lew about 3 weeks in PMs, and about 2 weeks ago in public postings. So at this point we're beginning to go around in circles.

Quote:
When the pin goes low the transistor conducts, the led lights, the HC-12 (or GPS) module gets power and works fine.


Correct.

So I would think this part of the board is settled.

Hank




Posted By: HankR
Date Posted: 26 March 2016 at 5:03am

R9 and R10 are unnecessary. It doesn't hurt to have them.

In the real old days of germanium transistors they would be needed because of substantial leakage currents. These leakage currents are so small with silicon as to be negligible in most circumstances.

I think some of the difficulties evident here for the last couple of weeks in understanding these load switching circuits is due to a tendency to apply digital binary logic level thinking to what is really a linear circuit.

So the logic way of thinking about circuit action misapplied to circuits that are not in fact digital can lead to oversimplifications that in turn lead to erroneous conclusions.

Hank



Posted By: bigmik
Date Posted: 26 March 2016 at 5:15am

Hi Lew, All,

My apologies.. I am getting too old and my eyes too bad..

I read the circuit diagram as the uMite pin on the left (going into the Collector of the transistor) and the controlled device (through the LED) on the right..

DOH!

I can now see the logic behind it... You are using the higher voltage drop across the LED to enable the base to turn the transistor off... Nice...

I doubt the LED would light when a LOW is on the umite side, but then it might by the current flowing through the B-E junction, but I dont think that is why you have it in circuit..

Interesting approach..

Regards,

Mick

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: HankR
Date Posted: 26 March 2016 at 5:20am

Quote:
Edit: The 10K base emitter resistor seems a bit high only allowing .5mA to turn on the LED - will depend on LED if this is enough.


It's not those BE resistors which power the LEDs. They can be entirely omitted and the LEDs will happily glow with several mA of current!

The major LED current flow is through the 680 ohm resistors and the forward biased BE transistor junctions.

My preference would be to keep separate the LEDs and their requirements and the base current limiting resistors and their requirements. The arrangement as shown does save two resistors.

Hank






Posted By: HankR
Date Posted: 26 March 2016 at 5:45am

HankR wrote:
lew247 wrote:
With the Micromite pin High the transistor will not conduct, the diode is off there is no current drawn the module is not powered


Not quite correct. The 3.3 v from the uC is not enough to stop conduction.
If the PNP is fed from 3.3 volts as well, 3.3 volts out of the uC WILL stop conduction.


Correcting the correction I just submitted.

I guess the voltage drop across the LED will make it so that the 3.3 out of the uC will be just close enough to 5 volts seeing as how LEDs usually have a voltage drop greater than .6 volts.

So using that LED trick, it looks okay after all.

Using the uC floating pin mentioned previously for achieving the load-off state means you don't need LEDs or conventional diodes inserted to pad up the uC 3.3 volts.

Hank






Posted By: HankR
Date Posted: 26 March 2016 at 5:52am

I guess the 3.4 mA LED current in Lew's schematic is being missed by those distracted/fooled by the 10k BE resistors that can be left out entirely.

They're totally not needed.



Posted By: HankR
Date Posted: 28 March 2016 at 11:49pm

Microblocks,

Your PM box has reached its limit.

Please clear out some room for new PMs.

Hank



Posted By: HankR
Date Posted: 29 March 2016 at 6:44pm

MicroBlocks wrote:

This is what i got so far:





You are so very good at doing PCB designs, please upload to TBS or email to me the complete set of files including Gerbers. I just sent you my direct email, so thanks for making some room in your PM to allow that.

This design is fine by me as it stands, even if I have to do a trace cut or two, and twist some transistor leads.

Of course even better if you can update to Lew's latest stable design.

Hank



Posted By: lew247
Date Posted: 30 March 2016 at 2:37pm

Just to keep this thread updated:
I've finished the design for the indoor unit.
I won't post the the circuit here yet, I'll wait till I have the boards in my hand and get them made up so I can check they do work properly.

When I've finished and happy both boards work properly as designed, I'll post the complete project, circuits, board design, gerbers and so on.

Hopefully someone will want to make one as well and "Hopefully" some people will want to try and write better software than I am capable of, or at least tidy it up, or add new features.

I've made 2 indoor unit
1 to fit on the back of a 7" SDD1963 touchscreen LCD display that should fit perfectly (hopefully)
The 2nd is on a smaller board 75 X 75 that will still plug into the header used on the SDD1963 touchscreen display but is smaller and will fit the smaller versions of the display.

Although you can't tell from the picture, the larger board will mount on the back of the 7" display.

I've used a mini usb socket on the smaller one, but on the larger it's a header as I have several micro usb sockets that are on a small board with a header and they will just plug in.

ALL the connections on the boards are standard 0.1" (2.554mm) pitch so any kind of header, screw terminal, molex or whatever you want with that pitch can be used

Ignore the headers in the picture - only for show - anything can be used.

On the indoor unit, I have an LDR to dim the display at night,
DS3231 RTC
W25Q64 Serial Flash
ESP8266 WiFi module upload weather to Wunderground or other/download bmp of the cloud conditions? lots of options with this module
HC-12 433Mhz module
Console and ICSP headers
USB input and 5V input
Buzzer module (touchscreen beep?)
DS18B20 Temp module
and of course a Pic32MX470 64 pin Micromite (once programmed)
I don't think I've forgotten anything but if I have .. I'#ll come back to it after











Posted By: lew247
Date Posted: 05 April 2016 at 9:15am

The outdoor board has arrived from China, and the LCD unit board should arrive Friday I hope.
As you can see I'm VERY inexperienced using Diptrace or any circuit making program, this was my first board and I made some obvious errors.

1. The mounting holes are too small (I forgot to specify the hole size DUH!)
2. The tracks should be made wider where it's possible to do so, I did make the power lines thicker than the rest but maybe they should be thicker still, not sure as its only a few mA going through them at any one time and a maximum of 500mA and only for a few seconds at a time so they should be fine anyway.
3. One of the sensors has the silkscreen writing the wrong way round on 2 pins.

I guess not too many errors seeing it was my first board, so I'm reasonably happy.

The silkscreen error is already fixed in the Gerber files and I'll sort the rest of the problems out later.
I've also changed the silkscreen so it shows the value of each component as well.

Once the LCD unit board has arrived I can see about getting the components mounted and getting testing the software.




Posted By: bigmik
Date Posted: 05 April 2016 at 9:21am

Congratulations Lewis,

Looks pretty good. and quick off the mark..

Did you ever check your power control circuit? I think it will work but I havent yet tried it out in the flesh..

Regards,

Mick





-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 05 April 2016 at 11:16am

Nope, I've no way of actually testing it until I get the unit put together as my Micromite+ blew it's PSU when I tried using too many modules at once and I don't have any other working Micromite here at the moment.
The fault with the silkscreen is annoying, the Si1145 has the +V and Gnd reversed, not a major problem but it's annoying.
I've tested every trace with a meter and they all go to where they are meant to so it's looking hopeful.

The one thing that surprised me is how SMALL the board is
50 X 50 sounds a reasonable size but it's th same size as the tip of my middle finger to the 2nd knuckle



Posted By: bigmik
Date Posted: 05 April 2016 at 12:05pm

@Lew,

No big deal, just print out onto a sticker with the right size font and stick it over the incorrect overlay..

Maybe even DYMO tape will be ok.

Regards,

Mick


-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 10 April 2016 at 5:12pm

Just to keep this updated - again.
The LCD boards arrived from China
No silkscreen problems and everything was where it was meant to be but unfortunately there was a problem in the circuit which I never spotted.
Also the pinouts for some of the modules were wrong, both on this and the outdoor unit.
I've corrected the mistakes in the circuit, I'm going to get the board made up and "wire" the corrections - will look a bit messy but as this will only be for me it's not a problem really
And I'll be able to test the complete circuit properly.
I've also added a 3rd board which does something else - but I'll leave saying what that is until I get these two working properly first.



Posted By: Phil23
Date Posted: 10 April 2016 at 9:01pm

bigmik wrote:
Hi Lew,

Are you hoping to do this as a commercial product or is it a small project for yourself? If commercial, then I will ask some form of payment (modest to small) or if you wish to make the whole thing public including the code I will do the board and make the artwork available for all to use..


Regards,

Mick


Sounds interesting.

Are you considering making it interface with http://sandaysoft.com/products/cumulus - Cumulus?

Would certainly be interested in offering a small donation for a project like this.

Something of the magnitude of a sensor or two to help development.
Maybe to help incorporate Air pressure & solar irradiance.

My old Jaycar https://www.wunderground.com/personal-weather-station/dashboard?ID=INSWINVE2 - Weather Station is getting a bit sad.

Cheers


Edit:-

Should have read the entire thread before posting...
Misread the start date by a month....



Posted By: bigmik
Date Posted: 11 April 2016 at 6:23am

Hi Lew,

lew247 wrote:

Due to problems with the switching of the transistor I've had to modify the circuit

I'm informed this should work perfectly now





I tested the above circuit and can confirm that it works perfectly.. There is also, as Hank stated, no need for the 10k pull-up resistor.

I used a MuP to power another MuP that was driving my Mik-Matrix panel with 5 LED matrix panels.

With the IO pin set high the second MuP was powered off with the IO pin set low the second MuP powered up..

Using one of those cheap modules that plugs inline on the USB port that measures current shows no detectable difference in current draw with the second MuP connected and off than if it was disconnected.. The LED also illuminates with about 3/4 optimal intensity when on and totally off when off.

Considering the simplicity of that circuit I can recommend it to be put in the circuit bank if we have one..

The LED is the secret to this working, I used a standard GREEN one and results may vary with blue or white ones due to the higher forward voltage which may stop the circuit from working effectively..

Regards,

Mick

PS...

There was about 0.22v drop across the transistor.. Of course higher current draw would need an appropriate transistor to be used.

Mik

-------------
Mick's uMite Stuff can be found http://www.dontronics.com/micks-mite/files/ - HERE




Posted By: lew247
Date Posted: 11 April 2016 at 6:50am

Phil23 wrote:

Are you considering making it interface with http://sandaysoft.com/products/cumulus - Cumulus?


Phil23
I'd not heard of that before you posted it, it looks like a really nice software package.
I don't know the format that the software is expecting - maybe someone else knows?
BUT the indoor unit has a wifi interface so you can communicate with a web page and it has a usb interface so you can connect it to the computer.

IF someone knows how the Cumulus works, ie how it gets the data and in what format, it shouldn't be too hard to incorporate I wouldn't think.

By the way - it already incorporates Lux and UV Index sensors

Thanks Mick, I'm "hoping" to have the boards built up in the next week or two so I'll be able to carry on and get all this working
Then it's the hard bit - getting all the software working like I envisage, although hopefully it won't be too hard thanks to all the helpful people on here and especially matherp who has solved the problem I had with the analog clock I wanted on the screen.



Posted By: spjoruss
Date Posted: 12 April 2016 at 2:51am

I have been reading this whole thread with interest. I have always wanted to build my own weather station but it may never happen. I would be starting at ground level. Both with circuits and programming.

I started out with a cheap Fine Offset type of weather station. After it started failing I got one that a fellow in Canada designed made with micro controllers.

I have been using Cumulus1 for about 3 years which runs on Windows only. It works with these Fine Offset type of stations and a few others also. The developer of Cumulus has now created a new version CumulusMX which will run on Windows or Linux.

The station that the fellow in Canada made was designed especially to work with Cumulus. He emulated a Fine Offset station using protocols that some others had reverse engineered.

There is another way to access Cumulus with a Easyweather.dat file but that is a very limited way.

When you get this thing operating and I see how it works I might be interested in buying one from you. My preference has always been to keep using CumulusMX though.

Here are some links to the above information.

http://sandaysoft.com/forum/viewforum.php?f=27&sid=ef081f358106907aaf3734a1ff98cc38 - CumulusMX

http://www.jim-easterbrook.me.uk/weather/mm/ - Fine Offset Protocol

http://wiki.sandaysoft.com/a/Fineoffset_Memory_Map - More info on Fine Offset Protocol

http://www.jim-easterbrook.me.uk/weather/ew/ - Easyweather.dat


Sperry



Posted By: lew247
Date Posted: 13 April 2016 at 10:57am

Whoever said designing circuits is easy?
It's really hard to get it all right, I've discovered it takes several goes to get things right.
My last effort although correct and would have worked fine has had to be redone because the pins on the esp8266 module was upside down.
It would work find mounted under the pcb but I like to get things right so I've redone it.
I keep finding small things wrong, and have modified the outdoor circuit 28 times now.
It will go right in the end




Posted By: lew247
Date Posted: 30 May 2016 at 6:04pm

An update on this.

I first of all made the boards 50mm X 50mm and they were way too small to solder to properly, let alone have the connectors mounted on properly

I then had the outdoor unit made up as a 75mm X 50mm unit and it seemed all good

Whitewizzard soldered the smd components for me and tested it to make sure it worked and all was good at first.

However when I tried fitting the actual modules to the board I discovered to my horror how stupid I was

The modules will not physically fit on the board, so my only option is to either get yet another board made up a bit bigger this time (99mm X 75mm)
or
Use it "ugly fashion" with the modules not plugged into the board but connected with jumper wires.

I wanted this to be neat and tidy with all the modules plugging into one board so it looks like I'm about to get some more boards made up (again - 4th set!!!)

The LCD board is great apart from I have the same problem with the RTC module, it will not physically fit where I have the socket mounted.

I also made some changes to the board after I had them sent to the PCB house, and Whitewizzard very kindly soldered jumper wires onto the chip to make them work.

I am considering getting the LCD module boards redone as well, with the module headers in the correct place this time so they actually plug in and work, and with no wire jumpers.

Going to be another 3-4 weeks before this is finished


Here's the outdoor unit PLEASE NOTE THE HEADERS ARE NOT SOLDERED that's why they look "crooked"

The ESP8266 on the outdoor unit is there so I can program it remotely, if better code comes along after I've mounted it outside I can update it remotely, It's connected to the console header




Here's how the new one "should look" (simulated pic) and Ive also changed the header sizing on the top row of headers to 3.5mm spacing instead of 2.54 and planning on using screw terminals and the same for the power connector.






Print Page | Close Window

Powered by Web Wiz Forums version 7.8 - http://www.webwizforums.com
Copyright ©2001-2004 Web Wiz Guide - http://www.webwizguide.info