Looks like a fun project.
The wiring would be a bitch (too much and introduce loads of issues that you could not code around). Switching winding current over that sort of wire length would radiate a whole bunch of RFI and give you weired switching waveforms.
My best advice would be to drop the arduino's out, and replace them with 1 ESP8266 module per mirror and mount everything on the back of the mirrors. LEavign only DC power to run around your array.
This also makes the project a bit more scalable in that you could
start out doing one (wifi over the air code downloads) and expand
your array as you wanted one at a time. Until you either run out
of funds or garden.
Where you feel the need to run cables then it is power only. The
control can be done over wifi to the ESP's. Personally I would
ditch running power and use a solar panel on each mirror assembly.
But there could be advantages to running DC power, the cabling
wills till be tedious but not as much so and at least electrically
you have removed the issues mentioned above.
Tracking is an interesting thing, I notice from your kit list. There is no light sensors (LDR or digital module type) leaving me to assume you will be doing the tracking via idealized math. Do-able but not as good as having ldr based sensing on the mirror assemblies. Or better still a single separate pickup on an esp to pick up the current brightest point to pickup on next.
Something to consider is that on nights with good moonlight you
might get enough light to get some (although much less than solar)
out of your setup. But if there is no moon ie cloudy nights you
would be better placed to save the power and not bother tracking
that which is not there. There might be a similar argument
applying to diffuse solar radiation (cloudy days) but you will
only get real figures for this by doing.
Ok power consumption. This can be kept down if you implement power reducing sleeps between bursts of acquisition and re alignments. Also your mechanical design can help you with power consumption. Provided you use a lead screw or sufficiently geared down based set of actuators then even if you drop power to the steppers the mirror assembly will maintain position through the mechanical stiffness and friction. If you were driving the steppers directly you might implement a braked mode that shorts all the windings enhancing the effect and taking no power to do it. SOme drivers have a pin that enables this. Dunno bout the ones you have chosen. This is not available though on micro-stepped modes though only really on complete full, half, and quarter step increments. This is not really any hardship if you have geared down the stepper output as by doing so you increase the resolution to the point where you don't actually need micro-step modes. Two important considerations then, where you can reduce your power needs to the absolute minimum then you introduce the option for local solar and battery on each mirror assembly. However to do all the development work you might want to run a power lead out to get you started then add battery etc later when you know how much you are looking at needing. Once the code and power saving is optimized.
Which ever way you choose to go (Do-ocracy rules apply) have fun and share with us how you get on.
Cheers
Kirbs
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
-- an...@kirbyand.co.uk www.kirbyand.co.uk
My best advice would be to drop the arduino's out, and replace them with 1 ESP8266 module per mirror and mount everything on the back of the mirrors. LEavign only DC power to run around your array.
Where you feel the need to run cables then it is power only. The control can be done over wifi to the ESP's. Personally I would ditch running power and use a solar panel on each mirror assembly. But there could be advantages to running DC power, the cabling wills till be tedious but not as much so and at least electrically you have removed the issues mentioned above.
Tracking is an interesting thing, I notice from your kit list. There is no light sensors (LDR or digital module type) leaving me to assume you will be doing the tracking via idealized math. Do-able but not as good as having ldr based sensing on the mirror assemblies. Or better still a single separate pickup on an esp to pick up the current brightest point to pickup on next.
Something to consider is that on nights with good moonlight you might get enough light to get some (although much less than solar) out of your setup. But if there is no moon ie cloudy nights you would be better placed to save the power and not bother tracking that which is not there. There might be a similar argument applying to diffuse solar radiation (cloudy days) but you will only get real figures for this by doing.
Also your mechanical design can help you with power consumption. Provided you use a lead screw or sufficiently geared down based set of actuators then even if you drop power to the steppers the mirror assembly will maintain position through the mechanical stiffness and friction. If you were driving the steppers directly you might implement a braked mode that shorts all the windings enhancing the effect and taking no power to do it. SOme drivers have a pin that enables this. Dunno bout the ones you have chosen.
Hi again
Lack of pictures aside (can anyone else see them?).
Andy's suggestion of solar/battery power leads to an elegant, modular system IMHO. Working the power budget is key.
I don't know how often these things need to move but I am guessing maybe every 60s would be tops.
The current draw of a ESP8266 is maybe 70mA average so you would need to send them to deep sleep between moves. This reduces I down to a few uA but watch out for the quiescent of the 3V3 regulator - this can easily be 10mA so choose with care and avoid LM1117 - unfortunately this reg is preset on any number of modules including NodeMCU (and I think WeMOS).
OTA is very useful especially during initial pointing phase, it can be a pain to mix with deep-sleep but is do-able, either by a "push to program" button - which seems to rather miss the point - or just by careful timing when sending the OTA.
MQTT also provides a useful method to control/tweek the devices provided that you have an MQTT server handy - Raspberry Pi zero W anyone? and get the QOS right, and of course Wi-Fi.
I assume you will no longer need the RTC just use ntp?
regards
Graham
I don't know how often these things need to move but I am guessing maybe every 60s would be tops.
The current draw of a ESP8266 is maybe 70mA average so you would need to send them to deep sleep between moves. This reduces I down to a few uA but watch out for the quiescent of the 3V3 regulator - this can easily be 10mA so choose with care and avoid LM1117 - unfortunately this reg is preset on any number of modules including NodeMCU (and I think WeMOS).
MQTT also provides a useful method to control/tweek the devices provided that you have an MQTT server handy - Raspberry Pi zero W anyone? and get the QOS right, and of course Wi-Fi.
I assume you will no longer need the RTC just use ntp?
Looking good.
All of what graham said.
On piccys I can see them when I click on them, they open in a browser window. But I have HTML etc disabled in my email and use txt only. So not really surprising to me that this happens. HTML disabled is by choice.
You would be wise to put debounce on your limit switches.
http://www.sheffieldhardwarehackers.org.uk/wordpress/2016/04/hacking-de-bounce-and-rotary-encoders/
The same principles apply. My usual method with microswitches is connect vcc to say NO, Gnd to NC, a resistor between NO and COMMON and then a capacitor between COMMON and NC, then take the switch signal from common.
VCC in your case is 3v or so.
Yes it is 3 wires per microswitch but it gives reliable and reasonably clean results. The switched signal is never floating especially as the contacts are in transition.
As an addendum to what graham said you need to watch the current draw on ESP units. it can easily get up to around 200ma in brief bursts when the unit is actually transmitting packets. Having a supply that can't cope with these sort of peaks will leave you with random brownouts, crashes and disrupted comms that is difficult to trace.
Whilst I appreciate you are trying to keep the costs down I love using those little smpsu units we get from alli express for these sort of projects they are pence and can source up to 3A. I use them with a 2200uF electrolytic cap across the supply and they work well. You might want to try with your linears and a similar cap first and it it proves unstable upgrade to one of the switchers.
Really bizarely all the aliexpress listings sell the better priced ones without using the actual chip name, you need to search for "Replace LM2596". Go figure.
They work out cheaper still if you shop around on aliexpress for lots of 5 or 10 at a time with free postage.
Given that you set the voltage to what you want I use these for just about everything even powering raspberry Pi's as they are very efficient (switch at 1Mhz, or so), I usually disable or get rid of the linear regs when building battery powered stuff or things I that I want to run cool, as linear regs they can be quite wasteful. 1 Mhz switch noise is also relatively easy to filter if your circuits are a bit noise sensitive.
Kirbs
I can't offer much help with the Wemos D1 minis as I have not used them.
I think Graham, Rich L and maybe OJ have though, they are nice little breakout boards for the esp modules form what I saw of the one someone was using in the space.
For esp's I usually use ESP07's with the cheap little plain break out PCB's (to get them to 0.1" pinout) and get the newer versions which have more flash on board. The 07's usually have a u.FL connector on board for an external antenna, for which you will need a pigtail and either make your own aerial or buy one.
I like external aerials, and tend to dislike on board one's ,
although I do put up with the onboard ones sometimes for
convenience.
Kirbs
Just to include the power requirements of the EasyDriver boards: 50mA in normal use (per board), 9mA in 'disabled' mode (chip active, but power cut to motor), and 20uA in 'sleep' mode (chip sleeping). I'm not sure if the +3.3V output from the EasyDriver board that I want to use to drive the Wemos D1 mini is also cut in disabled/sleep mode. I'm hoping not!
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
Hi again
Lack of pictures aside (can anyone else see them?).
Andy's suggestion of solar/battery power leads to an elegant, modular system IMHO. Working the power budget is key.
I don't know how often these things need to move but I am guessing maybe every 60s would be tops.
The current draw of a ESP8266 is maybe 70mA average so you would need to send them to deep sleep between moves. This reduces I down to a few uA but watch out for the quiescent of the 3V3 regulator - this can easily be 10mA so choose with care and avoid LM1117 - unfortunately this reg is preset on any number of modules including NodeMCU (and I think WeMOS).
OTA is very useful especially during initial pointing phase, it can be a pain to mix with deep-sleep but is do-able, either by a "push to program" button - which seems to rather miss the point - or just by careful timing when sending the OTA.
MQTT also provides a useful method to control/tweek the devices provided that you have an MQTT server handy - Raspberry Pi zero W anyone? and get the QOS right, and of course Wi-Fi.
I assume you will no longer need the RTC just use ntp?
regards
Graham
From: Nick Smith <ni...@climbers.net>
Sent: 14 March 2017 10:38
To: Graham Driver
Subject: Re: [SHH:5993] Sun-tracking mirrors controlled by Arduino?
On 14/03/2017 10:12, Graham Driver wrote:
> I see no pictures....
It works for me - possibly your email software doesn't like PNG format
images? Trying looking at it in any web browser instead?
https://lh3.googleusercontent.com/-odKTVppm9HM/WMbTOv3ofuI/AAAAAAAAAhw/tEmzdIFB0sAqcjSSM5cjTWGxLnCP6wg9ACLcB/s1600/circuit-esp8266.png
Cheers
>
>
> ------------------------------------------------------------------------
> *From:* 'Nick Smith' via Sheffield Hackspace
> *Sent:* 13 March 2017 17:17
> *To:* Sheffield Hackspace
> *Cc:* an...@kirbyand.co.uk
> *Subject:* Re: [SHH:5993] Sun-tracking mirrors controlled by Arduino?
>
> <https://lh3.googleusercontent.com/-odKTVppm9HM/WMbTOv3ofuI/AAAAAAAAAhw/tEmzdIFB0sAqcjSSM5cjTWGxLnCP6wg9ACLcB/s1600/circuit-esp8266.png>
>
>
> Revised design, with 5x Wemos D1 minis, one on each mirror with very
> short cable runs, controlled over WiFi, instead of the Arduino. It looks
> like the EasyDriver board can be set to use 3.3V for all its logic, as
> well as supply 3.3V/50mA to power the Wemos board, so I'd only need a
> 12V supply?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Sheffield Hackspace" group.
> To unsubscribe from this group and stop receiving emails from it, send
> To post to this group, send email to
> Visit this group at
> https://groups.google.com/group/sheffield-hardware-hackers.
> For more options, visit https://groups.google.com/d/optout.
--
Nick Smith, Climbers.net UK
Climbing websites & Photography http://climbers.net/
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-hackers+unsub...@googlegroups.com.
To post to this group, send email to sheffield-hardware-hackers@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
Hi
I use some modules callled ESP8266-201 though I have seen that designation on things which look like 12E
Minor (well major) problem was that on 2 out of 4 boards the ULF connector was put in 180deg rotated and so shorted the input. Guess which two modules I was trying to use. Removing and refitting proved impossible so these boards now have pigtails soldered directly.
Passwords are mentioned in my file, but be aware that if you set one you will not be able to upload to SPIFFS OTA, though that might have been cured by now.
Several replies went to OP only, so some things I say now might seem a bit stage-left.
Graham
You would be wise to put debounce on your limit switches.
http://www.sheffieldhardwarehackers.org.uk/wordpress/2016/04/hacking-de-bounce-and-rotary-encoders/
The same principles apply. My usual method with microswitches is connect vcc to say NO, Gnd to NC, a resistor between NO and COMMON and then a capacitor between COMMON and NC, then take the switch signal from common.
VCC in your case is 3v or so.
Yes it is 3 wires per microswitch but it gives reliable and reasonably clean results. The switched signal is never floating especially as the contacts are in transition.
As an addendum to what graham said you need to watch the current draw on ESP units. it can easily get up to around 200ma in brief bursts when the unit is actually transmitting packets. Having a supply that can't cope with these sort of peaks will leave you with random brownouts, crashes and disrupted comms that is difficult to trace.
Whilst I appreciate you are trying to keep the costs down I love using those little smpsu units we get from alli express for these sort of projects they are pence and can source up to 3A. I use them with a 2200uF electrolytic cap across the supply and they work well. You might want to try with your linears and a similar cap first and it it proves unstable upgrade to one of the switchers.
Really bizarely all the aliexpress listings sell the better priced ones without using the actual chip name, you need to search for "Replace LM2596". Go figure.
They work out cheaper still if you shop around on aliexpress for lots of 5 or 10 at a time with free postage.
Given that you set the voltage to what you want I use these for just about everything even powering raspberry Pi's as they are very efficient (switch at 1Mhz, or so), I usually disable or get rid of the linear regs when building battery powered stuff or things I that I want to run cool, as linear regs they can be quite wasteful. 1 Mhz switch noise is also relatively easy to filter if your circuits are a bit noise sensitive.
Yeah they are the same ones. At least they are called what they
are, on ebay, lol.
MP1584, cheap plentiful and work.
Heres a link to the data sheet.
Shutdown supply current 20uA
Quiescent current with no load 125 uA
Pretty awesome for what they are and cost.
Kirbs
PS switch bounce, chatter and floating switch lines was a big problem for the early 3D printer builds that were mostly attempted by software folk. They could not figure out why prints would fail and it looked like the carriage had hit an end stop although it was no where near. A cap and a resistor was all it took to sort it and no software debounce was needed. The folk that couldn't quite get their heads around it opted to disable the limit switch inputs when not actually homing, but could still get variability on the homed positions. best way to see it is to either write a sketch that counts switch transitions or hook up an oscilloscope and capture the bounce like I did in the article.
Software de-bounce is usually done by detecting the first
transition, then coming back after a pause that is longer than the
bounce typically occurs for and seeing what state the line has
settled to. You will find it very wasteful of processor cycles and
hard to use pin change interrupts with switches that bounce (and
they all do as graham observed, unless you do some thing to stop
it)
I have used these switchers extensively with ESP8266, either down to 5V or straight down to 3V3, in either case with the 1000/2200uF cap.
Switch bounce is mysterious but real. Can be fully cured by proper hardware, or ameliorated by kiddy-hardware (an R and a C), and then sorted in software.
Basically you assume that a switch is either mkade or not, and moves smoothly between the two. In reality there is a period, and it might several milli-seconds long where you really don't know what it is going to be.
I guess Andy's article makes it sound like it's an encoder problem but it is all switches.....
Graham
From: 'Nick Smith' via Sheffield Hackspace <sheffield-har...@googlegroups.com>
Sent: 14 March 2017 18:14
To: Sheffield Hackspace
Cc: nickco...@googlemail.com; an...@kirbyand.co.uk
Subject: Re: [SHH:6006] Sun-tracking mirrors controlled by Arduino?
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
Sounds like a good idea.
I could probably do a shortish presentation. On securing tech, if
only to get the initial concepts across, it all starts with the
way we look at the situation and think about it. Followed by how
we treat it and zone it. Thereafter a lot of solutions suggest
themselves, form following function and all that. If we don't
think about it in the right way our evaluation and resultant
measures will be flawed from the outset.
--- snip here, don't read if not interested, brief overview
follows ---
Maximum security can always be achieved by air-gapping (disconnecting) everything. But we like to be able to do tech that gives us something back, which means interconnection.
Similarly we want access to all our stuff wherever we are, but don't want anyone else to have access to it.
The end product we need then is a compromise of connectedness and access control. What we control access to and how we do it depends on where it is, and this is dependent on what zone we allocate it to.
Zoning classically divides into 3, Trusted, Untrusted and DMZ (De-militarised zone). In reality there are more zones than this making up our lives but we can use the 3 as the basis for running a comparison between adjoining zones where the number is more than 3.
In a nominal home/hackspace automation or NoT set up then, the NoT should be a Trusted Zone, the home/space network/lan should be a DMZ and the internet is an Untrusted Zone. To get directly at the NoT from the INTERNET you have to be good enough or lucky enough to get through two levels of security. To use the NoT in your home/hackspace you have only one level of security (what ever it is) to work with. The level of security then is a function of where you are trying to get to/from across the zones.
Similarly if you want to run intrusion detection, you will see
repeated attempts to get from the internet to your home/hackspace
zone and you should never see any attempts to get from your
home/hackspace or DMZ to your NoT or trusted zone. Where you do,
it is immediately obvious there is something to be attended to.
Intrusion detection can be as simple as pass-wording your services and logging failed attempts to connect. Resulting in both a notification to yourself and or banning the offending IP for 20mins or so. You could also police or occasionally inspect your DMZ for unexpected network activity using a packet sniffer like wireshark.
Not wishing to get off topic, a wifi network controlling heliostats, measuring the environment and doing home automation etc is or should be, your Trusted NoT.
All the above sounds great, but we need to temper this with some
realism. Absolute security leaves us with something potentially
unusable and is hard work. No security......, well no surprises
here eh... or there shouldn't be. There is a compromise to be made
and this is a personal value decision.
Who are we securing our selves against?
If it is nation states and their alphabet agencies, there is no
point, their access to law, resources and motivation is something
that we can not do anything about. They can always use meat space,
gain legal forced entry, and will, if all else fails. We may as
well lube ourselves up in preparation and hope they use a condom.
We all hope that the laws of the country we reside in, whilst far
from perfect, give us some protection from this situation being
abused.
Random vandalism, criminal intent and info hoarders though, should be what we spend some time defending against. This is something we can afford to tackle both in terms of cost and time.
Overall then being mindful of what we are securing ourselves
against, establishing zones and controlling transfer between the
zones should be how we look at it. Not transferring stuff between
zones that we don't really need to, has to be an obvious first
step. Sharing is useful and good, over-sharing is damn stupid.
We wouldn't stand in the main concourse of Meadowhell handing out
brochures of what we posses so crims can nick it, we wouldn't hand
out gratis copies of our house keys with the address attached, nor
would we leave the house without locking it. We would not hand out
a printed calendar of our where/when abouts so crims knew when we
were in or out so they could target their activities to suit.
Lastly we would not hand out handy lists of clues as to what our
most likely password choices were going to be.
So why do we think it is OK to do this on the INTERNET, "in the cloud", on social media, to anyone who asks via email ?? Is it any less public than the main concourse at Meadowhell?? Similarly why are we then surprised at the results. Intangibility does not make it any less real and the resultant risk/exposure via over-share any less damaging.
Personaly if I was inclined towards public over-share, I would do it in the main concourse of Meadowhell, in preference to doing it on the INTERNET. At least there would not be a permanent record of it, and I would have reached less of the worlds crims with each session.
Kirbs
Any of the usb serial converter boards that allow you to jumper them to 3v3 should do.
5V will kill ESP's dead, in very short order non of their pins
are 5V tolerant. Oddly enough mine seem to have survived reverse
polarity a number of times but have never survived over voltage.
On the ESP units, something you need ot be aware of is that you need twice the flash fro your application when you use OTA. OTA downloads the next copy inot the other half then points the boat-loader at it. When you OTA again it over writes the first one then re points the boot-loader at it. This is how it does OTA. SOrt of sensible really.
If you have configured spiffs this is shared between the two run time images so there is only one of these.
So your flash needs to be sized to allow for 1* spiffs and 2 * runtime code.
As you are developing and don;t know yet if you are buying ahead get the most flash that fits your budget. Beware buying units with too little flash, better to have too much than too little.
As to which module pick one with enough io pins broken out and an aerial configuration that suits your application.
If you want lots of flash and to use an external antenna with no on board antenna (metal enclosure, longer range required for wifi) an 07S is the best bet.
Looks like this but is usually cheaper of aliexpress, may need to
shop around, sometimes job lots (10 off including free postage
etc) can be cheaper.
http://www.electrodragon.com/product/esp-07s-esp8266-serial-wifi-module/
But if you want an onboard antenna then something like the ESP12-S is OK
http://www.electrodragon.com/product/esp-12s-wifi-module-esp8266/
The ESP8266 modules are all exactly the same chip the only difference between the types is how much external spi flash they have, how many gpio pins have been broken out and what the antenna options are. These are usually set by your project.
If you are buying a job lot in to get a good deal and have them around for later projects go for most spi flash and pins, with an antenna config that is flexible enough for the most likely range of your needs.
I usualy do this and use an external usb/serial converter, simply
because I am too tight to leave one connected all the time when it
is not needed. lol.
Hope this helps
Cheers Kirbs
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
Yeah that is an occupational hazard for hackers. I think we all have a collection of these, including the space itself.
Kirbs
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.
If you are in a tearing great hurry, checkout pimoroni's serial adapter cable for the raspberry pi console.
It is definitely 3v3, I don't think the Pi's pins are very 5v tolerant.
Failing that check out ebay for UK dispatched usb serial converters.
FTDI whether real or clone are pretty much mostly 3V3 these days.
These sorts of boards that can be jumpered and breakout all the ftdi pins are useful, They can often be re-purposed for jtag dependingon the implementation.
Kirbs
Thanks, I've gone for the ESP-12F board with onboard antenna and 4MB flash. £1.46/ea inc. shipping! Oddly buying 5 individually was cheaper than a single lot of 5pcs.
Have you got a link to a specific usb serial converter board that can do 3v3? The cheap Chinese boards never seem to have any documentation, and I don't want to wait a month only for the wrong thing to arrive... Apparently quite a few of the boards can do 3v3 on the Vout, but still use 5v on the data pins? :(
Cheers
--
You received this message because you are subscribed to the Google Groups "Sheffield Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sheffield-hardware-...@googlegroups.com.
To post to this group, send email to sheffield-har...@googlegroups.com.
Visit this group at https://groups.google.com/group/sheffield-hardware-hackers.
For more options, visit https://groups.google.com/d/optout.