Raspberry Pi project

Author
Discussion

J4CKO

Original Poster:

41,676 posts

201 months

Saturday 21st January 2017
quotequote all
Purity14 said:
Personally, Id use an arduino for that.
Id get a small lcd display for an in situ output.
Or add an ethernet shield and get a webserver online.
I took your advice, ordered an Arduino Uno last night, arrived at lunch time !

Got it set up and just done the LED blink programme so made a modest start, still waiting for the temp sensors.

I kind of like the simplicity of the Arduino

TonyRPH

12,978 posts

169 months

Sunday 22nd January 2017
quotequote all
ash73 said:
I've been playing with a breadboard simulator while waiting for my kit to arrive, probably saved me a lot in blown LEDs! Here's my first relay circuit after a lot of trial and error.



https://circuits.io/
What is the small black device to the top right?

It looks like it should be a 3 terminal voltage regulator, however one terminal appears to not be connected?

Therefore I'm a bit puzzled as to how your circuit is deriving 3.3v.

Also, when driving relays from a transistor (I know you're not doing this in your circuit) you will need a reverse biased diode across the coil to capture back EMF, or else said EMF will quickly destroy a transistor.


J4CKO

Original Poster:

41,676 posts

201 months

Tuesday 24th January 2017
quotequote all
Going to order the rest of the bits soon, so setting the scope of what I want to do, using this as my brain dump for future reference.

Arduino to monitor Tank Temperature and PH.

To Switch Lights on and off on a timed basis

Alert me if Temp or PH goes out of bounds via a text

Upload data to a webpage

I would like the Arduino to be powers off the mains but with a battery back up, not sure how that would work with the alerting aspect, as log as it could send an SMS.

Got the Arduino,
Temp probes on the way
research PH monitoring

Need,

Battery back up method
Possibly a Real Time Clock but can get the time from the Network with a Ethernet Shield ?
GSM Sheild, hopefully combined with Ethernet
Display for the temp/Ph
Some veroboard
A bigger Breadboard
Pack of resistors
















J4CKO

Original Poster:

41,676 posts

201 months

Tuesday 24th January 2017
quotequote all
ash73 said:
Don't forget the 4.7kOhm resistor for the temp sensor.
Yeah, will get a job lot and make sure it has that value in, need to remember how to read the values off them again.

Might get a new soldering iron kit, mine is crap, any suggestions ?

J4CKO

Original Poster:

41,676 posts

201 months

Tuesday 24th January 2017
quotequote all
ash73 said:
Don't forget the 4.7kOhm resistor for the temp sensor.
Yeah, will get a job lot and make sure it has that value in, need to remember how to read the values off them again.

Might get a new soldering iron kit, mine is crap, any suggestions ?

TonyRPH

12,978 posts

169 months

Wednesday 25th January 2017
quotequote all
@J4CKO

Just to give you a little Arduino inspiration smile


J4CKO

Original Poster:

41,676 posts

201 months

Wednesday 25th January 2017
quotequote all
TonyRPH said:
@J4CKO

Just to give you a little Arduino inspiration smile

Oo, whats it doing ?

TonyRPH

12,978 posts

169 months

Wednesday 25th January 2017
quotequote all
J4CKO said:
Oo, whats it doing ?
It's a DDS (Direct Digital Synthesis) signal generator using an AD9850 chip / module.

It generated sine waves / square waves 1Hz to 40mHz.

More details here

I'm glad there are so many useful examples on the internet, because I wouldn't have had a clue where to start!

I also stumbled across this temperature monitor which is what I think you're wanting to do?

J4CKO

Original Poster:

41,676 posts

201 months

Friday 27th January 2017
quotequote all
TonyRPH said:
J4CKO said:
Oo, whats it doing ?
It's a DDS (Direct Digital Synthesis) signal generator using an AD9850 chip / module.

It generated sine waves / square waves 1Hz to 40mHz.

More details here

I'm glad there are so many useful examples on the internet, because I wouldn't have had a clue where to start!

I also stumbled across this temperature monitor which is what I think you're wanting to do?
At the risk of sounding like the cat from Red Dwarf "But what is it ? "


My temp sensors have finally arrived, going to make a list and order the rest of the gubbins over the weekend, just been paid !

J4CKO

Original Poster:

41,676 posts

201 months

Sunday 29th January 2017
quotequote all
Stuff ordered,

2 mains relays (yeah I know, be careful)
Stater kit, full of all sorts of useful bits
Power lead, instead of the usb for power
Resistors, need a 2700 ohm pull up and not got any so not been able to try the sensors yet.

Will worry about comms side when I have it sensing and displaying temps and controlling the lights, though not sure how to do timings of the lights as it doesnt have a RTC


Zad

12,708 posts

237 months

Sunday 29th January 2017
quotequote all
Pull up / down resistor values aren't usually critical, anything from 1k to 1M will probably do the job.

When using a relay: Don't forget to put a reverse biased diode (i.e. a diode facing the opposite way to the current flow) across any relay coil. The reason is that when you remove the power from a coil, the magnetic field collapses and induces a huge reverse voltage across it. Unsurprisingly, delicate little semiconductors don't like this and they can fry the input/output pretty quickly. The reverse biased diode essentially shorts out the spike. I/O does have protection diodes built in, but they are pretty weedy and can get damaged themselves.

A DDS is basically a programmable oscillator or tone generator. These go way beyond the audible range, you use them for whatever you want really. Very popular for testing audio circuits etc.

Maybe its just me, but I find those visual circuit design things really difficult to understand. If you are getting into electronics, then I'd really recommend drawing it out as a schematic diagram first, then transfer it to breadboard.

A couple of tips for learning to solder: First, use lead/tin solder with a flux core, not the lead free. That's horrible stuff, especially when learning the craft. Secondly, choose a soldering iron with a chisel tip, not a pointy one.

ETA: So long as the RaspPi is connected to the internet, it can grab the time from an online time server. Not sure how accurate the onboard timing will be though. RTC boards don't cost much though.

Edited by Zad on Sunday 29th January 18:56

J4CKO

Original Poster:

41,676 posts

201 months

Sunday 29th January 2017
quotequote all
Zad, Am using an Arduino at this point, may still use the Pi, not sure, will get trying stuff when its here.

I am not too bad at soldering, used to work in an electronics place so got taught and got lots of hands on, still do the odd bit, key thing was always a good iron, most are crap.

J4CKO

Original Poster:

41,676 posts

201 months

Wednesday 1st February 2017
quotequote all
Progress, well for me it was,

Got all the bits arrive so after a bit of faffing about got the LCD screen reading "Hello World !" with a counting timer, seconds since restart, as per one of the Arduino demos.

My soldering skills and kit arent great, but manage to get 16 header pins on the display, tomorrow nigth I will endeavour to get the temp probe up and running and displaying the temperature.

spants

1,053 posts

228 months

Wednesday 1st February 2017
quotequote all
If you are looking at Ardunios - try an ESP8266 instead.

Faster, built in wifi and can use Arduino code and IDE to program it.
For simple applications, you can upload ESPEASY code. This code is web configured, supports lots of sensors.

For controlling stuff (and dashboards) look at Node Red (runs on Pi etc). There are lots of web services that are free/cheap including IBM Watson Bluemix.
Search for "bluemix recipes" and pi/arduino/esp8266 or whatever. Bluemix is free for 30days then needs a credit card (but most items have a free tier that home users should stay under!).

(Disclaimer - I work for Big Blue)

TonyRPH

12,978 posts

169 months

Thursday 2nd February 2017
quotequote all
ash73 said:
Pimoroni have the Pi Zero in stock, if anyone's interested.
Pi is so yesterday. spin

The $9 C.H.I.P. is where it's at!

Here's a video review

And a video comparing the two Pi Zero vs Chip (the C.H.I.P lost on video playback)




SystemParanoia

14,343 posts

199 months

Thursday 2nd February 2017
quotequote all
postage.

Pi zero is far cheaper when you include the postage. USA vs Wales somewhere.

J4CKO

Original Poster:

41,676 posts

201 months

Thursday 2nd February 2017
quotequote all
spants said:
If you are looking at Ardunios - try an ESP8266 instead.

Faster, built in wifi and can use Arduino code and IDE to program it.
For simple applications, you can upload ESPEASY code. This code is web configured, supports lots of sensors.

For controlling stuff (and dashboards) look at Node Red (runs on Pi etc). There are lots of web services that are free/cheap including IBM Watson Bluemix.
Search for "bluemix recipes" and pi/arduino/esp8266 or whatever. Bluemix is free for 30days then needs a credit card (but most items have a free tier that home users should stay under!).

(Disclaimer - I work for Big Blue)
Will have a look, dont think faster is a consideration for monitoring Tropical Fish but the wifi may be useful if the board is cheaper than buying an Ethernet shield.

Got the temp sensor reading.


Ordered a soldering station from Amazon and some new solder/tips, gets a decent review and should be tonnes better than the old thing I have.

So have ticked off

Temp Sensor reading
Updating the display,

Now need to put those together,

Get it so it can text me, alert for low/high temp/loss of mains power
Set it up with a battery back up
Set up the relays to do the lights
Work out how to time/override the lights

Then package it all up and make it resillient and relaible, got some veroboard coming to make the circuits permanent.

J4CKO

Original Poster:

41,676 posts

201 months

Thursday 2nd February 2017
quotequote all
ash73 said:
TonyRPH said:
And a video comparing the two Pi Zero vs Chip (the C.H.I.P lost on video playback)
No HDMI? Still, at £10 who cares just buy both and have a play. I ordered an Arduino as it has analogue inputs, I may use it to do all the interfacing; seems a good way to protect the Pi.

OP sounds like you're making good progress!
Yeah, cheers, there was just enough agro to make it a little challenging, but not enough to put me off.

Crafty_

13,299 posts

201 months

Thursday 2nd February 2017
quotequote all

Rather than using the dot matrix screens for display does anyone know of something that lets you build "dashboards" - maybe just a number in a big font or a circle graph (vaguely like an instrument gauge).

I'm starting to plan out a little project that will have constant data (probably 1Hz) that I want to display - needs to be locally hosted as the device will be offline, so I can't use one of the data dashboard services that you push data to and they do all the clever display stuff.

weeboot

1,063 posts

100 months

Friday 3rd February 2017
quotequote all
Ordered a Sense Hat for tinkering.

I've been wanting to have a play with thermometer input and was on the verge of ordering some kit to do that, but then realised that the Sense Hat has so much more potential for play, and a pre-built library, so that's apparently been delivered today (although how Amazon have handed it to the resident, when I'm in the office, I've no idea!)