Jump to content

My electronics and/or Arduino projects.


Klaynos

Recommended Posts

I'm hoping to get some input, ideas and views on my ongoing projects. I'm also hoping that some of this might inspire some similar threads in this area. If more than one of these becomes a talking point I'll (or I'll ask another mod so I'm not involved) to split the topics. 

Project 1 - the parking sensor

(On mobile so no diagrams I'm afraid)

The idea was to use a set of ultrasonic distance sensors to perfectly park my car in my garage every time. My car only just fitted. 

The plan was to have a forward facing sensor, and angled sensor just inside the door to ensure initial line up. Then sideways pointed sensors every few inches to maintain distance from the edge of the tyre. Finally sensors at the end to get the distance I need to drive in correctly. 

A set of around 5 sensors would be attached to an arduino micro which would control a set of LEDs red (too close), amber (too far) and green. 

It's all be powered off of a 12v battery. 

I started by buying a few sensors and building a calibration rig. I'd get a distance readout in nearly real time for any sensor plugged in. There was then set distances at which a block could be placed. I ran this calibration for a set of sensors and plotted curves for each. I was surprised by how good they were between 5 cm and 50 cm, consistent and linear. So I needed to set up my system so that was the distances I'd be using. 

I then built a proof of concept with 5 sensors and a breadboard led set up. All held in place with gaffa tape. It worked! Great. 

Unfortunately by this point I'd planned phase 2 which would use a servo at the door with a sensor to track the front of the car in and then I got too good at parking without the kit and replaced my car with something that won't fit any more... Oh well...

Link to comment
Share on other sites

Some years ago, I visited my (rich) uncle who had a large garage.

I noticed some medicine bottles hanging by strings from the roof joists.

 

Upon enquiry I learned that it was his high tech solution to his problem.

Each bottle represented the exact position his car, my aunt's car and my cousin's car needed to be in o fit in the garage.
So each car was driven in until the bottle just touched the windscreen at the correct point in relation to the drivers mirror.
Also easy to reset for a different car.

You could substitute a soft weighted bag.

Link to comment
Share on other sites

9 hours ago, studiot said:

Some years ago, I visited my (rich) uncle who had a large garage.

I noticed some medicine bottles hanging by strings from the roof joists.

 

Upon enquiry I learned that it was his high tech solution to his problem.

Each bottle represented the exact position his car, my aunt's car and my cousin's car needed to be in o fit in the garage.
So each car was driven in until the bottle just touched the windscreen at the correct point in relation to the drivers mirror.
Also easy to reset for a different car.

You could substitute a soft weighted bag.

I was aware of this. But where's the fun and challenge? 

Link to comment
Share on other sites

56 minutes ago, Klaynos said:

I was aware of this. But where's the fun and challenge? 

I have it on good authority (bimbo36 in your more science thread) that religion is more fun than science or the technologically best solutions, which are apparently not fun.

:)

Edited by studiot
Link to comment
Share on other sites

Ideas for new future projects:

1) solar panel, connect to Arduino current and voltage meters, so you will be able to calculate power. Digitalize readings and send to computer database with date and time (through wifi?). Computer application will draw graph power versus time per day, couple days/weeks/months/years, so you will be able to compare them what power you can get in different seasons. Calculate total energy produced by installation. Host it somewhere, so you will be able to check any data at any time from smartphone from web browser.

2) extension to the above, add vertical and horizontal servos to be able to rotate in two axes entire solar panel. It'll be periodically adjusted by computer to find the best possible alignment to have the largest power. Compare results with fixed alignment.

 

Link to comment
Share on other sites

On 08/08/2017 at 9:44 AM, Sensei said:

Ideas for new future projects:

1) solar panel, connect to Arduino current and voltage meters, so you will be able to calculate power. Digitalize readings and send to computer database with date and time (through wifi?). 

It's funny you should say that. This wasn't going to be the second one I posted but...

Project 2 - the meteorology instruments

I wanted to answer the question of "do I need to drive my wife's car?"

I have a Stevenson screen (this is news, last winter with the first installation I had only an unvented clear plastic box). I have 3 one wire temperature sensors, one in the screen, one on grass and one on concrete. In the screen I also have a dht22 for humidity (and another air temperature). 

When the 3 one wire temperature probes are all together they give readings that are one reporting level of each other (0.06 K). 

The 3 temperatures and humidity let me calculate a few/frost point temperature and see how different surfaces are likely to frost over. 

The sensors plug into a wemos D1 mini which is an esp8265 breakout board. This is a microprocessor with onboard WiFi and a PCB antenna. The data is sent via http to a web service which collects the data. On different parameter thresholds the system should tweet but this has never properly worked. 

