Arduino beginner

Discussion in 'Electronics & Electrics' started by Agg, Jan 7, 2017.

  1. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    572
    Location:
    Newcastle, NSW, Australia
    The absolute biggest motivation for me was getting a 3D printer. Finally being able to print enclosures around my electronics projects, not to mention stuff like servo horns for tiny custom laser pointer turrets :D has been such a useful addition to my workshop.

    I started from a $200 kit from Aliexpress, i've probably spent about AU$400 on it all up now, including about 10kg of filament.

    Random pics of my printer and some produce:

    http://imgur.com/a/M5xb1
    http://imgur.com/a/KZjf0
     
  2. oculi

    oculi Member

    Joined:
    Aug 18, 2004
    Messages:
    9,000
    i'll have to keep these in mind, was wondering why they need so many inputs but it makes sense due to the way they are interfaced, and they do current feedback which is useful.

    dumb question but is the 0.96" OLED colour?
     
  3. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    572
    Location:
    Newcastle, NSW, Australia
    Not at all a dumb question, the standard screens are basically single color, available in white, blue, or a combination yellow/blue display where the top 12 pixels or such are yellow, the rest blue.

    There are color versions available too tho, search "OLED 65k" on aliexpress or such, they cost around US$10 each last I checked, so not as cheap, but still quite nice.

    I can also highly recommend the 2.8" SPI Touch LCD modules, I used one in my motor controller example video, and provide links to the exact module I use in the description there, but they're fairly common, about AU$10 each, provide plenty of screen space for UI, and provide simple resistive touch, which while not being as sexy as capacitive touch input, is simpler to work with in your projects, and can be used with gloves on or such, so makes for a better appliance interface.

    For more specific displays, buydisplay seems to be a nifty source with a wide variety of shapes & sizes of monochome and color, lcd and oled displays, at decent prices.
     
  4. azzachaz

    azzachaz Member

    Joined:
    Nov 5, 2003
    Messages:
    1,463
    Location:
    Canberra
    Viper, you the real MVP.

    I'm looking to start my first project but would like some advice.

    I want to build a wifi camera that I can put anywhere in the house. Eventually I want to interface it with the internet so I can retrieve an image.

    What hardware would you suggest starting out with?
    From what you have posted I was interested in using a D1 mini (ESP8266) and a OV7670 camera module. Just not sure what other stuff I need (and haven't thought of) to get started.

    I wouldn't mind getting a 'Arduino Starter pack' to get started but I feel like there would be heaps of bits I would never use, and i'm more motivated to build something I have thought of rather than the basic stuff.
     
  5. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    4,466
    Location:
    4109
  6. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    572
    Location:
    Newcastle, NSW, Australia
    Two main ways to go about this one, the way you suggested will work great, and is easily combined with services such as pushingbox.com to provide push notifications to your phone / desktop, including the latest photo. You shouldn't really need anything else beyond a USB phone charger / power supply to run it from.

    The alternative is a step up in functionality - microcontrollers are great, but when you start talking about high quality images, or worse yet video, they can start to feel a little cramped. I'd likely be considering a cheap pi board, running linux, using "motion" to provide motion triggered alerts, record stills and video, and provide live network camera streams. For this you can use one of the boards available with native camera, or a simple USB webcam.

    All in one solution with camera & wifi: https://www.aliexpress.com/item/Ora...h-wide-angle-lens-for-Orange/32663940765.html

    USB Camera: https://www.aliexpress.com/item/Bla...-30-Mega-Pixel-Webcam-Camera/32673429029.html

    Super cheap WiFi pi: https://www.aliexpress.com/item/New...nt-board-beyond-Raspberry-Pi/32760774493.html

    More powerful ethernet equivalent: http://www.friendlyarm.com/index.php?route=product/product&product_id=132

    I should note, either of the Orange Pi solutions will require a special power cable, they wont accept power over micro usb. https://www.aliexpress.com/item/NEW...-Plug-DC-Charging-Cable-With/32581161944.html, however the nanopi from friendlyarm will run from a regular micro usb charger cable, like the D1 mini.


    An added little bonus, just in case you want to take it further, this would also work with any of the solutions discussed. Pan & tilt control for $4?

    Pan & Tilt camera mounting kit: https://www.aliexpress.com/item/Ser...Aircraft-FPV-dedicated-nylon/32544952286.html

    Servos for mounting kit: https://www.aliexpress.com/item/1PC...licopter-plane-boat-car-MG90/32673542105.html
     
    Last edited: Jan 9, 2017
  7. ViPeR-7

    ViPeR-7 Member

    Joined:
    Jun 28, 2001
    Messages:
    572
    Location:
    Newcastle, NSW, Australia
    Any of the platforms discussed will work fine there. I'd probably go for an ATTiny85, or even just an Arduino Uno, just for the sake of keeping it simple.

    You can use ultrasonic ranging: https://www.aliexpress.com/item/Fre...e-Measuring-Transducer-Sensor/1979768585.html

    or laser ranging: https://www.aliexpress.com/item/DIY...Module-6-pins-for-Arduino-BY/32770569783.html

    For ultrasonics, I would suggest more than one input for safety - in building a system like this, you really don't want a bit of dust covering the sensor to create an accident, just because the driver expected your system to work and it didn't. For the ultrasonic modules, a blocked sensor is the same as no object being in range to reflect sound. The laser ranging modules don't suffer from this, and will see an obstruction of the sensor as an obstacle, so produce a constant alert, letting you know to clean the sensor.

    As for the output, i'm not sure a speaker/buzzer/horn is really the best approach for an external sensor - it would need to be loud enough to hear inside the car, but not loud enough to annoy the whole house/neighbourhood.

    I'd suggest perhaps something different instead, how about a visual indication? https://www.aliexpress.com/item/1m-...ck-White-PCB-30-60-144-leds-m/2036819167.html

    You could put those on the back wall, and make them flash, change color, etc as they get closer - that way the information is right in their face, and you can have some fun playing with the individually addressable RGB lights :)

    This stuff is basically lego these days, just grab the modules you need for your project to provide the features/functionality you want, some wires to link em together, and follow tutorials to write some basic code, using high level libraries to glue the modules together in the way you want.
     
    Last edited: Jan 9, 2017
  8. RobRoySyd

    RobRoySyd Member

    Joined:
    Jan 24, 2008
    Messages:
    7,751
    Location:
    Sydney
    Couldn't agree more.

    I had an Arduino for a few years, did much of the usual and quickly got bored.

    Then I was handed a problem and I set out to provide a solution using an Arduino. Seemed simple enough, a box with 4 pots to control 4 lights via DMX. The standard DMX library is broken and figuring out how to deal with the 1 bit dither from the ADC really stained the brain. I'm now into a project that uses a different serial protocol, LANC. If I get any more like this I'll definitely be investing in a DSO.

    I suspect a lot of people move on from the Arduino to something with more grunt without ever looking under the hood of the Arduino. It gets pretty intense and very frustrating as there's a lot of well intentioned but dud advice to be found.
     
  9. oculi

    oculi Member

    Joined:
    Aug 18, 2004
    Messages:
    9,000
    Hang a ball from the ceiling with some string so it touches the windscreen when the car is in far enough or glue some 90 x 45 to the floor so the front wheel touches it when the car is in the right spot.
     
  10. PabloEscobar

    PabloEscobar Member

    Joined:
    Jan 28, 2008
    Messages:
    9,910
    I'm playing with a string of WS2811 RGB Lights at the moment.

    The Libraries make it so easy, I was actually hoping to learn more about serial data protocols, and timings and things... But when the libraries let you do so much, so quickly... I feel like reinventing the wheel is wasted time.
     
  11. azzachaz

    azzachaz Member

    Joined:
    Nov 5, 2003
    Messages:
    1,463
    Location:
    Canberra
    Thanks Viper. I appreciate the time you've taken.

    Just getting started, I found this: https://circuits.io/
    It allows you to simulate your circuits including Arduino devices. I've been using it to go through the https://www.arduino.cc 'built in' tutorials before my parts arrive in the mail.
     
  12. Amran

    Amran Member

    Joined:
    Jul 4, 2001
    Messages:
    1,530
    Location:
    Wagga
    Welcome Agg! These Arduino devices are pretty cool bits of kit. Just a few comments based on what I read here and my personal experience.

    First off, it's hard to build an Arduino project without a use for it. I think of them as solutions, without a problem they are kinda useless. So I had a problem a few weeks ago in that I needed to know how much water is in my rainwater tank. Now I have a solution to that, an U/S sensor and radio link back to my PC using 2 Arduinos. For those who may be curious, I have no goddamn water... but moving on.

    You've done this, but I'd recommend people buy a kit. When I started out, I just went to Jaycar and bought some resisters, diodes, switches etc but I never had the stuff I really needed whenever I went to build something.

    I spend a lot of time checking out the Adafruit website. They are expensive but it's a beautiful site, lots of information and tutorials, very passionate about "making". I actually buy a fair bit of gear from the Aussie's at Core Electronics, they carry Adafruit and Sparkfun. Also, as a few other people have said, stock up on lots of cheap Chinese gear - just be prepared to wait a while for it to arrive. If you are doing a weekend project and really need a bit of gear, Jaycar carry some Arduino stuff which works in a pinch. BTW, I find the Freetronics stuff at Jaycar quite overpriced as they didn't have any competition in Oz at first. Jaycar now also carry DuinoTech which is much more reasonable although they obviously can't compete with the Chinese stuff on price.

    When I started, I spent hours on Youtube getting schooled by Jeremy Blum. I found he has just the right level of detail, explaining electrical concepts without getting too deep etc, YMMV.

    There is heaps of info on the internet for just about every Arduino compatible do-dad and thingamabob. Most people happily publish their code as well which I find very helpful as I have zero programming knowledge. Just open up their code and read through it, get an idea of how they are operating. Cut and paste their code into yours and tinker until it works!

    A few others have mentioned the ESP8266. I think of it as an Arduino on steroids with built in WiFi! There's much more to it than that but that's how I use it. Once you've mucked around with Ardunio for a while, you should definitely get one of these chips and check them out.

    A really practical idea: Get some compartment storage boxes, like 5 of em and put all the bits in them!

    Lastly, I found I would make something, go "cool!" and walk away. It's really important to finish a project off. Get an enclosure, battery etc and mount it properly so you can walk away knowing it's finished! That will help push you towards new projects and certainly helps getting spending approval from the boss for all the gear you'll need for that reverse geocaching box ;)

    Oh, so project ideas, limited to what I've actually done!:

    1. Fish tank sensors! You'll like this Agg... water temperature, water level, lighting control - stick a light sensor outside and have the tank's LEDs turn on slowly at the same rate the sun is coming up... simulate lightning in the tank to entertain you friends and terrify the fish. Use RGB LEDs to get just the right amount of blue light in for your plants or just to show up those fish colours. With a few garden irrigation parts you could set up a 1 button press water change. You could control dosing for a planted aquarium. So much stuff!
    2. A weather station. OK it was just a temperature/humidity sensor but it uploaded the data to an online site which was a handy thing to learn for...
    3. Axillary temperature monitor. Otherwise known as "waterproof temp sensor under my arm" monitor. I had this monitoring my body temperature while cycling and uploading the data via my mobile's wireless hotspot. For no apparent reason, it just seemed cool at the time.
    4. And finally, my water tank sensor. Ultrasonic sensor measures the distance from the top of the tank to the water surface and sends it via a radio link to an Arduino on my desk. At the moment it just plugs into a serial monitor and tells me how many litres are left but later I'll wire in a nice LED bar to visualise it. I might even put another one on my second tank and add a solenoid valve so I can control the flow between them.

    Boooo! What he needs is an combined ultrasonic and laser rangefinder wired back to an ESP8266 that can use its WiFi to send him an email when the car gets to the right distance while also being patched into the car's ignition system, killing the engine at just the right moment or activating any "auto braking" features the car may have, closing the garage door, turning the driveway light off and alerting the wife via SMS that he's arrived so she can have dinner on the table when he walks in the door.
     
    Last edited: Jan 11, 2017
  13. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    4,466
    Location:
    4109
    thanks for the tip on the ultrasonics, i never knew that.
    I'll combine once of each type for reliability

    its not my first time with arduino, i have a 90% completed "chook shed door opener" thats basically a RTC with a H bridge driver into a small 12VDC motor with a massive gear reduction.
    currently, not completed as i wanted to have it doing web lookups for sunrise and sunset, but lost time/energy at this point and never got back onto it ....
    soon/oneday
    edit - wanted to make it run off a small SLA battery and PV solar panel too...
    if i actually ever complete it, i'll put a post up around here for giggles and so you clever peeps can pick on my bad coding :)

    the old fella is, well, very old. stuff on the floor is a trip hazard, and he has a wine bottle cork on fishing line setup as the current pass/fail spot test.
    I wanted to make a flash version of it, just because i can, and he and mum would think i'm even cleverer than i am ;)


    me too :)
     
    Last edited: Jan 12, 2017
  14. Amran

    Amran Member

    Joined:
    Jul 4, 2001
    Messages:
    1,530
    Location:
    Wagga
    Bit more info on the laser sensors as they are newish.

    This is on my to-do list as well! I was thinking a light dependent resistor would be easiest, just open the door when sunrise hits a (quite low) threshold. Or just use a large time window with your RTC, like open at 5am, close at 9pm.

    I found this Youtube video and several others like it helpful with extending battery life.
     
    Last edited: Jan 12, 2017
  15. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    4,466
    Location:
    4109
    thanks for the links :thumbup:
    those ToF sensors are sweet, definately getting the "big sister". I'll source the supply from the garage door opener, that way it'll be powered only as required

    wrt the LDR as a trigger, what about cloudy days or clear nights on a full moon ?
    my chook is up right on dawn and is into roost +/- 3 minutes of published sunset time.
    i was thinking if i dont have any joy with times from web gets, I'll just run a large operating window around the times based on a fortnightly or monthly schedule that i setup manually
    should be trivial to pull in two or three years of times and make a small look up table
    the other thought i had was clock drift, but maybe a network time lookup would be easy from a low power wifi dongle ?
    anyway, its stalled right now, just not enough hours in a day
    edit - one other method I'd briefly thought of was a load cell on the perch ??
     
    Last edited: Jan 12, 2017
  16. Amran

    Amran Member

    Joined:
    Jul 4, 2001
    Messages:
    1,530
    Location:
    Wagga
    I think the ambient light on a cloudy day would still be way higher than even a full moon night, but that's just a guess. Probably best just to set times, it doesn't matter if the chook can't get out the moment she wakes up. I often don't let mine out until the afternoon and they just wander back in the evening and I shut the door at around 8pm. I wouldn't worry about your RTC drifting, as far as i know they are crazy accurate, that's kind of what they are for!
     
  17. BlueRaven

    BlueRaven Member

    Joined:
    Jul 29, 2010
    Messages:
    3,906
    Location:
    Back in Sydney
    Great info in here guys, thanks very much.
    Subbing as motivation to press forward with learning Arduino. :thumbup:
     
  18. Lasmi

    Lasmi Member

    Joined:
    Jan 24, 2006
    Messages:
    4,716
    Location:
    Local
    This site with home automation projects might interest some people.

    http://www.bruhautomation.com/

    I've got a Arduino project kit, nodemcu and some other parts on order and am planning on playing with home automation such as closing windows. I've already got Home Assistant running on an RPI controlling a few Yeelights using a Xiaomi Mi Home kit but there's so much more it can do.
     
  19. davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,816
    Save yourself ALOT of hassle and go check out www.mysensors.org.

    They provide a complete ecosystem for Arduino + radio = remote sensor/actuator network.



    I have spent the last 10+ years playing with Arduino's and the ecosystem the guys have created at mysensors is just fantastic. They just work and are very cheap :)

    Some of the things they have sketches and detailed instructions for are:

    Sensors & Actuators
    Air Humidity
    Atmospheric Pressure
    Bed Occupancy
    Dimmer - LED
    Display and Time
    Distance
    Door/Window/Button
    Dust
    Gas Detection
    Gesture Controller
    GPS Sensor
    Heatpump Control
    IR Sender/Receiver
    Irrigation Controller
    Light Level - BH1750
    Light Level - LM393
    Motion
    Orientation Actuator
    Orientation Sensor
    Parking Sensor
    Pulse Power Meter
    Pulse Water Meter
    Rain Gauge
    Relay Actuator
    RFID
    Scene Controller
    Secret Knock
    Servo
    Smart Alarm Clock
    Soil Moisture
    Starry Sky
    Temperature
    UV
    Whole House Fan

     
  20. azzachaz

    azzachaz Member

    Joined:
    Nov 5, 2003
    Messages:
    1,463
    Location:
    Canberra
    So I made a massive Aliexpress order last night.

    Based on Vipers 'shopping list' and some other stuff it came to over $200 in tiny orders :)
    Went to pay for them all at once but the payment failed, leaving all the individual order in 'awaiting payment'.
    I had to pay each order individually, triggering a fraud inquiry call from the bank :pirate: for suspicious activity.

    Cant wait. I've also ordered a variable bench power supply from ebay. It designed for mobile phone repair but should be perfect for arduino development.

    http://www.ebay.com.au/itm/152172858973?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT

    I was going to build my own as a project but for $40 I thought it was worth a try.
     

Share This Page