Which controller should I choose for this application?
I'm new to the forum but joined to tap into the wealth of knowledge that I know must be here!
I have a past knowledge of working with logic chips soldered to home built circuit boards, but have never worked with microcontrollers.
I want to build a device that has the following basic requirements:
Take two measurements (from two separate Ping ((( Ultrasonic sensors) that plug into the same microcontroller.
Add the measurements together.
Store the result.
Take another two measurements.
Store the result.
Compare the two results and light a different LED depending on the result.
I can see a requirement for at least 4 status LEDs
I can see a requirement for at least 2 buttons.
All in a small package.
Is there a distinct advantage to any of the microcontrollers - Propeller, micro:bit, BASIC Stamp? The Propeller Mini size and format looks good for a compact installation, but I am not familiar with any of these devices.
Would love to hear some advice on this! And please point me to any circuits/articles/posts that may be relevant to my search.
The Propeller FLiP module will give you the most bang for the buck.
+1 to Phil’s excellent advice. The Flip would be perfect for this and you’d only be using a single cog of the 8. (So if you get bored with blinky leds you could go to the next level, add a serial text display, logging capabilities, laptop upload, etc. hehehe).
BTW: if you are new to the world of embedded programming, check out ERSmith’s Flex compiler suite. It supports the ABCS: Assembly, BASIC, C, and Spin. It compiles everything down to PASM. Really nice. And really free.
One more vote for the FLIP.
The packaging is excellent and the power options make it easy to power with various battery options using its USB/5vdc/ or the 5-9 input.
Coding is very easy and sensor library object are extensive in Blockly.
If you are building one to ten units then it may also be cost effective.
How many might you be building?
The Propeller Mini would also work fine for your application if you want a smaller form factor. You'll need a separate Propeller Plug which increases the cost. The FLiP has it built-in.
The Basic Stamp could be used for the application you've described. It's "old" tech now. Given the current programming tools available, I'd just start with the Propeller 1. You don't have to use the fancy features like multiple cogs
What exactly is 'a small package' ?
Is this a one-off, or a volume production design ?
This is for a prototype. I can see a possibility of building the first with the FLiP module, then miniaturizing it using the mini once I have proved proof of concept and optimized it.
After that. I would be looking to find an organization to build in quantity (but to be honest that might be a pipe dream )
Thank you all for your suggestions. Interesting that you all headed towards the FLiP.
One potential problem I have though - availability in Canada. There are distributors, but I have yet to find one that carries the full range of products.
In contrast, the Arduino is readily available - but typically physically larger which might be a problem. The finished box must easily slip into a pocket.
It's not clear from your description ... If you're using two PINGs, you have to allow enough time for the ultrasound pulse to die down in the environment before you issue another pulse from the same or other PING. If not, the 2nd PING might hear an echo from the 1st PING and falsely trigger on it.
I don't think this will be a problem - there's no hurry ...
What is showing up as a problem is the power requirements. I read the specs for the Mini three times to make sure I was understanding correctly - it requires 6.5v regulated to provide 5v output to drive the sonic sensors (or 5V usb). This is a portable device, and needs to be rechargeable, so I'm not sure how to handle that requirement.
The FLiP module cost is much higher, and also only has 5v output when plugged into usb power.
So far the only solution I have come up with is to use the LaserPING instead of the sonic, which rules out using the cheaper HC-SR04.
Is there a rechargeable battery pack that can act as a 5v usb power source?
As I work through this I find the devil is in all the details....
There are all sorts of rechargeable battery packs that have a USB socket output and provide 5V for charging / operating a USB powered device. I have one of these in front of me made by some Chinese company under the brand JW. The output is via a standard USB socket ... 5V at 2.1A max. Charging input is via a micro-USB socket at 5V and max 2A. Capacity 4AH.
Most of these external USB battery packs are regulated to produce 5V, so you may be able to bypass the 5V regulator on the Prop Mini. You can always put a 5V Zener and fuse in the USB power input to protect your device from excess voltage.
When checking power needs, you should drill down to the data sheet on the regulators used.
The SCH shows LM2940, and that data shows low dropout, of 100mV at 100mA, so 5V in will give 4.9V out at 100mA.
The bad news is data also shows IQ of 10mA typical, (which is high in 2021 terms), and there are 2 regulators, so a sleeping Prop is going to be dominated by ~ 20mA regulator current.
How long does your battery need to last ?
I assume you mean one of these?
I will follow up to see if there are smaller ones available.
Absolute minimum 24 hours, but much of that will be in "standby" mode,
A week would be ideal.
I've just discovered a whole bunch of useful Adafruit components which are easily available in Canada. Working my way through the list but they include Liion battery charges and power boosters. Think I can get there.
Like I said - I'm new to this environment so it may take me a while to find my way around
Look also at small. step-up regulator modules such as those offered by Pololu:
A single LiPoly cell or a pair of alkaline batteries could provide 5V to the Pings. If standby operation is important, there are modules with an on-off pin that the Propeller could control, so that the 5V power is on only when needed. The 5V power bricks can be tricky to operate in standby unless there is someone to press a button to start the operation.
I agree with others that the Flip is the best bet for a prototype, proof of concept. For the Prop mini though, I'd swap the old LM2940 and LM2937 regulators for something like the MCP1703AT-5002 and MCP1703AT-3302. That would reduce the standby current drain down to the 10s of microamp level. Note that the Prop mini is end-of-life, limited to the stock on hand, largely because the Prop in the QFN package has itself been discontinued.
If you're trying to miniaturize this enough to make it pocketable, then sure, start with the FLiP, but your final design will probably want to use a raw P8X32A-Q44. Custom PCBs have gotten pretty easy to design/buy nowdays, so that's probably the best way to go.
Custom circuit boards are easy, but surface mount assembly not so much. There is a reason modules like the PropMini and FLIP are useful for those of us who need midrange miniaturization. We can let Parallax do the surface mount stuff and do the crude stuff thru-hole. It's rather disappointing to hear that the Mini is EOL as I used it in several projects. I guess it's fortunate that the most promising of those died for unrelated reasons on my end.
@Cluso99 has a tiny P1 work of art
My P1 is called the P8XBlade2 and I build to order. Shipping is from Australia which now adds USD $20-25 depending on country
Link in my signature below
342 in stock.
Don't know how I missed this until now, but I disagree. I've soldered plenty of SMT stuff and, while the QFP is solderable easily enough with a soldering iron, you can also do it with either a hot-air pencil or an electric skillet.
At this point I would recommend most electronics hobbyists should have a hot air pencil. They're getting plenty cheap.
@Circuitsoft I'm guessing you don't have 57 year old eyes. Nowadays I can barely see a lot of SMT components, which is the difficulty I have soldering them. Yes I know SMT construction is do-able with the right tools and I might be willing to work with a head mounted magnifier and bull it through for a one-off project, but if I have to assemble 20 boards for inventory at work I'd much rather have my part of it be through-hole and let someone else deal with the teeny stuff.
Not only my eyes are not what they used to be, my hands are not as steady either. This makes placement of tiny parts and fine pitch ICs difficult. This is what another 12 years will bring
I am attempting to build a jig to help position the parts although a PNP machine would be better. I’m keeping an eye on the developments here!
I thought SMT would be too difficult but I tried it with an ESP-07 module, a MCS23017 port expander, a transistor, some voltage regulators, and some 0805 resistors and capacitors and it wasn't too bad. I'm not sure I could do smaller parts though. I really wanted to use the P1 QFP instead of the port expander but I ran out of time to write the Propeller software. I'm planning on buying some P1 QFP chips once they become available to see if I can handle those.
While I have 35 year-old eyes, I taught my 68yo dad to solder smt stuff, and he found it surprisingly easy. It helps that molten solder has a lot of surface tension, so most parts will self-align once the solder melts. He even managed a usb-c port.
I thought that too but tried out one of these
Strewth the size of that link is a bit scary!!!!
anyway its a link to a cheap surface mount practice board with a selection of IC's and r's and c's and a working toy as a result!
bit of fun without risking anything.
My first exposure to SMT was pretty ugly because I thought my existing equipment would “be okay for awhile”. Nope. Between old eyes, old hands, and old equipment, I set myself up for disaster. IMHO, you need a hot air pencil, video microscope, and a mini hotplate to play this game. Add a toaster oven for reflow if you plan on doing whole boards. And you need practice. Lots of practice.
Amazon has an SMT-based blinky light kit for about $8. The instructions are absolutely awful, so major rework will be required just to get it working the first time… which is the entire point. Once you get it working, take it apart and do it again. Lather, rinse, repeat.
Story: I went through a medical rough patch 3 years ago. The treatment resulted in many weeks of a dense mental fog. I couldnt read a paper or write code, but I found I could do simple, repetitive tasks that develop muscle memory. So I built, disassembled, and rebuilt those same two boards endlessly. That training stuck. When my brain came back, I found I had a new skill. Wonderful end to a bad time. Next time, I’ll work on my BGA skills if I can find a “trainer” board.
The vast bulk of that link is tracking data to follow you around. It works correctly with just the first numerals - https://www.ebay.co.uk/itm/393329753037
I don't pretend to understand anything internet. Which party attached that data to the original link- ebay- the seller- or someone else?
edit- and how do I stop it happening in the future?
and is it tracking me now?
and and and.....
Don't know the details either. But "?" and "=" and "&" are typical giveaways of the link being more than a webpage address. Those symbols can be usefully for you but will be very much shorter and more readable in such a case.
As for what is it tracking - not unreasonable to assume the worst. After all, they've gone to the trouble of crafting and installing all this extra code to do the tracking. They'll be wanting to get the most back from it as well. Not just Ebay either. Many players in the background, both cooperating and competing, trying to maximise the revenue.
Which means, tracking as many people as possible, all at once. Which in turn means they themselves won't know how far the data is travelling. The term "wild-west" gets used to describe the web these days.