The frequency of measurements depends on the values measured from every 12 hours when it's warm and dry to every 5 minutes. Between measurements it's in a super deep sleep to save power. 

It's powered from a 3.7 V lithium ion battery. I have a modified (else on I loose energy to back currents in the solar panel) charge controller with a 5 V solar panel plugged in. 

This is my most complete and actually used for purpose project. Between November last year until now it has had the solar and controller added, the screen added and some general upkeep but the code is pretty much as was. 

I'm not monitoring the energy in the battery or from the solar panel but I'm considering it in the future. 

Link to comment
Share on other sites

47 minutes ago, Klaynos said:

The data is sent via http to a web service which collects the data. On different parameter thresholds the system should tweet but this has never properly worked.

If you don't bother about security, it can be implemented as series of HTTP GET /index.php requests,

just periodically visit page http://url/index.php?t1=[....]&t2=[....]

Then in index.php have code

<?php
	 $t1 = $_GET[ 't1' ]; $t2 = $_GET[ 't2' ];
	 file_put_contents( "data.txt", file_get_contents( "data.txt" ) . "\r\n" . t1 . " " . t2 );
	// the easiest implementation of append new row of data at the end of txt file..
	// you need to start with empty data.txt AFAIR to not throw warning at first launch or so
	 ?>

http://php.net/manual/en/function.file-put-contents.php

http://php.net/manual/en/function.file-get-contents.php

If this will be working, and you will have free time, implement proper MySQL database.

Edited by Sensei
Link to comment
Share on other sites

47 minutes ago, Sensei said:

If you don't bother about security, it can be implemented as series of HTTP GET /index.php requests,

just periodically visit page http://url/index.php?t1=[....]&t2=[....]

Then in index.php have code


<?php
	 $t1 = $_GET[ 't1' ]; $t2 = $_GET[ 't2' ];
	 file_put_contents( "data.txt", file_get_contents( "data.txt" ) . "\r\n" . t1 . " " . t2 );
	// the easiest implementation of append new row of data at the end of txt file..
	// you need to start with empty data.txt AFAIR to not throw warning at first launch or so
	 ?>

http://php.net/manual/en/function.file-put-contents.php

http://php.net/manual/en/function.file-get-contents.php

If this will be working, and you will have free time, implement proper MySQL database.

I have something running on a raspberry pi to do that. I don't use it though. I use a free service from thingspeak. They've got done nice tools and you can run MATLAB code on the data as it arrives etc... It's pretty nicely done. 

Link to comment
Share on other sites

1 hour ago, Klaynos said:

I have something running on a raspberry pi to do that. I don't use it though. I use a free service from thingspeak. They've got done nice tools and you can run MATLAB code on the data as it arrives etc... It's pretty nicely done. 

So what did you mean by " the system should tweet but this has never properly worked. "... ?

 

Link to comment
Share on other sites

13 minutes ago, Sensei said:

So what did you mean by " the system should tweet but this has never properly worked. "... ?

 

I have a bit of MATLAB and a thingspeak app that is supposed to put up Twitter messages when frost is likely. It's never done it though. I'm not sure if it's a setting or code problem but I've never actually investigated other than noteing it didn't work. Prefer checking the graphs. 

Link to comment
Share on other sites

10 minutes ago, Klaynos said:

I have a bit of MATLAB and a thingspeak app that is supposed to put up Twitter messages when frost is likely. It's never done it though. I'm not sure if it's a setting or code problem but I've never actually investigated other than noteing it didn't work. Prefer checking the graphs. 

If it would work, you would be flooded by tweets, one every couple minutes (or seconds)..

Better would be Android/iOS application, which would periodically, say once per 10-15 seconds visiting website (hosted on your web server), where is PHP script drawing graph to custom made PNG file..

Or normal Android/iOS web browser, and PHP script would generate automatically refreshing web page, with custom dynamic PNG file with graph.

https://www.w3schools.com/Tags/att_meta_http_equiv.asp

 

Dynamic PNG image generated by PHP script:

http://php.net/manual/en/image.examples-png.php

Edited by Sensei
Link to comment
Share on other sites

The code is cleverer than that so it would only tweet when the situation is frost likely every few hours. 

Generating graphs is pretty easy. 

I wanted to avoid any new apps especially ones that would do things frequently as most of the year and even most of the winter there is no chance of a frost.

I did consider a wireless link with a receiver which would change led colours based on the situation but decided graphs would be nicer. 

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.